[PATCH] D65984: [GlobalISel] Make the InstructionSelector instance non-const, allowing state to be maintained.

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 12 18:07:23 PDT 2019


dsanders accepted this revision.
dsanders added a comment.

I can't say I'm keen for it to have any state but collecting the result of expensive per-MF checks seems reasonable. LGTM with a naming nit pick



================
Comment at: llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp:72
   assert(ISel && "Cannot work without InstructionSelector");
+  ISel->init(MF, CoverageInfo);
 
----------------
Just a nit pick: init() gives the impression that it will only be run once per object. Could we name it runBeforeISel(), prepareForMF() or something to make it clear that it runs every time?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65984/new/

https://reviews.llvm.org/D65984





More information about the llvm-commits mailing list