similar to: [LLVMdev] Trying to access the user defined variable name

Displaying 20 results from an estimated 600 matches similar to: "[LLVMdev] Trying to access the user defined variable name"

2010 Jul 15
0
[LLVMdev] Trying to access the user defined variable name
On Wed, Jul 14, 2010 at 3:03 PM, Arvind Sudarsanam <arvind.sudarsanam at aggiemail.usu.edu> wrote: > Dear all, > > I have the following source code: > > long f(long x, long y) > { >        long u; > >   u = x+y; >   return u; > }; > > After clang (with debug option set) and llvm opt using mem2reg, I get > the following .ll file >
2010 Jul 15
2
[LLVMdev] Trying to access the user defined variable name
Hi Devang, Thanks for your reply. You mentioned " First parameter is the compiler generated temp. and 3rd parameter provides info about the variable, including its name 'u'." I did manage to get this far. But, I am finding it difficult to access this info using LLVM APIs. The third parameter is of type "metadata". So I was able to access it by casting it to MDNode.
2010 Jul 15
0
[LLVMdev] Trying to access the user defined variable name
On Thu, Jul 15, 2010 at 1:19 PM, Arvind Sudarsanam <arvind.sudarsanam at aggiemail.usu.edu> wrote: > Hi Devang, > > Thanks for your reply. You mentioned > " First parameter is the compiler generated temp. and 3rd parameter > provides info about the variable, including its name 'u'." > > I did manage to get this far. But, I am finding it difficult to
2009 Dec 14
3
[LLVMdev] clang and static functions
Hi, Sorry for not being specific. I just wanted to know if there is any way at all to force clang to generate intermediate code for static functions when they are not being called anywhere inside the current module. Other compilers seem to generate intermediate code (lcc, for instance). Thanks for your reply..Olivier. Sincerely Arvind On Mon, Dec 14, 2009 at 1:10 PM, Olivier Meurant
2009 Dec 14
0
[LLVMdev] clang and static functions
Ah ok. Sorry. :) I think that argument "-femit-all-decls" will help you. Olivier. On Mon, Dec 14, 2009 at 9:18 PM, Arvind Sudarsanam < arvind.sudarsanam at aggiemail.usu.edu> wrote: > Hi, > > Sorry for not being specific. I just wanted to know if there is any > way at all to force clang to generate intermediate code for static > functions when they are not being
2009 Dec 14
2
[LLVMdev] clang and static functions
Hi, I am trying to compile a single module (dgemm.c) using clang and generate dgemm.ll. Command: clang -emit-llvm dgemm.c -S -o dgemm.ll Some of the functions are declared as static and clang ignores these functions: One of the functions is: static void innerloop(double a, const double* b, double* c, double beta) { *b = a*beta; return; } Is there any way to make clang generate llvm code
2009 Dec 14
0
[LLVMdev] clang and static functions
Hi Arvind, you need to use it effectively : static int add(int a, int b) { return a+b; } int use() { return add(4,5); } ==> ; ModuleID = '<stdin>' target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" target triple = "i386-pc-linux-gnu" define i32 @use()
2009 Dec 04
2
[LLVMdev] regarding getelementptr
Hi, I have been working towards generating my own IR code from llvm IR. I have hit a stumbling block with respect to "getelementptr" used inside another llvm instruction. Example: %arrayidx = getelementptr inbounds i32* getelementptr inbounds ([10 x i32]* @k, i32 0, i32 0), i32 %tmp2 ; <i32*> [#uses=1] I am unable to get a handle on the second "getelementptr" in this
2009 Dec 04
0
[LLVMdev] regarding getelementptr
Hi Arvind, > I have been working towards generating my own IR code from llvm IR. I > have hit a stumbling block with respect to "getelementptr" used inside > another llvm instruction. > > Example: %arrayidx = getelementptr inbounds i32* getelementptr > inbounds ([10 x i32]* @k, i32 0, i32 0), i32 %tmp2 ; <i32*> [#uses=1] > > I am unable to get a handle on
2010 Mar 25
4
[LLVMdev] source code information in LLVM IR
Hi, I am generating llvm IR code for C source code using clang as the front end. I am wondering if there is any way of mapping an llvm IR line number back to its C source code line number. Thanks Sincerely Arvind -- Arvind Sudarsanam Utah State University Phone: (435) 512-7769 E-mail: theonemorpheus at gmail.com Web-site: http://cc.usu.edu/~asudarsanam
2015 Apr 29
2
[LLVMdev] Assertion failure (Bug 21609) in DwarfFile.cpp
Hi Folks, I ran into this assertion failure while compiling a function with a large number of arguments: https://llvm.org/bugs/show_bug.cgi?id=21609 I have coded up the fix as per David's suggestion (added a new header field for DIVariable to separate out ArgNo & LineNo). The proposed diff is attached to the bug. However, there are around 175 testcases across clang & llvm that need
2010 Jul 01
2
[LLVMdev] Qualitative comparisons between Open64 and llvm
Hi, I have been working towards developing compiler optimization tools targeting multi core processors while using LLVM IR as the starting point and building on top of the analysis and optimization passes available in the llvm source. Recently, I looked into Open64 and its intermediate representation WHIRL. Documentation for developers to use Open64 seems to be inadequate (when compared to LLVM
2015 Apr 29
2
[LLVMdev] Assertion failure (Bug 21609) in DwarfFile.cpp
On Tue, Apr 28, 2015 at 7:14 PM, David Blaikie <dblaikie at gmail.com> wrote: > I believe duncan's fixed this recently in 235956 and 235955 - does ToT work > for you? It seems like r235955 might have fixed it. However I'm having build issues with ToT in my environment. Is this the right place to check ToT build status: http://lab.llvm.org:8011/one_line_per_build > > On
2010 Jul 02
0
[LLVMdev] Qualitative comparisons between Open64 and llvm
Hi, Arvind Sudarsanam: I know some of Open64. Above all, Open64 is designed for a high performance compiler. It is now supported by AMD, HP, ICT Chinese Academy of Science, etc. and has been ported to X86, Itanium, Loongson CPU etc. And to your questions 1, Open64 already have some main optimization phases, Inline for aggressive inline opt. LNO for loop opt, WOPT for machine independent opt(
2012 Mar 02
2
[LLVMdev] Question on debug information
Hi all, I'm using my own front-end to generate following code .ll file targeting x86 32-bit: ; ModuleID = 'check.c' target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32" target triple = "i386-pc-linux-gnu" @.str581 = internal constant [52 x i8] c"---- test number %d
2010 May 13
4
[LLVMdev] How to get the variable mapping between the source and llvm bytecode
Hi, I want to know the variable mapping between the source and llvm bytecode. It seems that current llvm debugging information cannot provide this mapping directly. Here is my examples (llvm 2.7). In this exmaple, I want to know the mapping: tmp<--->%4. But current llvm's debugging information can only provide that the instruction "%4 = add nsw i32 %3, 2" is at line 3 in
2012 Mar 06
0
[LLVMdev] Question on debug information
Hi all, Anyone have ideas/info on this topic ? Thanks Seb 2012/3/2 Seb <babslachem at gmail.com> > Hi all, > > I'm using my own front-end to generate following code .ll file targeting > x86 32-bit: > > ; ModuleID = 'check.c' > target datalayout = >
2012 Mar 06
2
[LLVMdev] Question on debug information
On Mar 6, 2012, at 5:31 AM, Seb <babslachem at gmail.com> wrote: > Hi all, > > Anyone have ideas/info on this topic ? > Thanks > Seb > > 2012/3/2 Seb <babslachem at gmail.com> > Hi all, > > I'm using my own front-end to generate following code .ll file targeting x86 32-bit: > > ; ModuleID = 'check.c' > target datalayout =
2010 Jun 18
1
[LLVMdev] argpromotion not working
Hi all, I have the following C code. static int addp(int *c, int a,int b) { int x = *c + a + b; return(x); } I want to replace *c with a scalar. So I tried the -argpromotion pass. However, it fails to do anything to the resulting llvm file. List of commands: clang add.c -c -o add.bc clang add.c -S -o add.ll opt -argpromotion -stats add.bc -o add_a.bc llvm-dis < add_a.bc > add_a.ll Also,
2010 Mar 25
1
[LLVMdev] source code information in LLVM IR
Hi, I am generating llvm IR code for C source code using clang as the front end. I am wondering if there is any way of mapping an llvm IR line number back to its C source code line number. Thanks Sincerely Arvind ------------------------------------------------------------------------ ------------ Arvind Sudarsanam Phone: (435) 512-7769 CPU Technology, Inc