Re: [cfe-users] [llvm-dev] Fine Grained Optimization Control

2021-03-28 Thread Navid Rahimi via cfe-users
Makes sense thank you. I have to look at the dependencies between different optimization passes too I guess. On Sun, Mar 28, 2021 at 17:33 Johannes Doerfert wrote: > I recommend adding such a flag to the pass you want to disable. > Whenever `runOnXXX` is called, check the flag and exit if set. >

Re: [cfe-users] [llvm-dev] Fine Grained Optimization Control

2021-03-28 Thread Navid Rahimi via cfe-users
Thanks Johannes. That makes this makes it more understandable to me. What can I do for optimization that doesn’t have flag? How should I approach disabling them. On Sat, Mar 27, 2021 at 22:10 Johannes Doerfert wrote: > Hi Navid, > > comments inlined. > > On 3/27/21 9:24 PM, Navid Rahimi via llvm

[cfe-users] Fine Grained Optimization Control

2021-03-27 Thread Navid Rahimi via cfe-users
Hi everyone, tl;dr: I want to control which optimization and transformation can and will run on my code. Does Clang/LLVM permit such an approach? I am doing this with GCC. But at first, it seems for some reason GCC does not allow optimizations to run unless I am passing -Ox flag (x>=1). The appro