[cfe-dev] RE : Add flags to clang and llvm

Rinaldini Julien julien.rinaldini at heig-vd.ch
Mon Jan 28 00:58:48 PST 2013


Hi,

Thanks for the answer, but that is obsolutely not what I want to do ;)

Cheers
________________________________________
De : Arnaud de Grandmaison [arnaud.allarddegrandmaison at parrot.com]
Date d'envoi : mercredi 23 janvier 2013 18:06
À : Rinaldini Julien
Cc: cfe-dev at cs.uiuc.edu
Objet : Re: [cfe-dev] Add flags to clang and llvm

On 01/23/2013 03:28 PM, Rinaldini Julien wrote:
> Hi,
>
> I want to add a flag to clang and I want this flag to be passed to llvm... I'm looking in the Driver directory,
> but I'm a bit lost !
>
> I have written an optimisation pass in llvm and I want to be able to call it with my own flag (not the -O) like that for example:
>
> clang input.c -o output -b{1,2,3,4}
>
> Is there some documentation or some example somewhere ? I didn't find any in the doc :(
>
> Thx
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>

Hi Julien,

In order to tweak the 'unroll-threshold' parameter from LLVM's
LoopUnrollPass (lib/Transforms/Scalar/LoopUnrollPass.cpp) here are the
options I pass to clang :

-mllvm -unroll-threshold=4

Cheers,

--
Arnaud de Grandmaison





More information about the cfe-dev mailing list