Displaying 4 results from an estimated 4 matches for "classllvm_1_1pass".
2016 Mar 22
1
Passing llvm option -mem2reg to clang
...n mention mem2reg (PromotePass) pass as a
> > pre-requisite in my own pass's implementation?
>
> I think you can consider overriding the
> Pass::getAnalysisUsage(AnalysisUsage &)
> method. Described as follows in manual:
>
>
> http://www.llvm.org/docs/doxygen/html/classllvm_1_1Pass.html#a048082a5be9ae0d8901ea64de59e5c8f
>
> In your own pass in method getAnalysisUsage(Analysis &AU), you can add
> required
> pass by:
>
> AU.addRequired<PassName>();
>
> And get the analysis from the pass:
>
> PassName &P = getAnalysis<PassName>()...
2016 Mar 22
2
Passing llvm option -mem2reg to clang
I have used the following command for my pass (without -mem2reg):
clang -Xclang -load -Xclang MYPASS.so -c ../../tests/test1.c
For mem2reg, I tried the following:
clang -mllvm -mem2reg -Xclang -load -Xclang MYPASS.so -c ../../tests/test1.c
On Mon, Mar 21, 2016 at 9:26 PM, Mehdi Amini <mehdi.amini at apple.com> wrote:
>
>> On Mar 21, 2016, at 6:23 PM, Syed Rafiul Hussain
2012 Sep 10
0
[LLVMdev] About writing an alias analysis pass for LLVM 3.1
Hi,
Does your pass use multiple inheritance? Sounds like your problem is
that you need to define getAdjustedAnalysisPointer, see:
http://llvm.org/docs/doxygen/html/classllvm_1_1Pass.html#a03d3a81b1c46aff7c38ef3a6750ba225
An example implementation (very likely exactly what you want) is in
LibCallAliasAnalysis:
http://llvm.org/docs/doxygen/html/LibCallAliasAnalysis_8h_source.html#l00060
Hope this helps!
~Will
On Sep 9, 2012 9:08 PM, "Pei Wang" <uraj.wp at gmail...
2012 Sep 10
2
[LLVMdev] About writing an alias analysis pass for LLVM 3.1
Hi,
I am now trying to write an alias analysis pass for LLVM 3.1. The pass
is compiled into a .so library. When I loaded it into opt to perform
evaluation with command:
opt -load my-so-lib -aa-eval foo.bc
the following errors occurred:
opt: raw_ostream.cpp:261: void llvm::raw_ostream::flush_nonempty():
Assertion `OutBufCur > OutBufStart && "Invalid call to