[LLVMdev] MachineConstantPoolValue

Chris Lattner sabre at nondot.org
Thu Dec 7 22:06:59 PST 2006


On Wed, 6 Dec 2006, [UTF-8] Rafael Esp?ndola wrote:
> In the ARM backend, functions (and other 32 bit constants) are placed
> in a pool and loaded when needed.

Has this approach been replaced with your later constant pool patch?

-Chris

> A problem with this is that ".weak" directives must be printed in the
> pool. This is not supported in the standard printer, so I think that I
> have found the first use for MachineConstantPoolValue :-)
>
> Creating the constant is easy, but I have two problems:
>
> 1) what are the methods getExistingMachineCPValue and
> AddSelectionDAGCSEId supposed to do?
>
> 2) printing is hard because we are outside the AsmPrinter.
>
> In my current hack I am printing from
> ARMAsmPrinter::EmitMachineConstantPoolValue :-(
>
> Since this problem might also be significant to x86 (see my previous
> email), maybe we should just teach the pool printer to emit ".weak"
> directives...
>
> Best Regards,
> Rafael
>
> P.S.: rest assured that what is attached is just a demo hack and will
> not be committed :-)
>
>

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list