[PATCH] D136332: [FuncSpec][NFC] Avoid redundant computations of DominatorTree/LoopInfo
Chuanqi Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 20 19:17:01 PDT 2022
ChuanqiXu added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/FunctionSpecialization.cpp:837
SCCPSolver Solver(DL, GetTLI, M.getContext());
FunctionSpecializer FS(Solver, GetAC, GetTTI, GetTLI);
bool Changed = false;
----------------
Solver is a member variable of `FunctionSpecializer` already. So the most of the work to rewrite signatures look odd to me
================
Comment at: llvm/lib/Transforms/IPO/SCCP.cpp:80
F)),
- nullptr, // We cannot preserve the DT or PDT with the legacy pass
- nullptr}; // manager, so set them to nullptr.
+ nullptr, // We cannot preserve the LI, DT or PDT with the legacy pass
+ nullptr, // manager, so set them to nullptr.
----------------
chill wrote:
> I don't understand why not preserving the DT is a reason to not pass it. Maybe @fhahn can provide a rationale?
>
> In the meantime, there's a workaround to compute DT/LI on the spot.
>
The code lives in Legacy path. And the legacyPM related code can be removed now.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136332/new/
https://reviews.llvm.org/D136332
More information about the llvm-commits
mailing list