forked from OSchip/llvm-project
Rename usesCustomDAGSchedInserter to usesCustomInserter, and update a
bunch of associated comments, because it doesn't have anything to do with DAGs or scheduling. This is another step in decoupling MachineInstr emitting from scheduling. llvm-svn: 85517
This commit is contained in:
parent
ba91b89711
commit
453d64c9f5
|
@ -151,7 +151,7 @@ file prints this (at the time of this writing):</p>
|
|||
<b>bit</b> isReMaterializable = 0;
|
||||
<b>bit</b> isPredicable = 0;
|
||||
<b>bit</b> hasDelaySlot = 0;
|
||||
<b>bit</b> usesCustomDAGSchedInserter = 0;
|
||||
<b>bit</b> usesCustomInserter = 0;
|
||||
<b>bit</b> hasCtrlDep = 0;
|
||||
<b>bit</b> isNotDuplicable = 0;
|
||||
<b>bit</b> hasSideEffects = 0;
|
||||
|
|
|
@ -199,7 +199,7 @@ class Instruction {
|
|||
bit isReMaterializable = 0; // Is this instruction re-materializable?
|
||||
bit isPredicable = 0; // Is this instruction predicable?
|
||||
bit hasDelaySlot = 0; // Does this instruction have an delay slot?
|
||||
bit usesCustomDAGSchedInserter = 0; // Pseudo instr needing special help.
|
||||
bit usesCustomInserter = 0; // Pseudo instr needing special help.
|
||||
bit hasCtrlDep = 0; // Does this instruction r/w ctrl-flow chains?
|
||||
bit isNotDuplicable = 0; // Is it unsafe to duplicate this instruction?
|
||||
bit isAsCheapAsAMove = 0; // As cheap (or cheaper) than a move instruction.
|
||||
|
|
|
@ -109,7 +109,7 @@ namespace TID {
|
|||
UnmodeledSideEffects,
|
||||
Commutable,
|
||||
ConvertibleTo3Addr,
|
||||
UsesCustomDAGSchedInserter,
|
||||
UsesCustomInserter,
|
||||
Rematerializable,
|
||||
CheapAsAMove,
|
||||
ExtraSrcRegAllocReq,
|
||||
|
@ -416,7 +416,7 @@ public:
|
|||
return Flags & (1 << TID::ConvertibleTo3Addr);
|
||||
}
|
||||
|
||||
/// usesCustomDAGSchedInsertionHook - Return true if this instruction requires
|
||||
/// usesCustomInsertionHook - Return true if this instruction requires
|
||||
/// custom insertion support when the DAG scheduler is inserting it into a
|
||||
/// machine basic block. If this is true for the instruction, it basically
|
||||
/// means that it is a pseudo instruction used at SelectionDAG time that is
|
||||
|
@ -424,8 +424,8 @@ public:
|
|||
///
|
||||
/// If this is true, the TargetLoweringInfo::InsertAtEndOfBasicBlock method
|
||||
/// is used to insert this into the MachineBasicBlock.
|
||||
bool usesCustomDAGSchedInsertionHook() const {
|
||||
return Flags & (1 << TID::UsesCustomDAGSchedInserter);
|
||||
bool usesCustomInsertionHook() const {
|
||||
return Flags & (1 << TID::UsesCustomInserter);
|
||||
}
|
||||
|
||||
/// isRematerializable - Returns true if this instruction is a candidate for
|
||||
|
|
|
@ -1425,14 +1425,15 @@ public:
|
|||
SelectionDAG &DAG) const;
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
// Scheduler hooks
|
||||
// Instruction Emitting Hooks
|
||||
//
|
||||
|
||||
// EmitInstrWithCustomInserter - This method should be implemented by targets
|
||||
// that mark instructions with the 'usesCustomDAGSchedInserter' flag. These
|
||||
// that mark instructions with the 'usesCustomInserter' flag. These
|
||||
// instructions are special in various ways, which require special support to
|
||||
// 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 this method is called to expand it into a sequence of
|
||||
// instructions, potentially also creating new basic blocks and control flow.
|
||||
// When new basic blocks are inserted and the edges from MBB to its successors
|
||||
// are modified, the method should insert pairs of <OldSucc, NewSucc> into the
|
||||
// DenseMap.
|
||||
|
|
|
@ -556,7 +556,7 @@ void InstrEmitter::EmitNode(SDNode *Node, bool IsClone, bool IsCloned,
|
|||
MI->setMemRefs(cast<MachineSDNode>(Node)->memoperands_begin(),
|
||||
cast<MachineSDNode>(Node)->memoperands_end());
|
||||
|
||||
if (II.usesCustomDAGSchedInsertionHook()) {
|
||||
if (II.usesCustomInsertionHook()) {
|
||||
// Insert this instruction into the basic block using a target
|
||||
// specific inserter which may returns a new basic block.
|
||||
MBB = TLI->EmitInstrWithCustomInserter(MI, MBB, EM);
|
||||
|
|
|
@ -150,16 +150,20 @@ namespace llvm {
|
|||
}
|
||||
|
||||
// EmitInstrWithCustomInserter - This method should be implemented by targets
|
||||
// that mark instructions with the 'usesCustomDAGSchedInserter' flag. These
|
||||
// that mark instructions with the 'usesCustomInserter' flag. These
|
||||
// instructions are special in various ways, which require special support to
|
||||
// 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 this method is called to expand it into a sequence of
|
||||
// instructions, potentially also creating new basic blocks and control flow.
|
||||
// When new basic blocks are inserted and the edges from MBB to its successors
|
||||
// are modified, the method should insert pairs of <OldSucc, NewSucc> into the
|
||||
// DenseMap.
|
||||
MachineBasicBlock *TargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||
MachineBasicBlock *MBB,
|
||||
DenseMap<MachineBasicBlock*, MachineBasicBlock*> *EM) const {
|
||||
#ifndef NDEBUG
|
||||
errs() << "If a target marks an instruction with "
|
||||
"'usesCustomDAGSchedInserter', it must implement "
|
||||
"'usesCustomInserter', it must implement "
|
||||
"TargetLowering::EmitInstrWithCustomInserter!";
|
||||
#endif
|
||||
llvm_unreachable(0);
|
||||
|
|
|
@ -158,7 +158,7 @@ def tADDspr : TIt<(outs GPR:$dst), (ins GPR:$lhs, GPR:$rhs), IIC_iALUr,
|
|||
"add\t$dst, $rhs", []>;
|
||||
|
||||
// Pseudo instruction that will expand into a tSUBspi + a copy.
|
||||
let usesCustomDAGSchedInserter = 1 in { // Expanded by the scheduler.
|
||||
let usesCustomInserter = 1 in { // Expanded after instruction selection.
|
||||
def tSUBspi_ : PseudoInst<(outs GPR:$dst), (ins GPR:$lhs, i32imm:$rhs),
|
||||
NoItinerary, "@ sub\t$dst, $rhs * 4", []>;
|
||||
|
||||
|
@ -168,7 +168,7 @@ def tADDspr_ : PseudoInst<(outs GPR:$dst), (ins GPR:$lhs, GPR:$rhs),
|
|||
let Defs = [CPSR] in
|
||||
def tANDsp : PseudoInst<(outs tGPR:$dst), (ins tGPR:$lhs, tGPR:$rhs),
|
||||
NoItinerary, "@ and\t$dst, $rhs", []>;
|
||||
} // usesCustomDAGSchedInserter
|
||||
} // usesCustomInserter
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Control Flow Instructions.
|
||||
|
@ -617,8 +617,8 @@ def tUXTH : T1pI<(outs tGPR:$dst), (ins tGPR:$src), IIC_iUNAr,
|
|||
|
||||
|
||||
// Conditional move tMOVCCr - Used to implement the Thumb SELECT_CC DAG operation.
|
||||
// Expanded by the scheduler into a branch sequence.
|
||||
let usesCustomDAGSchedInserter = 1 in // Expanded by the scheduler.
|
||||
// Expanded after instruction selection into a branch sequence.
|
||||
let usesCustomInserter = 1 in // Expanded after instruction selection.
|
||||
def tMOVCCr_pseudo :
|
||||
PseudoInst<(outs tGPR:$dst), (ins tGPR:$false, tGPR:$true, pred:$cc),
|
||||
NoItinerary, "@ tMOVCCr $cc",
|
||||
|
|
|
@ -454,14 +454,14 @@ def t2SUBrSPs : T2sI<(outs GPR:$dst), (ins GPR:$sp, t2_so_reg:$rhs),
|
|||
|
||||
|
||||
// Pseudo instruction that will expand into a t2SUBrSPi + a copy.
|
||||
let usesCustomDAGSchedInserter = 1 in { // Expanded by the scheduler.
|
||||
let usesCustomInserter = 1 in { // Expanded after instruction selection.
|
||||
def t2SUBrSPi_ : PseudoInst<(outs GPR:$dst), (ins GPR:$sp, t2_so_imm:$imm),
|
||||
NoItinerary, "@ sub.w\t$dst, $sp, $imm", []>;
|
||||
def t2SUBrSPi12_ : PseudoInst<(outs GPR:$dst), (ins GPR:$sp, imm0_4095:$imm),
|
||||
NoItinerary, "@ subw\t$dst, $sp, $imm", []>;
|
||||
def t2SUBrSPs_ : PseudoInst<(outs GPR:$dst), (ins GPR:$sp, t2_so_reg:$rhs),
|
||||
NoItinerary, "@ sub\t$dst, $sp, $rhs", []>;
|
||||
} // usesCustomDAGSchedInserter
|
||||
} // usesCustomInserter
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
|
@ -164,7 +164,7 @@ def MEMLABEL : PseudoInstAlpha<(outs), (ins s64imm:$i, s64imm:$j, s64imm:$k, s64
|
|||
"LSMARKER$$$i$$$j$$$k$$$m:", [], s_pseudo>;
|
||||
|
||||
|
||||
let usesCustomDAGSchedInserter = 1 in { // Expanded by the scheduler.
|
||||
let usesCustomInserter = 1 in { // Expanded after instruction selection.
|
||||
def CAS32 : PseudoInstAlpha<(outs GPRC:$dst), (ins GPRC:$ptr, GPRC:$cmp, GPRC:$swp), "",
|
||||
[(set GPRC:$dst, (atomic_cmp_swap_32 GPRC:$ptr, GPRC:$cmp, GPRC:$swp))], s_pseudo>;
|
||||
def CAS64 : PseudoInstAlpha<(outs GPRC:$dst), (ins GPRC:$ptr, GPRC:$cmp, GPRC:$swp), "",
|
||||
|
|
|
@ -108,7 +108,7 @@ def ADJCALLSTACKUP : Pseudo<(outs), (ins i16imm:$amt1, i16imm:$amt2),
|
|||
[(MSP430callseq_end timm:$amt1, timm:$amt2)]>;
|
||||
}
|
||||
|
||||
let usesCustomDAGSchedInserter = 1 in {
|
||||
let usesCustomInserter = 1 in {
|
||||
def Select8 : Pseudo<(outs GR8:$dst), (ins GR8:$src1, GR8:$src2, i8imm:$cc),
|
||||
"# Select8 PSEUDO",
|
||||
[(set GR8:$dst,
|
||||
|
|
|
@ -253,7 +253,7 @@ let hasDelaySlot = 1, Defs=[FCR31] in {
|
|||
|
||||
// For some explanation, see Select_CC at MipsInstrInfo.td. We also embedd a
|
||||
// condiciton code to enable easy handling by the Custom Inserter.
|
||||
let usesCustomDAGSchedInserter = 1, Uses=[FCR31] in {
|
||||
let usesCustomInserter = 1, Uses=[FCR31] in {
|
||||
class PseudoFPSelCC<RegisterClass RC, string asmstr> :
|
||||
MipsPseudo<(outs RC:$dst),
|
||||
(ins CPURegs:$CmpRes, RC:$T, RC:$F, condcode:$cc), asmstr,
|
||||
|
|
|
@ -417,7 +417,7 @@ def CPRESTORE : MipsPseudo<(outs), (ins uimm16:$loc), ".cprestore\t$loc\n", []>;
|
|||
// operation. The solution is to create a Mips pseudo SELECT_CC instruction
|
||||
// (MipsSelectCC), use LowerSELECT_CC to generate this instruction and finally
|
||||
// replace it for real supported nodes into EmitInstrWithCustomInserter
|
||||
let usesCustomDAGSchedInserter = 1 in {
|
||||
let usesCustomInserter = 1 in {
|
||||
class PseudoSelCC<RegisterClass RC, string asmstr>:
|
||||
MipsPseudo<(outs RC:$dst), (ins CPURegs:$CmpRes, RC:$T, RC:$F), asmstr,
|
||||
[(set RC:$dst, (MipsSelectCC CPURegs:$CmpRes, RC:$T, RC:$F))]>;
|
||||
|
|
|
@ -467,9 +467,9 @@ def br_uncond: ControlFormat<0x0, (outs), (ins brtarget:$dst),
|
|||
"goto $dst",
|
||||
[(br bb:$dst)]>;
|
||||
|
||||
// SELECT_CC_* - Used to implement the SELECT_CC DAG operation. Expanded by the
|
||||
// scheduler into a branch sequence.
|
||||
let usesCustomDAGSchedInserter = 1 in { // Expanded by the scheduler.
|
||||
// SELECT_CC_* - Used to implement the SELECT_CC DAG operation. Expanded after
|
||||
// instruction selection into a branch sequence.
|
||||
let usesCustomInserter = 1 in { // Expanded after instruction selection.
|
||||
def SELECT_CC_Int_ICC
|
||||
: Pseudo<(outs GPR:$dst), (ins GPR:$T, GPR:$F, i8imm:$Cond),
|
||||
"; SELECT_CC_Int_ICC PSEUDO!",
|
||||
|
|
|
@ -127,7 +127,7 @@ def : Pat<(PPCnop),
|
|||
(NOP)>;
|
||||
|
||||
// Atomic operations
|
||||
let usesCustomDAGSchedInserter = 1 in {
|
||||
let usesCustomInserter = 1 in {
|
||||
let Uses = [CR0] in {
|
||||
def ATOMIC_LOAD_ADD_I64 : Pseudo<
|
||||
(outs G8RC:$dst), (ins memrr:$ptr, G8RC:$incr),
|
||||
|
|
|
@ -363,9 +363,9 @@ def DYNALLOC : Pseudo<(outs GPRC:$result), (ins GPRC:$negsize, memri:$fpsi),
|
|||
[(set GPRC:$result,
|
||||
(PPCdynalloc GPRC:$negsize, iaddr:$fpsi))]>;
|
||||
|
||||
// SELECT_CC_* - Used to implement the SELECT_CC DAG operation. Expanded by the
|
||||
// scheduler into a branch sequence.
|
||||
let usesCustomDAGSchedInserter = 1, // Expanded by the scheduler.
|
||||
// SELECT_CC_* - Used to implement the SELECT_CC DAG operation. Expanded after
|
||||
// instruction selection into a branch sequence.
|
||||
let usesCustomInserter = 1, // Expanded after instruction selection.
|
||||
PPC970_Single = 1 in {
|
||||
def SELECT_CC_I4 : Pseudo<(outs GPRC:$dst), (ins CRRC:$cond, GPRC:$T, GPRC:$F,
|
||||
i32imm:$BROPC), "${:comment} SELECT_CC PSEUDO!",
|
||||
|
@ -539,7 +539,7 @@ def DCBZL : DCB_Form<1014, 1, (outs), (ins memrr:$dst),
|
|||
PPC970_DGroup_Single;
|
||||
|
||||
// Atomic operations
|
||||
let usesCustomDAGSchedInserter = 1 in {
|
||||
let usesCustomInserter = 1 in {
|
||||
let Uses = [CR0] in {
|
||||
def ATOMIC_LOAD_ADD_I8 : Pseudo<
|
||||
(outs GPRC:$dst), (ins memrr:$ptr, GPRC:$incr),
|
||||
|
|
|
@ -238,10 +238,10 @@ let Predicates = [HasNoV9] in { // Only emit these in V8 mode.
|
|||
[(set DFPRegs:$dst, (fabs DFPRegs:$src))]>;
|
||||
}
|
||||
|
||||
// SELECT_CC_* - Used to implement the SELECT_CC DAG operation. Expanded by the
|
||||
// scheduler into a branch sequence. This has to handle all permutations of
|
||||
// selection between i32/f32/f64 on ICC and FCC.
|
||||
let usesCustomDAGSchedInserter = 1 in { // Expanded by the scheduler.
|
||||
// SELECT_CC_* - Used to implement the SELECT_CC DAG operation. Expanded after
|
||||
// instruction selection into a branch sequence. This has to handle all
|
||||
// permutations of selection between i32/f32/f64 on ICC and FCC.
|
||||
let usesCustomInserter = 1 in { // Expanded after instruction selection.
|
||||
def SELECT_CC_Int_ICC
|
||||
: Pseudo<(outs IntRegs:$dst), (ins IntRegs:$T, IntRegs:$F, i32imm:$Cond),
|
||||
"; SELECT_CC_Int_ICC PSEUDO!",
|
||||
|
|
|
@ -25,7 +25,7 @@ def fpimmneg0 : PatLeaf<(fpimm), [{
|
|||
return N->isExactlyValue(-0.0);
|
||||
}]>;
|
||||
|
||||
let Uses = [PSW], usesCustomDAGSchedInserter = 1 in {
|
||||
let Uses = [PSW], usesCustomInserter = 1 in {
|
||||
def SelectF32 : Pseudo<(outs FP32:$dst), (ins FP32:$src1, FP32:$src2, i8imm:$cc),
|
||||
"# SelectF32 PSEUDO",
|
||||
[(set FP32:$dst,
|
||||
|
|
|
@ -74,7 +74,7 @@ def ADJCALLSTACKUP : Pseudo<(outs), (ins i64imm:$amt1, i64imm:$amt2),
|
|||
"#ADJCALLSTACKUP",
|
||||
[(SystemZcallseq_end timm:$amt1, timm:$amt2)]>;
|
||||
|
||||
let Uses = [PSW], usesCustomDAGSchedInserter = 1 in {
|
||||
let Uses = [PSW], usesCustomInserter = 1 in {
|
||||
def Select32 : Pseudo<(outs GR32:$dst), (ins GR32:$src1, GR32:$src2, i8imm:$cc),
|
||||
"# Select32 PSEUDO",
|
||||
[(set GR32:$dst,
|
||||
|
|
|
@ -1541,7 +1541,7 @@ def LOCK_DEC64m : RI<0xFF, MRM1m, (outs), (ins i64mem:$dst),
|
|||
}
|
||||
// Atomic exchange, and, or, xor
|
||||
let Constraints = "$val = $dst", Defs = [EFLAGS],
|
||||
usesCustomDAGSchedInserter = 1 in {
|
||||
usesCustomInserter = 1 in {
|
||||
def ATOMAND64 : I<0, Pseudo, (outs GR64:$dst),(ins i64mem:$ptr, GR64:$val),
|
||||
"#ATOMAND64 PSEUDO!",
|
||||
[(set GR64:$dst, (atomic_load_and_64 addr:$ptr, GR64:$val))]>;
|
||||
|
|
|
@ -69,7 +69,7 @@ def fpimmneg1 : PatLeaf<(fpimm), [{
|
|||
}]>;
|
||||
|
||||
// Some 'special' instructions
|
||||
let usesCustomDAGSchedInserter = 1 in { // Expanded by the scheduler.
|
||||
let usesCustomInserter = 1 in { // Expanded after instruction selection.
|
||||
def FP32_TO_INT16_IN_MEM : I<0, Pseudo,
|
||||
(outs), (ins i16mem:$dst, RFP32:$src),
|
||||
"##FP32_TO_INT16_IN_MEM PSEUDO!",
|
||||
|
|
|
@ -524,7 +524,7 @@ def ADJCALLSTACKUP32 : I<0, Pseudo, (outs), (ins i32imm:$amt1, i32imm:$amt2),
|
|||
}
|
||||
|
||||
// x86-64 va_start lowering magic.
|
||||
let usesCustomDAGSchedInserter = 1 in
|
||||
let usesCustomInserter = 1 in
|
||||
def VASTART_SAVE_XMM_REGS : I<0, Pseudo,
|
||||
(outs),
|
||||
(ins GR8:$al,
|
||||
|
@ -1129,13 +1129,13 @@ let isTwoAddress = 1 in {
|
|||
// Conditional moves
|
||||
let Uses = [EFLAGS] in {
|
||||
|
||||
// X86 doesn't have 8-bit conditional moves. Use a customDAGSchedInserter to
|
||||
// X86 doesn't have 8-bit conditional moves. Use a customInserter to
|
||||
// emit control flow. An alternative to this is to mark i8 SELECT as Promote,
|
||||
// however that requires promoting the operands, and can induce additional
|
||||
// i8 register pressure. Note that CMOV_GR8 is conservatively considered to
|
||||
// clobber EFLAGS, because if one of the operands is zero, the expansion
|
||||
// could involve an xor.
|
||||
let usesCustomDAGSchedInserter = 1, isTwoAddress = 0, Defs = [EFLAGS] in
|
||||
let usesCustomInserter = 1, isTwoAddress = 0, Defs = [EFLAGS] in
|
||||
def CMOV_GR8 : I<0, Pseudo,
|
||||
(outs GR8:$dst), (ins GR8:$src1, GR8:$src2, i8imm:$cond),
|
||||
"#CMOV_GR8 PSEUDO!",
|
||||
|
@ -3667,7 +3667,7 @@ def LOCK_DEC32m : I<0xFF, MRM1m, (outs), (ins i32mem:$dst),
|
|||
|
||||
// Atomic exchange, and, or, xor
|
||||
let Constraints = "$val = $dst", Defs = [EFLAGS],
|
||||
usesCustomDAGSchedInserter = 1 in {
|
||||
usesCustomInserter = 1 in {
|
||||
def ATOMAND32 : I<0, Pseudo, (outs GR32:$dst),(ins i32mem:$ptr, GR32:$val),
|
||||
"#ATOMAND32 PSEUDO!",
|
||||
[(set GR32:$dst, (atomic_load_and_32 addr:$ptr, GR32:$val))]>;
|
||||
|
@ -3736,7 +3736,7 @@ let Constraints = "$val1 = $dst1, $val2 = $dst2",
|
|||
Defs = [EFLAGS, EAX, EBX, ECX, EDX],
|
||||
Uses = [EAX, EBX, ECX, EDX],
|
||||
mayLoad = 1, mayStore = 1,
|
||||
usesCustomDAGSchedInserter = 1 in {
|
||||
usesCustomInserter = 1 in {
|
||||
def ATOMAND6432 : I<0, Pseudo, (outs GR32:$dst1, GR32:$dst2),
|
||||
(ins i64mem:$ptr, GR32:$val1, GR32:$val2),
|
||||
"#ATOMAND6432 PSEUDO!", []>;
|
||||
|
|
|
@ -706,10 +706,9 @@ def : Pat<(v2i32 (X86pcmpgtd VR64:$src1, VR64:$src2)),
|
|||
def : Pat<(v2i32 (X86pcmpgtd VR64:$src1, (bitconvert (load_mmx addr:$src2)))),
|
||||
(MMX_PCMPGTDrm VR64:$src1, addr:$src2)>;
|
||||
|
||||
// CMOV* - Used to implement the SELECT DAG operation. Expanded by the
|
||||
// scheduler into a branch sequence.
|
||||
// These are expanded by the scheduler.
|
||||
let Uses = [EFLAGS], usesCustomDAGSchedInserter = 1 in {
|
||||
// CMOV* - Used to implement the SELECT DAG operation. Expanded after
|
||||
// instruction selection into a branch sequence.
|
||||
let Uses = [EFLAGS], usesCustomInserter = 1 in {
|
||||
def CMOV_V1I64 : I<0, Pseudo,
|
||||
(outs VR64:$dst), (ins VR64:$t, VR64:$f, i8imm:$cond),
|
||||
"#CMOV_V1I64 PSEUDO!",
|
||||
|
|
|
@ -299,10 +299,9 @@ def palign : PatFrag<(ops node:$lhs, node:$rhs),
|
|||
// SSE scalar FP Instructions
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// CMOV* - Used to implement the SSE SELECT DAG operation. Expanded by the
|
||||
// scheduler into a branch sequence.
|
||||
// These are expanded by the scheduler.
|
||||
let Uses = [EFLAGS], usesCustomDAGSchedInserter = 1 in {
|
||||
// CMOV* - Used to implement the SSE SELECT DAG operation. Expanded after
|
||||
// instruction selection into a branch sequence.
|
||||
let Uses = [EFLAGS], usesCustomInserter = 1 in {
|
||||
def CMOV_FR32 : I<0, Pseudo,
|
||||
(outs FR32:$dst), (ins FR32:$t, FR32:$f, i8imm:$cond),
|
||||
"#CMOV_FR32 PSEUDO!",
|
||||
|
@ -3807,7 +3806,7 @@ let Constraints = "$src1 = $dst" in {
|
|||
}
|
||||
|
||||
// String/text processing instructions.
|
||||
let Defs = [EFLAGS], usesCustomDAGSchedInserter = 1 in {
|
||||
let Defs = [EFLAGS], usesCustomInserter = 1 in {
|
||||
def PCMPISTRM128REG : SS42AI<0, Pseudo, (outs VR128:$dst),
|
||||
(ins VR128:$src1, VR128:$src2, i8imm:$src3),
|
||||
"#PCMPISTRM128rr PSEUDO!",
|
||||
|
@ -3835,7 +3834,7 @@ def PCMPISTRM128rm : SS42AI<0x62, MRMSrcMem, (outs),
|
|||
}
|
||||
|
||||
let Defs = [EFLAGS], Uses = [EAX, EDX],
|
||||
usesCustomDAGSchedInserter = 1 in {
|
||||
usesCustomInserter = 1 in {
|
||||
def PCMPESTRM128REG : SS42AI<0, Pseudo, (outs VR128:$dst),
|
||||
(ins VR128:$src1, VR128:$src3, i8imm:$src5),
|
||||
"#PCMPESTRM128rr PSEUDO!",
|
||||
|
|
|
@ -357,9 +357,9 @@ def STWFI : PseudoInstXCore<(outs), (ins GRRegs:$src, MEMii:$addr),
|
|||
"${:comment} STWFI $src, $addr",
|
||||
[(store GRRegs:$src, ADDRspii:$addr)]>;
|
||||
|
||||
// SELECT_CC_* - Used to implement the SELECT_CC DAG operation. Expanded by the
|
||||
// scheduler into a branch sequence.
|
||||
let usesCustomDAGSchedInserter = 1 in {
|
||||
// SELECT_CC_* - Used to implement the SELECT_CC DAG operation. Expanded after
|
||||
// instruction selection into a branch sequence.
|
||||
let usesCustomInserter = 1 in {
|
||||
def SELECT_CC : PseudoInstXCore<(outs GRRegs:$dst),
|
||||
(ins GRRegs:$cond, GRRegs:$T, GRRegs:$F),
|
||||
"${:comment} SELECT_CC PSEUDO!",
|
||||
|
|
|
@ -94,7 +94,7 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr)
|
|||
isTerminator = R->getValueAsBit("isTerminator");
|
||||
isReMaterializable = R->getValueAsBit("isReMaterializable");
|
||||
hasDelaySlot = R->getValueAsBit("hasDelaySlot");
|
||||
usesCustomDAGSchedInserter = R->getValueAsBit("usesCustomDAGSchedInserter");
|
||||
usesCustomInserter = R->getValueAsBit("usesCustomInserter");
|
||||
hasCtrlDep = R->getValueAsBit("hasCtrlDep");
|
||||
isNotDuplicable = R->getValueAsBit("isNotDuplicable");
|
||||
hasSideEffects = R->getValueAsBit("hasSideEffects");
|
||||
|
|
|
@ -97,7 +97,7 @@ namespace llvm {
|
|||
bool isTerminator;
|
||||
bool isReMaterializable;
|
||||
bool hasDelaySlot;
|
||||
bool usesCustomDAGSchedInserter;
|
||||
bool usesCustomInserter;
|
||||
bool isVariadic;
|
||||
bool hasCtrlDep;
|
||||
bool isNotDuplicable;
|
||||
|
|
|
@ -114,7 +114,7 @@ static unsigned getResultPatternCost(TreePatternNode *P,
|
|||
if (Op->isSubClassOf("Instruction")) {
|
||||
Cost++;
|
||||
CodeGenInstruction &II = CGP.getTargetInfo().getInstruction(Op->getName());
|
||||
if (II.usesCustomDAGSchedInserter)
|
||||
if (II.usesCustomInserter)
|
||||
Cost += 10;
|
||||
}
|
||||
for (unsigned i = 0, e = P->getNumChildren(); i != e; ++i)
|
||||
|
|
|
@ -275,8 +275,7 @@ void InstrInfoEmitter::emitRecord(const CodeGenInstruction &Inst, unsigned Num,
|
|||
if (Inst.isReMaterializable) OS << "|(1<<TID::Rematerializable)";
|
||||
if (Inst.isNotDuplicable) OS << "|(1<<TID::NotDuplicable)";
|
||||
if (Inst.hasOptionalDef) OS << "|(1<<TID::HasOptionalDef)";
|
||||
if (Inst.usesCustomDAGSchedInserter)
|
||||
OS << "|(1<<TID::UsesCustomDAGSchedInserter)";
|
||||
if (Inst.usesCustomInserter) OS << "|(1<<TID::UsesCustomInserter)";
|
||||
if (Inst.isVariadic) OS << "|(1<<TID::Variadic)";
|
||||
if (Inst.hasSideEffects) OS << "|(1<<TID::UnmodeledSideEffects)";
|
||||
if (Inst.isAsCheapAsAMove) OS << "|(1<<TID::CheapAsAMove)";
|
||||
|
|
Loading…
Reference in New Issue