Changes in directory llvm/lib/Target:
Target.td updated: 1.64 -> 1.65 TargetSelectionDAG.td updated: 1.23 -> 1.24 --- Log message: Added support to specify predicates. --- Diffs of the changes: (+17 -2) Target.td | 14 ++++++++++++++ TargetSelectionDAG.td | 5 +++-- 2 files changed, 17 insertions(+), 2 deletions(-) Index: llvm/lib/Target/Target.td diff -u llvm/lib/Target/Target.td:1.64 llvm/lib/Target/Target.td:1.65 --- llvm/lib/Target/Target.td:1.64 Sun Dec 4 02:13:17 2005 +++ llvm/lib/Target/Target.td Wed Dec 14 16:02:59 2005 @@ -127,6 +127,7 @@ // include "../TargetSchedule.td" +class Predicate; // Forward def //===----------------------------------------------------------------------===// // Instruction set description - These classes correspond to the C++ classes in @@ -149,6 +150,10 @@ list<Register> Uses = []; // Default to using no non-operand registers list<Register> Defs = []; // Default to modifying no non-operand registers + // Predicates - List of predicates which will be turned into isel matching + // code. + list<Predicate> Predicates = []; + // These bits capture information about the high-level semantics of the // instruction. bit isReturn = 0; // Is this instruction a return instruction? @@ -168,6 +173,15 @@ InstrItinClass Itinerary; // Execution steps used for scheduling. } +/// Predicates - These are extra conditionals which are turned into instruction +/// selector matching code. Currently each predicate is just a string. +class Predicate<string cond> { + string CondString = cond; +} + +class Requires<list<Predicate> preds> { + list<Predicate> Predicates = preds; +} /// ops definition - This is just a simple marker used to identify the operands /// list for an instruction. This should be used like this: Index: llvm/lib/Target/TargetSelectionDAG.td diff -u llvm/lib/Target/TargetSelectionDAG.td:1.23 llvm/lib/Target/TargetSelectionDAG.td:1.24 --- llvm/lib/Target/TargetSelectionDAG.td:1.23 Wed Dec 14 13:40:54 2005 +++ llvm/lib/Target/TargetSelectionDAG.td Wed Dec 14 16:02:59 2005 @@ -382,8 +382,9 @@ // class Pattern<dag patternToMatch, list<dag> resultInstrs> { - dag PatternToMatch = patternToMatch; - list<dag> ResultInstrs = resultInstrs; + dag PatternToMatch = patternToMatch; + list<dag> ResultInstrs = resultInstrs; + list<Predicate> Predicates = []; // See class Instruction in Target.td. } // Pat - A simple (but common) form of a pattern, which produces a simple result _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits