Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] [PATCH] Minor typos corrected in docs"
2018 Jan 07
2
Beginner question: Calling intrinsic
Hello,
I’m not sure if this is the right place to ask beginner questions.
If not, please direct me to the appropriate place.
I’m writing my first llvm program and I’m trying to call an intrinsic, but
failing.
So far this is what I have:
declare ccc i32 @llvm.x86.bmi.pdep.32(i32, i32)
@.str2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
declare i32 @printf(i8*, ...)
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
2018 Feb 08
3
ThinLTO and linkonce_odr + unnamed_addr
2018-02-08 9:33 GMT-08:00 Steven Wu <stevenwu at apple.com>:
>
>
> On Feb 7, 2018, at 4:03 PM, Mehdi AMINI <joker.eph at gmail.com> wrote:
>
>
>
> 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
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
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?
Hi all,
First post to the list, I hope you can help or guide me on this task.
I am involved in a project that requires to re-link extracted and edited IR
code
Thus I want to know if these tools can be used in this way?
clang++-4.0 code03.cpp -emit-llvm -S -o code03.ll
llvm-extract-4.0 code03.ll -func main -S -o extracted_main.ll
llvm-link-4.0 code03.ll -only-needed -override extracted_main.ll
2018 Feb 08
0
ThinLTO and linkonce_odr + unnamed_addr
> On Feb 8, 2018, at 10:28 AM, Mehdi AMINI <joker.eph at gmail.com> wrote:
>
>
>
> 2018-02-08 9:33 GMT-08:00 Steven Wu <stevenwu at apple.com <mailto:stevenwu at apple.com>>:
>
>
>> On Feb 7, 2018, at 4:03 PM, Mehdi AMINI <joker.eph at gmail.com <mailto:joker.eph at gmail.com>> wrote:
>>
>>
>>
>> 2018-02-07
2018 Feb 08
2
ThinLTO and linkonce_odr + unnamed_addr
2018-02-08 10:44 GMT-08:00 Steven Wu <stevenwu at apple.com>:
>
>
> On Feb 8, 2018, at 10:28 AM, Mehdi AMINI <joker.eph at gmail.com> wrote:
>
>
>
> 2018-02-08 9:33 GMT-08:00 Steven Wu <stevenwu at apple.com>:
>
>>
>>
>> On Feb 7, 2018, at 4:03 PM, Mehdi AMINI <joker.eph at gmail.com> wrote:
>>
>>
>>
>>
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
2018 Feb 09
2
ThinLTO and linkonce_odr + unnamed_addr
SGTM. I would do as 2 separate patches, the local per-module case, then the
case that requires linker/global analysis.
Thanks,
Teresa
On Fri, Feb 9, 2018 at 9:20 AM, Steven Wu via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Are we agreeing on this is what we should do? If so, I will prepare a
> patch.
>
> Steven
>
>
> On Feb 8, 2018, at 11:07 AM, Mehdi AMINI
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
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.
>
>
2018 Feb 07
4
ThinLTO and linkonce_odr + unnamed_addr
I agree with Teresa, we should probably do #2 to preserve behavior for now.
On Wed, Feb 7, 2018 at 9:34 AM, Teresa Johnson via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hi Steven,
>
> I'd prefer not to inhibit importing. I am also concerned about putting
> these symbols in the llvm.compiler_used (I don't recall earlier discussion
> around this, but it seems
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
2018 Jan 07
0
Beginner question: Calling intrinsic
Hi John,
What targer are you trying to compile this for? I imagine this is just a
case of using an X86 intrinsic on a non-X86 back end. Or is this an
intrinsic you added and didn't provide a selection pattern for?
In any case, this intrinsic makes it into the selection DAG and the
instruction selector tries to select a sequence of instructions for it.
However, it fails to find a pattern that
2018 Feb 07
0
ThinLTO and linkonce_odr + unnamed_addr
Hi Steven,
I'd prefer not to inhibit importing. I am also concerned about putting
these symbols in the llvm.compiler_used (I don't recall earlier discussion
around this, but it seems like it could have effects on optimization as you
mention).
What are the downsides of #2 (adding visibility hidden)? We already do this
when promoting internal linkage to external due to importing. I'm
2018 Feb 07
2
ThinLTO and linkonce_odr + unnamed_addr
Something I haven't seen mentioned: why are we dropping the unnamed_addr?
Can't we preserve it with the weak symbol? Would it be OK to add auto-hide
in this case (maybe it would already happen)?
Can we use the new local_unnamed_addr that was added (by pcc or Rafael I
don't remember)? I think this attribute matches exactly the `auto-hide`
semantic. Wasn't the idea that this could be
2018 Feb 08
1
ThinLTO and linkonce_odr + unnamed_addr
On Thu, Feb 8, 2018 at 10:44 AM, Steven Wu via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
>
>
> On Feb 8, 2018, at 10:28 AM, Mehdi AMINI <joker.eph at gmail.com> wrote:
>
>
>
> 2018-02-08 9:33 GMT-08:00 Steven Wu <stevenwu at apple.com>:
>
>>
>>
>> On Feb 7, 2018, at 4:03 PM, Mehdi AMINI <joker.eph at gmail.com> wrote:
>>
2018 Feb 09
0
ThinLTO and linkonce_odr + unnamed_addr
Are we agreeing on this is what we should do? If so, I will prepare a patch.
Steven
> On Feb 8, 2018, at 11:07 AM, Mehdi AMINI <joker.eph at gmail.com> wrote:
>
>
>
> 2018-02-08 10:44 GMT-08:00 Steven Wu <stevenwu at apple.com <mailto:stevenwu at apple.com>>:
>
>
>> On Feb 8, 2018, at 10:28 AM, Mehdi AMINI <joker.eph at gmail.com
2018 Feb 08
0
ThinLTO and linkonce_odr + unnamed_addr
> On Feb 7, 2018, at 4:03 PM, Mehdi AMINI <joker.eph at gmail.com> wrote:
>
>
>
> 2018-02-07 12:45 GMT-08:00 Steven Wu <stevenwu 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
2018 Feb 09
0
ThinLTO and linkonce_odr + unnamed_addr
The one that doesn’t require global analysis is commit in r324757.
The global analysis will require adding a field into GlobalSummary. Let me do some research. The implementation should not be hard but I don’t want to break bitcode compatibility if that applies to the summary.
Steven
> On Feb 9, 2018, at 9:33 AM, Teresa Johnson <tejohnson at google.com> wrote:
>
> SGTM. I would