mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-10 04:33:40 +00:00
eliminate the TargetInstrInfo::GetInstSizeInBytes hook.
ARM/PPC/MSP430-specific code (which are the only targets that implement the hook) can directly reference their target-specific instrinfo classes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109171 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
77beeaec1e
commit
2062875a7d
@ -566,13 +566,6 @@ public:
|
|||||||
const MachineBasicBlock *MBB,
|
const MachineBasicBlock *MBB,
|
||||||
const MachineFunction &MF) const = 0;
|
const MachineFunction &MF) const = 0;
|
||||||
|
|
||||||
/// GetInstSize - Returns the size of the specified Instruction.
|
|
||||||
///
|
|
||||||
virtual unsigned GetInstSizeInBytes(const MachineInstr *MI) const {
|
|
||||||
assert(0 && "Target didn't implement TargetInstrInfo::GetInstSize!");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Measure the specified inline asm to determine an approximation of its
|
/// Measure the specified inline asm to determine an approximation of its
|
||||||
/// length.
|
/// length.
|
||||||
virtual unsigned getInlineAsmLength(const char *Str,
|
virtual unsigned getInlineAsmLength(const char *Str,
|
||||||
|
@ -224,7 +224,7 @@ public:
|
|||||||
virtual bool AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
|
virtual bool AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
|
||||||
MachineBasicBlock *&FBB,
|
MachineBasicBlock *&FBB,
|
||||||
SmallVectorImpl<MachineOperand> &Cond,
|
SmallVectorImpl<MachineOperand> &Cond,
|
||||||
bool AllowModify) const;
|
bool AllowModify = false) const;
|
||||||
virtual unsigned RemoveBranch(MachineBasicBlock &MBB) const;
|
virtual unsigned RemoveBranch(MachineBasicBlock &MBB) const;
|
||||||
virtual unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
|
virtual unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
|
||||||
MachineBasicBlock *FBB,
|
MachineBasicBlock *FBB,
|
||||||
|
@ -165,7 +165,7 @@ namespace {
|
|||||||
/// HasInlineAsm - True if the function contains inline assembly.
|
/// HasInlineAsm - True if the function contains inline assembly.
|
||||||
bool HasInlineAsm;
|
bool HasInlineAsm;
|
||||||
|
|
||||||
const TargetInstrInfo *TII;
|
const ARMInstrInfo *TII;
|
||||||
const ARMSubtarget *STI;
|
const ARMSubtarget *STI;
|
||||||
ARMFunctionInfo *AFI;
|
ARMFunctionInfo *AFI;
|
||||||
bool isThumb;
|
bool isThumb;
|
||||||
@ -272,7 +272,7 @@ FunctionPass *llvm::createARMConstantIslandPass() {
|
|||||||
bool ARMConstantIslands::runOnMachineFunction(MachineFunction &MF) {
|
bool ARMConstantIslands::runOnMachineFunction(MachineFunction &MF) {
|
||||||
MachineConstantPool &MCP = *MF.getConstantPool();
|
MachineConstantPool &MCP = *MF.getConstantPool();
|
||||||
|
|
||||||
TII = MF.getTarget().getInstrInfo();
|
TII = (const ARMInstrInfo*)MF.getTarget().getInstrInfo();
|
||||||
AFI = MF.getInfo<ARMFunctionInfo>();
|
AFI = MF.getInfo<ARMFunctionInfo>();
|
||||||
STI = &MF.getTarget().getSubtarget<ARMSubtarget>();
|
STI = &MF.getTarget().getSubtarget<ARMSubtarget>();
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ FunctionPass *llvm::createMSP430BranchSelectionPass() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool MSP430BSel::runOnMachineFunction(MachineFunction &Fn) {
|
bool MSP430BSel::runOnMachineFunction(MachineFunction &Fn) {
|
||||||
const TargetInstrInfo *TII = Fn.getTarget().getInstrInfo();
|
const MSP430InstrInfo *TII = (MSP430InstrInfo*)Fn.getTarget().getInstrInfo();
|
||||||
// Give the blocks of the function a dense, in-order, numbering.
|
// Give the blocks of the function a dense, in-order, numbering.
|
||||||
Fn.RenumberBlocks();
|
Fn.RenumberBlocks();
|
||||||
BlockSizes.resize(Fn.getNumBlockIDs());
|
BlockSizes.resize(Fn.getNumBlockIDs());
|
||||||
|
@ -53,7 +53,7 @@ FunctionPass *llvm::createPPCBranchSelectionPass() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool PPCBSel::runOnMachineFunction(MachineFunction &Fn) {
|
bool PPCBSel::runOnMachineFunction(MachineFunction &Fn) {
|
||||||
const TargetInstrInfo *TII = Fn.getTarget().getInstrInfo();
|
const PPCInstrInfo *TII = (PPCInstrInfo*)Fn.getTarget().getInstrInfo();
|
||||||
// Give the blocks of the function a dense, in-order, numbering.
|
// Give the blocks of the function a dense, in-order, numbering.
|
||||||
Fn.RenumberBlocks();
|
Fn.RenumberBlocks();
|
||||||
BlockSizes.resize(Fn.getNumBlockIDs());
|
BlockSizes.resize(Fn.getNumBlockIDs());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user