[PATCH] D30535: [tablegen][globalisel] Capture instructions into locals and related infrastructure for multiple instructions matches.

Diana Picus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 16 09:14:42 PDT 2017


rovka accepted this revision.
rovka added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: utils/TableGen/GlobalISelEmitter.cpp:577
+
+  const OperandMatcher &getOperandChecked(const StringRef SymbolicName) const {
+    const OperandMatcher *OM = getOperand(SymbolicName);
----------------
dsanders wrote:
> rovka wrote:
> > Are you planning to add more checks here? If not, I would suggest naming this getOperand and renaming getOperand to getOperandOrNull (otherwise it's a bit unclear what it's checking without looking at the code).
> No, the 'Checked' is just to distinguish between the case that's allowed to fail and the one that isn't. I'll rename it.
> 
> What do you think about getOptionalOperand (returning an Optional<>) for the one that's allowed to fail? I think that might fit better with the support for OperandWithDefaultOps I'm looking into at the moment.
Ok, sounds good.


https://reviews.llvm.org/D30535





More information about the llvm-commits mailing list