Jason via llvm-dev
2017-Jun-28 17:29 UTC
[llvm-dev] Override TargetOptions for block of code?
Hi, we generally run our JIT with UnsafeFPMath enabled, but there are a few specific instances where a block of code needs to follow strict FPMath. Is there a way to temporarily override TargetOptions for a specific block of IR? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170628/b1c65733/attachment.html>
Hal Finkel via llvm-dev
2017-Jun-28 17:53 UTC
[llvm-dev] Override TargetOptions for block of code?
Hi, Jason, You shouldn't need to use UsafeFPMath at all now. Instead, use fast-math flags on the relevant instructions. See: http://llvm.org/docs/LangRef.html#fast-math-flags -Hal On 06/28/2017 12:29 PM, Jason via llvm-dev wrote:> Hi, we generally run our JIT with UnsafeFPMath enabled, but there are > a few specific instances where a block of code needs to follow strict > FPMath. Is there a way to temporarily override TargetOptions for a > specific block of IR? > > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-- Hal Finkel Lead, Compiler Technology and Programming Languages Leadership Computing Facility Argonne National Laboratory -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170628/fc9640dd/attachment.html>
Jason via llvm-dev
2017-Jun-28 18:48 UTC
[llvm-dev] Override TargetOptions for block of code?
Is there any way to provide the inverse? Ie, fast math enabled by default, but disable rcp using the flags for a specific div? On Wed, Jun 28, 2017 at 10:53 AM, Hal Finkel <hfinkel at anl.gov> wrote:> Hi, Jason, > > You shouldn't need to use UsafeFPMath at all now. Instead, use fast-math > flags on the relevant instructions. See: http://llvm.org/docs/LangRef. > html#fast-math-flags > > -Hal > On 06/28/2017 12:29 PM, Jason via llvm-dev wrote: > > Hi, we generally run our JIT with UnsafeFPMath enabled, but there are a > few specific instances where a block of code needs to follow strict FPMath. > Is there a way to temporarily override TargetOptions for a specific block > of IR? > > > > > _______________________________________________ > LLVM Developers mailing listllvm-dev at lists.llvm.orghttp://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > > -- > Hal Finkel > Lead, Compiler Technology and Programming Languages > Leadership Computing Facility > Argonne National Laboratory > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170628/9cec150f/attachment.html>