[FuncSpec][NFC] Avoid redundant computations of DominatorTree/LoopInfo
The `FunctionSpecialization` pass needs loop analysis results for its cost function. For this purpose, it computes the `DominatorTree` and `LoopInfo` for a function in `getSpecializationBonus`. This function, however, is called O(number of call sites x number of arguments), but the DominatorTree/LoopInfo can be computed just once. This patch plugs into the PassManager infrastructure to obtain LoopInfo for a function and removes ad-hoc computation from `getSpecializatioBonus`. Reviewed By: ChuanqiXu, labrinea Differential Revision: https://reviews.llvm.org/D136332
Loading
Please sign in to comment