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