[cfe-dev] Question about size optimization and PRE

jingu@codeplay.com via cfe-dev cfe-dev at lists.llvm.org
Wed Jun 27 09:27:24 PDT 2018


Thanks for the helpful comment Hal.

Do you agree the PRE makes code size bigger?

JinGu Kang


On 27/06/18 17:08, Hal Finkel wrote:
> 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

-- 
JINGU KANG
Software Engineer, Compilers
Codeplay Software Ltd
Level C Argyle House, 3 Lady Lawson Street, Edinburgh, United Kingdom, EH3 9DR
Tel: +44 (0)131 466 0503
Website: http://www.codeplay.com
Twitter: https://twitter.com/codeplaysoft

This email and any attachments may contain confidential and /or privileged information and is for use by the addressee only. If you are not the intended recipient, please notify Codeplay Software Ltd immediately and delete the message from your computer. You may not copy or forward it, or use or disclose its contents to any other person. Any views or other information in this message which do not relate to our business are not authorized by Codeplay software Ltd, nor does this message form part of any contract unless so stated.
As internet communications are capable of data corruption Codeplay Software Ltd does not accept any responsibility for any changes made to this message after it was sent. Please note that Codeplay Software Ltd does not accept any liability or responsibility for viruses and it is your responsibility to scan any attachments.
Company registered in England and Wales, number: 04567874
Registered office: Regent House, 316 Beulah Hill, London, United Kingdom, SE19 3HF




More information about the cfe-dev mailing list