Ramakota Reddy via llvm-dev
2019-Mar-20 10:58 UTC
[llvm-dev] get Optimization Level options
Hi All, I want to use Optimization Level options in tailDuplicate() API from TailDuplicator.cpp file to restrict splice() function. With -Oz option this splice() API is duplicating the RET instruction in predecessor blocks. Could anyone please give your suggestions to get OPTLevel Options(which object will carry OptLevel Options in this stage?) in this level. Thanks & Regards, Ramakota Reddy. IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190320/4e7be42d/attachment.html>
Tim Northover via llvm-dev
2019-Mar-20 13:21 UTC
[llvm-dev] get Optimization Level options
Hi Ramakota, On Wed, 20 Mar 2019 at 10:59, Ramakota Reddy via llvm-dev <llvm-dev at lists.llvm.org> wrote:> With -Oz option this splice() API is duplicating the RET instruction in predecessor blocks.-Oz is handled slightly differently from the numeric options. It gets attached to the function as an attribute that you can check for with Function::optForMinSize.> Could anyone please give your suggestions to get OPTLevel Options(which object will carry OptLevel Options in this stage?) in this level.This looks like it's known by the PassManagerBuilder and given to the constructor of any pass that needs it. Mostly it just configures what passes are run at all though. Cheers. Tim.
Ramakota Reddy via llvm-dev
2019-Mar-20 13:45 UTC
[llvm-dev] get Optimization Level options
Thanks a lot Tim for your suggestions. With Regards, Ramakota. -----Original Message----- From: Tim Northover <t.p.northover at gmail.com> Sent: Wednesday, March 20, 2019 6:52 PM To: Ramakota Reddy <Ramakota.Reddy at arm.com> Cc: llvm-dev at lists.llvm.org Subject: Re: [llvm-dev] get Optimization Level options Hi Ramakota, On Wed, 20 Mar 2019 at 10:59, Ramakota Reddy via llvm-dev <llvm-dev at lists.llvm.org> wrote:> With -Oz option this splice() API is duplicating the RET instruction in predecessor blocks.-Oz is handled slightly differently from the numeric options. It gets attached to the function as an attribute that you can check for with Function::optForMinSize.> Could anyone please give your suggestions to get OPTLevel Options(which object will carry OptLevel Options in this stage?) in this level.This looks like it's known by the PassManagerBuilder and given to the constructor of any pass that needs it. Mostly it just configures what passes are run at all though. Cheers. Tim. IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.