[cfe-dev] Question about size optimization and PRE

Hal Finkel via cfe-dev cfe-dev at lists.llvm.org
Wed Jun 27 09:08:46 PDT 2018


On 06/27/2018 04:15 AM, jingu at codeplay.com via cfe-dev wrote:
> Hi All,
>
> I have a question about the opportunity of size optimization in clang.
> As you know, the PRE(partial redundancy elimination) copies partially
> available instructions to paths in which the instruction is not
> available. I think it makes code size bigger. I can see the PRE
> implementation in llvm's GVN pass. However, I can not see the options
> like '-enable-pre=false' or '-enable-load-pre=fasle' on clang with
> size optimization. How do you think about disabling PRE with clang's
> size optimization? If I missed something, please let me know.

The right way to do this would be to have the pass itself check
F->optForSize() (or F->optForMinSize(), as the case may be). Clang
itself should essentially never set pass command-line options for anything.

 -Hal

>
> Thanks,
>
> JinGu Kang
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory




More information about the cfe-dev mailing list