[PATCH] D59024: [CGP] Limit distance between overflow math and cmp
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 6 07:03:29 PST 2019
samparker created this revision.
samparker added reviewers: spatel, RKSimon, dmgreen.
Herald added a subscriber: javed.absar.
Inserting an overflowing arithmetic intrinsic can increase register pressure by producing two values at a point where only one is needed, while the second use maybe several blocks away. This increase in pressure could be more detrimental on performance than rematerialising one of the original instructions.
So, I've added a check that calculates the distance (in basic blocks) between the cmp and math instructions, limiting this to two. This covers the existing test cases.
https://reviews.llvm.org/D59024
Files:
lib/CodeGen/CodeGenPrepare.cpp
test/Transforms/CodeGenPrepare/ARM/overflow-intrinsics.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59024.189505.patch
Type: text/x-patch
Size: 2816 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190306/f1509ac8/attachment.bin>
More information about the llvm-commits
mailing list