[PowerPC] During branch relaxation, recompute padding offsets before each iteration
authorHal Finkel <hfinkel@anl.gov>
Sun, 4 Sep 2016 14:18:29 +0000 (14:18 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sun, 4 Sep 2016 14:18:29 +0000 (14:18 +0000)
commitf0bc9db96e563e00883bb8ebcf902031e1ad6639
tree9477da73a161587df6d47e39dcafdea6d9a61af1
parent7e2a0dfa0cf37f54a2092c78e3f2e4143b61b3b2
[PowerPC] During branch relaxation, recompute padding offsets before each iteration

We used to compute the padding contributions to the block sizes during branch
relaxation only at the start of the transformation. As we perform branch
relaxation, we change the sizes of the blocks, and so the amount of inter-block
padding might change. Accordingly, we need to recompute the (alignment-based)
padding in between every iteration on our way toward the fixed point.

Unfortunately, I don't have a test case (and none was provided in the bug
report), and while this obviously seems needed, algorithmically, I don't have
any way of generating a small and/or non-fragile regression test.

llvm-svn: 280626
llvm/lib/Target/PowerPC/PPCBranchSelector.cpp