This eliminates ~200 lines of code mostly file scoped struct definitions that were unnecessary.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
It mostly seems reasonable to me, but I don't know this area of the code, and do not feel at all comfortable giving an LGTM, so someone more experienced should look at it.
My only complaint about the patch as a whole is that it could probably have been cut in several parts, in particular all the whitespace/formatting changes could have been a separate patch and it would have made reviewing much easier.
Nitpicks inline.
include/llvm/Transforms/Utils/SimplifyLibCalls.h | ||
---|---|---|
57 ↗ | (On Diff #13735) | Could you give a comment here for the intended use/semantics for this method ? |
lib/Transforms/Utils/SimplifyLibCalls.cpp | ||
1626 ↗ | (On Diff #13735) | The comment here got mangled by the reformatting. |
1902 ↗ | (On Diff #13735) | This looks like a behavior change. If so it should probably be in a separate patch (this one is already rather bulky). |
2046 ↗ | (On Diff #13735) | Same as before, this does not look like just a part of the refactor. |
2071 ↗ | (On Diff #13735) | This could perhaps be replaced by an initializer list ? |
2076 ↗ | (On Diff #13735) | Is this necessary ? If it does nothing I would be tempted to just keep the default destructor. |
I'm going to work on revisions based on the feedback, but I had a few comments.
lib/Transforms/Utils/SimplifyLibCalls.cpp | ||
---|---|---|
1902 ↗ | (On Diff #13735) | This actually isn't a behavior change. It was part of LibCallOptimization::optimizeCall. Since the refactoring removed that method I've moved the check here. |
2046 ↗ | (On Diff #13735) | This actually isn't a behavior change. It was also part of LibCallOptimization::optimizeCall. |
- Renamed isFoldable to be more descriptive
- Cleaned up constructors and destructors
- Added some comments
- Fixed formatting in a few places where clang-format went a bit nuts