mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-12 13:30:51 +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 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
|
||||
/// length.
|
||||
virtual unsigned getInlineAsmLength(const char *Str,
|
||||
|
@ -224,7 +224,7 @@ public:
|
||||
virtual bool AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
|
||||
MachineBasicBlock *&FBB,
|
||||
SmallVectorImpl<MachineOperand> &Cond,
|
||||
bool AllowModify) const;
|
||||
bool AllowModify = false) const;
|
||||
virtual unsigned RemoveBranch(MachineBasicBlock &MBB) const;
|
||||
virtual unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
|
||||
MachineBasicBlock *FBB,
|
||||
|
@ -165,7 +165,7 @@ namespace {
|
||||
/// HasInlineAsm - True if the function contains inline assembly.
|
||||
bool HasInlineAsm;
|
||||
|
||||
const TargetInstrInfo *TII;
|
||||
const ARMInstrInfo *TII;
|
||||
const ARMSubtarget *STI;
|
||||
ARMFunctionInfo *AFI;
|
||||
bool isThumb;
|
||||
@ -272,7 +272,7 @@ FunctionPass *llvm::createARMConstantIslandPass() {
|
||||
bool ARMConstantIslands::runOnMachineFunction(MachineFunction &MF) {
|
||||
MachineConstantPool &MCP = *MF.getConstantPool();
|
||||
|
||||
TII = MF.getTarget().getInstrInfo();
|
||||
TII = (const ARMInstrInfo*)MF.getTarget().getInstrInfo();
|
||||
AFI = MF.getInfo<ARMFunctionInfo>();
|
||||
STI = &MF.getTarget().getSubtarget<ARMSubtarget>();
|
||||
|
||||
|
@ -52,7 +52,7 @@ FunctionPass *llvm::createMSP430BranchSelectionPass() {
|
||||
}
|
||||
|
||||
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.
|
||||
Fn.RenumberBlocks();
|
||||
BlockSizes.resize(Fn.getNumBlockIDs());
|
||||
|
@ -53,7 +53,7 @@ FunctionPass *llvm::createPPCBranchSelectionPass() {
|
||||
}
|
||||
|
||||
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.
|
||||
Fn.RenumberBlocks();
|
||||
BlockSizes.resize(Fn.getNumBlockIDs());
|
||||
|
Loading…
Reference in New Issue
Block a user