This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Questions about LTO infrastructure and pragma omp target


On 17 Sep 14:12, Jakub Jelinek wrote:
> On Tue, Sep 17, 2013 at 01:56:39PM +0200, Richard Biener wrote:
> > 
> > Are you sure we have the same IL for all targets and the same targets
> > for all functions?  That would certainly simplify things, but you still need
> > a way to tell the target compiler which symbol to emit the function on
> > as the compile-stage will already necessarily refer to all target
> > variant symbols.
> 
> This has been discussed to some extent during Cauldron.
> Yes, there are various target dependencies in the GIMPLE IL, many of them
> very early.
> Some of the dependencies are there already during preprocessing, there is
> nothing to do about those.
> For some things we will just rely on the host and target having the same
> properties, stuff like BITS_PER_UNIT, type layout/alignment, endianity,
> the OpenMP (and I believe OpenACC too) model effectively requires that,
> while you don't need to have shared address space between host and target
> (but can have that), for the mapping/unmapping it is assumed that you can
> simply take host portions of memory and copy them over to the target device
> or back, as sequence of bytes, there is no form of RPC or similar that would
> tweak endianity, differently sized types, padding, etc.
> While you can say have 64-bit host and 32-bit target or vice versa, the
> target IL will simply contain precision info, alignment, structure layout
> etc. and just will have to generate right code for that (something that is
> native long on the host can be native long long on the target or vice versa
> etc.).
> Then there are dependencies we'd ideally get rid of, at least pre-IPA,
> stuff like BRANCH_COST, but generally that is just an optimization issue and
> thus not that big deal.
> Bigger issue are target specific builtins, I guess we'll either have to just
> sorry on those, or have some helper targhook that will translate a subset of
> md builtins from selected hosts to selected targets.
> Preferrably, before IPA we'd introduce as few target dependencies into the
> IL as possible, and gradually towards RTL can add more dependencies (e.g.
> the vectorizer adds so many target dependencies that at that point trying to
> use the IL for a different target is practically impossible).
> 
> 	Jakub

Do I understand correctly that GIMPLE IL is target dependent, but we will emit
the same IL for all targets?

  -- Ilya


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]