similar to: [LLVMdev] Basic doubt related to Module::iterator

Displaying 20 results from an estimated 7000 matches similar to: "[LLVMdev] Basic doubt related to Module::iterator"

2010 May 28
2
[LLVMdev] Basic doubt related to Module::iterator
Hi, Yeah I found that it is running LLVM's functions. The functions that are running are: main llvm.dbg.func.start llvm.dbg.stoppoint scanf llvm.dbg.region.end But I dont want all the functions to be called as I am using Dominator Trees and whenever I the statement DominatorTree &DT = getAnalysis<DominatorTree>(F); is encountered by functions other than main, it gives error.
2010 May 28
0
[LLVMdev] Basic doubt related to Module::iterator
ambika wrote: > Hi, > > Yeah I found that it is running LLVM's functions. The functions that are > running are: > > main > llvm.dbg.func.start > llvm.dbg.stoppoint > scanf > llvm.dbg.region.end > > But I dont want all the functions to be called as I am using Dominator > Trees and whenever I the statement > > DominatorTree &DT =
2010 May 25
0
[LLVMdev] Basic doubt related to Module::iterator
On May 24, 2010, at 12:58 PM, ambika wrote: > I run this for different files, each having one function each ie > main(), > but for one it loops twice, and for another it loops thrice. > for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) It might be iterating over the LLVM intrinsic functions as well as the user-defined functions. Try printing out the function names
2010 May 10
2
[LLVMdev] [Fwd: Error while running my pass with opt]
ambika wrote: > Here is getAnalysisUsage() i am using, > > void getAnalysisUsage(AnalysisUsage &AU) const { > AU.setPreservesAll(); > AU.addRequired<DominatorTree>(); > } > > and then I use it as, > > > bool ptrTest::runOnModule(Module &M) { > > DominatorTree &DT = getAnalysis<DominatorTree>(); > ...... >
2010 May 09
2
[LLVMdev] [Fwd: Error while running my pass with opt]
ambika wrote: > But this is already present in my pass. > And I am not able to understand the cause for the error: > Can you send a copy of your getAnalysisUsage() method for your pass? There are some funny errors that can occur when you do things that the PassManager cannot handle. For example, if you're requiring a transform pass, that can cause strange assertions from the
2010 May 11
0
[LLVMdev] [Fwd: Error while running my pass with opt]
John Criswell wrote: > ambika wrote: >> Here is getAnalysisUsage() i am using, >> >> void getAnalysisUsage(AnalysisUsage&AU) const { >> AU.setPreservesAll(); >> AU.addRequired<DominatorTree>(); >> } >> >> and then I use it as, >> >> >> bool ptrTest::runOnModule(Module&M) { >> >>
2010 May 09
0
[LLVMdev] [Fwd: Error while running my pass with opt]
Here is getAnalysisUsage() i am using, void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AU.addRequired<DominatorTree>(); } and then I use it as, bool ptrTest::runOnModule(Module &M) { DominatorTree &DT = getAnalysis<DominatorTree>(); ...... } John Criswell wrote: > ambika wrote: >> But this is already present in
2010 May 08
0
[LLVMdev] [Fwd: Error while running my pass with opt]
But this is already present in my pass. And I am not able to understand the cause for the error: opt: /home/ambika/llvm_3/llvm-2.6/include/llvm/PassAnalysisSupport.h:203: AnalysisType& llvm::Pass::getAnalysisID(const llvm::PassInfo*) const [with AnalysisType = llvm::DominatorTree]: Assertion `ResultPass && "getAnalysis*() called on an analysis that was not "
2010 Feb 15
0
[LLVMdev] A very basic doubt about LLVM Alias Analysis
Hi Ambika, > Using this option I do get all the vars as may alias ie > > MayAlias: i32* %j.0, i32* %k > MayAlias: i32* %i.0, i32* %k > MayAlias: i32* %i.0, i32* %j.0 > > Is there any other analysis which will give them as must aliases. at -O1 these variables are entirely eliminated here. I'm surprised they aren't eliminated for you. Ciao, Duncan. PS:
2010 May 08
3
[LLVMdev] [Fwd: Error while running my pass with opt]
Hi, you need something like this in your pass: void YourPass::getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<DominatorTree>(); } because you need to specify which analysis you are using. Tobi
2010 Mar 04
1
[LLVMdev] Doubt with GVNPRE
Hi, I have a program as: int main(int argc, char **argv) { int a,b,k,l; scanf("%d%d",&a,&b); if (argc > 1) { k=a+b; } else { k=5; } l=a+b; printf("%d,%d",k,l); return 0; } Now i run the following on it: llvm-gcc -O1 -emit-llvm -c -o 1.bc 1.c llvm-dis 1.bc -o 1.ll opt
2010 Feb 15
3
[LLVMdev] A very basic doubt about LLVM Alias Analysis
Hi, Using this option I do get all the vars as may alias ie MayAlias: i32* %j.0, i32* %k MayAlias: i32* %i.0, i32* %k MayAlias: i32* %i.0, i32* %j.0 Is there any other analysis which will give them as must aliases. Actually what I want to do is implement a flow sensitive points-to(not alias) analysis and then use that information for some optimizations like PRE. Will that be
2010 Feb 12
2
[LLVMdev] A very basic doubt about LLVM Alias Analysis
Hi, I have a program like: main() { int i,*k; k = &i; i=4; ...... } then why dont i get {k -> i} ie k is aliased to i in any of the analysis. If i want to get this then how can i get it. thanks and regards, Ambika
2010 Apr 12
1
[LLVMdev] [Fwd: Can someone help me with error while i make my own pass]
Tried that but still no success Chris Lattner wrote: > Try doing a clean build, then doing 'make ENABLE_PIC=1' > > -Chris > > On Apr 11, 2010, at 9:13 AM, ambika wrote: > >> >> >> *From: *ambika <ambika at cse.iitb.ac.in <mailto:ambika at cse.iitb.ac.in>> >> *Date: *April 8, 2010 9:10:25 AM PDT >> *To: *llvmdev at cs.uiuc.edu
2010 Feb 09
3
[LLVMdev] Mapping bitcode to source code
On Feb 8, 2010, at 8:51 PM, Duncan Sands wrote: > this can be done using debug info. Check out > http://llvm.org/docs/SourceLevelDebugging.html Wow, that threw me for a loop. I'm using the 2.6 release, thinking I was up to date, but its debug output doesn't look anything like what's described in the above link. It appears to document the upcoming 2.7 version, which
2010 Apr 11
0
[LLVMdev] [Fwd: Can someone help me with error while i make my own pass]
Try doing a clean build, then doing 'make ENABLE_PIC=1' -Chris On Apr 11, 2010, at 9:13 AM, ambika wrote: > > > From: ambika <ambika at cse.iitb.ac.in> > Date: April 8, 2010 9:10:25 AM PDT > To: llvmdev at cs.uiuc.edu > Subject: [LLVMdev] Can someone help me with error while i make my own pass > > > Hi, > > I have added LoaderInterface pass in
2010 Feb 14
4
[LLVMdev] A very basic doubt about LLVM Alias Analysis
Oh m sorry for that mistake as I had points to in mind. But still what about the following prog: int main() { int *i,*j,k; i=&k; j=&k; k=4; printf("%d,%d,%d",*i,*j,k); return 0; } here too i dont get <i,j> alias each other. Duncan Sands wrote: > Hi ambika, > >> main() { >> int i,*k; >> k =
2010 Feb 02
3
[LLVMdev] Problem in Adding a pass to LLVM
Hi, I am trying to add alias analysis in llvm. I created a file ProfileAlias.cpp in llvm source at the place where Andersens.cpp is there. ProfileAlias.cpp does nothing at present just empty definitions of required functions. When I build llvm I get the following error: /home/ambika/llvm1/llvm-obj/Release/lib/libLLVMipa.a(ProfileAlias.o): In function `llvm::createProfileAliasPass()':
2010 Feb 23
1
[LLVMdev] Regarding a pass in LLVM
I have done that. I have defined createMyAnaPass() in Passes.h and it is defined in MyAna.cpp and used in LinkAllPasses.h But still the error : /home/ambika/llvm/llvm-obj/tools/opt/Release/opt.o: In function `global constructors keyed to opt.cpp': opt.cpp:(.text+0x1e89): undefined reference to `llvm::createMyAnaPass()' I dont understand whats the problem. Jianzhou Zhao wrote: >
2010 Feb 23
0
[LLVMdev] Regarding a pass in LLVM
On Tue, Feb 23, 2010 at 7:17 AM, ambika <ambika at cse.iitb.ac.in> wrote: > Thanks that helped me out. > But now I am facing one more problem. It says : > > ‘llvm::ModulePass* llvm::createMyAnaPass()’ should have been declared > inside ‘llvm’ > > but I can find no place to declare it. > Where should I do it. We can do what scalar optimizations do. All scalar passes