[PATCH] D76639: Change X86RetpolineThunks from a MachineFunctionPass to a ModulePass

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 23 14:11:19 PDT 2020


craig.topper added a comment.

In D76639#1937693 <https://reviews.llvm.org/D76639#1937693>, @sconstab wrote:

> In D76639#1937680 <https://reviews.llvm.org/D76639#1937680>, @craig.topper wrote:
>
> > This probably has a hidden side effect on the pass manager construction. Inserting a module pass into the middle of the pipeline effectively introduces a serialization point in the middle of the pipeline. This means all functions have to reach this point in the pipeline before any function can continue. I believe this will cause the Machine IR for all functions to become resident in memory at once. This will substantially increase the memory usage of the compiler.
>
>
> Isn't this what already happens with the SymbolRewriter?


Isn't SymbolRewriter before any of the MachineIR passes?

> I had also tried grouping the X86RetpolineThunks ModulePass with some earlier module passes, but then later passes would attempt to perform transformations that assume SSA form. Is there a way to move the pass earlier in the pipeline, and prevent any subsequent passes from modifying the retpolines?

Are there other ModulePasses after isel?


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

https://reviews.llvm.org/D76639





More information about the llvm-commits mailing list