[LLVMdev] Splitting a load with 2 consumers into 2 loads.
joe at pusdesris.com
Sat Dec 1 19:24:14 PST 2012
So I think I have made some progress.
SDValue dupVal = consumer->getOperand(OpNo);
LoadSDNode *dupNode = (LoadSDNode*) dupVal.getNode();
SDValue newLoad = CurDAG->getLoad(dupVal.getValueType(),
However, my problem now is that it will re-use the same load still. If I
change something, like setting volatile to true for example, it will create
a new node, but otherwise it will not. Any ideas?
On Fri, Nov 30, 2012 at 9:55 PM, Joseph Pusdesris <joe at pusdesris.com> wrote:
> Hi, I am writing an llvm target and I need both loads for isel
> reasons, but I am struggling to find the right way. I have been trying to
> use DAG.getLoad() to make a copy, then just change the operand in the
> consumers, but I cannot seem to get all of the arguments needed for that
> function in order to make the copy. Any help would be great, thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev