summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenInstruction.h
diff options
context:
space:
mode:
authorJoey Gouly <joey.gouly@arm.com>2013-09-12 10:28:05 +0000
committerJoey Gouly <joey.gouly@arm.com>2013-09-12 10:28:05 +0000
commit0e76fa7df566cbe1f8140806937814651b7634d0 (patch)
treed0d2fe928fbb1fefba2c5a57bf73a5661b4c0d8b /llvm/utils/TableGen/CodeGenInstruction.h
parent9caa10d0c78989c149ef9732c6a888ba170c76b3 (diff)
downloadbcm5719-llvm-0e76fa7df566cbe1f8140806937814651b7634d0.tar.gz
bcm5719-llvm-0e76fa7df566cbe1f8140806937814651b7634d0.zip
Add an instruction deprecation feature to TableGen.
The 'Deprecated' class allows you to specify a SubtargetFeature that the instruction is deprecated on. The 'ComplexDeprecationPredicate' class allows you to define a custom predicate that is called to check for deprecation. For example: ComplexDeprecationPredicate<"MCR"> would mean you would have to define the following function: bool getMCRDeprecationInfo(MCInst &MI, MCSubtargetInfo &STI, std::string &Info) Which returns 'false' for not deprecated, and 'true' for deprecated and store the warning message in 'Info'. The MCTargetAsmParser constructor was chaned to take an extra argument of the MCInstrInfo class, so out-of-tree targets will need to be changed. llvm-svn: 190598
Diffstat (limited to 'llvm/utils/TableGen/CodeGenInstruction.h')
-rw-r--r--llvm/utils/TableGen/CodeGenInstruction.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CodeGenInstruction.h b/llvm/utils/TableGen/CodeGenInstruction.h
index d1e11535548..6004f667927 100644
--- a/llvm/utils/TableGen/CodeGenInstruction.h
+++ b/llvm/utils/TableGen/CodeGenInstruction.h
@@ -248,6 +248,9 @@ namespace llvm {
bool isCodeGenOnly;
bool isPseudo;
+ std::string DeprecatedReason;
+ bool HasComplexDeprecationPredicate;
+
/// Are there any undefined flags?
bool hasUndefFlags() const {
return mayLoad_Unset || mayStore_Unset || hasSideEffects_Unset;
OpenPOWER on IntegriCloud