diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-12-08 01:22:39 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-12-08 01:22:39 +0000 |
commit | 14e024dff74e679bf251effe648fe6015f9815ea (patch) | |
tree | 195dd326ce9ef7b5cbf0bcd76bab15a47047adbf /llvm/lib | |
parent | f10a635eb40219f0413b86442f9c1fa46607c65b (diff) | |
download | bcm5719-llvm-14e024dff74e679bf251effe648fe6015f9815ea.tar.gz bcm5719-llvm-14e024dff74e679bf251effe648fe6015f9815ea.zip |
Drop the HasInlineAsm flag.
It is not used any more. We are tracking inline assembly misalignments
directly through the BBInfo.Unalign and KnownBits fields.
A simple conservative size estimate is not good enough since it can
cause alignment padding to be underestimated.
llvm-svn: 146124
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/ARM/ARMConstantIslandPass.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp b/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp index 844469eadd6..315bf214d7b 100644 --- a/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp +++ b/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp @@ -226,9 +226,6 @@ namespace { /// the branch fix up pass. bool HasFarJump; - /// HasInlineAsm - True if the function contains inline assembly. - bool HasInlineAsm; - const ARMInstrInfo *TII; const ARMSubtarget *STI; ARMFunctionInfo *AFI; @@ -338,7 +335,6 @@ bool ARMConstantIslands::runOnMachineFunction(MachineFunction &MF) { isThumb2 = AFI->isThumb2Function(); HasFarJump = false; - HasInlineAsm = false; // Renumber all of the machine basic blocks in the function, guaranteeing that // the numbers agree with the position of the block in the function. @@ -711,10 +707,8 @@ void ARMConstantIslands::ComputeBlockSize(MachineBasicBlock *MBB) { BBI.Size += TII->GetInstSizeInBytes(I); // For inline asm, GetInstSizeInBytes returns a conservative estimate. // The actual size may be smaller, but still a multiple of the instr size. - if (I->isInlineAsm()) { + if (I->isInlineAsm()) BBI.Unalign = isThumb ? 1 : 2; - HasInlineAsm = true; - } } // tBR_JTr contains a .align 2 directive. @@ -907,7 +901,7 @@ bool ARMConstantIslands::CPEIsInRange(MachineInstr *MI, unsigned UserOffset, MachineInstr *CPEMI, unsigned MaxDisp, bool NegOk, bool DoDump) { unsigned CPEOffset = GetOffsetOf(CPEMI); - assert((CPEOffset%4 == 0 || HasInlineAsm) && "Misaligned CPE"); + assert(CPEOffset % 4 == 0 && "Misaligned CPE"); if (DoDump) { DEBUG(errs() << "User of CPE#" << CPEMI->getOperand(0).getImm() |