[LLVMdev] Disabling certain optimizations at -O1?

Renato Golin renato.golin at linaro.org
Wed Nov 27 02:16:24 PST 2013


On 27 November 2013 08:43, Evgeniy Stepanov <eugeni.stepanov at gmail.com>wrote:

> Also note that tail merging of calls happens in CodeGen, not in
> SimplifyCFG.
>

Hi Evgenly,

What we need is the general information that we want to avoid too much code
motion, from choosing the passes, to choosing steps on the passes, to
lowering code differently.

On the front-end layer, It's as simple as dealing -O levels.

On the middle-end, we could have front-ends to set a flag "debug-illusion"
on each individual pass, so that they could use this information to take
decisions locally, independent of the -O level (which they don't have
access to). This flag should only be set if the user requests -g and the
optimization level is not greater than 1.

On the back-end, I think the only place global enough that the front-end
has access to is the Target description, which could have a similar flag to
avoid folding too much during codegen.

cheers,
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131127/89668558/attachment.html>


More information about the llvm-dev mailing list