[llvm-commits] [llvm] r92934 - /llvm/trunk/lib/Target/X86/X86FastISel.cpp

Chris Lattner clattner at apple.com
Thu Jan 7 14:06:33 PST 2010


On Jan 7, 2010, at 11:45 AM, Eric Christopher wrote:

> Author: echristo
> Date: Thu Jan  7 13:45:14 2010
> New Revision: 92934
>
> URL: http://llvm.org/viewvc/llvm-project?rev=92934&view=rev
> Log:
> If the data requires a relocation then don't attempt to
> add it to the constant pool for fast-isel. We already
> don't add it for the normal case.

You shouldn't need the #include.

-Chris

>
> Modified:
>    llvm/trunk/lib/Target/X86/X86FastISel.cpp
>
> Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=92934&r1=92933&r2=92934&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Thu Jan  7 13:45:14 2010
> @@ -19,6 +19,7 @@
> #include "X86RegisterInfo.h"
> #include "X86Subtarget.h"
> #include "X86TargetMachine.h"
> +#include "llvm/Constant.h"
> #include "llvm/CallingConv.h"
> #include "llvm/DerivedTypes.h"
> #include "llvm/GlobalVariable.h"
> @@ -1652,6 +1653,12 @@
>     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);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list