search for: callinstr

Displaying 7 results from an estimated 7 matches for "callinstr".

Did you mean: callinst
2018 Mar 22
0
Change args count in CallInstr
Hello, I have a CallInstr for "functionA". I renamed it to "functionB" but I want to decrease number of arguments as functionA accepts e.g two and functionB just one. So far, I dont find any function to just replace args / set args size. Any idea? Maybe other solution... Is there any way to create a n...
2013 Aug 30
1
[LLVMdev] Are instr_iterators invalidated when function inlining is performed?
...terator is made invalid when I do inlining (looking in gdb one of its fields I see is NodePtr=0x0 ). Is this normal behaviour? If so what is the correct way to implement what I'm trying to do? For now I'm going to implement the code so that it instead collects a set of pointers to all the CallInstr of interest whilst iterating through the module. Then after iterating through the module, iterate through the set of collected CallInstr* and inline each one. Thanks, Dan Liew
2018 Aug 16
2
Convert Function Pointer Call to Function Call at the IR Level
...unction called "demux_lavf_control()" with the following definition: ... define internal i32 @demux_lavf_control(%struct.demuxer.2657* nocapture readonly, i32, i8* nocapture) #0 !dbg !963916 { ... I wrote a function pass and found the mentioned function pointer call (here, stored in "CallInstr") and set the call target as follows: ... Module *theModule = F.getParent(); Function *targetFunc = theModule->getFunction("demux_lavf_control"); CalIInstr->setCalledFunction(targetFunc); ... "F" is the function containing the call. But it leads to the following error...
2013 Sep 15
0
[LLVMdev] Are instr_iterators invalidated when function inlining is performed?
...> ++i; > erase(t); > } else { > ++i; > } > } > >> If so what is the correct way to implement >> what I'm trying to do? >> >> For now I'm going to implement the code so that it instead collects a >> set of pointers to all the CallInstr of interest whilst iterating >> through the module. Then after iterating through the module, iterate >> through the set of collected CallInstr* and inline each one. >> >> Thanks, >> Dan Liew >> _______________________________________________ >> LLVM Develop...
2005 Feb 23
1
[LLVMdev] Sparc MachineBasicBlock info
Is there a way to access the current MachineBasicBlock info from within CodeGenIntrinsic in SparcV9BurgISel.cpp? The arguments are: Intrinsic::ID iid, CallInst &callInstr, TargetMachine &target, and std::vector<MachineInstr*>& mvec, none of which seem to offer access to the current MachineBasicBlock. Brent
2017 Aug 24
2
How do set 'nest' addribute in an indirect call?
On 08/24/2017 09:40 AM, Tim Northover wrote: > On 17 August 2017 at 15:15, Rodney M. Bates via llvm-dev > <llvm-dev at lists.llvm.org> wrote: >> For an indirect call, i.e., on a function whose address is runtime variable, >> I can't find any place/way to attach this attribute. LLVMAddAttribute >> won't take a type. > > In the C++ API you'd add the
2018 Mar 23
0
Optimization: Replace functions with thread unsafe variants + detection of multithreading
Hello, My idea is to detect a multithreading and perform some transformations and get new possibilities for optimizations: 1. Check pthread_create and follow CallInstr (goal: to know that we are in new thread), identify functions where fork is used and check all other CallIstr (we are in child) + check Windows variants of fork/ thread create.. 2. Check functions if they do not contain any of thread unsafe functions - if yes - mark such function as thread unsafe....