Hi,
I have a short question regarding the update of chain.
I would like to morph/select a node having a simple value (only a chain, in position 0) into a node having a composed value (a return i32 value, in position 0, and the preserved chain, in position 1).
The SelectNodeTo() API build the composed result value, but does not update all the chain links to the new position. Is there an API to update all the references in the chain to this new position?
I’ve seen the SelectionDAGISel::UpdateChains() API but none of the reference architectures make a direct call to this service…
Thanks, Dominique T.
|
|
|
Dominique Torette
|
On Tue, 25 Sep 2018 at 16:06, Dominique Torette via llvm-dev
<llvm...@lists.llvm.org> wrote:
> The SelectNodeTo() API build the composed result value, but does not update all the chain links to the new position. Is there an API to update all the references in the chain to this new position?
I think you want SelectionDAG::ReplaceAllUsesOfValueWith, if you're
changing the node outputs. ReplaceAllUsesWith is similar but wholesale
maps all output values of the SDNode between the two (confusingly,
even the version that takes an SDValue does that).
Cheers.
Tim.
_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev