mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 15:33:33 +00:00
Don't cache the instruction and register info from the TargetMachine, because
the internals of TargetMachine could change. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183572 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a5e5ba611f
commit
e488b4ecdc
@ -41,7 +41,7 @@ using namespace llvm;
|
||||
|
||||
XCoreInstrInfo::XCoreInstrInfo()
|
||||
: XCoreGenInstrInfo(XCore::ADJCALLSTACKDOWN, XCore::ADJCALLSTACKUP),
|
||||
RI(*this) {
|
||||
RI() {
|
||||
}
|
||||
|
||||
static bool isZeroImm(const MachineOperand &op) {
|
||||
|
@ -37,8 +37,8 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
XCoreRegisterInfo::XCoreRegisterInfo(const TargetInstrInfo &tii)
|
||||
: XCoreGenRegisterInfo(XCore::LR), TII(tii) {
|
||||
XCoreRegisterInfo::XCoreRegisterInfo()
|
||||
: XCoreGenRegisterInfo(XCore::LR) {
|
||||
}
|
||||
|
||||
// helper functions
|
||||
@ -112,6 +112,7 @@ XCoreRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
|
||||
int FrameIndex = FrameOp.getIndex();
|
||||
|
||||
MachineFunction &MF = *MI.getParent()->getParent();
|
||||
const TargetInstrInfo &TII = *MF.getTarget().getInstrInfo();
|
||||
const TargetFrameLowering *TFI = MF.getTarget().getFrameLowering();
|
||||
int Offset = MF.getFrameInfo()->getObjectOffset(FrameIndex);
|
||||
int StackSize = MF.getFrameInfo()->getStackSize();
|
||||
@ -249,6 +250,7 @@ loadConstant(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
|
||||
report_fatal_error("loadConstant value too big " + Twine(Value));
|
||||
}
|
||||
int Opcode = isImmU6(Value) ? XCore::LDC_ru6 : XCore::LDC_lru6;
|
||||
const TargetInstrInfo &TII = *MBB.getParent()->getTarget().getInstrInfo();
|
||||
BuildMI(MBB, I, dl, TII.get(Opcode), DstReg).addImm(Value);
|
||||
}
|
||||
|
||||
|
@ -25,8 +25,6 @@ class TargetInstrInfo;
|
||||
|
||||
struct XCoreRegisterInfo : public XCoreGenRegisterInfo {
|
||||
private:
|
||||
const TargetInstrInfo &TII;
|
||||
|
||||
void loadConstant(MachineBasicBlock &MBB,
|
||||
MachineBasicBlock::iterator I,
|
||||
unsigned DstReg, int64_t Value, DebugLoc dl) const;
|
||||
@ -40,7 +38,7 @@ private:
|
||||
unsigned DstReg, int Offset, DebugLoc dl) const;
|
||||
|
||||
public:
|
||||
XCoreRegisterInfo(const TargetInstrInfo &tii);
|
||||
XCoreRegisterInfo();
|
||||
|
||||
/// Code Generation virtual methods...
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user