[PATCH] D93423: [GlobalISel] Use slot indexes to speed up huge block compile time

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 15:42:51 PST 2020


aemerson added a comment.

In D93423#2459003 <https://reviews.llvm.org/D93423#2459003>, @aditya_nandakumar wrote:

> In D93423#2458972 <https://reviews.llvm.org/D93423#2458972>, @arsenm wrote:
>
>> I still think the CSE MIR builder shouldn't be required to CSE and can bail early on long dominance queries
>
> I guess the concern is how exactly one defines "early" and "long". Should it be universal? Opt in? Configurable ?.. What if it bailed just a few instructions away from the target instruction. What about the compile time impact of counting and checking in loop in the cases where you don't need and so on.

I don't know if it's feasible to dynamically require SlotIndexes to be run, but if it is: to ensure we never have different codegen depending on the threshold we can conditionally use SlotIndexes when we detect earlier on (maybe after translation), that the function we're compiling, or at least the entry block, is very large. If we detect that say the block is 100k generic instructions long, we could set a flag somewhere to indicate that and switch to using the indexes vs linked list walk.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93423



More information about the llvm-commits mailing list