[PATCH] D120752: [RegAlloc] Add a complexity limit in growRegion() to cap compilation time.

Vasileios Porpodas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 3 10:26:08 PST 2022


vporpo added inline comments.


================
Comment at: llvm/lib/CodeGen/RegAllocGreedy.cpp:793
 
+  long Budget = GrowRegionComplexityBudget;
   while (true) {
----------------
mtrofin wrote:
> You could just take `Visited` out of its conditional compilation block and compare it to `GrowRegionComplexityBudget`. I realize `Visited` is incremented less often than Budget is currently decremented, but it does achieve the same goal?
Yes, it would be similar I guess, but I think it is probably best to keep the counters separate as their purpose is different.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120752



More information about the llvm-commits mailing list