search for: oldmodule

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

2018 Sep 02
2
Replacing a function from one module into another one
Hello and thanks for the answer, I'm still facing issues, I'll do my best to explain my situation, as I explained, I have two modules, each one with its own main and functions, I would like to replace in the *oldModule* a function call that is calling *foo2* (defined in *oldModule*) to instead call *foo3*, which is defined in the *refModule. *So in summary, I have: 1. The original instruction call, defined in the main function of the oldModule, who is a calling function to foo2, I'll name it *oInst *(...
2018 Sep 02
2
Replacing a function from one module into another one
...dev at lists.llvm.org> wrote: > >> Hello and thanks for the answer, >> >> I'm still facing issues, I'll do my best to explain my situation, as I >> explained, I have two modules, each one with its own main and functions, I >> would like to replace in the *oldModule* a function call that is calling >> *foo2* (defined in *oldModule*) to instead call *foo3*, which is defined >> in the *refModule. *So in summary, I have: >> >> 1. The original instruction call, defined in the main function of >> the oldModule, who is a calling...
2018 Sep 03
2
Replacing a function from one module into another one
...m still facing the issue with the *llvm::SmallVectorImpl< llvm::ReturnInst *> &Returns *argument for the *CloneFunctionInto, *can anyone please give an example of use of that function? I guess that's the only way because otherwise if I move the blocks from foo3 in the refModule to the oldModule, the references of the moved block still point to the arguments of foo3 defined in the refModule, and I don't know how to go instruction by instruction in all the moved blocks and correct the reference to point to the arguments in the oldModule's new function, this also sounds very messy an...
2018 Sep 04
2
Replacing a function from one module into another one
...lvm::SmallVectorImpl< >> llvm::ReturnInst *> &Returns *argument for the *CloneFunctionInto, *can >> anyone please give an example of use of that function? I guess that's the >> only way because otherwise if I move the blocks from foo3 in the refModule >> to the oldModule, the references of the moved block still point to the >> arguments of foo3 defined in the refModule, and I don't know how to go >> instruction by instruction in all the moved blocks and correct the >> reference to point to the arguments in the oldModule's new function, thi...
2018 Sep 06
2
Replacing a function from one module into another one
...;>> llvm::ReturnInst *> &Returns *argument for the *CloneFunctionInto, *can >>>> anyone please give an example of use of that function? I guess that's the >>>> only way because otherwise if I move the blocks from foo3 in the refModule >>>> to the oldModule, the references of the moved block still point to the >>>> arguments of foo3 defined in the refModule, and I don't know how to go >>>> instruction by instruction in all the moved blocks and correct the >>>> reference to point to the arguments in the oldModule...
2018 Sep 06
2
Replacing a function from one module into another one
...st *> &Returns *argument for the *CloneFunctionInto, *can >>>>>> anyone please give an example of use of that function? I guess that's the >>>>>> only way because otherwise if I move the blocks from foo3 in the refModule >>>>>> to the oldModule, the references of the moved block still point to the >>>>>> arguments of foo3 defined in the refModule, and I don't know how to go >>>>>> instruction by instruction in all the moved blocks and correct the >>>>>> reference to point to the ar...
2018 Aug 27
3
Replacing a function from one module into another one
Hello LLVM Developers, I'm trying to replace a function defined in one module into another module (different files). The first issue I ran into was that llvm::Function does not have a method "moveBefore" or "moveAfter" as the llvm::BasicBlock or llvm::Instruction do, so I figured I would just move the BasicBlocks of the replacing function into the function that was being