Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] static variables in the IR"
2011 Apr 14
2
[LLVMdev] llvm instrinsic (memcpy/memset/memmov)and ConstantExpression with cast
Hi All,
I have a question on ConstantExpressions and llvm intrinsic memcpy/memset/memmove. I am using llvm-2.8 release. In one of the C programs that I am compiling using clang frontend, the call to memcpy instrinsic looks like the following
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp2, i8* bitcast (%struct.ta* @tret to i8*), i64 4, i32 4, i1 false), !dbg !19
The second argument to memcpy is
2014 Aug 28
4
[LLVMdev] How to tell whether a GlobalValue is user-defined
>> Agreed. If ld64 can drop support for .o produced by the old gcc that
>> would be awesome. Failing that, what is really needed is
> Because of static archives, the linker has to support old .o files for quite a while. I also don’t know when clang starting getting this right.
r123585 (Jan 16 17:19:34 2011) I think.
> Also, this seems like linker complexity for a very
2011 Apr 15
0
[LLVMdev] llvm instrinsic (memcpy/memset/memmov)and ConstantExpression with cast
On 4/14/11 6:34 PM, Kodakara, Sreekumar V wrote:
>
> Hi All,
>
> I have a question on ConstantExpressions and llvm intrinsic
> memcpy/memset/memmove. I am using llvm-2.8 release. In one of the C
> programs that I am compiling using clang frontend, the call to memcpy
> instrinsic looks like the following
>
> call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp2, i8* bitcast
2017 Apr 04
3
RFC: Adding a string table to the bitcode format
On Tue, Apr 4, 2017 at 12:36 PM, Duncan P. N. Exon Smith <
dexonsmith at apple.com> wrote:
>
> On 2017-Apr-04, at 12:12, Peter Collingbourne <peter at pcc.me.uk> wrote:
>
> On Mon, Apr 3, 2017 at 8:13 PM, Mehdi Amini <mehdi.amini at apple.com> wrote:
>
>>
>> On Apr 3, 2017, at 7:08 PM, Peter Collingbourne <peter at pcc.me.uk> wrote:
>>
2012 Oct 23
0
[LLVMdev] precondition suggestion to LLVM
On Mon, Oct 22, 2012 at 9:33 PM, Niko Zarzani <koni10 at hotmail.it> wrote:
> Thank you, it was what I really was searching for :)
>
> However, I don't know if I well understood. I've find this link in the
> second link which seemed what i was looking for:
> http://nondot.org/sabre/LLVMNotes/BuiltinUnreachable.txt .
> If I put around the code block (inside my
2012 Oct 23
3
[LLVMdev] precondition suggestion to LLVM
Thank you, it was what I really was searching for :)
However, I don't know if I well understood. I've find this link in the second link which seemed what i was looking for: http://nondot.org/sabre/LLVMNotes/BuiltinUnreachable.txt .If I put around the code block (inside my function with precondition (x>0 && y>0)) a contruct like that that use __builtin_unreachable:
int foo(int
2012 Oct 23
0
[LLVMdev] precondition suggestion to LLVM
Hi Niko,
Do you mean branch prediction, i.e. __builtin_expect [1]? Many
compilers support it, I think clang (LLVM's C/C++ frontend) is among
them.
- D.
[1] http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
2012/10/23 Niko Zarzani <koni10 at hotmail.it>:
> Hi all,
> Is there any way to tell LLVM some additional information about the
> variables in the code in order to
2020 Feb 18
4
LLD doesn't handle globals with appending linkage
Hello.
I'm posting this question here, because there seem to be no LLD-specific
mailing list. Sorry in advance if this is wrong one.
I compile two C source with following command:
clang -flto -o %name.bc %name.c
LLVM is augmented with my custom pass, which amongst other things create a
global with appending linkage:
@myvar = appending constant [1 x [1 x i8]*] ...
I also have another pass
2012 Jan 28
1
[LLVMdev] How to get the string value?
Hey Duncan,
Thanks! I figured out this piece of code finally:
Value *gep = call->getArgOperand(0);
if ( ConstantExpr *pCE = dyn_cast<ConstantExpr>(gep) ) {
Value *firstop = pCE->getOperand(0);
if (GlobalVariable *GV = dyn_cast<GlobalVariable>(firstop)){
Constant *v = GV->getInitializer();
if
2012 Oct 23
0
[LLVMdev] precondition suggestion to LLVM
You may want to check this out:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-October/053924.html
and also
http://llvm.org/PR810
- xi
On 10/22/12 6:05 PM, Niko Zarzani wrote:
> Hi all,
> Is there any way to tell LLVM some additional information about the
> variables in the code in order to make better optimization?
> For example, if my function has a certain precondition (such
2014 Mar 10
2
[LLVMdev] GlobalValues appear in their own use lists?
In the following IR module:
–
define i8 @foo() #0 {
entry:
%call0 = call i8 @bar()
ret i8 %call0
}
declare i8 @bar() #1
–
@bar() gets marked as its own user in top-of-tree LLVM. I patched the Verifier to check it (but didn’t commit the patch):
–
Index: lib/IR/Verifier.cpp
===================================================================
--- lib/IR/Verifier.cpp (revision 203468)
+++
2012 Oct 22
5
[LLVMdev] precondition suggestion to LLVM
Hi all,Is there any way to tell LLVM some additional information about the variables in the code in order to make better optimization?For example, if my function has a certain precondition (such as x>0) then it will be possible to better optimize the code given that information (which the compiler does not know).I am new in this field and I don't know if there are ways to tell the compiler
2013 Sep 12
1
[LLVMdev] (no subject)
I tried it on a simple file test.c (as you did) but actually clang does not show me any output.
In addition I tried to set the CFLAGS specifying the -mllvm -time-passes options. However I still have anything about the time passes informations in the output and I also get this warning during the build with make:clang: warning: argument unused during compilation: '-mllvm -time-passes'Maybe
2014 Sep 19
3
[LLVMdev] [RFC] Exhaustive bitcode compatibility tests for IR features
On 19 September 2014 15:54, Steven Wu <stevenwu at apple.com> wrote:
> Yes, we don’t need to edit the assembly in the file, but we need to modified the CHECK line to reflect the output of current llvm-dis. I was talking about updating the CHECK in all the previous version. Does that make sense?
Yes, the CHECK lines would have to be updated, but that seems like a
pretty small annoyance.
2014 Mar 12
3
[LLVMdev] [ARM] [PIC] optimizing the loading of hidden global variable
Hi,
When Im compiling a code with fvisibility=hidden fPIC for ARM, I find
that LLVM generates less optimized code than GCC.
For example:
test.cpp:
void init(void *);
int g0[100];
int g1[100];
int g2[100];
void foo() {
init(&g0);
init(&g1);
init(&g2);
}
Clang will emit 1 GOT entry for each GV and 2 instructions to get the
address:
ldr
2013 Sep 12
0
[LLVMdev] (no subject)
To use options like "-time-passes" and "-stats" you need to prefix
them with "-mllvm":
clang -mllvm -time-passes -O3 test.c -o /dev/null
Note that I believe you need asserts enabled or some other build
configuration for this to work,
the timing code is disabled in fully release builds IIRC.
Hope this helps!
~Will
On Thu, Sep 12, 2013 at 11:50 AM, Niko Zarzani
2013 Apr 16
0
[LLVMdev] sccp pass with opt
This compiler does not have mem-SSA, as far as I know, only few pass
can propagate value along memory.
You need to promote those local variable into register first before sccp
is invoked.
e.g1. opt a.ll -basicaa -gvn -sccp -S
eg.2. opt a.ll -sroa -sccp -S
On 4/16/13 12:37 PM, Niko Zarzani wrote:
> Hi all,
>
> I am trying to see how single llvm optimizations work by running them
2004 Oct 13
1
[LLVMdev] creating Internal GlobalVaraibles
Here is my code, (GV is a GlobalVariable*):
GV = new GlobalVariable(AI->getType(), false, GlobalValue::InternalLinkage,
0, "temp_glob", &M);
I tell it to make it with internal linkage, but when I run the pass it makes
them external:
%temp_glob = external global [10 x int]* ; <[10 x int]**>
[#uses=2]
%temp_glob = external global [10 x float]* ;
2013 Sep 12
2
[LLVMdev] (no subject)
Hi all,
I was interested in knowing which of the passes spends the most of the time compiling the dns server BIND.With the -CC option I selected clang as my compiler and, as I was expecting, the compilation gave me no problems.Now I have a question, is there any way to set an option similiar to "-time-passes" to clang in order to get those information I was interested in?Or do you think
2005 Nov 02
2
[LLVMdev] Statically Initialized Arrays
I am trying to generate LLVM code that references a global array.
Unfortunately, while I am generating the code I do not know the final
length of the array, as I add elements to it as my compiler goes along.
What is the best way to do this in LLVM? Ideally, I would be able to
define the GlobalVariable array and change its length later on. I would
love for it to have the correct length so I