Fix pr4202: Disable CodePlacementOpt for ARM. The ARMConstantIslandPass has
authorBob Wilson <bob.wilson@apple.com>
Mon, 18 May 2009 20:55:32 +0000 (20:55 +0000)
committerBob Wilson <bob.wilson@apple.com>
Mon, 18 May 2009 20:55:32 +0000 (20:55 +0000)
to run last because it needs to know the exact size and position of every
basic block.  Currently CodePlacementOpt is set up to run last.  It might be
worthwhile to investigate reordering these passes, but for now, let's just
make it work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72037 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMISelLowering.cpp

index d3cf6675f2961caa9bb90a00f4a212a95123e21e..e06846559c3de088544e8a146fa21a8e1970b3ad 100644 (file)
@@ -288,7 +288,10 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM)
   setIfCvtDupBlockSizeLimit(Subtarget->isThumb() ? 0 : 2);
 
   maxStoresPerMemcpy = 1;   //// temporary - rewrite interface to use type
-  benefitFromCodePlacementOpt = true;
+  // Do not enable CodePlacementOpt for now: it currently runs after the
+  // ARMConstantIslandPass and messes up branch relaxation and placement
+  // of constant islands.
+  // benefitFromCodePlacementOpt = true;
 }
 
 const char *ARMTargetLowering::getTargetNodeName(unsigned Opcode) const {