Displaying 20 results from an estimated 4000 matches similar to: "[llvm] Query the target from an opt pass?"
2018 Apr 03
0
[llvm] Query the target from an opt pass?
On 4/3/2018 9:25 AM, Kevin Neal via llvm-dev wrote:
> I'm working on the #pragma STDC FENV_ACCESS ON support, specifically
> the support for a strict version of the FP to unsigned int conversion.
> I've got a pass that runs and converts a new intrinsic into code that
> uses the FP to signed int conversion code similar to how SelectionDAG
> handles this now. Except that
2018 Apr 03
2
[llvm] Query the target from an opt pass?
Hmmm, a quick look at the documentation for TargetTransformInfo doesn't look
like it.
In LegalizeDAG.cpp it uses TLI.getOperationAction() to find out if an SDNode
should be expanded by the legalizer or passed down to the target. That's what
I need to know, but I need it in a pass pre-legalization.
This seems like weird layering, though. Having an "optimization" pass be
looking
2020 Jan 27
11
Floating point semantic modes
Hi all,
I'm trying to put together a set of rules for how the various floating point semantic modes should be handled in clang. A lot of this information will be relevant to other front ends, but the details are necessarily bound to a front end implementation so I'm framing the discussion here in terms of clang. Other front ends can choose to follow clang or not. The existence of this set
2020 Jan 07
3
Calling function from non-default floating-point environment
Hi all,
Implementation of #pragma STDC FENV_ACCESS raises a problem: what to do if
a function is called inside a region where FP environment differs from the
default? If the function expects default FP mode it may work incorrectly in
such case.
The C2x standard draft (
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2454.pdf) states (7.6p4):
Certain programming conventions support the intended
2020 Jan 29
2
Floating point semantic modes
Yes, you’re probably right about this. I was originally thinking of FENV_ACCESS as a fully strict mode of operation, but what you’re suggesting aligns with what Cameron suggested and even some of my own reasoning on other points. So, let me amend my previous proposal to say:
STDC FENV_ACCESS {ON|OFF}
Patch in progress. I think ON should force the following:
except_behavior { strict }
2018 Jan 08
4
[cfe-dev] Why is #pragma STDC FENV_ACCESS not supported?
Hi Kevin,
Thanks for reaching out about this, and thanks especially for offering to help. I've had some other priorities that have prevented me from making progress on this recently.
As far as I know, there is no support at all in clang for handling the FENV_ACCESS pragma. I have a sample patch somewhere that I created to demonstrate how the front end would create the constrained intrinsics
2018 Jan 09
2
[cfe-dev] Why is #pragma STDC FENV_ACCESS not supported?
On 01/08/2018 07:06 PM, Richard Smith via llvm-dev wrote:
> On 8 January 2018 at 11:15, Kaylor, Andrew via llvm-dev
> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
>
> Hi Kevin,
>
> Thanks for reaching out about this, and thanks especially for
> offering to help. I've had some other priorities that have
> prevented
2018 Jan 09
1
[cfe-dev] Why is #pragma STDC FENV_ACCESS not supported?
On Tue, Jan 09, 2018 at 06:53:51PM +0000, Kaylor, Andrew via cfe-dev wrote:
> I think we're going to need to create a new mechanism to communicate
> strict FP modes to the backend. I think we need to avoid doing anything
> that will require re-inventing or duplicating all of the pattern
> matching that goes on in instruction selection (which is the reason
>
2018 Jan 09
0
[cfe-dev] Why is #pragma STDC FENV_ACCESS not supported?
On 8 January 2018 at 11:15, Kaylor, Andrew via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hi Kevin,
>
> Thanks for reaching out about this, and thanks especially for offering to
> help. I've had some other priorities that have prevented me from making
> progress on this recently.
>
> As far as I know, there is no support at all in clang for handling the
>
2018 Jan 09
0
[cfe-dev] Why is #pragma STDC FENV_ACCESS not supported?
On 8 Jan 2018 19:50, "Hal Finkel via cfe-dev" <cfe-dev at lists.llvm.org>
wrote:
On 01/08/2018 07:06 PM, Richard Smith via llvm-dev wrote:
On 8 January 2018 at 11:15, Kaylor, Andrew via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hi Kevin,
>
> Thanks for reaching out about this, and thanks especially for offering to
> help. I've had some other
2020 Mar 05
3
Should rint and nearbyint be always constrained?
+cfe-dev as the discussion is now biased toward C standard.
I'm not sure what problem you see here. In default mode, i.e.
> when there is no "#pragma STDC FENV_ACCESS on" in effect,
> then the compiler can always assume that the default rounding
> mode is in effect.
Well, if #pragma STDC FENV_ACCESS on is not in effect, that means
> that the user has promised that at
2020 Jan 29
3
Floating point semantic modes
> ... math errno ...
I wouldn't recommend to anyone that they should rely on math errno (because I don't trust libraries to correctly support it). My goal here was to incorporate our existing support for it into the rest of what I'm trying to document.
My understanding is that for clang this primarily controls whether or not we feel free to substitute intrinsics for recognized
2020 Mar 03
5
Should rint and nearbyint be always constrained?
>
> One concern with replacing llvm.rint and llvm.nearbyint with
> llvm.roundeven makes it difficult to turn back into a libcall if the
> backend doesn't have an instruction for it. You can't just call the
> roundeven library function since that wouldn't exist in older libm
> implementations. So ideally you would know which function was originally
> used in the
2017 Nov 03
2
FW: clarification needed for the constrained fp implementation.
Copying the list on a discussion of potentially general interest....
From: Kaylor, Andrew
Sent: Friday, November 03, 2017 1:11 PM
To: 'Ding, Wei' <Wei.Ding2 at amd.com>; Sumner, Brian <Brian.Sumner at amd.com>; Arsenault, Matthew <Matthew.Arsenault at amd.com>
Subject: RE: clarification needed for the constrained fp implementation.
Hi Wei,
I've been meaning to
2018 May 23
0
Update on strict FP status
Hi Ulrich,
I am interested in knowing if the current proposals also take into account
the FP_CONTRACT pragma and the ability to implement options that imply a
specific value for the FLT_EVAL_METHOD macro.
Additionally, I am not aware of the IR being able to represent the
potentially deferred loss of precision that the C language semantics
provide; in particular, applying such semantics to the
2017 Nov 04
2
FW: clarification needed for the constrained fp implementation.
On 11/03/2017 05:26 PM, 陳韋任 via llvm-dev wrote:
>
>
> 2017-11-04 4:29 GMT+08:00 Kaylor, Andrew via llvm-dev
> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>>:
>
> Copying the list on a discussion of potentially general interest….
>
> *From:* Kaylor, Andrew
> *Sent:* Friday, November 03, 2017 1:11 PM
> *To:* 'Ding,
2018 May 23
3
Update on strict FP status
Hello,
at the recent EuroLLVM developer meeting in Bristol I held a BoF
session on the topic "Towards implementing #pragma STDC FENV_ACCESS".
I've also had a number of follow-on discussions both on-site in
Bristol and online since. This post is intended as a summary of
my current understanding set of requirements and implementation
details covering the overall topic.
I'm
2019 Oct 01
7
[RFC] Using basic block attributes to implement non-default floating point environment
Hi all,
This proposal is aimed at support of floating point environment, in which
some properties like rounding mode or exception behavior differ from those
used by default. This include in particular support of 'pragma STDC
FENV_ACCESS', 'pragma STDC FENV_ROUND' as well as some other related
facilities.
Problem
On many processors use of non-default floating mode requires
2018 Jan 09
5
[cfe-dev] Why is #pragma STDC FENV_ACCESS not supported?
Andrew Kaylor wrote:
>In general, the current "strict FP" handling stops at instruction
>selection. At the MachineIR level we don't currently have a mechanism
>to prevent inappropriate optimizations based on floating point
>constraints, or indeed to convey such constraints to the backend.
>Implicit register use modeling may provide some restriction on some
2018 Jan 09
2
[cfe-dev] Why is #pragma STDC FENV_ACCESS not supported?
I think we're going to need to create a new mechanism to communicate strict FP modes to the backend. I think we need to avoid doing anything that will require re-inventing or duplicating all of the pattern matching that goes on in instruction selection (which is the reason we're currently dropping that information). I'm out of my depth on this transition, but I think maybe we could