1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Add way to test for generic TargetOpcodes

The alternative would be to add a bit to the target's
InstrFlags but that seems like a waste of a bit.

llvm-svn: 249169
This commit is contained in:
Matt Arsenault 2015-10-02 18:58:33 +00:00
parent 2579a6b0e5
commit 280210a9d9
2 changed files with 8 additions and 0 deletions

View File

@ -62,6 +62,10 @@ public:
virtual ~TargetInstrInfo();
static bool isGenericOpcode(unsigned Opc) {
return Opc <= TargetOpcode::GENERIC_OP_END;
}
/// Given a machine instruction descriptor, returns the register
/// class constraint for OpNum, or NULL.
const TargetRegisterClass *getRegClass(const MCInstrDesc &TID,

View File

@ -128,6 +128,10 @@ enum {
/// "zero cost" null checks in managed languages by allowing LLVM to fold
/// comparisons into existing memory operations.
FAULTING_LOAD_OP = 22,
/// BUILTIN_OP_END - This must be the last enum value in this list.
/// The target-specific post-isel opcode values start here.
GENERIC_OP_END = FAULTING_LOAD_OP,
};
} // end namespace TargetOpcode
} // end namespace llvm