Displaying 3 results from an estimated 3 matches for "neg_tglobaladdr_xform".
2011 Apr 26
0
[LLVMdev] Symbol folding with MC
...the symbol reference using patterns, if it's even possible. The obvious hack is adding a "-" char when lowering the symbol reference into text.
>
You can probably do some of this with a complex pattern that has a transform function. Something like (completely untested, etc):
def neg_tglobaladdr_XFORM : SDNodeXForm<tglobaladdr, [{return makeNegatedGlobalAddr(CurDAG);}]>;
def neg_tglobaladdr : PatLeaf<(tglobaladdr), [{
return <true if the curdag really is a tglobaladdr, false otherwise>;
}], neg_tglobaladdr_XFORM>;
def : Pat<(add DREGS:$src, (Wrapper tglobaladdr:$src2...
2011 Apr 27
1
[LLVMdev] Symbol folding with MC
...if it's
> even possible. The obvious hack is adding a "-" char when lowering the
> symbol reference into text.
> >
>
> You can probably do some of this with a complex pattern that has a
> transform function. Something like (completely untested, etc):
>
> def neg_tglobaladdr_XFORM : SDNodeXForm<tglobaladdr, [{return
> makeNegatedGlobalAddr(CurDAG);}]>;
> def neg_tglobaladdr : PatLeaf<(tglobaladdr), [{
> return <true if the curdag really is a tglobaladdr, false otherwise>;
> }], neg_tglobaladdr_XFORM>;
>
> def : Pat<(add DREGS:$src,...
2011 Apr 26
2
[LLVMdev] Symbol folding with MC
Hello Jim thanks for the reply,
For normal additions with immediates I've done the same as ARM does,
basically transforming add(x, imm) nodes to sub(x, -imm) with a pattern in
the .td file like this:
def : Pat<(add DLDREGS:$src1, imm:$src2),
(SUBIWRdK DLDREGS:$src1, (imm16_neg_XFORM imm:$src2))>;
Now, the typical pattern concerning additions with global addresses looks