[PATCH] D57718: [PPC] Adjust the computed branch offset for the possible shorter distance

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 19 18:49:18 PST 2019


nemanjai added inline comments.


================
Comment at: lib/Target/PowerPC/PPCBranchSelector.cpp:200
+          BranchSize += BlockSizes[DestBlock].first;
+          for (unsigned i = DestBlock+1, e = MBB.getNumber(); i < e; ++i) {
             BranchSize += BlockSizes[i].first;
----------------
nemanjai wrote:
> I don't actually follow why we don't count the size of the destination block since we're branching to the top of it. Could you add a comment explaining why?
Oh, nvm. I just realized that you moved the addition of the size of the destination block to before the loop. I suppose the idea is that we do want to consider the destination block's size but not its alignment.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57718/new/

https://reviews.llvm.org/D57718





More information about the llvm-commits mailing list