Hi, Can anyone please tell me how can I scalarize or de-vectorize the llvm vector ir. In this (http://old.nabble.com/Re%3A-Thoughts-about-the-llvm-architecture---p2961720 3.html) thread I found LegalizeTypes will do this while generating machine code from llvm ir.. How do I convert llvm ir to selection Dag. And scalarize the vector ir and again get back llvm ir. Thanks & Regards, Pachauri -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101001/b98d92f1/attachment.html>
On Thu, Sep 30, 2010 at 11:33 PM, Kulbhushan Pachauri <kb.pachauri at samsung.com> wrote:> Hi, > > > > Can anyone please tell me how can I scalarize or de-vectorize the llvm > vector ir. > > In this > (http://old.nabble.com/Re%3A-Thoughts-about-the-llvm-architecture---p29617203.html) > thread > > I found LegalizeTypes will do this while generating machine code from llvm > ir.. > > > > How do I convert llvm ir to selection Dag. And scalarize the vector ir and > again get back llvm ir…You can't... the SelectionDAG is part of CodeGen. If you really need to scalarize IR, you'll need to write a pass yourself; that said, it should be pretty straightforward to write. -Eli
On Sep 30, 2010, at 11:33 PM, Kulbhushan Pachauri wrote:> Hi, > > Can anyone please tell me how can I scalarize or de-vectorize the llvm vector ir. > In this (http://old.nabble.com/Re%3A-Thoughts-about-the-llvm-architecture---p29617203.html) thread > I found LegalizeTypes will do this while generating machine code from llvm ir.. > > How do I convert llvm ir to selection Dag. And scalarize the vector ir and again get back llvm ir…I'm not aware of any existing support for that. Once the LLVM IR is converted to a SelectionDAG, we don't ever convert it back to LLVM IR.