[PATCH] D114831: [NFC][regalloc] Move ExtraRegInfo and related to LiveRangeStageManager

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 2 13:56:06 PST 2021


mtrofin added inline comments.


================
Comment at: llvm/lib/CodeGen/RegAllocGreedy.cpp:176
   std::unique_ptr<VirtRegAuxInfo> VRAI;
+  std::unique_ptr<LiveRangeStageManager> LRSM;
 
----------------
mtrofin wrote:
> mtrofin wrote:
> > MatzeB wrote:
> > > Is it possible to embed this by value to avoid the extra indirections?
> > Oh, is this the reason for avoiding nondefault ctor? Let me fire up a https://llvm-compile-time-tracker.com/ experiment, if overhead is a concern.
> [[ https://llvm-compile-time-tracker.com/compare.php?from=e0b259f22c003ffe909693c6ab0d508d1814434d&to=6e50c112689040a071a963272cba1df8ffd11854&stat=instructions | Here it is ]] - arguably, the indirection has no impact.
> 
Actually - I think we can avoid the heap allocation, and not require default ctor, too, if we used Optional. I'll try that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114831



More information about the llvm-commits mailing list