mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
a3a549be48
InlineHelpers often inlines functions that contain a switch on an argument that is constant on the call site. Specifically, this is true for the `cc_compute_c` and `cc_compute_all` helpers of x86 architectures. The LLVM inliner, in such situations, is smart and inlines a reduced amount of code, significantly reducing the maximum size of the modules we work with. However, before this commit, we couldn't capture this fact due to `newpc` preventing constant propagation of the values of CSV set in an instruction into their usage in the next instruction. Running `PromoteCSV` before `InlineHelpers`, along with `mem2reg` enables us to capture this behavior effectively.