mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-13 10:32:06 +00:00
Update the TargetInstrInfo interfaces so hasLoad/StoreFrom/ToStackSlot
can return a MachineMemOperand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90615 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ea7bfc5aa0
commit
5e33632559
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include "llvm/Target/TargetInstrDesc.h"
|
#include "llvm/Target/TargetInstrDesc.h"
|
||||||
#include "llvm/CodeGen/MachineFunction.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
|
#include "llvm/CodeGen/MachineMemOperand.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
@ -182,11 +183,13 @@ public:
|
|||||||
|
|
||||||
/// hasLoadFromStackSlot - If the specified machine instruction has
|
/// hasLoadFromStackSlot - If the specified machine instruction has
|
||||||
/// a load from a stack slot, return true along with the FrameIndex
|
/// a load from a stack slot, return true along with the FrameIndex
|
||||||
/// of the loaded stack slot. If not, return false. Unlike
|
/// of the loaded stack slot and the machine mem operand containing
|
||||||
|
/// the reference. If not, return false. Unlike
|
||||||
/// isLoadFromStackSlot, this returns true for any instructions that
|
/// isLoadFromStackSlot, this returns true for any instructions that
|
||||||
/// loads from the stack. This is just a hint, as some cases may be
|
/// loads from the stack. This is just a hint, as some cases may be
|
||||||
/// missed.
|
/// missed.
|
||||||
virtual bool hasLoadFromStackSlot(const MachineInstr *MI,
|
virtual bool hasLoadFromStackSlot(const MachineInstr *MI,
|
||||||
|
const MachineMemOperand *&MMO,
|
||||||
int &FrameIndex) const {
|
int &FrameIndex) const {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -205,17 +208,18 @@ public:
|
|||||||
/// stack locations as well. This uses a heuristic so it isn't
|
/// stack locations as well. This uses a heuristic so it isn't
|
||||||
/// reliable for correctness.
|
/// reliable for correctness.
|
||||||
virtual unsigned isStoreToStackSlotPostFE(const MachineInstr *MI,
|
virtual unsigned isStoreToStackSlotPostFE(const MachineInstr *MI,
|
||||||
int &FrameIndex) const {
|
int &FrameIndex) const {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// hasStoreToStackSlot - If the specified machine instruction has a
|
/// hasStoreToStackSlot - If the specified machine instruction has a
|
||||||
/// store to a stack slot, return true along with the FrameIndex of
|
/// store to a stack slot, return true along with the FrameIndex of
|
||||||
/// the loaded stack slot. If not, return false. Unlike
|
/// the loaded stack slot and the machine mem operand containing the
|
||||||
/// isStoreToStackSlot, this returns true for any instructions that
|
/// reference. If not, return false. Unlike isStoreToStackSlot,
|
||||||
/// loads from the stack. This is just a hint, as some cases may be
|
/// this returns true for any instructions that loads from the
|
||||||
/// missed.
|
/// stack. This is just a hint, as some cases may be missed.
|
||||||
virtual bool hasStoreToStackSlot(const MachineInstr *MI,
|
virtual bool hasStoreToStackSlot(const MachineInstr *MI,
|
||||||
|
const MachineMemOperand *&MMO,
|
||||||
int &FrameIndex) const {
|
int &FrameIndex) const {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -543,6 +547,13 @@ public:
|
|||||||
/// length.
|
/// length.
|
||||||
virtual unsigned getInlineAsmLength(const char *Str,
|
virtual unsigned getInlineAsmLength(const char *Str,
|
||||||
const MCAsmInfo &MAI) const;
|
const MCAsmInfo &MAI) const;
|
||||||
|
|
||||||
|
/// TailDuplicationLimit - Returns the limit on the number of instructions
|
||||||
|
/// in basic block MBB beyond which it will not be tail-duplicated.
|
||||||
|
virtual unsigned TailDuplicationLimit(const MachineBasicBlock &MBB,
|
||||||
|
unsigned DefaultLimit) const {
|
||||||
|
return DefaultLimit;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/// TargetInstrInfoImpl - This is the default implementation of
|
/// TargetInstrInfoImpl - This is the default implementation of
|
||||||
|
Loading…
x
Reference in New Issue
Block a user