return hasProperty(MCID::Pseudo, Type);
}
+ /// Return true if this instruction doesn't produce any output in the form of
+ /// executable instructions.
+ bool isMetaInstruction(QueryType Type = AnyInBundle) const {
+ return hasProperty(MCID::Meta, Type);
+ }
+
bool isReturn(QueryType Type = AnyInBundle) const {
return hasProperty(MCID::Return, Type);
}
getOperand(0).getSubReg() == getOperand(1).getSubReg();
}
- /// Return true if this instruction doesn't produce any output in the form of
- /// executable instructions.
- bool isMetaInstruction() const {
- switch (getOpcode()) {
- default:
- return false;
- case TargetOpcode::IMPLICIT_DEF:
- case TargetOpcode::KILL:
- case TargetOpcode::CFI_INSTRUCTION:
- case TargetOpcode::EH_LABEL:
- case TargetOpcode::GC_LABEL:
- case TargetOpcode::DBG_VALUE:
- case TargetOpcode::DBG_VALUE_LIST:
- case TargetOpcode::DBG_INSTR_REF:
- case TargetOpcode::DBG_PHI:
- case TargetOpcode::DBG_LABEL:
- case TargetOpcode::LIFETIME_START:
- case TargetOpcode::LIFETIME_END:
- case TargetOpcode::PSEUDO_PROBE:
- case TargetOpcode::ARITH_FENCE:
- return true;
- }
- }
-
/// Return true if this is a transient instruction that is either very likely
/// to be eliminated during register allocation (such as copy-like
/// instructions), or if this instruction doesn't have an execution-time cost.
bit isPseudo = false; // Is this instruction a pseudo-instruction?
// If so, won't have encoding information for
// the [MC]CodeEmitter stuff.
+ bit isMeta = false; // Is this instruction a meta-instruction?
+ // If so, won't produce any output in the form of
+ // executable instructions
bit isExtractSubreg = false; // Is this instruction a kind of extract subreg?
// If so, make sure to override
// TargetInstrInfo::getExtractSubregLikeInputs.
let hasCtrlDep = true;
let hasSideEffects = false;
let isNotDuplicable = true;
+ let isMeta = true;
}
def EH_LABEL : StandardPseudoInstruction {
let OutOperandList = (outs);
let hasCtrlDep = true;
let hasSideEffects = false;
let isNotDuplicable = true;
+ let isMeta = true;
}
def GC_LABEL : StandardPseudoInstruction {
let OutOperandList = (outs);
let hasCtrlDep = true;
let hasSideEffects = false;
let isNotDuplicable = true;
+ let isMeta = true;
}
def ANNOTATION_LABEL : StandardPseudoInstruction {
let OutOperandList = (outs);
let InOperandList = (ins variable_ops);
let AsmString = "";
let hasSideEffects = false;
+ let isMeta = true;
}
def EXTRACT_SUBREG : StandardPseudoInstruction {
let OutOperandList = (outs unknown:$dst);
let hasSideEffects = false;
let isReMaterializable = true;
let isAsCheapAsAMove = true;
+ let isMeta = true;
}
def SUBREG_TO_REG : StandardPseudoInstruction {
let OutOperandList = (outs unknown:$dst);
let InOperandList = (ins variable_ops);
let AsmString = "DBG_VALUE";
let hasSideEffects = false;
+ let isMeta = true;
}
def DBG_VALUE_LIST : StandardPseudoInstruction {
let OutOperandList = (outs);
let InOperandList = (ins variable_ops);
let AsmString = "DBG_VALUE_LIST";
let hasSideEffects = 0;
+ let isMeta = true;
}
def DBG_INSTR_REF : StandardPseudoInstruction {
let OutOperandList = (outs);
let InOperandList = (ins variable_ops);
let AsmString = "DBG_INSTR_REF";
let hasSideEffects = false;
+ let isMeta = true;
}
def DBG_PHI : StandardPseudoInstruction {
let OutOperandList = (outs);
let InOperandList = (ins variable_ops);
let AsmString = "DBG_PHI";
let hasSideEffects = 0;
+ let isMeta = true;
}
def DBG_LABEL : StandardPseudoInstruction {
let OutOperandList = (outs);
let InOperandList = (ins unknown:$label);
let AsmString = "DBG_LABEL";
let hasSideEffects = false;
+ let isMeta = true;
}
def REG_SEQUENCE : StandardPseudoInstruction {
let OutOperandList = (outs unknown:$dst);
let InOperandList = (ins i32imm:$id);
let AsmString = "LIFETIME_START";
let hasSideEffects = false;
+ let isMeta = true;
}
def LIFETIME_END : StandardPseudoInstruction {
let OutOperandList = (outs);
let InOperandList = (ins i32imm:$id);
let AsmString = "LIFETIME_END";
let hasSideEffects = false;
+ let isMeta = true;
}
def PSEUDO_PROBE : StandardPseudoInstruction {
let OutOperandList = (outs);
let InOperandList = (ins i64imm:$guid, i64imm:$index, i8imm:$type, i32imm:$attr);
let AsmString = "PSEUDO_PROBE";
let hasSideEffects = 1;
+ let isMeta = true;
}
def ARITH_FENCE : StandardPseudoInstruction {
let OutOperandList = (outs unknown:$dst);
let AsmString = "";
let hasSideEffects = false;
let Constraints = "$src = $dst";
+ let isMeta = true;
}
def STACKMAP : StandardPseudoInstruction {