[PATCH] [AArch64] MachO large code-model: Materialize FP constants in code.

Juergen Ributzka juergen at apple.com
Wed Dec 10 11:13:05 PST 2014


Hi Tim,

Your tblgen trick worked great :)

I attached an updated patch, which is now much simpler.

Thanks

Cheers,
Juergen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-AArch64-MachO-large-code-model-Materialize-FP-consta.patch
Type: application/octet-stream
Size: 5796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141210/88dac1cb/attachment.obj>
-------------- next part --------------


> On Dec 10, 2014, at 10:24 AM, Tim Northover <t.p.northover at gmail.com> wrote:
> 
> Hi Juergen,
> 
> On 9 December 2014 at 16:14, Juergen Ributzka <juergen at apple.com> wrote:
>> I used a custom inserter to attach a vreg to the pseudo instruction that materializes the FP constant, because I couldn’t find a way to do it in the tblgen pattern. Do you know a trick to accomplish that?
> 
> There are a couple of things we could do, but I don't think a custom
> inserter is necessary. What we're essentially doing is converting
> fpimm:$imm into "(f32 (bitcast i32imm:$imm))".
> 
> I think this could be accomplished at either ISelLowering (Custom
> method for ConstantFP), or ISelDAGToDAG time without needing a
> pseudo-instruction like that. You might be able to do it in TableGen
> if SDNodeXForms can change the type of the node, but I can't remember
> whether that actually works:
> 
> def : Pat<(fpimm f32:$in), (COPY_TO_REGCLASS (MOVi32imm (XFORM_bitcast
> f32:$in)), FPR32)>;
> 
> Cheers.
> 
> Tim.



More information about the llvm-commits mailing list