[llvm-dev] Llvm pass to remove temporaries

James Molloy via llvm-dev llvm-dev at lists.llvm.org
Sat Aug 29 03:49:02 PDT 2015


Hi,

mem2reg is what you want. Why are you worried about the generated IR
looking different from the input source? don't you have to modify the IR to
remove such temporaries?

Cheers,

James

On Fri, 28 Aug 2015 at 19:10 RĂ©gis Portalez <llvm-dev at lists.llvm.org> wrote:

> Hi.
>
> I'm just starting to dig into the many existing llvm passes, and so far I
> didn't find what I'm looking for.
>
> I generate llvm IR code in debug. I'd just like to go through this code
> and remove as many temporaries as possible. Those variables look generated
> for debug purposes.
> They often look like synonyms of variables declared in the input source
> and don't seem to have a real meaning.
>
> IR looks like:
> Load a
> Store b
> Use b (instead of a)
>
> I don't want to run something like mem2reg or simpilfycfg,, because the
> generated IR is too different from the input source.
>
> Could someone please give me a hint?
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150829/1bb1ecb8/attachment.html>


More information about the llvm-dev mailing list