Even if there are no interesting functions, the SCCP solver would still run before bailing and doing nothing. Now bail earlier, avoid running the solver for nothing.
Details
Details
Diff Detail
Diff Detail
Event Timeline
llvm/lib/Transforms/IPO/FunctionSpecialization.cpp | ||
---|---|---|
828 | Consider replacing with if(TrackedFuncs.empty()). IMO its a little easier to read. Also I wonder if moving lines 822-831 before we define RunSCCPSolver on L793 makes it easier to read. I was confused for a bit before realizing that L793 is creating a functor. Wdyt? | |
llvm/test/Transforms/FunctionSpecialization/function-specialization-nothing-todo.ll | ||
19 | typo: absence |
Consider replacing with if(TrackedFuncs.empty()). IMO its a little easier to read.
Also I wonder if moving lines 822-831 before we define RunSCCPSolver on L793 makes it easier to read. I was confused for a bit before realizing that L793 is creating a functor. Wdyt?