[PATCH] D15467: [PPC] Early exit loop in getPrefLoopAlignment().
Chad Rosier via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 11 14:08:58 PST 2015
mcrosier created this revision.
mcrosier added a reviewer: hfinkel.
mcrosier added a subscriber: llvm-commits.
Just something I saw in passing..
Chad
http://reviews.llvm.org/D15467
Files:
lib/Target/PowerPC/PPCISelLowering.cpp
Index: lib/Target/PowerPC/PPCISelLowering.cpp
===================================================================
--- lib/Target/PowerPC/PPCISelLowering.cpp
+++ lib/Target/PowerPC/PPCISelLowering.cpp
@@ -10801,8 +10801,11 @@
// boundary so that the entire loop fits in one instruction-cache line.
uint64_t LoopSize = 0;
for (auto I = ML->block_begin(), IE = ML->block_end(); I != IE; ++I)
- for (auto J = (*I)->begin(), JE = (*I)->end(); J != JE; ++J)
+ for (auto J = (*I)->begin(), JE = (*I)->end(); J != JE; ++J) {
LoopSize += TII->GetInstSizeInBytes(J);
+ if (LoopSize > 32)
+ break;
+ }
if (LoopSize > 16 && LoopSize <= 32)
return 5;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15467.42577.patch
Type: text/x-patch
Size: 707 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151211/8548bd0b/attachment.bin>
More information about the llvm-commits
mailing list