OSDN Git Service

[AArch64][GlobalISel] Remove duplicate attribute lookup code that was supposed to...
authorAmara Emerson <aemerson@apple.com>
Thu, 23 Jan 2020 22:46:15 +0000 (14:46 -0800)
committerAmara Emerson <aemerson@apple.com>
Thu, 23 Jan 2020 23:50:08 +0000 (15:50 -0800)
When I cached this a long time ago it seems I forgot to remove the locally
declared variable of the same name in select(), so the caching wasn't having
any compile time benefit. Doh.

llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp

index 30fdd55..a582df9 100644 (file)
@@ -1517,8 +1517,6 @@ bool AArch64InstructionSelector::select(MachineInstr &I) {
     // Speculation tracking/SLH assumes that optimized TB(N)Z/CB(N)Z
     // instructions will not be produced, as they are conditional branch
     // instructions that do not set flags.
-    bool ProduceNonFlagSettingCondBr =
-        !MF.getFunction().hasFnAttribute(Attribute::SpeculativeLoadHardening);
     if (ProduceNonFlagSettingCondBr && selectCompareBranch(I, MF, MRI))
       return true;