similar to: [LLVMdev] How to get the string value?

Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] How to get the string value?"

2012 Jan 27
0
[LLVMdev] How to get the string value?
Hi Welson Sun, > Hi, if I have some LLVM code like this: > > @.str = private unnamed_addr constant [7 x i8] c"in_arr\00", align 1 > @.str1 = private unnamed_addr constant [8 x i8] c"in_arr2\00", align 1 > @.str2 = private unnamed_addr constant [8 x i8] c"out_arr\00", align 1 > ... > ... > > call void (...)* @_Z16fooz(i8* *getelementptr
2012 Jan 27
3
[LLVMdev] How to get the string value?
Thanks Duncan, Yes, it is a ConstantExpr! Thank you! Now trying to find a clue in ConstantExpr's functions to get that string :-) Regards, Welson On Thu, Jan 26, 2012 at 9:04 PM, Duncan Sands <baldrick at free.fr> wrote: > Hi Welson Sun, > > > Hi, if I have some LLVM code like this: > > > > @.str = private unnamed_addr constant [7 x i8]
2012 Jan 28
0
[LLVMdev] How to get the string value?
Hi Welson, > Yes, it is a ConstantExpr! Thank you! > > Now trying to find a clue in ConstantExpr's functions to get that string :-) you can get the pointer operand by doing: getOperand(0) The i'th index is getOperand(i+1). Ciao, Duncan. > > Regards, > Welson > > On Thu, Jan 26, 2012 at 9:04 PM, Duncan Sands <baldrick at free.fr > <mailto:baldrick at
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 Mar 01
1
[LLVMdev] Linking problem in a pass
HI Duncan, Your understanding of the problem is correct. However, the XYZ class is not inside an anonymous name space. Also, all the XYZ methods are defined in the .cpp file. Looking at the error message: opt: symbol lookup error: path/to/pass.so: undefined symbol: _ZN12DataTransferD1Ev Where DataTransfer is the class name. Maybe I am missing certain type of constructors? Thanks, Welson On
2012 Mar 01
2
[LLVMdev] Linking problem in a pass
Originally, the problem is the lack of .cpp file. Then I noticed the compilation log is not showing the .o file being generated for the non-pass classes. Then I added the .cpp files for each .h file, then the .o files are being generated, shown in the Debug directory. Actually, if I add "VERBOSE = 1" in the Makefile, it shows the linking command is actually linking all the .o files into
2012 Feb 16
2
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
Hi Welson, the default alias analysis is -no-aa. As the name suggests it just returns MayAlias for everything. Maybe you are using that one? Best wishes, Duncan.
2012 Mar 01
0
[LLVMdev] Linking problem in a pass
Hi Welson, are you saying that the .o file containing the class is being linked into the .so file, but nonetheless you get "undefined symbol XYZ" errors where XYZ is that class? Maybe you defined the class inside an anonymous name space? Alternatively, if XYZ refers to a method of the class, maybe you forgot to define that method. Ciao, Duncan. On 01/03/12 17:36, Welson Sun wrote:
2012 Sep 21
2
[LLVMdev] Alias Analysis accuracy
Yeah. Is there a way to specify noalias between these arguments? On Fri, Sep 21, 2012 at 2:46 PM, Krzysztof Parzyszek < kparzysz at codeaurora.org> wrote: > On 9/21/2012 4:35 PM, Welson Sun wrote: > >> Dear LLVM, >> >> I would like to understand how to improve the LLVM alias analysis >> accuracy. I am currently using llvmgcc 2.9 and llvm 3.0. Here is the C
2012 Feb 16
0
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
Thanks Duncan! You are right! If I type the command "opt -basicaa -mypass ...", then the output makes sense. Now, how can you specify which AA to use in the code? Regards, Welson On Thu, Feb 16, 2012 at 12:05 PM, Duncan Sands <baldrick at free.fr> wrote: > Hi Welson, the default alias analysis is -no-aa. As the name suggests it > just returns MayAlias for everything.
2012 Sep 19
1
[LLVMdev] Alias analysis result
Hi Welson, > In case "my_pass" is compiled into a standalone executable, how can I run the > specific alias analysis in the code? I suggest you work out what passing -basic-aa to opt does, how it works, and do the same in your code. Ciao, Duncan. > > Thanks > > On Thu, Mar 8, 2012 at 8:55 AM, Duncan Sands <baldrick at free.fr > <mailto:baldrick at
2012 Mar 14
2
[LLVMdev] Linking static external library into an LLVM pass library?
This document http://llvm.org/docs/Projects.html says the USEDLIBS should be used to statically link libraries: USEDLIBSThis variable holds a space separated list of libraries that should be linked into the program. These libraries must be libraries that come from your *lib* directory. The libraries must be specified without their "lib" prefix. For example, to link libsample.a, you
2012 Apr 18
2
[LLVMdev] STLport
Good to hear that. Doesn't seem to be a popular combination since googling results little information on this. Is it possible for you to show the changes to LLVM? Personally I don't like STLport, not sure the real benefit versus using compiler's STL. On Tue, Apr 17, 2012 at 12:04 PM, Villmow, Micah <Micah.Villmow at amd.com>wrote: > We are able to compile it internally,
2012 Sep 21
3
[LLVMdev] Alias Analysis accuracy
Can you give an example? And is this limited to C (not C++) only? On Fri, Sep 21, 2012 at 2:52 PM, Liu, Yaxun (Sam) <Yaxun.Liu at amd.com> wrote: > I think you may add restrict type qualifier.**** > > ** ** > > Sam**** > > ** ** > > *From:* llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] *On > Behalf Of *Welson Sun > *Sent:* Friday,
2012 Sep 21
0
[LLVMdev] Alias Analysis accuracy
I think you may add restrict type qualifier. Sam From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Welson Sun Sent: Friday, September 21, 2012 5:50 PM To: Krzysztof Parzyszek Cc: llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] Alias Analysis accuracy Yeah. Is there a way to specify noalias between these arguments? On Fri, Sep 21, 2012 at 2:46 PM, Krzysztof
2012 Mar 01
2
[LLVMdev] Linking problem in a pass
My pass uses another class which is defined in a separate .h file, which sits in the same folder as the pass .cpp file. The pass compiles fine, but when using the pass "opt -load ...", there is an error: opt symbol lookup error .... undefined symbol xxx, where xxx is the class name. It looks like that class file's object file is not linked into the pass.so file. How should I change
2012 Apr 17
2
[LLVMdev] STLport
I am curious to see if anyone has ever been successfully compiled LLVM with STLport? I tried compiling LLVM 3.0 with STLport-5.2.1, and failed. Thanks, Welson -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120417/e3322a36/attachment.html>
2016 Jul 22
2
HEAD compilation causes gcc internal error
Sure this is more likely a gcc bug. However, same toolchain compiled without any problems a week ago. Also, in some organizations, upgrading gcc is very hard if not impossible. On Fri, Jul 22, 2016 at 11:11 AM, Paulo Matos via llvm-dev < llvm-dev at lists.llvm.org> wrote: > > > On 22/07/16 20:08, Welson Sun via llvm-dev wrote: > > This is gcc4.8.0 compiling HEAD synced on
2012 Sep 21
3
[LLVMdev] Alias Analysis accuracy
On Fri, Sep 21, 2012 at 3:08 PM, Welson Sun <welson.sun at gmail.com> wrote: > OK, with the restrict type qualifier, it is a little bit better: > > The IR's function signature becomes: > define void @foo(i32* noalias %a, i32* noalias %b, i32* noalias %c) nounwind > { > > Now the AA result: > Function: foo: 13 pointers, 0 call sites > NoAlias: i32* %a,
2012 Mar 08
2
[LLVMdev] Alias analysis result
Hi, > That's the reason I have defined getAnalysisUsage method. Isn't that the > right way to do it? no, that gives you access to whatever alias analysis has been computed, but it doesn't specify what kind of alias analysis should be computed (there are several). Try something like this: opt -load=my_pass.so -basic-aa -run_my_pass ... Ciao, Duncan.