[PATCH] D46695: [RFC] [Patch 1/3] Add a new class of predicates for variant scheduling classes.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 11 10:23:04 PDT 2018


RKSimon added a comment.

A few minor questions about naming conventions.



================
Comment at: include/llvm/Target/TargetInstrPredicate.td:73
+// A generic machine instruction predicate.
+class MCPredicate;
+
----------------
Should this be more specific and called MCInstPredicate? I have no strong preference tbh


================
Comment at: include/llvm/Target/TargetInstrPredicate.td:84
+// set of opcodes.
+class CheckNot<MCPredicate P> : MCPredicate {
+  MCPredicate Pred = P;
----------------
What should be the rules on naming classes such as this? As Tablegen doesn't have any concept of namespace scope should all of these have a MC prefix or something?


================
Comment at: include/llvm/Target/TargetInstrPredicate.td:153
+// MCInst.
+class NonPortableCheck<string Code> : MCPredicate {
+  string CodeBlock = Code;
----------------
AFAICT all the other MCPredicate child classes start with Check - CheckNonPortable?


https://reviews.llvm.org/D46695





More information about the llvm-commits mailing list