[LLVMdev] Compiler Driver Decisions
Chris Lattner
sabre at nondot.org
Wed Aug 4 13:33:08 PDT 2004
On Wed, 4 Aug 2004, Reid Spencer wrote:
> I don't see why we have to maintain 100% compatibility with GCC. We're
> so incompatible in so many other ways that I don't see it as a
> necessity.
We are? Currently you can just 'configure CC=llvmgcc' and stuff works.
> For example, we probably won't have all the -f and -X and -W
> options that GCC does. So, why can't we just DEFINE the optimization
> levels and be done with it? Its not like users of LLVM can just use
> their existing makefiles, they will have to make some adjustments.
They currently don't have to make these changes. The -f flags that don't
make sense we can just ignore. We support all of the -W flags I think.
> Also, I don't know of very many people that use -O0. Typical usage is
> either no -O option on the command line or -O2, -O3. In those typical
> use cases the driver will give them basically what they expect.
I agree this is much more common.
> So I propose:
>
> -O0 = zero optimization, raw output from the front end
> -O1 = default fast/lightweight optimization, emphasis on
> making compilation faster
That is fine, but my point is that NO USER will ever care about -O0.
Since this is the case, why expose it at all? It should only be exposed
for LLVM compiler hackers, which is why I suggested -On (later ammended to
-Onone). I would not have a problem with it really being named something
without a -O prefix (-really-give-me-what-the-front-end-spits-out).
Given that, either -O0 and -O1 should do the same thing, or we should drop
one.
-Chris
--
http://llvm.cs.uiuc.edu/
http://nondot.org/sabre/
More information about the llvm-dev
mailing list