The loop here calls ConstantFoldConstantExpression before knowing if all the operands are constant, which can waste a lot of time. Cuts time spent in ConstantFoldInstruction (and callees) by ~20% in our tests. Should be NFC.
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM with nits.
| lib/Analysis/ConstantFolding.cpp | ||
|---|---|---|
| 986 | I don't think you need the llvm:: qualifier. | |
I don't think you need the llvm:: qualifier.
Also, I think clang-format would not have a space between the capture and the parameter.