diff options
author | Chad Rosier <mcrosier@codeaurora.org> | 2015-12-14 14:44:06 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@codeaurora.org> | 2015-12-14 14:44:06 +0000 |
commit | bc9d4f9947ee5cd2dc686547477f77797a895b3e (patch) | |
tree | 9d32c74f25bbc212046dbba7eaf86592ca0d377f | |
parent | ac764fabb8fd3e0af3e2e2b6faddacdc6a698ae3 (diff) | |
download | bcm5719-llvm-bc9d4f9947ee5cd2dc686547477f77797a895b3e.tar.gz bcm5719-llvm-bc9d4f9947ee5cd2dc686547477f77797a895b3e.zip |
[PPC] Early exit loop. NFC.
llvm-svn: 255497
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 176a8b3ea59..242c1ea3309 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -10801,8 +10801,11 @@ unsigned PPCTargetLowering::getPrefLoopAlignment(MachineLoop *ML) const { // 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; |