aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorVikram Hegde <115221833+vikramRH@users.noreply.github.com>2025-07-18 11:58:01 +0530
committerGitHub <noreply@github.com>2025-07-18 11:58:01 +0530
commit06528070fce04d580821b3448f1d5321e0a9a97b (patch)
tree6d7f975831cf4591294b9f4008456b19ff4f2449 /llvm/lib/Transforms/Utils/Local.cpp
parent5fe9b5235298dc67864e947ea23df201aec177fc (diff)
downloadllvm-06528070fce04d580821b3448f1d5321e0a9a97b.zip
llvm-06528070fce04d580821b3448f1d5321e0a9a97b.tar.gz
llvm-06528070fce04d580821b3448f1d5321e0a9a97b.tar.bz2
[CodeGen][NPM] Clear MachineFunctions without using PA (#148113)
same as https://github.com/llvm/llvm-project/pull/139517 This replaces the InvalidateAnalysisPass<MachineFunctionAnalysis> pass. There are no cross-function analysis requirements right now, so clearing all analyses works for the last pass in the pipeline. Having the InvalidateAnalysisPass<MachineFunctionAnalysis>() is causing a problem with ModuleToCGSCCPassAdaptor by deleting machine functions for other functions and ending up with exactly one correctly compiled MF, with the rest being vanished. This is because ModuleToCGSCCPAdaptor propagates PassPA (received from the CGSCCToFunctionPassAdaptor that runs the actual codegen pipeline on MFs) to the next SCC. That causes MFA invalidation on functions in the next SCC. For us, PassPA happens to be returned from invalidate<machine-function-analysis> which abandons the MachineFunctionAnalysis. So while the first function runs through the pipeline normally, invalidate also deletes the functions in the next SCC before its pipeline is run. (this seems to be the intended mechanism of the CG adaptor to allow cross-SCC invalidations. Co-authored-by : Oke, Akshat <[Akshat.Oke@amd.com](mailto:Akshat.Oke@amd.com)>
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
0 files changed, 0 insertions, 0 deletions