mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-17 18:24:34 +00:00
Constify TargetInstrInfo::EmitInstrWithCustomInserter, allowing
ScheduleDAG's TLI member to use const. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64018 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -423,7 +423,7 @@ namespace llvm {
|
|||||||
const TargetMachine &TM; // Target processor
|
const TargetMachine &TM; // Target processor
|
||||||
const TargetInstrInfo *TII; // Target instruction information
|
const TargetInstrInfo *TII; // Target instruction information
|
||||||
const TargetRegisterInfo *TRI; // Target processor register info
|
const TargetRegisterInfo *TRI; // Target processor register info
|
||||||
TargetLowering *TLI; // Target lowering info
|
const TargetLowering *TLI; // Target lowering info
|
||||||
MachineFunction &MF; // Machine function
|
MachineFunction &MF; // Machine function
|
||||||
MachineRegisterInfo &MRI; // Virtual/real register map
|
MachineRegisterInfo &MRI; // Virtual/real register map
|
||||||
MachineConstantPool *ConstPool; // Target constant pool
|
MachineConstantPool *ConstPool; // Target constant pool
|
||||||
|
@@ -1346,7 +1346,7 @@ public:
|
|||||||
// insert. The specified MachineInstr is created but not inserted into any
|
// insert. The specified MachineInstr is created but not inserted into any
|
||||||
// basic blocks, and the scheduler passes ownership of it to this method.
|
// basic blocks, and the scheduler passes ownership of it to this method.
|
||||||
virtual MachineBasicBlock *EmitInstrWithCustomInserter(MachineInstr *MI,
|
virtual MachineBasicBlock *EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||||
MachineBasicBlock *MBB);
|
MachineBasicBlock *MBB) const;
|
||||||
|
|
||||||
//===--------------------------------------------------------------------===//
|
//===--------------------------------------------------------------------===//
|
||||||
// Addressing mode description hooks (used by LSR etc).
|
// Addressing mode description hooks (used by LSR etc).
|
||||||
|
@@ -157,7 +157,7 @@ namespace llvm {
|
|||||||
// insert. The specified MachineInstr is created but not inserted into any
|
// insert. The specified MachineInstr is created but not inserted into any
|
||||||
// basic blocks, and the scheduler passes ownership of it to this method.
|
// basic blocks, and the scheduler passes ownership of it to this method.
|
||||||
MachineBasicBlock *TargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
MachineBasicBlock *TargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||||
MachineBasicBlock *MBB) {
|
MachineBasicBlock *MBB) const {
|
||||||
cerr << "If a target marks an instruction with "
|
cerr << "If a target marks an instruction with "
|
||||||
<< "'usesCustomDAGSchedInserter', it must implement "
|
<< "'usesCustomDAGSchedInserter', it must implement "
|
||||||
<< "TargetLowering::EmitInstrWithCustomInserter!\n";
|
<< "TargetLowering::EmitInstrWithCustomInserter!\n";
|
||||||
|
@@ -1496,7 +1496,7 @@ void ARMTargetLowering::ReplaceNodeResults(SDNode *N,
|
|||||||
|
|
||||||
MachineBasicBlock *
|
MachineBasicBlock *
|
||||||
ARMTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
ARMTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||||
MachineBasicBlock *BB) {
|
MachineBasicBlock *BB) const {
|
||||||
const TargetInstrInfo *TII = getTargetMachine().getInstrInfo();
|
const TargetInstrInfo *TII = getTargetMachine().getInstrInfo();
|
||||||
switch (MI->getOpcode()) {
|
switch (MI->getOpcode()) {
|
||||||
default: assert(false && "Unexpected instr type to insert");
|
default: assert(false && "Unexpected instr type to insert");
|
||||||
|
@@ -88,7 +88,7 @@ namespace llvm {
|
|||||||
virtual const char *getTargetNodeName(unsigned Opcode) const;
|
virtual const char *getTargetNodeName(unsigned Opcode) const;
|
||||||
|
|
||||||
virtual MachineBasicBlock *EmitInstrWithCustomInserter(MachineInstr *MI,
|
virtual MachineBasicBlock *EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||||
MachineBasicBlock *MBB);
|
MachineBasicBlock *MBB) const;
|
||||||
|
|
||||||
/// isLegalAddressingMode - Return true if the addressing mode represented
|
/// isLegalAddressingMode - Return true if the addressing mode represented
|
||||||
/// by AM is legal for this target, for a load/store of the specified type.
|
/// by AM is legal for this target, for a load/store of the specified type.
|
||||||
|
@@ -706,7 +706,7 @@ getRegClassForInlineAsmConstraint(const std::string &Constraint,
|
|||||||
|
|
||||||
MachineBasicBlock *
|
MachineBasicBlock *
|
||||||
AlphaTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
AlphaTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||||
MachineBasicBlock *BB) {
|
MachineBasicBlock *BB) const {
|
||||||
const TargetInstrInfo *TII = getTargetMachine().getInstrInfo();
|
const TargetInstrInfo *TII = getTargetMachine().getInstrInfo();
|
||||||
assert((MI->getOpcode() == Alpha::CAS32 ||
|
assert((MI->getOpcode() == Alpha::CAS32 ||
|
||||||
MI->getOpcode() == Alpha::CAS64 ||
|
MI->getOpcode() == Alpha::CAS64 ||
|
||||||
|
@@ -99,7 +99,7 @@ namespace llvm {
|
|||||||
bool hasITOF() { return useITOF; }
|
bool hasITOF() { return useITOF; }
|
||||||
|
|
||||||
MachineBasicBlock *EmitInstrWithCustomInserter(MachineInstr *MI,
|
MachineBasicBlock *EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||||
MachineBasicBlock *BB);
|
MachineBasicBlock *BB) const;
|
||||||
|
|
||||||
virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
|
virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
|
||||||
|
|
||||||
|
@@ -276,8 +276,7 @@ static Mips::CondCode FPCondCCodeToFCC(ISD::CondCode CC) {
|
|||||||
|
|
||||||
MachineBasicBlock *
|
MachineBasicBlock *
|
||||||
MipsTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
MipsTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||||
MachineBasicBlock *BB)
|
MachineBasicBlock *BB) const {
|
||||||
{
|
|
||||||
const TargetInstrInfo *TII = getTargetMachine().getInstrInfo();
|
const TargetInstrInfo *TII = getTargetMachine().getInstrInfo();
|
||||||
bool isFPCmp = false;
|
bool isFPCmp = false;
|
||||||
|
|
||||||
|
@@ -106,7 +106,7 @@ namespace llvm {
|
|||||||
SDValue LowerSETCC(SDValue Op, SelectionDAG &DAG);
|
SDValue LowerSETCC(SDValue Op, SelectionDAG &DAG);
|
||||||
|
|
||||||
virtual MachineBasicBlock *EmitInstrWithCustomInserter(MachineInstr *MI,
|
virtual MachineBasicBlock *EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||||
MachineBasicBlock *MBB);
|
MachineBasicBlock *MBB) const;
|
||||||
|
|
||||||
// Inline asm support
|
// Inline asm support
|
||||||
ConstraintType getConstraintType(const std::string &Constraint) const;
|
ConstraintType getConstraintType(const std::string &Constraint) const;
|
||||||
|
@@ -1359,7 +1359,7 @@ SDValue PIC16TargetLowering::LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) {
|
|||||||
|
|
||||||
MachineBasicBlock *
|
MachineBasicBlock *
|
||||||
PIC16TargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
PIC16TargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||||
MachineBasicBlock *BB) {
|
MachineBasicBlock *BB) const {
|
||||||
const TargetInstrInfo &TII = *getTargetMachine().getInstrInfo();
|
const TargetInstrInfo &TII = *getTargetMachine().getInstrInfo();
|
||||||
unsigned CC = (PIC16CC::CondCodes)MI->getOperand(3).getImm();
|
unsigned CC = (PIC16CC::CondCodes)MI->getOperand(3).getImm();
|
||||||
|
|
||||||
|
@@ -90,7 +90,7 @@ namespace llvm {
|
|||||||
SDValue getPIC16Cmp(SDValue LHS, SDValue RHS, unsigned OrigCC, SDValue &CC,
|
SDValue getPIC16Cmp(SDValue LHS, SDValue RHS, unsigned OrigCC, SDValue &CC,
|
||||||
SelectionDAG &DAG, DebugLoc dl);
|
SelectionDAG &DAG, DebugLoc dl);
|
||||||
virtual MachineBasicBlock *EmitInstrWithCustomInserter(MachineInstr *MI,
|
virtual MachineBasicBlock *EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||||
MachineBasicBlock *MBB);
|
MachineBasicBlock *MBB) const;
|
||||||
|
|
||||||
|
|
||||||
virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG);
|
virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG);
|
||||||
|
@@ -3953,7 +3953,7 @@ void PPCTargetLowering::ReplaceNodeResults(SDNode *N,
|
|||||||
|
|
||||||
MachineBasicBlock *
|
MachineBasicBlock *
|
||||||
PPCTargetLowering::EmitAtomicBinary(MachineInstr *MI, MachineBasicBlock *BB,
|
PPCTargetLowering::EmitAtomicBinary(MachineInstr *MI, MachineBasicBlock *BB,
|
||||||
bool is64bit, unsigned BinOpcode) {
|
bool is64bit, unsigned BinOpcode) const {
|
||||||
// This also handles ATOMIC_SWAP, indicated by BinOpcode==0.
|
// This also handles ATOMIC_SWAP, indicated by BinOpcode==0.
|
||||||
const TargetInstrInfo *TII = getTargetMachine().getInstrInfo();
|
const TargetInstrInfo *TII = getTargetMachine().getInstrInfo();
|
||||||
|
|
||||||
@@ -4012,7 +4012,7 @@ MachineBasicBlock *
|
|||||||
PPCTargetLowering::EmitPartwordAtomicBinary(MachineInstr *MI,
|
PPCTargetLowering::EmitPartwordAtomicBinary(MachineInstr *MI,
|
||||||
MachineBasicBlock *BB,
|
MachineBasicBlock *BB,
|
||||||
bool is8bit, // operation
|
bool is8bit, // operation
|
||||||
unsigned BinOpcode) {
|
unsigned BinOpcode) const {
|
||||||
// This also handles ATOMIC_SWAP, indicated by BinOpcode==0.
|
// This also handles ATOMIC_SWAP, indicated by BinOpcode==0.
|
||||||
const TargetInstrInfo *TII = getTargetMachine().getInstrInfo();
|
const TargetInstrInfo *TII = getTargetMachine().getInstrInfo();
|
||||||
// In 64 bit mode we have to use 64 bits for addresses, even though the
|
// In 64 bit mode we have to use 64 bits for addresses, even though the
|
||||||
@@ -4136,7 +4136,7 @@ PPCTargetLowering::EmitPartwordAtomicBinary(MachineInstr *MI,
|
|||||||
|
|
||||||
MachineBasicBlock *
|
MachineBasicBlock *
|
||||||
PPCTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
PPCTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||||
MachineBasicBlock *BB) {
|
MachineBasicBlock *BB) const {
|
||||||
const TargetInstrInfo *TII = getTargetMachine().getInstrInfo();
|
const TargetInstrInfo *TII = getTargetMachine().getInstrInfo();
|
||||||
|
|
||||||
// To "insert" these instructions we actually have to insert their
|
// To "insert" these instructions we actually have to insert their
|
||||||
|
@@ -285,13 +285,13 @@ namespace llvm {
|
|||||||
unsigned Depth = 0) const;
|
unsigned Depth = 0) const;
|
||||||
|
|
||||||
virtual MachineBasicBlock *EmitInstrWithCustomInserter(MachineInstr *MI,
|
virtual MachineBasicBlock *EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||||
MachineBasicBlock *MBB);
|
MachineBasicBlock *MBB) const;
|
||||||
MachineBasicBlock *EmitAtomicBinary(MachineInstr *MI,
|
MachineBasicBlock *EmitAtomicBinary(MachineInstr *MI,
|
||||||
MachineBasicBlock *MBB, bool is64Bit,
|
MachineBasicBlock *MBB, bool is64Bit,
|
||||||
unsigned BinOpcode);
|
unsigned BinOpcode) const;
|
||||||
MachineBasicBlock *EmitPartwordAtomicBinary(MachineInstr *MI,
|
MachineBasicBlock *EmitPartwordAtomicBinary(MachineInstr *MI,
|
||||||
MachineBasicBlock *MBB,
|
MachineBasicBlock *MBB,
|
||||||
bool is8bit, unsigned Opcode);
|
bool is8bit, unsigned Opcode) const;
|
||||||
|
|
||||||
ConstraintType getConstraintType(const std::string &Constraint) const;
|
ConstraintType getConstraintType(const std::string &Constraint) const;
|
||||||
std::pair<unsigned, const TargetRegisterClass*>
|
std::pair<unsigned, const TargetRegisterClass*>
|
||||||
|
@@ -922,7 +922,7 @@ LowerOperation(SDValue Op, SelectionDAG &DAG) {
|
|||||||
|
|
||||||
MachineBasicBlock *
|
MachineBasicBlock *
|
||||||
SparcTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
SparcTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||||
MachineBasicBlock *BB) {
|
MachineBasicBlock *BB) const {
|
||||||
const TargetInstrInfo &TII = *getTargetMachine().getInstrInfo();
|
const TargetInstrInfo &TII = *getTargetMachine().getInstrInfo();
|
||||||
unsigned BROpcode;
|
unsigned BROpcode;
|
||||||
unsigned CC;
|
unsigned CC;
|
||||||
|
@@ -61,7 +61,7 @@ namespace llvm {
|
|||||||
SmallVectorImpl<SDValue> &ArgValues,
|
SmallVectorImpl<SDValue> &ArgValues,
|
||||||
DebugLoc dl);
|
DebugLoc dl);
|
||||||
virtual MachineBasicBlock *EmitInstrWithCustomInserter(MachineInstr *MI,
|
virtual MachineBasicBlock *EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||||
MachineBasicBlock *MBB);
|
MachineBasicBlock *MBB) const;
|
||||||
|
|
||||||
virtual const char *getTargetNodeName(unsigned Opcode) const;
|
virtual const char *getTargetNodeName(unsigned Opcode) const;
|
||||||
|
|
||||||
|
@@ -6984,7 +6984,7 @@ X86TargetLowering::EmitAtomicBitwiseWithCustomInserter(MachineInstr *bInstr,
|
|||||||
unsigned notOpc,
|
unsigned notOpc,
|
||||||
unsigned EAXreg,
|
unsigned EAXreg,
|
||||||
TargetRegisterClass *RC,
|
TargetRegisterClass *RC,
|
||||||
bool invSrc) {
|
bool invSrc) const {
|
||||||
// For the atomic bitwise operator, we generate
|
// For the atomic bitwise operator, we generate
|
||||||
// thisMBB:
|
// thisMBB:
|
||||||
// newMBB:
|
// newMBB:
|
||||||
@@ -7081,7 +7081,7 @@ X86TargetLowering::EmitAtomicBit6432WithCustomInserter(MachineInstr *bInstr,
|
|||||||
unsigned regOpcH,
|
unsigned regOpcH,
|
||||||
unsigned immOpcL,
|
unsigned immOpcL,
|
||||||
unsigned immOpcH,
|
unsigned immOpcH,
|
||||||
bool invSrc) {
|
bool invSrc) const {
|
||||||
// For the atomic bitwise operator, we generate
|
// For the atomic bitwise operator, we generate
|
||||||
// thisMBB (instructions are in pairs, except cmpxchg8b)
|
// thisMBB (instructions are in pairs, except cmpxchg8b)
|
||||||
// ld t1,t2 = [bitinstr.addr]
|
// ld t1,t2 = [bitinstr.addr]
|
||||||
@@ -7225,7 +7225,7 @@ X86TargetLowering::EmitAtomicBit6432WithCustomInserter(MachineInstr *bInstr,
|
|||||||
MachineBasicBlock *
|
MachineBasicBlock *
|
||||||
X86TargetLowering::EmitAtomicMinMaxWithCustomInserter(MachineInstr *mInstr,
|
X86TargetLowering::EmitAtomicMinMaxWithCustomInserter(MachineInstr *mInstr,
|
||||||
MachineBasicBlock *MBB,
|
MachineBasicBlock *MBB,
|
||||||
unsigned cmovOpc) {
|
unsigned cmovOpc) const {
|
||||||
// For the atomic min/max operator, we generate
|
// For the atomic min/max operator, we generate
|
||||||
// thisMBB:
|
// thisMBB:
|
||||||
// newMBB:
|
// newMBB:
|
||||||
@@ -7325,7 +7325,7 @@ X86TargetLowering::EmitAtomicMinMaxWithCustomInserter(MachineInstr *mInstr,
|
|||||||
|
|
||||||
MachineBasicBlock *
|
MachineBasicBlock *
|
||||||
X86TargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
X86TargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||||
MachineBasicBlock *BB) {
|
MachineBasicBlock *BB) const {
|
||||||
DebugLoc dl = MI->getDebugLoc();
|
DebugLoc dl = MI->getDebugLoc();
|
||||||
const TargetInstrInfo *TII = getTargetMachine().getInstrInfo();
|
const TargetInstrInfo *TII = getTargetMachine().getInstrInfo();
|
||||||
switch (MI->getOpcode()) {
|
switch (MI->getOpcode()) {
|
||||||
|
@@ -392,7 +392,7 @@ namespace llvm {
|
|||||||
virtual SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const;
|
virtual SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const;
|
||||||
|
|
||||||
virtual MachineBasicBlock *EmitInstrWithCustomInserter(MachineInstr *MI,
|
virtual MachineBasicBlock *EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||||
MachineBasicBlock *MBB);
|
MachineBasicBlock *MBB) const;
|
||||||
|
|
||||||
|
|
||||||
/// getTargetNodeName - This method returns the name of a target specific
|
/// getTargetNodeName - This method returns the name of a target specific
|
||||||
@@ -639,7 +639,7 @@ namespace llvm {
|
|||||||
unsigned notOpc,
|
unsigned notOpc,
|
||||||
unsigned EAXreg,
|
unsigned EAXreg,
|
||||||
TargetRegisterClass *RC,
|
TargetRegisterClass *RC,
|
||||||
bool invSrc = false);
|
bool invSrc = false) const;
|
||||||
|
|
||||||
MachineBasicBlock *EmitAtomicBit6432WithCustomInserter(
|
MachineBasicBlock *EmitAtomicBit6432WithCustomInserter(
|
||||||
MachineInstr *BInstr,
|
MachineInstr *BInstr,
|
||||||
@@ -648,14 +648,14 @@ namespace llvm {
|
|||||||
unsigned regOpcH,
|
unsigned regOpcH,
|
||||||
unsigned immOpcL,
|
unsigned immOpcL,
|
||||||
unsigned immOpcH,
|
unsigned immOpcH,
|
||||||
bool invSrc = false);
|
bool invSrc = false) const;
|
||||||
|
|
||||||
/// Utility function to emit atomic min and max. It takes the min/max
|
/// Utility function to emit atomic min and max. It takes the min/max
|
||||||
// instruction to expand, the associated basic block, and the associated
|
// instruction to expand, the associated basic block, and the associated
|
||||||
// cmov opcode for moving the min or max value.
|
// cmov opcode for moving the min or max value.
|
||||||
MachineBasicBlock *EmitAtomicMinMaxWithCustomInserter(MachineInstr *BInstr,
|
MachineBasicBlock *EmitAtomicMinMaxWithCustomInserter(MachineInstr *BInstr,
|
||||||
MachineBasicBlock *BB,
|
MachineBasicBlock *BB,
|
||||||
unsigned cmovOpc);
|
unsigned cmovOpc) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace X86 {
|
namespace X86 {
|
||||||
|
@@ -782,7 +782,7 @@ LowerRET(SDValue Op, SelectionDAG &DAG)
|
|||||||
|
|
||||||
MachineBasicBlock *
|
MachineBasicBlock *
|
||||||
XCoreTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
XCoreTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||||
MachineBasicBlock *BB) {
|
MachineBasicBlock *BB) const {
|
||||||
const TargetInstrInfo &TII = *getTargetMachine().getInstrInfo();
|
const TargetInstrInfo &TII = *getTargetMachine().getInstrInfo();
|
||||||
assert((MI->getOpcode() == XCore::SELECT_CC) &&
|
assert((MI->getOpcode() == XCore::SELECT_CC) &&
|
||||||
"Unexpected instr type to insert");
|
"Unexpected instr type to insert");
|
||||||
|
@@ -79,7 +79,7 @@ namespace llvm {
|
|||||||
virtual const char *getTargetNodeName(unsigned Opcode) const;
|
virtual const char *getTargetNodeName(unsigned Opcode) const;
|
||||||
|
|
||||||
virtual MachineBasicBlock *EmitInstrWithCustomInserter(MachineInstr *MI,
|
virtual MachineBasicBlock *EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||||
MachineBasicBlock *MBB);
|
MachineBasicBlock *MBB) const;
|
||||||
|
|
||||||
virtual bool isLegalAddressingMode(const AddrMode &AM,
|
virtual bool isLegalAddressingMode(const AddrMode &AM,
|
||||||
const Type *Ty) const;
|
const Type *Ty) const;
|
||||||
|
Reference in New Issue
Block a user