search for: replaceallusesafterthisinstruction

Displaying 3 results from an estimated 3 matches for "replaceallusesafterthisinstruction".

2006 Oct 05
1
[LLVMdev] Extracting all BasicBlocks of a Function into new Function
...cond va_list. This seems a task for a control flow graph based function checking the (possibly partial) order between two Instructions, i.e. to check whether a Use is situated after a CallInst to va_end. Does such a method already exist in one of the transform or analysis passes? Or does a replaceAllUsesAfterThisInstruction() method exist? A related question: What's the easiest way to replace all uses of a Value, but only within, say, a Function? Kind regards, Bram Adams GH-SEL, INTEC, Ghent University (Belgium)
2006 Oct 05
0
[LLVMdev] Extracting all BasicBlocks of a Function into new Function
On Thu, 5 Oct 2006, Bram Adams wrote: > Apparently, the problem is how to "rewind" the vararg-argument back to > its first element when the second loop is reached, as it seems that the > code just continues at position count and beyond, resulting in overflow. > > I'm not sure whether this code snippet is valid ANSI C, and if it is, > one probably shouldn't use
2006 Oct 05
3
[LLVMdev] Extracting all BasicBlocks of a Function into new Function
Hi, Chris Lattner wrote: > All the non-vastart calls can be anywhere. va_end in particular codegens > to a noop on all targets llvm currently supports, fwiw. > Things go well, except for the following (pathological?) C program: int va_double_sum(int count,...){ int i,sum=0; va_list ap; va_start(ap,count); for(i=0;i<count;i++){ sum+=va_arg(ap,int); } va_end(ap);