diff options
author | Andrew Trick <atrick@apple.com> | 2012-10-03 23:06:32 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-10-03 23:06:32 +0000 |
commit | 13745262a8db98d6c4513ff9934db4be75a8b26c (patch) | |
tree | 94a2e5f6ae75723c8ef8895bbd96fc264d52821d /include | |
parent | 2062b1260fa9df3e69e7b4d24a657a0ebb7f8710 (diff) | |
download | llvm-13745262a8db98d6c4513ff9934db4be75a8b26c.tar.gz llvm-13745262a8db98d6c4513ff9934db4be75a8b26c.tar.bz2 llvm-13745262a8db98d6c4513ff9934db4be75a8b26c.tar.xz |
Added instregex support to TableGen subtarget emitter.
This allows the processor-specific machine model to override selected
base opcodes without any fanciness.
e.g. InstRW<[CoreXWriteVANDP], (instregex "VANDP")>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165180 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Target/TargetSchedule.td | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/llvm/Target/TargetSchedule.td b/include/llvm/Target/TargetSchedule.td index cf3d250590..0da82fdd89 100644 --- a/include/llvm/Target/TargetSchedule.td +++ b/include/llvm/Target/TargetSchedule.td @@ -55,6 +55,15 @@ include "llvm/Target/TargetItinerary.td" class Instruction; // Forward def +// DAG operator that interprets the DAG args as Instruction defs. +def instrs; + +// DAG operator that interprets each DAG arg as a regex pattern for +// matching Instruction opcode names. +// The regex must match the beginning of the opcode (as in Python re.match). +// To avoid matching prefixes, append '$' to the pattern. +def instregex; + // Define the SchedMachineModel and provide basic properties for // coarse grained instruction cost model. Default values for the // properties are defined in MCSchedModel. A value of "-1" in the @@ -325,9 +334,9 @@ class SchedReadVariant<list<SchedVar> variants> : SchedRead, // the subtarget to easily override specific operations. // // SchedModel ties this opcode mapping to a processor. -class InstRW<list<SchedReadWrite> rw, list<Instruction> instrs> { +class InstRW<list<SchedReadWrite> rw, dag instrlist> { list<SchedReadWrite> OperandReadWrites = rw; - list<Instruction> Instrs = instrs; + dag Instrs = instrlist; SchedMachineModel SchedModel = ?; } |