[llvm] r255497 - [PPC] Early exit loop. NFC.
Chad Rosier via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 14 06:44:07 PST 2015
Author: mcrosier
Date: Mon Dec 14 08:44:06 2015
New Revision: 255497
URL: http://llvm.org/viewvc/llvm-project?rev=255497&view=rev
Log:
[PPC] Early exit loop. NFC.
Modified:
llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp
Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp?rev=255497&r1=255496&r2=255497&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Mon Dec 14 08:44:06 2015
@@ -10801,8 +10801,11 @@ unsigned PPCTargetLowering::getPrefLoopA
// 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;
More information about the llvm-commits
mailing list