similar to: [LLVMdev] FunctionPass question

Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] FunctionPass question"

2013 Jan 24
0
[LLVMdev] FunctionPass question
Hi Paul, > I am working on a pass to convert lib calls to intrinsic calls as discussed here: http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-January/058507.html this whole area is a little confusing. If you can recognize a libcall as being equivalent to an intrinsic, you could indeed turn it into an intrinsic, but on the other hand you could just directly do on it the IR transforms you want
2011 Oct 25
1
[LLVMdev] Using a FunctionPass inside a CallGraphSCCPass
Hi, I am writing a CallGraphSCCPass that uses LoopInfo which is a FunctionPass. However, doing so results in the following error. **** Unable to schedule 'Natural Loop Information' required by '......' **** Google led me to this page, where Devang Patel suggests implementing the addLowerLevelRequiredPasses in CGPassManager in a manner similar to MPPassManager.
2018 Mar 24
0
Change function call name in a CallInst only in certain functions
You are probably calling setName() on the called Function, which in-turned renamed the called Function instead of replacing the called function. Depending on your use-case, if you are certain that you only need to modify CallInsts, then you could simply call CallInst::setCalledFunction , otherwise it’s probably wiser to use CallSite as a wrapper for both CallInst and InvokeInst. Do note, however,
2012 Mar 06
2
[LLVMdev] Work with CallSites
Hi. I have a test program: class A { int A; public: virtual void test ( int x ) = 0; }; class B : public A { int B; public: void test ( int x ) {}; }; int main() { A *a = new B(); a->test(1); } We have call site CS: "a->test(1);". CS.getCalledFunction() - return NULL, so we can say that this call site is virtual. My optimization determines, that in this call site
2018 May 07
2
Preservation of CallGraph (by BasicBlockPass, FunctionPass)
If I run: opt -globals-aa -die -inline -debug-pass=Details foo.ll -S then I will get this pass structure: Target Library Information Target Transform Information Target Pass Configuration Assumption Cache Tracker Profile summary info ModulePass Manager CallGraph Construction Globals Alias Analysis FunctionPass Manager BasicBlockPass Manager Dead Instruction
2012 Nov 09
2
[LLVMdev] Inlining bitcast functions...
I've got a call instruction: call void bitcast (void (%4 addrspace(1)*, <2 x i32>, <4 x float>)* @_Z12write_imagefPU3AS110_image2d_tDv2_iDv4_f to void (%9 addrspace(1)*, <2 x i32>, <4 x float>)*)(%9 addrspace(1)* %dstimg, <2 x i32> %28, <4 x float> %26) nounwind %4 and %9 are both (stripped) opaque structs. InlineFunction() does not inline this because
2013 Oct 30
1
[LLVMdev] Setting called value for an indirect function call
Hello; I am trying to clone some call instructions in the IR and then set the call destination of those call instructions to my own library functions that happens to have the same arguments and return types of the original callee. It works perfectly for direct calls using setCalledFunction(). But when the function call is indirect, is there a way to set the callee? Something like
2018 May 07
0
Preservation of CallGraph (by BasicBlockPass, FunctionPass)
I'm not sure about the old pass manager, but I think the new pass manager solves this issue. See llvm::updateCGAndAnalysisManagerForFunctionPass where it updates the call graph to be in sync with edges deleted by function passes. So I suspect the right fix is to use the new pass manager. -- Sanjoy On Mon, May 7, 2018 at 7:32 AM, Björn Pettersson A via llvm-dev <llvm-dev at
2018 May 08
2
Preservation of CallGraph (by BasicBlockPass, FunctionPass)
Well, do you have a patch that enables the new pass manager that we can land then? To be more serious: 1) I don't even know how to run those passes using the new pass manager even if it where enabled by default. I guess that I'm supposed to use -passes. Is there a syntax description for that option somewhere? How do I for example run -die? 2) "Use the new pass manager" does
2018 May 08
0
Preservation of CallGraph (by BasicBlockPass, FunctionPass)
Hi Björn, 1) The pass pipeline syntax is documented here: https://github.com/llvm-project/llvm/blob/master/include/llvm/Passes/PassBuilder.h#L378 -die is not implemented, since the new pass manager does not support BasicBlock passes. But you can use dce instead: "-passes=dce" 2) I don't have a qualified answer here, but if I recall correctly, the trouble to correctly update the
2018 Aug 16
2
Convert Function Pointer Call to Function Call at the IR Level
Hi, I want to convert a function pointer call in the IR of MPlayer to a function call. For example, I have the following line: ... %10 = tail call i32 %7(%struct.demuxer* nonnull %0, i32 %1, i8* %2) #7, !dbg !863222 ... I want to set the target which is stored in %7 to a real function called "demux_lavf_control()" with the following definition: ... define internal i32
2012 Nov 09
0
[LLVMdev] Inlining bitcast functions...
On Fri, Nov 9, 2012 at 3:25 PM, Relph, Richard <Richard.Relph at amd.com> wrote: > I've got a call instruction: > call void bitcast (void (%4 addrspace(1)*, <2 x i32>, <4 x float>)* @_Z12write_imagefPU3AS110_image2d_tDv2_iDv4_f to void (%9 addrspace(1)*, <2 x i32>, <4 x float>)*)(%9 addrspace(1)* %dstimg, <2 x i32> %28, <4 x float> %26)
2018 Mar 23
3
Change function call name in a CallInst only in certain functions
Hello, In my module I have functions: a b c f3 calls "a" f2 calls "a" f1 calls "b" I would like to modify a CallInst in the f2. Now it calls "a", but I want changed it to "c". When loop over the instructions of the f2, I can get a CallInst to be modified, then I use "setName" to changed it to "c". Problem is, since
2013 Jan 22
0
[LLVMdev] local test-suite failures on linux
On Sun, Jan 20, 2013 at 1:26 PM, Redmond, Paul <paul.redmond at intel.com> wrote: > There is almost certainly a bug in lnt or the makefiles. > > I changed the body of Burg main to the following: > > + printf("Hello World\n"); > + return 0; > > > I re-ran the test-suite again and got the following errors: > > --- Tested: 986 tests -- > FAIL:
2010 Jul 16
2
[LLVMdev] Function::getName in CallGraphSCCPass causes bus error
Hi, I'm trying to use CallGraphSCCPass, but I keep getting a bus error. I can reproduce the problem quite easily using the lib/Transforms/Hello example. I simply mix in these changes: #include "llvm/CallGraphSCCPass.h" ... struct Hello : public CallGraphSCCPass { static char ID; // Pass identification, replacement for typeid Hello() : CallGraphSCCPass(&ID) {}
2013 Jan 20
2
[LLVMdev] local test-suite failures on linux
There is almost certainly a bug in lnt or the makefiles. I changed the body of Burg main to the following: + printf("Hello World\n"); + return 0; I re-ran the test-suite again and got the following errors: --- Tested: 986 tests -- FAIL: MultiSource/Applications/Burg/burg.execution_time (494 of 986) FAIL: MultiSource/Applications/ClamAV/clamscan.execution_time (495 of 986) FAIL:
2008 Jul 07
5
[LLVMdev] fp_round libcall
Hi, I'm trying to emit FP_ROUND f64 -> f32 considering a mips target that only supports single float point operations. The problem is that f32 is considered legal on this target but f64 doesn't and the only way I can codegen this instruction is using setConvertAction(MVT::f64, MVT::f32, Expand), which issues a EmitStackConvert. What if I want a libcall instead? What should I do? The
2006 Sep 29
2
[LLVMdev] FunctionPass requiring SCCs
I have a FunctionPass F that needs a list of all the SCCs for use in its doFinalization() method. Let's say I write a CallGraphSCCPass C that creates an array of all SCCs. Let C be required by F, and let F call getAnalysis<C>() from its doFinalization() method. Am I guaranteed that C's runOnSCC() method will have executed on all SCCs before F's doFinalization() method?
2006 Sep 29
2
[LLVMdev] FunctionPass requiring SCCs
On Sep 29, 2006, at 2:05 PM, Domagoj Babic wrote: > > Check out scc_* iterators. Also note that the call graph > is not aware of the indirect calls, so you will need to write your > own CG implementation if you need to handle function pointers > soundly. > Chris, is this true? If so, it seems like a bad property for the CallGraphSCCPass framework. --Vikram
2015 May 20
3
[LLVMdev] Processing functions in call graph SCC "order" with function-level analyses
So I got very mixed results. With the CallGraphSCCPass, both `addRequired<DominatorTreeWrapperPass>` and `addRequired<MemoryDependenceAnalysis>` fail at runtime. The LLVM core has just two CallGraphSCCPasses and neither uses neither analyses, so it's hard to find a valid example. I transformed the pass into a ModulePass, using scc_iterator as shown in CGPassManager to process