[llvm-dev] Updating the Chain

19 views
Skip to first unread message

Dominique Torette via llvm-dev

unread,
Sep 25, 2018, 11:06:05 AM9/25/18
to llvm...@lists.llvm.org

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.







http://www.spacebel.be/wp-content/uploads/2018/02/image-sign-sbp30y-1.jpg

Dominique Torette
System Architect
Rue des Chasseurs Ardennais - Liège Science Park - B-4031 Angleur
Tel: +32 (0) 4 361 81 11 - Fax: +32 (0) 4 361 81 20
www.spacebel.be

 


------------------------------------------------------------------------------

E-MAIL DISCLAIMER

The present message may contain confidential and/or legally privileged information. If you are not the intended addressee and in case of a transmission error, please notify the sender immediately and destroy this E-mail. Disclosure, reproduction or distribution of this document and its possible attachments is strictly forbidden.

SPACEBEL denies all liability for incomplete, improper, inaccurate, intercepted, (partly) destroyed, lost and/or belated transmission of the current information given that unencrypted electronic transmission cannot currently be guaranteed to be secure or error free.
Upon request or in conformity with formal, contractual agreements, an originally signed hard copy will be sent to you to confirm the information contained in this E-mail.

SPACEBEL denies all liability where E-mail is used for private use.

SPACEBEL cannot be held responsible for possible viruses that might corrupt this message and/or your computer system.
-------------------------------------------------------------------------------

Tim Northover via llvm-dev

unread,
Sep 25, 2018, 11:47:24 AM9/25/18
to Dominique Torette, LLVM Developers Mailing List
Hi Dominique,

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

Reply all
Reply to author
Forward
0 new messages