similar to: [LLVMdev] about writing a functionpass requiring a modulepass

Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] about writing a functionpass requiring a modulepass"

2011 May 30
0
[LLVMdev] (no subject)
Hi, I wrote an analysis pass, myPass, inherited from both ModulePass and ProfileInfo, and this pass requires the CallGraph, i.e., * class myPass : public ModulePass, public ProfileInfo { ...};* * void myPass::getAnalysisUsage(AnalysisUsage &AU) const {* * AU.addRequired<CallGraph>();* * AU.setPreservesAll();* *}* Then, I assumes the UnreachableBlockElim (inherited from
2011 Jan 21
1
[LLVMdev] About static-profile in llvm-2.8
When I searched for branch frequency profiling on the internet, I got this link by a casual chance: http://homepages.dcc.ufmg.br/~rimsa/tools/stprof-llvm.patch. It seems it was written by Andrei Rimsa. So I downloaded and integrate these files into the llvm-2.8 building. After the building, I tried "opt -static-profile bitcnt_1.bc", and an segment fault error occured. I debugged it
2014 Oct 14
2
[LLVMdev] Problem of stack slot coloring
Hal's advice helps me a lot to understand the implementation much better. Thanks so much! So, now I am able to state my problem more clearly: 1) There are two kinds of locals, i.e., the local variables originated from the source code (like C/C++), and the compilation generated temporaries. After instruction selection phase, the former is seen as frame indexes, while the latter is seen as
2014 Oct 13
2
[LLVMdev] Problem of stack slot coloring
Hi, Can anyone help me with the stack slot coloring optimization? This corresponding file is /lib/codegen/stackslotcoloring.cpp. It is said this optimization was for stack slot overlay for frame size reduction, after register allocation phase. And this transformation pass relies on the LiveStack analysis pass. How, when checking the source code, it seems the LiveStack analysis has not been
2009 Sep 16
1
[LLVMdev] FunctionPass Analysis is not saved after ModulePasses run?
Hi, I have a problem with the following scenario: I use the ProfileEstimatorPass to get ProfileInfo and verifiy this info with the ProfileVerifierPass. (Please bear with me, its not about the profiling but about the Pass interaction.) Then the LowerSetJumpPass is executed and I want to verify that the esimtated ProfileInfo survives this pass by calling again the ProfileVerifierPass. This is what
2009 Sep 16
0
[LLVMdev] FunctionPass Analysis is not saved after ModulePasses run?
Hi, I have a problem with the following scenario: I use the ProfileEstimatorPass to get ProfileInfo and verifiy this info with the ProfileVerifierPass. (Please bear with me, its not about the profiling but about the Pass interaction.) Then the LowerSetJumpPass is executed and I want to verify that the esimtated ProfileInfo survives this pass by calling again the ProfileVerifierPass. This is what
2011 Jan 18
3
[LLVMdev] About test suits Cont1
*1. I have searched the access/setting of LLVMCC_EMITIR_FLAG in the build directory, recursively, and all the output is what I pasted in last email (just the same to the that in source directory). Maybe the configure failed to do it. My command list for building the test suit is as followings:* *(1) cd ~/SRC_DIR/llvm/projects* *(2) svn co http://llvm.org/svn/llvm-project/test-suite/trunk
2011 Jan 19
0
[LLVMdev] Fwd: About test suits Cont1
---------- Forwarded message ---------- From: Qingan Li <ww345ww at gmail.com> Date: 2011/1/19 Subject: Re: [LLVMdev] About test suits Cont1 To: Eric Christopher <echristo at apple.com> *I am sorry for making you confused when I presented my problem.* *1. My steps for the test suit building:* (1) cd /home/qali/Src; * // This is my source directory for all application
2011 Jan 28
2
[LLVMdev] The type or size of virtual registers
Thanks for your help with me about the way to access type and size of Value. But, I want also know the interface for me to access the type or size of virtual registers in the SSA form. 1. I find no way to associate the virtual registers with the Value class. 2. I also tried to get the size of register nReg by: TargetRegisterClass::getSize(), where the TargetRegisterClass object is obtained by
2011 Jan 28
0
[LLVMdev] The type or size of virtual registers
On 1/28/11 8:14 AM, Qingan Li wrote: > Thanks for your help with me about the way to access type and size of > Value. > But, I want also know the interface for me to access the type or size > of virtual registers in the SSA form. > 1. I find no way to associate the virtual registers with the Value class. In the in-memory LLVM IR, all of the SSA values are C++ objects derived
2011 Jan 10
1
[LLVMdev] About NDEBUG (Cont)
Hi Li Qingan, > Thanks for your last reply. > I have made a critical mistake when I stated my question in last email. > I built llvm in debug mode, but the NDEBUG seemed to be still defined, such that > the -debug option is not enabled. > I have restated my configuration below. you need to configure with --enable-assertions In spite of the name, NDEBUG is not related to
2011 Jan 18
1
[LLVMdev] adding a codegen pass into llvm
Thanks for your last reply. Could I understand the way to adding a pass (built into the llvm rather than dynamic loadable) includes: 1. Declaring a creator function for this pass 2. Implementing the creator function for this pass 3. Instantiating this pass and get a object of it 3. Register this pass into the PassRegistry Then, for a built-into bytecode pass, task 1(declaration of the
2011 Jan 29
1
[LLVMdev] The type or size of virtual registers
llvm::TargetRegisterClass::getSize() llvm::TargetRegisterClass::getAllignment() will return the size and alignment of a virtual register used both in register allocation and stack slot assignment. llvm::TargetRegisterClass::alloc_order_begin() llvm::TargetRegisterClass::alloc_order_end() will give a list of the possible physical registers. When a virtual register is assigned a physical register
2011 Jan 27
0
[LLVMdev] The type or size of virtual registers
On 1/27/11 3:23 AM, Qingan Li wrote: > Hi, > > I wonder if there is an interface for me to access the type or size of > virtual registers in the SSA form? > I have scanned the MachineOperand in CodeGen part, and failed to find > this kind of info for virtual registers. The getType() method of Value * will return the LLVM type. The TargetData class will provide information on
2011 Jan 27
2
[LLVMdev] The type or size of virtual registers
Hi, I wonder if there is an interface for me to access the type or size of virtual registers in the SSA form? I have scanned the MachineOperand in CodeGen part, and failed to find this kind of info for virtual registers. -- Best regards, Li Qingan -------------- next part -------------- An HTML attachment was scrubbed... URL:
2014 Nov 14
2
[LLVMdev] Is there a path from MachineInstr to the associated Instruction
Hi, Recently, I am working on some information collection on the machine instruction (MachineInstr) level. But, sometimes, I need check the corresponding IR level instruction of the a machine instruction. When visiting a machine instruction which is a call (MachineInstr::isCall()), I need to check the arguments of this call site. I know that the CallSite class provides good facility for this
2009 Aug 10
2
[LLVMdev] How to use a FunctionPass in a ModulePass?
Hi, all: I wanted to use a FunctionPass (e.g. *MemoryDependenceAnalysis*) in a ModulePass, and then I used the method "getAnalysis<* MemoryDependenceAnalysis*>(llvm::Function *)" described at http://llvm.org/docs/WritingAnLLVMPass.html#ModulePass to get the FunctionPass. But , it still crashed when I invoked this pass in tool 'opt'. However, if I change my pass to
2011 Jan 16
2
[LLVMdev] About test suits Cont1
*[qali at qali llvm-2.8-rev]$ find . -exec grep -n "LLVMCC_EMITIR_FLAG" ./ {} \;* ./projects/test-suite/Makefile.tests:47: -$(LCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -S $< -o $@ $(LLVMCC_EMITIR_FLAG) ./projects/test-suite/Makefile.tests:51: -$(LCXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -S $< -o $@ $(LLVMCC_EMITIR_FLAG)
2011 Jun 14
0
[LLVMdev] How to get an LLVM-compiled executable which could be debugged using gdb
I am sorry for my poor statement of my problem. Yes, ��f�� is right. I want to know whether llvm could emit debugging information which GDB could use directly. Ex, how does the executable file generated from llc could be debug using gdb? A simple demonstration is greatly appreciated. 2011/6/14 ��f�� <chenwj at iis.sinica.edu.tw> > > Debug information can be placed in the assembler
2006 Oct 08
1
[LLVMdev] modulepass requiring a functionpass
I have a ModulePass, which we'll call MP, that generates a dependency graph for an entire program. I want MP to require the UnifyFunctionExitNodes pass, which is a FunctionPass. Since its not possible to make a ModulePass depend on a FunctionPass, is my only choice to make MP a FunctionPass in which the runOnFunction() routine does nothing, and the doFinalization routine does all the