[llvm-dev] Glue two instructions together

Krzysztof Parzyszek via llvm-dev llvm-dev at lists.llvm.org
Tue Dec 10 08:51:13 PST 2019

Create a pseudo-instruction that represents these two, and expand it into the actual instructions late, after optimizations.

Krzysztof Parzyszek  kparzysz at quicinc.com<mailto:kparzysz at quicinc.com>   AI tools development

From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Przemyslaw Ossowski via llvm-dev
Sent: Tuesday, December 10, 2019 10:42 AM
To: llvm-dev <llvm-dev at lists.llvm.org>
Subject: [EXT] [llvm-dev] Glue two instructions together


for DAG-to-DAG instruction selection I’ve implemented a pattern, which creates from one SDNode two instructions, something like:

def: Pat<(NEW_SDNODE REG:$r1),
         (INST_OUT (INST_IN), REG:$r1)>;

where INST_IN doesn't  accepts any inputs and INST_OUT accepts two inputs - one returned by INST_IN and REG;$r1.

Is there any possibility to ‘Glue’ two instruction created in a such way? Maybe something similar to creation SDNodes with SDNPOutGlue, SDNPInGlue) ?

These two instructions INST_IN and INST_OUT have to be one after another without any other inserted between them.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191210/dbd82e35/attachment-0001.html>

More information about the llvm-dev mailing list