[RFC] AEABI Divmod refactoring + 64-bit

Renato Golin renato.golin at linaro.org
Tue Jul 30 05:37:02 PDT 2013


On 30 July 2013 13:08, Tim Northover <t.p.northover at gmail.com> wrote:

> It looks like that'll happen automatically. The function
> DAGTypeLegalizer::ReplaceValueWith gets called straight after ARM's
> ReplaceNodeResults and has code to add the new nodes to the worklist
> appropriately.


Ha, ok. Makes sense. I had changed ReplaceNodeResults to either leave
Results untouched (in which case it'd expand) or leave the same node in, in
which case ReplaceValueWith would fail, because it'd be circular, so I
added a hack:

  for (unsigned i = 0, e = Results.size(); i != e; ++i) {
    SDValue Old = SDValue(N, i);
    SDValue New = Results[i];
    if (Old != New)
      ReplaceValueWith(Old, New);
  }

Now I remember, this is why I thought about introducing another NodeType
(as you mentioned, ISD::SREM64), but thought that this was a work around at
best. Also, I will probably have to create 4 new node types (S/U)x(DIV/REM).

Ok, now I have a lead, thanks for the input!

cheers,
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130730/fa3cfa44/attachment.html>


More information about the llvm-commits mailing list