[PATCH] D129612: [Reassociate] Cleanup minor missed optimizations
Warren Ristow via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 12 18:17:02 PDT 2022
wristow created this revision.
wristow added reviewers: spatel, RKSimon, lebedev.ri.
Herald added a subscriber: hiraditya.
Herald added a project: All.
wristow requested review of this revision.
Herald added a project: LLVM.
In analyzing issue #56483, it was noticed that running `opt` with
`-reassociate` was missing some minor optimizations. For example,
there were cases where the running `opt` on IR with floating-point
instructions that have the `fast` flags applied, sometimes resulted in
less efficient code than the input IR (things like dead instructions
left behind, and missed reassociations). These were sometimes noted
in the test-files with TODOs, to investigate further. This commit
fixes some of these problems, removing some TODOs in the process.
FTR, I refer to these as "minor" missed optimizations, because when
running a full clang/llvm compilation, these inefficiencies are not
happening, as other passes clean that residue up. Regardless, having
cleaner IR produced by `opt`, makes assessing the quality of fixes done
in `opt` easier.
https://reviews.llvm.org/D129612
Files:
llvm/lib/Transforms/Scalar/Reassociate.cpp
llvm/test/Transforms/Reassociate/fast-ReassociateVector.ll
llvm/test/Transforms/Reassociate/fast-basictest.ll
llvm/test/Transforms/Reassociate/pr42349.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129612.444128.patch
Type: text/x-patch
Size: 10090 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220713/7ba6ed7e/attachment.bin>
More information about the llvm-commits
mailing list