Re: LTO remapping/deduction of machine modes of types/decls

2017-01-11 Thread Alexander Monakov
On Wed, 11 Jan 2017, Richard Biener wrote: > > WPA re-streams packed function bodies as-is, so anything referred to > > from within just the body won't be subject to mode remapping; I think > > only modes of toplevel declarations and functions' arguments will be > > remapped. And I believe it

Re: LTO remapping/deduction of machine modes of types/decls

2017-01-11 Thread Richard Biener
On Tue, 10 Jan 2017, Alexander Monakov wrote: > On Tue, 10 Jan 2017, Richard Biener wrote: > > In general I think they should match. But without seeing concrete > > examples of where they do not I can't comment on whether such exceptions > > make sense. For example if you adjust a DECLs

Re: LTO remapping/deduction of machine modes of types/decls

2017-01-10 Thread Vladislav Ivanishin
Hi In general I think they should match. But without seeing concrete examples of where they do not I can't comment on whether such exceptions make sense. For example if you adjust a DECLs alignment and then re-layout it I'd expect you might get a non-BLKmode mode for an aggregate in some

Re: LTO remapping/deduction of machine modes of types/decls

2017-01-10 Thread Alexander Monakov
On Tue, 10 Jan 2017, Richard Biener wrote: > In general I think they should match. But without seeing concrete > examples of where they do not I can't comment on whether such exceptions > make sense. For example if you adjust a DECLs alignment and then > re-layout it I'd expect you might get a

Re: LTO remapping/deduction of machine modes of types/decls

2017-01-10 Thread Richard Biener
On Mon, 9 Jan 2017, Alexander Monakov wrote: > On Wed, 4 Jan 2017, Richard Biener wrote: > > My suggestion at that time isn't likely working in practice due to the > > limitations Jakub outlines below. The situation is a bit unfortunate > > but expect to run into more host(!) dependences in the

Re: LTO remapping/deduction of machine modes of types/decls

2017-01-09 Thread Alexander Monakov
On Wed, 4 Jan 2017, Richard Biener wrote: > My suggestion at that time isn't likely working in practice due to the > limitations Jakub outlines below. The situation is a bit unfortunate > but expect to run into more host(!) dependences in the LTO bytecode. > Yes, while it would be nice to LTO

Re: LTO remapping/deduction of machine modes of types/decls

2017-01-04 Thread Richard Biener
On Mon, 2 Jan 2017, Jakub Jelinek wrote: > On Mon, Jan 02, 2017 at 09:49:55PM +0300, Alexander Monakov wrote: > > On Mon, 2 Jan 2017, Jakub Jelinek wrote: > > > If the host has long double the same as double, sure, PTX can use its > > > native > > > DFmode even for long double. But otherwise,

Re: LTO remapping/deduction of machine modes of types/decls

2017-01-04 Thread Richard Biener
On Mon, 2 Jan 2017, Jakub Jelinek wrote: > On Fri, Dec 30, 2016 at 08:40:11PM +0300, Alexander Monakov wrote: > > Hello, Richard, Jakub, community, > > > > May I join/restart the old discussion about machine mode remapping at LTO > > stream-in time. To recap, when offloading to NVPTX was

Re: LTO remapping/deduction of machine modes of types/decls

2017-01-02 Thread Jakub Jelinek
On Mon, Jan 02, 2017 at 10:38:54PM +0300, Alexander Monakov wrote: > On Mon, 2 Jan 2017, Jakub Jelinek wrote: > > On Mon, Jan 02, 2017 at 09:49:55PM +0300, Alexander Monakov wrote: > > > On Mon, 2 Jan 2017, Jakub Jelinek wrote: > > > > If the host has long double the same as double, sure, PTX can

Re: LTO remapping/deduction of machine modes of types/decls

2017-01-02 Thread Alexander Monakov
On Mon, 2 Jan 2017, Jakub Jelinek wrote: > On Mon, Jan 02, 2017 at 09:49:55PM +0300, Alexander Monakov wrote: > > On Mon, 2 Jan 2017, Jakub Jelinek wrote: > > > If the host has long double the same as double, sure, PTX can use its > > > native > > > DFmode even for long double. But otherwise,

Re: LTO remapping/deduction of machine modes of types/decls

2017-01-02 Thread Jakub Jelinek
On Mon, Jan 02, 2017 at 09:49:55PM +0300, Alexander Monakov wrote: > On Mon, 2 Jan 2017, Jakub Jelinek wrote: > > If the host has long double the same as double, sure, PTX can use its native > > DFmode even for long double. But otherwise, the storage must be > > transferable between accelerator

Re: LTO remapping/deduction of machine modes of types/decls

2017-01-02 Thread Alexander Monakov
On Mon, 2 Jan 2017, Jakub Jelinek wrote: > If the host has long double the same as double, sure, PTX can use its native > DFmode even for long double. But otherwise, the storage must be > transferable between accelerator and host. Hm, sorry, the 'must' is not obvious to me: is it known that the

Re: LTO remapping/deduction of machine modes of types/decls

2017-01-02 Thread Jakub Jelinek
On Mon, Jan 02, 2017 at 06:38:28PM +0300, Alexander Monakov wrote: > I wonder if it's possible to have a small tag in tree types to distinguish > between binary/decimal/fixed-point types. For prototyping, I was thinking > about just looking at the type name, because non-ieee-binary types have an

Re: LTO remapping/deduction of machine modes of types/decls

2017-01-02 Thread Alexander Monakov
On Mon, 2 Jan 2017, Jakub Jelinek wrote: > In my view mode is essential part of the type system. It (sadly, but still) > participates in many ABI decisions, but more importantly especially for > floating point types it is the main source of information of what the type > actually is, as just size

Re: LTO remapping/deduction of machine modes of types/decls

2017-01-02 Thread Jakub Jelinek
On Fri, Dec 30, 2016 at 08:40:11PM +0300, Alexander Monakov wrote: > Hello, Richard, Jakub, community, > > May I join/restart the old discussion about machine mode remapping at LTO > stream-in time. To recap, when offloading to NVPTX was introduced, there > was a problem due to differences in

LTO remapping/deduction of machine modes of types/decls

2016-12-30 Thread Alexander Monakov
Hello, Richard, Jakub, community, May I join/restart the old discussion about machine mode remapping at LTO stream-in time. To recap, when offloading to NVPTX was introduced, there was a problem due to differences in the set of supported modes (e.g. there was no 'XFmode' on NVPTX that would