From 40efc251cd7a52dd2375ec95ee38b1be4572178f Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 24 Jul 2009 19:31:03 +0000 Subject: [PATCH] Disable my constant island pass optimization (to make use soimm more effectively). It caused infinite looping on lencod. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76995 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMConstantIslandPass.cpp | 6 ++---- lib/Target/ARM/README.txt | 5 +++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/Target/ARM/ARMConstantIslandPass.cpp b/lib/Target/ARM/ARMConstantIslandPass.cpp index 1f584d4e3ef..48db39b623a 100644 --- a/lib/Target/ARM/ARMConstantIslandPass.cpp +++ b/lib/Target/ARM/ARMConstantIslandPass.cpp @@ -696,13 +696,11 @@ bool ARMConstantIslands::OffsetIsInRange(unsigned UserOffset, // User before the Trial. if (TrialOffset - UserOffset <= MaxDisp) return true; - if (IsSoImm && ARM_AM::getSOImmVal(TrialOffset - UserOffset) != -1) - return true; + // FIXME: Make use full range of soimm values. } else if (NegativeOK) { if (UserOffset - TrialOffset <= MaxDisp) return true; - if (IsSoImm && ARM_AM::getSOImmVal(~(TrialOffset - UserOffset)) != -1) - return true; + // FIXME: Make use full range of soimm values. } return false; } diff --git a/lib/Target/ARM/README.txt b/lib/Target/ARM/README.txt index 3e8c54a05a8..a587a2bf7ea 100644 --- a/lib/Target/ARM/README.txt +++ b/lib/Target/ARM/README.txt @@ -541,3 +541,8 @@ while ARMConstantIslandPass only need to worry about LDR (literal). //===---------------------------------------------------------------------===// We need to fix constant isel for ARMv6t2 to use MOVT. + +//===---------------------------------------------------------------------===// + +Constant island pass should make use of full range SoImm values for LEApcrel. +Be careful though as the last attempt caused infinite looping on lencod.