This is an archive of the discontinued LLVM Phabricator instance.

[globalisel] OperandPredicateMatcher's shouldn't need to generate the MachineOperand expr. NFC
ClosedPublic

Authored by dsanders on Feb 8 2017, 4:02 AM.

Details

Summary

Each OperandPredicateMatcher shouldn't need to know how to generate the expression
to reference a MachineOperand. The OperandMatcher should provide it.

In addition to separating responsibilities, this also lays some groundwork for
decoupling source patterns from destination patterns to allow invented operands
or operands provided by GlobalISel's equivalent to the ComplexPattern<> class.

Depends on D29709

Event Timeline

dsanders created this revision.Feb 8 2017, 4:02 AM
rovka added inline comments.Feb 8 2017, 7:45 AM
utils/TableGen/GlobalISelEmitter.cpp
133–134

This comment is out of date.

dsanders updated this revision to Diff 87660.Feb 8 2017, 7:58 AM

Fix out of date comment.

ab accepted this revision.Feb 8 2017, 7:02 PM
ab added inline comments.
utils/TableGen/GlobalISelEmitter.cpp
186

"const StringRef" -> StringRef

(I now realize we had the same elsewhere; fixed that in r294555).

This revision is now accepted and ready to land.Feb 8 2017, 7:02 PM
dsanders added inline comments.Feb 9 2017, 1:10 AM
utils/TableGen/GlobalISelEmitter.cpp
186

What's wrong with 'const StringRef'? Why should InsnVarName be assignable?

dsanders updated this revision to Diff 88031.Feb 10 2017, 11:57 AM

Rebased to trunk

dsanders closed this revision.Feb 20 2017, 7:42 AM