[PATCH] D29743: [GlobalISel] Separate the SelectionDAG importer from the emitter. NFC: alternative using Expected<>

Ahmed Bougacha via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 9 20:17:02 PST 2017


ab added inline comments.


================
Comment at: utils/TableGen/GlobalISelEmitter.cpp:409
   if (!P.getPredicates()->getValues().empty())
-    return SkipReason{"Pattern has a predicate"};
+    return skipBecause("Pattern has a predicate");
 
----------------
dsanders wrote:
> Would this make more sense as ImportError()?
Yeah, that's better.  I went with failedImport to keep it a verb, let me know if you have a better idea!


================
Comment at: utils/TableGen/GlobalISelEmitter.cpp:548-550
+
+    MatcherOrErr->emit(OS);
+    ++NumPatternEmitted;
----------------
dsanders wrote:
> The main aim of D29709 was to separate the importer from the emitter so that there can be a sort inserted between them. As such, this needs to be in a separate loop that iterates over the whole rule-set.
Let me get rid of this and let's do the more interesting stuff in D29709;  do you want me to rebase it onto this?


Repository:
  rL LLVM

https://reviews.llvm.org/D29743





More information about the llvm-commits mailing list