mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
8a3c0788e9
Summary: Prepare the way for nested instruction matching support by having actions like CopyRenderer look up operands in the RuleMatcher rather than a specific InstructionMatcher. This allows actions to reference any operand from any matched instruction. It works by checking the 'shape' of the match and capturing each matched instruction to a local variable. If the shape is wrong (not enough operands, leaf nodes where non-leafs are expected, etc.), then the rule exits early without checking the predicates. Once we've captured the instructions, we then test the predicates as before (except using the local variables). If the match is successful, then we render the new instruction as before using the local variables. It's not noticable in this patch but by the time we support multiple instruction matching, this patch will also cause a significant improvement to readability of the emitted code since MRI.getVRegDef(I->getOperand(0).getReg()) will simply be MI1 after emitCxxCaptureStmts(). This isn't quite NFC because I've also fixed a bug that I'm surprised we haven't encountered yet. It now checks there are at least the expected number of operands before accessing them with getOperand(). Depends on D30531 Reviewers: t.p.northover, qcolombet, aditya_nandakumar, ab, rovka Reviewed By: rovka Subscribers: dberris, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D30535 llvm-svn: 298257 |
||
---|---|---|
.. | ||
2003-08-03-PassCode.td | ||
2006-09-18-LargeInt.td | ||
2010-03-24-PrematureDefaults.td | ||
AnonDefinitionOnDemand.td | ||
AsmPredicateCondsEmission.td | ||
AsmVariant.td | ||
BitOffsetDecoder.td | ||
BitsInit.td | ||
BitsInitOverflow.td | ||
cast-list-initializer.td | ||
cast.td | ||
ClassInstanceValue.td | ||
CStyleComment.td | ||
Dag.td | ||
defmclass.td | ||
DefmInherit.td | ||
DefmInsideMultiClass.td | ||
DuplicateFieldValues.td | ||
eq.td | ||
eqbit.td | ||
FieldAccess.td | ||
foreach.td | ||
ForeachList.td | ||
ForeachLoop.td | ||
ForwardRef.td | ||
GeneralList.td | ||
GlobalISelEmitter.td | ||
if-empty-list-arg.td | ||
if.td | ||
ifbit.td | ||
Include.inc | ||
Include.td | ||
IntBitInit.td | ||
intrinsic-long-name.td | ||
intrinsic-varargs.td | ||
LazyChange.td | ||
LetInsideMultiClasses.td | ||
lisp.td | ||
list-element-bitref.td | ||
ListArgs.td | ||
ListArgsSimple.td | ||
listconcat.td | ||
ListConversion.td | ||
ListManip.td | ||
ListOfList.td | ||
ListSlices.td | ||
lit.local.cfg | ||
LoLoL.td | ||
math.td | ||
MultiClass.td | ||
MultiClassDefName.td | ||
MultiClassInherit.td | ||
MultiPat.td | ||
nested-comment.td | ||
NestedForeach.td | ||
Paste.td | ||
pr8330.td | ||
RegisterBankEmitter.td | ||
SetTheory.td | ||
SiblingForeach.td | ||
Slice.td | ||
strconcat.td | ||
String.td | ||
subst2.td | ||
subst.td | ||
SuperSubclassSameName.td | ||
TargetInstrInfo.td | ||
TargetInstrSpec.td | ||
TemplateArgRename.td | ||
Tree.td | ||
TreeNames.td | ||
trydecode-emission2.td | ||
trydecode-emission3.td | ||
trydecode-emission.td | ||
TwoLevelName.td | ||
UnsetBitInit.td | ||
UnterminatedComment.td | ||
usevalname.td | ||
ValidIdentifiers.td |