[PATCH] D28249: Improve scheduling with branch coalescing
Lei Huang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 24 21:01:36 PST 2017
lei marked an inline comment as done.
lei added inline comments.
================
Comment at: lib/CodeGen/BranchCoalescing.cpp:608
+
+ assert(To.FallThroughBlock->isSuccessor(From.BranchBlock) &&
+ "Expecting From.BranchBlock to be a successor of To.FallThroughBlock");
----------------
nemanjai wrote:
> lei wrote:
> > nemanjai wrote:
> > > Are these two asserts enough or does `From.BranchBlock` need to [immediately] dominate both `To.BranchTargetBlock` and `To.FallThroughBlock`?
> > From.BranchBlock MUST equal To.BranchTargetBlock, not dominate.
> The two are not mutually exclusive. Also, this doesn't answer whether `From.BranchBlock` needs to dominate `To.FallThroughBlock`.
The same kind of checks are needed for function canMerge and mergeCandidate, Put the checks into function validateCandidates() and call it to verify MBBs and do an early exit if returns false.
https://reviews.llvm.org/D28249
More information about the llvm-commits
mailing list