search for: getpersonalityfn

Displaying 5 results from an estimated 5 matches for "getpersonalityfn".

Did you mean: setpersonalityfn
2015 Aug 31
2
Should personality functions actually be functions
...was no longer a function. The relevant code is >> >> MF->getMMI().addPersonality(MBB, cast<Function>(LPadInst->getParent() >> ->getParent() >> ->getPersonalityFn() >> ->stripPointerCasts())); >> >> We get different behavior in this code, which is able to handle non-function personality functions. >> >> EHPersonality llvm::classifyEHPersonality(const Value *Pers) { >&...
2018 Sep 06
2
Replacing a function from one module into another one
...lvm::ValueToValueMapTy VMap; populateVMap(VMap, fOld, fNew); bool ModuleArg = true; llvm::SmallVector<llvm::ReturnInst*, 8> Returns; llvm::CloneFunctionInto(fOld, fNew, VMap, ModuleArg, Returns); if (fNew->hasPersonalityFn()) fOld->setPersonalityFn(llvm::MapValue(fNew->getPersonalityFn(), VMap)); } void replaceFunctions(std::string oldFuncName, std::string newFuncName) { llvm::SMDiagnostic origErr; llvm::LLVMContext origContext; std::unique_ptr<llvm::Module> origMod = (llvm::parseIRFile(originalFileName, origErr, origContext)); llvm::Module *origMod_copy = origMod....
2018 Sep 06
2
Replacing a function from one module into another one
...teBody(); llvm::ValueToValueMapTy VMap; populateVMap(VMap, fOld, fNew); bool ModuleArg = true; llvm::SmallVector<llvm::ReturnInst*, 8> Returns; llvm::CloneFunctionInto(fOld, fNew, VMap, ModuleArg, Returns); if (fNew->hasPersonalityFn()) fOld->setPersonalityFn(llvm::MapValue(fNew->getPersonalityFn(), VMap)); But after running the code, I still get the error: *Use still stuck around after Def is destroyed* Which means that the instructions moved from *fNew* still refer to the arguments of *fNew* instead of the "mapped" (supposedly) ones in *fOld*. I have some ideas of what could b...
2020 Jan 10
2
Register Dataflow Analysis on X86
Hi Scott, Sorry for the late reply, I was out of office during the holidays. 1. A def node can reach either a use node, or another def node. In the highlighted phi node (p3224), the def (d3225) reaches another def (1598) in statement (s1597), that’s why it’s needed. 2. The reason why the def of R11 in s1578 is not connected directly to the use in s1725 is that there may be an intervening
2018 Sep 04
2
Replacing a function from one module into another one
Hi Philip, Thank you very much for your answer, the vector declaration example worked. I'm pretty sure the ValueToValueMapTy is the last thing I need because I even saw there is another function that could help me llvm*:*:RemapFunction <http://llvm.org/doxygen/namespacellvm.html#addf0183e92893bdbcde00fc9091dda93>; but my problem is that I don't know how to populate the