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

Scott Constable via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 23 13:38:49 PDT 2020


sconstab added a comment.

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?

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?


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

https://reviews.llvm.org/D76639





More information about the llvm-commits mailing list