This patch adds CanonicalizeFreezeInLoops before LSR.
Relevant patch: https://reviews.llvm.org/D77523
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This deserves a PhaseOrdering test (going from the most underoptimized but minimized IR, -O3)
llvm/test/Transforms/CanonicalizeFreezeInLoops/aarch64.ll | ||
---|---|---|
5 | Probably needs REQUIRES? |
llvm/test/Transforms/CanonicalizeFreezeInLoops/aarch64.ll | ||
---|---|---|
5 | I'm not familiar with REQUIRES: directive, would this work? ; REQUIRES: arm-registered-target |
llvm/test/Transforms/CanonicalizeFreezeInLoops/aarch64.ll | ||
---|---|---|
2 | Precommit testcase? |
llvm/test/Transforms/CanonicalizeFreezeInLoops/aarch64.ll | ||
---|---|---|
5 | I believe for this triple it should be aarch64-registered-target. |
As the main patch is landed, probably it is okay to land this too?
If there is a non-trivial regression, I can temporarily revert this and work on it.
ping
I evaluated the performance impact on linking time by compiling CTMark with -O3 + LTO enabled, and the result was as follows:
(unit: sec.) bed7884 +D77524 speedup 7zip 47.34 47.29 0.12% bullet 9.83 9.62 2.28% clamscan 25.42 25.44 -0.06% SPASS 19.91 19.93 -0.12% consumer-typeset 19.12 19.24 -0.64% kimwitu++ 15.19 15.06 0.88% lencod 39.91 40.03 -0.30% mafft 8.77 8.77 0.05% sqlite3 25.07 25.33 -1.02% tramp3d-v4 36.23 36.21 0.06%
The geometric mean of speedup is -0.13%, which seems to be within an error, considering that compilation time (without linking time) showed 0.1% average speedup which should be 0% in theory because LTO is enabled.
As the validity of this patch has been discussed at D77523, I think it is okay to add the pass before LSR.
https://bugs.llvm.org/show_bug.cgi?id=50440 was filed as a response to this. Since it doesn't look like we'll be able to fix forward quickly and clang 12.0.1 is about to release, I've filed https://bugs.llvm.org/show_bug.cgi?id=50573 to revert this from the main and release/12.x branches.
clang-format-diff not found in user's PATH; not linting file.