jdoerfert added a comment.

In D71241#1778736 <https://reviews.llvm.org/D71241#1778736>, @ABataev wrote:

> In D71241#1778717 <https://reviews.llvm.org/D71241#1778717>, @jdoerfert wrote:
>
> > >> There is no evidence that this is more complicated. By all measures, 
> > >> this is less complicated (see also below). It is also actually doing the 
> > >> right thing when it comes to code emission. Take 
> > >> https://godbolt.org/z/sJiP3B for example. The calls are wrong and the 
> > >> definition of base is missing.
> > > 
> > > How did you measure it? I have a completely different opinion. Also, 
> > > tried to reproduce the problem locally, could not reproduce. It seems to 
> > > me, the output of the test misses several important things. You can check 
> > > it yourself. `tgt_target_teams()` call uses `@.offload_maptypes` global 
> > > var but it is not defined.
> >
> > Here is the link with the globals not hidden: https://godbolt.org/z/5etB5S
> >  The base function is called both times but should not be called at all. 
> > What is your local output and why does it differ?
>
>
> On the host `base` is an alias for the `hst` function. On the device `base` 
> has the body of `dev` function because NVPTX does nit support function 
> aliases (10+ suppprts it, but LLVM does not support it yet). Try to change 
> the bodies of dev and hst and you will see.
>
> I tried to keep original function names to improve debugging and make users 
> less wonder why instead of `base` something else is called.


How does that work with linking? Another translation unit can call both the 
base and hst/dev function, right? I mean they both need to be present.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71241/new/

https://reviews.llvm.org/D71241



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to