[PATCH] D49220: [x86] Teach the EFLAGS copy lowering to handle much more complex control flow patterns including forks, merges, and even cyles.
Eric Christopher via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 12 21:19:31 PDT 2018
echristo accepted this revision.
echristo added a comment.
LGTM, a couple of inline requests. One small and one maybe less so.
-eric
================
Comment at: llvm/lib/Target/X86/X86FlagsCopyLowering.cpp:535
+ // In most cases, we walk from the beginning to the end of the block. But
+ // when the block is the same as the copy is from, we will visit it twice.
+ // The first time we start from the copy and go to the end. The second
----------------
"is the same" -> "is the same block" please.
================
Comment at: llvm/lib/Target/X86/X86FlagsCopyLowering.cpp:539
+ // handle copies inside of cycles.
+ for (auto MII = (&UseMBB == &MBB && !VisitedBlocks.count(&UseMBB))
+ ? std::next(CopyI->getIterator())
----------------
The logic of these fused loop feels a bit convoluted, but I can't come up with an easy way to split it - can you?
Repository:
rL LLVM
https://reviews.llvm.org/D49220
More information about the llvm-commits
mailing list