summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-12-16 19:10:00 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-12-16 19:10:00 +0000
commit5af144809e4774c22aa22e3c9a3d230594b53f43 (patch)
tree9709c6bab3d99d300164d8b0e02b76c15ea7a746 /llvm/lib
parent9ca2e7293bd5d4d8b944856e0ad7be9abf9b764b (diff)
downloadbcm5719-llvm-5af144809e4774c22aa22e3c9a3d230594b53f43.tar.gz
bcm5719-llvm-5af144809e4774c22aa22e3c9a3d230594b53f43.zip
Don't adjust for alignment padding in OffsetIsInRange.
This adjustment is already included in the block offsets computed by BasicBlockInfo, and adjusting again here can cause the pass to loop. When CreateNewWater splits a basic block, OffsetIsInRange would reject the new CPE on the next pass because of the too conservative alignment adjustment. This caused the block to be split again, and so on. llvm-svn: 146751
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/ARM/ARMConstantIslandPass.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp b/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
index fc85666855c..7cdce3db163 100644
--- a/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
+++ b/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
@@ -934,23 +934,8 @@ bool ARMConstantIslands::OffsetIsInRange(unsigned UserOffset,
// purposes of the displacement computation; compensate for that here.
// Effectively, the valid range of displacements is 2 bytes smaller for such
// references.
- unsigned TotalAdj = 0;
- if (isThumb && UserOffset%4 !=0) {
+ if (isThumb && UserOffset%4 !=0)
UserOffset -= 2;
- TotalAdj = 2;
- }
- // CPEs will be rounded up to a multiple of 4.
- if (isThumb && TrialOffset%4 != 0) {
- TrialOffset += 2;
- TotalAdj += 2;
- }
-
- // In Thumb2 mode, later branch adjustments can shift instructions up and
- // cause alignment change. In the worst case scenario this can cause the
- // user's effective address to be subtracted by 2 and the CPE's address to
- // be plus 2.
- if (isThumb2 && TotalAdj != 4)
- MaxDisp -= (4 - TotalAdj);
if (UserOffset <= TrialOffset) {
// User before the Trial.
OpenPOWER on IntegriCloud