[PATCH] D32575: Don't try to legalize Intermediate instructions (with generic types)

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 2 03:58:48 PDT 2017


dsanders added inline comments.


================
Comment at: lib/CodeGen/GlobalISel/Legalizer.cpp:183
+        if (isPreISelGenericOpcode(MI->getOpcode())) {
+          ++NumNewInsns;
+          WorkList.push_back(MI);
----------------
dsanders wrote:
> aditya_nandakumar wrote:
> > dsanders wrote:
> > > This line needs to happen unconditionally so that --debug-only=legalize reports the instruction.
> > Yes - for -debug-only printing output we would need it in the list but not process - but would disagree with Quentin's comment of not having the Instructions that are not needed in the work list.
> Incrementing NumNewInsns is just about how many instructions to print in the --debug-only=legalize output for that call to legalizeInstrStep(). The correlation with the growth of the work list is a coincidence.
As you rightly pointed out, they are connected in implementation right now because it's printing from the work list iterators instead of the BB iterators. I've looked into refactoring this away and I believe I've fixed this locally. I'll post the patch on-list once I've tested it.


https://reviews.llvm.org/D32575





More information about the llvm-commits mailing list