[PATCH] D120752: [RegAlloc] Add a complexity limit in growRegion() to cap compilation time.
Mircea Trofin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 3 10:11:29 PST 2022
mtrofin accepted this revision.
mtrofin added a comment.
This revision is now accepted and ready to land.
Nit: can you please rephrase the commit message, last statement: the patch (correctly) doesn't place a limit on time (which would be non-deterministic), rather, it places a limit on the number of Blocks visited (deterministic).
The patch LGTM, but I'm curious, why do we end up with a bazillion edges, like what property do the blocks pointed at the edges have, like are they all going to an exit block, or in any case, is this a meaningful pattern - maybe we could avoid placement via the Hopfield Network, and instead do something simpler (and maybe it benefits the rest of the allocation)?
================
Comment at: llvm/lib/CodeGen/RegAllocGreedy.cpp:793
+ long Budget = GrowRegionComplexityBudget;
while (true) {
----------------
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?
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