Displaying 20 results from an estimated 367 matches for "unnamed_addr".
2018 Feb 09
2
ThinLTO and linkonce_odr + unnamed_addr
Steven Wu <stevenwu at apple.com> writes:
> Add Rafael here. Because he basically ask me the same question in my commit.
>
> I wonder why clang choose to do unnamed_addr instead of just do visibility hidden. If linkonce_odr + unnamed_addr is just hidden, is the only difference linkonce_odr + unnamed_addr not in the symbol table?
A local symbol being in the symbol table is mostly an implementation
detail.
Not marking a linkonce_odr + *global* unnamed_addr hidden i...
2018 Feb 07
7
ThinLTO and linkonce_odr + unnamed_addr
Hi,
I recently found that thinLTO doesn't deal with globals that has linkonce_odr and unnamed_addr (for macho at least) because it prohibits the autohide optimization during link time.
In LLVM, we tagged a global linkonce_odr and unnamed_addr to indicate to the linker can hide them from symbol table if they were picked (aka, linkonce_odr_auto_hide linkage). It is very commonly used for some typ...
2018 Feb 07
0
ThinLTO and linkonce_odr + unnamed_addr
There should be no semantic difference between linkonce_odr and weak_odr,
except that weak_odr is non-discardable. Why doesn't the autohide
optimization work just as well on weak_odr + unnamed_addr as linkonce_odr +
unnamed_addr?
On Tue, Feb 6, 2018 at 5:35 PM, Steven Wu via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hi,
>
> I recently found that thinLTO doesn't deal with globals that has
> linkonce_odr and unnamed_addr (for macho at least) because it prohibits th...
2018 Feb 08
3
ThinLTO and linkonce_odr + unnamed_addr
...>
> 2018-02-07 12:45 GMT-08:00 Steven Wu <stevenwu at apple.com>:
>
>>
>>
>> On Feb 7, 2018, at 12:36 PM, Mehdi AMINI <joker.eph at gmail.com> wrote:
>>
>> > But it is interesting in general because according to the definition
>> for local_unnamed_addr, the symbol has to be linkonce_odr to be auto hide
>> as well. ThinLTO promotion can break that as well.
>>
>> What do you mean that the promotion can break that?
>>
>> The original description I found here: https://reviews.llvm.org/D20348
>> says that it is poss...
2018 Feb 08
0
ThinLTO and linkonce_odr + unnamed_addr
...;mailto:stevenwu at apple.com>>:
>>
>>
>>> On Feb 7, 2018, at 12:36 PM, Mehdi AMINI <joker.eph at gmail.com <mailto:joker.eph at gmail.com>> wrote:
>>>
>>> > But it is interesting in general because according to the definition for local_unnamed_addr, the symbol has to be linkonce_odr to be auto hide as well. ThinLTO promotion can break that as well.
>>>
>>> What do you mean that the promotion can break that?
>>>
>>> The original description I found here: https://reviews.llvm.org/D20348 <https://reviews....
2018 Feb 09
3
ThinLTO and linkonce_odr + unnamed_addr
I wonder whether we could change the frontend to always give hidden
visibility to globals which are linkonce_odr unnamed_addr. That way, the
mechanism would just work in ELF as well and would not require LTO.
Peter
On Fri, Feb 9, 2018 at 10:46 AM, Steven Wu via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> The one that doesn’t require global analysis is commit in r324757.
>
> The global analysis will r...
2018 Feb 08
2
ThinLTO and linkonce_odr + unnamed_addr
...MT-08:00 Steven Wu <stevenwu at apple.com>:
>>
>>>
>>>
>>> On Feb 7, 2018, at 12:36 PM, Mehdi AMINI <joker.eph at gmail.com> wrote:
>>>
>>> > But it is interesting in general because according to the definition
>>> for local_unnamed_addr, the symbol has to be linkonce_odr to be auto hide
>>> as well. ThinLTO promotion can break that as well.
>>>
>>> What do you mean that the promotion can break that?
>>>
>>> The original description I found here: https://reviews.llvm.org/D20348 says
>...
2018 Feb 09
0
ThinLTO and linkonce_odr + unnamed_addr
Add Rafael here. Because he basically ask me the same question in my commit.
I wonder why clang choose to do unnamed_addr instead of just do visibility hidden. If linkonce_odr + unnamed_addr is just hidden, is the only difference linkonce_odr + unnamed_addr not in the symbol table?
Steven
> On Feb 9, 2018, at 10:50 AM, Peter Collingbourne <peter at pcc.me.uk> wrote:
>
> I wonder whether we could chan...
2018 Feb 09
2
ThinLTO and linkonce_odr + unnamed_addr
...nwu at apple.com>:
>>>
>>>>
>>>>
>>>> On Feb 7, 2018, at 12:36 PM, Mehdi AMINI <joker.eph at gmail.com> wrote:
>>>>
>>>> > But it is interesting in general because according to the definition
>>>> for local_unnamed_addr, the symbol has to be linkonce_odr to be auto hide
>>>> as well. ThinLTO promotion can break that as well.
>>>>
>>>> What do you mean that the promotion can break that?
>>>>
>>>> The original description I found here: https://reviews.llvm....
2018 Feb 09
0
ThinLTO and linkonce_odr + unnamed_addr
...apple.com>>:
>>>
>>>
>>>> On Feb 7, 2018, at 12:36 PM, Mehdi AMINI <joker.eph at gmail.com <mailto:joker.eph at gmail.com>> wrote:
>>>>
>>>> > But it is interesting in general because according to the definition for local_unnamed_addr, the symbol has to be linkonce_odr to be auto hide as well. ThinLTO promotion can break that as well.
>>>>
>>>> What do you mean that the promotion can break that?
>>>>
>>>> The original description I found here: https://reviews.llvm.org/D20348 <...
2018 Feb 08
1
ThinLTO and linkonce_odr + unnamed_addr
...MT-08:00 Steven Wu <stevenwu at apple.com>:
>>
>>>
>>>
>>> On Feb 7, 2018, at 12:36 PM, Mehdi AMINI <joker.eph at gmail.com> wrote:
>>>
>>> > But it is interesting in general because according to the definition
>>> for local_unnamed_addr, the symbol has to be linkonce_odr to be auto hide
>>> as well. ThinLTO promotion can break that as well.
>>>
>>> What do you mean that the promotion can break that?
>>>
>>> The original description I found here: https://reviews.llvm.org/D20348 says
>...
2018 Feb 08
0
ThinLTO and linkonce_odr + unnamed_addr
...nwu at apple.com <mailto:stevenwu at apple.com>>:
>
>
>> On Feb 7, 2018, at 12:36 PM, Mehdi AMINI <joker.eph at gmail.com <mailto:joker.eph at gmail.com>> wrote:
>>
>> > But it is interesting in general because according to the definition for local_unnamed_addr, the symbol has to be linkonce_odr to be auto hide as well. ThinLTO promotion can break that as well.
>>
>> What do you mean that the promotion can break that?
>>
>> The original description I found here: https://reviews.llvm.org/D20348 <https://reviews.llvm.org/D20348&...
2018 Feb 09
0
ThinLTO and linkonce_odr + unnamed_addr
...Feb 9, 2018, at 11:49 AM, Rafael Avila de Espindola <rafael.espindola at gmail.com> wrote:
>
> Steven Wu <stevenwu at apple.com> writes:
>
>> Add Rafael here. Because he basically ask me the same question in my commit.
>>
>> I wonder why clang choose to do unnamed_addr instead of just do visibility hidden. If linkonce_odr + unnamed_addr is just hidden, is the only difference linkonce_odr + unnamed_addr not in the symbol table?
>
> A local symbol being in the symbol table is mostly an implementation
> detail.
>
> Not marking a linkonce_odr + *glob...
2018 Feb 07
3
ThinLTO and linkonce_odr + unnamed_addr
That is a good question and I don't know. The optimization is defined include/llvm/Analysis/ObjectUtils.h. If I enable that for weak_odr + unnamed_addr, no tests are failing so I guess it is a safe optimization? :)
It is probably because the autohide optimization is targeted at c++ templates and inline functions and we know they have linkonce_odr linkage, which suggests whoever uses this symbol should have their own copy. Because the linkonce_odr...
2018 Feb 09
0
ThinLTO and linkonce_odr + unnamed_addr
...gt;>>>
>>>>
>>>>> On Feb 7, 2018, at 12:36 PM, Mehdi AMINI <joker.eph at gmail.com <mailto:joker.eph at gmail.com>> wrote:
>>>>>
>>>>> > But it is interesting in general because according to the definition for local_unnamed_addr, the symbol has to be linkonce_odr to be auto hide as well. ThinLTO promotion can break that as well.
>>>>>
>>>>> What do you mean that the promotion can break that?
>>>>>
>>>>> The original description I found here: https://reviews.llvm...
2018 Feb 07
0
ThinLTO and linkonce_odr + unnamed_addr
...to external due to importing. I'm not an
expert on how this would affect link semantics.
Thanks,
Teresa
On Tue, Feb 6, 2018 at 5:35 PM, Steven Wu <stevenwu at apple.com> wrote:
> Hi,
>
> I recently found that thinLTO doesn't deal with globals that has
> linkonce_odr and unnamed_addr (for macho at least) because it prohibits the
> autohide optimization during link time.
>
> In LLVM, we tagged a global linkonce_odr and unnamed_addr to indicate to
> the linker can hide them from symbol table if they were picked (aka,
> linkonce_odr_auto_hide linkage). It is very co...
2018 Feb 08
2
ThinLTO and linkonce_odr + unnamed_addr
2018-02-07 12:45 GMT-08:00 Steven Wu <stevenwu at apple.com>:
>
>
> On Feb 7, 2018, at 12:36 PM, Mehdi AMINI <joker.eph at gmail.com> wrote:
>
> > But it is interesting in general because according to the definition
> for local_unnamed_addr, the symbol has to be linkonce_odr to be auto hide
> as well. ThinLTO promotion can break that as well.
>
> What do you mean that the promotion can break that?
>
> The original description I found here: https://reviews.llvm.org/D20348
> says that it is possible to exclude a global...
2017 Aug 29
5
Is the flow "llvm-extract -> llvm-link -> clang++ " supposed to be used in this way? To Extract and Re-insert functions?
...ion step (
clang++-4.0 linked_main.ll -o main.out ):
main.ll:(.text+0x14): undefined reference to `.str'
> main.ll:(.text+0x34): undefined reference to `.str.1'
> main.ll:(.text+0x51): undefined reference to `.str.2'
and linked_main.ll file has this section:
@.str.4 = private unnamed_addr constant [16 x i8] c"First Message\0A \00",
> align 1
> @.str.1.6 = private unnamed_addr constant [17 x i8] c"Second Message\0A
> \00", align 1
> @.str.2.8 = private unnamed_addr constant [16 x i8] c"Third Message\0A
> \00", align 1
> @.str = external...
2018 Feb 07
4
ThinLTO and linkonce_odr + unnamed_addr
...n expert on how this would affect link semantics.
>
> Thanks,
> Teresa
>
> On Tue, Feb 6, 2018 at 5:35 PM, Steven Wu <stevenwu at apple.com> wrote:
>
>> Hi,
>>
>> I recently found that thinLTO doesn't deal with globals that has
>> linkonce_odr and unnamed_addr (for macho at least) because it prohibits the
>> autohide optimization during link time.
>>
>> In LLVM, we tagged a global linkonce_odr and unnamed_addr to indicate to
>> the linker can hide them from symbol table if they were picked (aka,
>> linkonce_odr_auto_hide lin...
2018 Feb 07
0
ThinLTO and linkonce_odr + unnamed_addr
...s. It's a much better out of the box experience anyway.
On Wed, Feb 7, 2018 at 11:11 AM, Steven Wu <stevenwu at apple.com> wrote:
> That is a good question and I don't know. The optimization is
> defined include/llvm/Analysis/ObjectUtils.h. If I enable that for
> weak_odr + unnamed_addr, no tests are failing so I guess it is a safe
> optimization? :)
>
> It is probably because the autohide optimization is targeted at c++
> templates and inline functions and we know they have linkonce_odr linkage,
> which suggests whoever uses this symbol should have their own copy....