search for: visitinvokeinst

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

2009 Apr 14
3
[LLVMdev] InstVisitor Example
...yVisitor : public InstVisitor<StrcpyVisitor> { > void handleStrcpy(CallSite strcpy); > string strcpyName; > public: > void visitCallInst(CallInst& call) { > if (call.getName() == strcpyName) > handleStrcpy(&call); > } > void visitInvokeInst(InvokeInst& invoke) { > if (call.getName() == strcpyName) > handleStrcpy(&invoke); > } > }; > > Then, you probably want to inherit from ModulePass, or FunctionPass, > or BasicBlockPass, or whatever makes sense, and in the relevant > runOnX(X&...
2009 Apr 14
0
[LLVMdev] InstVisitor Example
...s that you want. class StrcpyVisitor : public InstVisitor<StrcpyVisitor> { void handleStrcpy(CallSite strcpy); string strcpyName; public: void visitCallInst(CallInst& call) { if (call.getName() == strcpyName) handleStrcpy(&call); } void visitInvokeInst(InvokeInst& invoke) { if (call.getName() == strcpyName) handleStrcpy(&invoke); } }; Then, you probably want to inherit from ModulePass, or FunctionPass, or BasicBlockPass, or whatever makes sense, and in the relevant runOnX(X& x) callback you say: bool r...
2009 Apr 14
2
[LLVMdev] InstVisitor Example
I just read the LLVM Programmer's Manual, which mentions (but specifically does not include any details of) the InstVisitor template. Could someone please provide an example of how to use this template to find (as an example) all CallSites for the function strcpy? Thanks, Brice Lin
2009 Apr 14
0
[LLVMdev] InstVisitor Example
...;StrcpyVisitor> { >>     void handleStrcpy(CallSite strcpy); >>     string strcpyName; >>    public: >>     void visitCallInst(CallInst& call) { >>       if (call.getName() == strcpyName) >>         handleStrcpy(&call); >>     } >>     void visitInvokeInst(InvokeInst& invoke) { >>       if (call.getName() == strcpyName) >>         handleStrcpy(&invoke); >>     } >>   }; >> >> Then, you probably want to inherit from ModulePass, or FunctionPass, >> or BasicBlockPass, or whatever makes sense, and in the...
2017 Apr 14
2
Saving Compile Time in InstCombine
On Fri, Apr 14, 2017 at 2:19 PM, Mikulin, Dmitry <dmitry.mikulin at sony.com> wrote: > >>> Is this a run with debug info? i.e. are you passing -g to the per-TU >>> pipeline? I'm inclined to think this is mostly an additive effect >>> adding matchers here and there that don't really hurt small testcases >>> but we pay the debt over time (in