Replacing uses of std::function pointers or refs, or Optional, to
function_ref, since the usage pattern allows that. If the function is
optional, using a default parameter value (nullptr). This led to a few
parameter reshufles, to push all optionals to the end of the parameter
list.
Details
- Reviewers
davidxl dblaikie - Commits
- rG08e2386dee3f: Revert "Revert "[llvm][NFC] Cleanup uses of std::function in Inlining-related…
rG454de99a6fec: Revert "[llvm][NFC] Cleanup uses of std::function in Inlining-related APIs"
rG767db5be67ca: [llvm][NFC] Cleanup uses of std::function in Inlining-related APIs
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
Looks good at a glance to me - welcome to make changes like that without review in the future.
llvm/lib/Transforms/Utils/InlineFunction.cpp | ||
---|---|---|
1907–1911 | Aside: This set of {} seems sort of arbitrary - given the larger for loop outside this doesn't use {} and the ifs inside don't... why this particular level of nesting with {}? Could remove those in a separate patch if you like | |
2499 | This still seems to have unnecessary parentheses, instead: &IFI.GetAssumptionCache(*Caller) should be fine. (few other cases of similarly unnecessary () in other similar places in this file you could remove, since you're moving them around anyway) |
Aside: This set of {} seems sort of arbitrary - given the larger for loop outside this doesn't use {} and the ifs inside don't... why this particular level of nesting with {}? Could remove those in a separate patch if you like