[llvm-dev] get llvm IR after a clang optimization pass.

regis portalez via llvm-dev llvm-dev at lists.llvm.org
Fri Aug 28 07:08:45 PDT 2015


HI Björn

Thanks, 

Works perfectly well!

-----Original Message-----
From: Björn Steinbrink [mailto:bsteinbr at gmail.com] 
Sent: vendredi 28 août 2015 15:54
To: regis portalez <regis.portalez at altimesh.com>
Cc: llvm-dev at lists.llvm.org
Subject: Re: [llvm-dev] get llvm IR after a clang optimization pass.

Hi Régis,

with clang, you can use add `-emit-llvm -S` to get it to output IR directly. With opt just add -S to get IR instead of bitcode.

Björn

2015-08-28 15:50 GMT+02:00 regis portalez via llvm-dev
<llvm-dev at lists.llvm.org>:
> Hi,
>
>
>
> I’d like to run clang with some optimization passes (-reassociate, 
> -simplifycfg, -dce…)
>
>
>
> But in the end I need to dump the llvm IR (no link to assembly generation).
>
>
>
> I didn’t find any way to do  that.
>
>
>
> I found out that passes are run via opt, but opt generates bc code, 
> and I want IR.
>
>
>
> Any help will be welcome
>
>
>
> Thanks,
>
>
>
> Régis
>
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>



More information about the llvm-dev mailing list