mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146124 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ff4cbb4c9a
commit
e6f9e9d836
@ -226,9 +226,6 @@ namespace {
|
|||||||
/// the branch fix up pass.
|
/// the branch fix up pass.
|
||||||
bool HasFarJump;
|
bool HasFarJump;
|
||||||
|
|
||||||
/// HasInlineAsm - True if the function contains inline assembly.
|
|
||||||
bool HasInlineAsm;
|
|
||||||
|
|
||||||
const ARMInstrInfo *TII;
|
const ARMInstrInfo *TII;
|
||||||
const ARMSubtarget *STI;
|
const ARMSubtarget *STI;
|
||||||
ARMFunctionInfo *AFI;
|
ARMFunctionInfo *AFI;
|
||||||
@ -338,7 +335,6 @@ bool ARMConstantIslands::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
isThumb2 = AFI->isThumb2Function();
|
isThumb2 = AFI->isThumb2Function();
|
||||||
|
|
||||||
HasFarJump = false;
|
HasFarJump = false;
|
||||||
HasInlineAsm = false;
|
|
||||||
|
|
||||||
// Renumber all of the machine basic blocks in the function, guaranteeing that
|
// Renumber all of the machine basic blocks in the function, guaranteeing that
|
||||||
// the numbers agree with the position of the block in the function.
|
// 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);
|
BBI.Size += TII->GetInstSizeInBytes(I);
|
||||||
// For inline asm, GetInstSizeInBytes returns a conservative estimate.
|
// For inline asm, GetInstSizeInBytes returns a conservative estimate.
|
||||||
// The actual size may be smaller, but still a multiple of the instr size.
|
// 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;
|
BBI.Unalign = isThumb ? 1 : 2;
|
||||||
HasInlineAsm = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// tBR_JTr contains a .align 2 directive.
|
// tBR_JTr contains a .align 2 directive.
|
||||||
@ -907,7 +901,7 @@ bool ARMConstantIslands::CPEIsInRange(MachineInstr *MI, unsigned UserOffset,
|
|||||||
MachineInstr *CPEMI, unsigned MaxDisp,
|
MachineInstr *CPEMI, unsigned MaxDisp,
|
||||||
bool NegOk, bool DoDump) {
|
bool NegOk, bool DoDump) {
|
||||||
unsigned CPEOffset = GetOffsetOf(CPEMI);
|
unsigned CPEOffset = GetOffsetOf(CPEMI);
|
||||||
assert((CPEOffset%4 == 0 || HasInlineAsm) && "Misaligned CPE");
|
assert(CPEOffset % 4 == 0 && "Misaligned CPE");
|
||||||
|
|
||||||
if (DoDump) {
|
if (DoDump) {
|
||||||
DEBUG(errs() << "User of CPE#" << CPEMI->getOperand(0).getImm()
|
DEBUG(errs() << "User of CPE#" << CPEMI->getOperand(0).getImm()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user