After further thought revert the patch to make fast-isel avoid
authorEric Christopher <echristo@apple.com>
Fri, 8 Jan 2010 08:24:49 +0000 (08:24 +0000)
committerEric Christopher <echristo@apple.com>
Fri, 8 Jan 2010 08:24:49 +0000 (08:24 +0000)
putting relocations into the constant pool - this isn't needed
for correctness and in the rare occasion it happens would pull
us out of fast isel for the block.

If fast-isel application startup time ever becomes an issue we
can add better support for these addresses instead of bailing.

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

lib/Target/X86/X86FastISel.cpp

index 2986ec2c31a04d6dfe01d5014fb9092c9559441d..10fba2461edf122b10423cb36572bec948ba86ed 100644 (file)
@@ -1652,12 +1652,6 @@ unsigned X86FastISel::TargetMaterializeConstant(Constant *C) {
     PICBase = X86::RIP;
   }
 
-  // If we've gotten here we need to make sure we don't have a constant
-  // that needs a relocation, because then we shouldn't put it into the
-  // constant pool.
-  if (C->getRelocationInfo() != Constant::NoRelocation)
-    return 0;
-  
   // Create the load from the constant pool.
   unsigned MCPOffset = MCP.getConstantPoolIndex(C, Align);
   unsigned ResultReg = createResultReg(RC);