[PATCH] D42637: [PowerPC] Check hot loop exit edge in PPCCTRLoops
Nemanja Ivanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 31 06:29:50 PST 2018
nemanjai added a comment.
This seems like a good thing to do. Would you be able to provide some benchmark data to show the impact?
================
Comment at: lib/Target/PowerPC/PPCCTRLoops.cpp:533
+ // we should not transform this loop.
+ for (SmallVectorImpl<BasicBlock *>::iterator I = ExitingBlocks.begin(),
+ IE = ExitingBlocks.end(); I != IE; ++I) {
----------------
Is there a reason this isn't a range for loop? Also, we typically use `I` for instructions or iterators over them. Seems like `BB` might be a clearer name here.
================
Comment at: test/CodeGen/PowerPC/ctrloops-hot-exit.ll:23
+ %tobool = icmp eq i32 %1, 0
+ br i1 %tobool, label %if.end, label %cleanup, !prof !1
+
----------------
Is it possible to also construct a test case where the true branch is the exit branch?
https://reviews.llvm.org/D42637
More information about the llvm-commits
mailing list