Dávid Bolvanský via llvm-dev
2018-Mar-08 14:52 UTC
[llvm-dev] Externally loadable Alias Analysis pass
Hello, I am currently working with the implementation of CFL Andersen algorithmand I am trying to do some improvements to the Andersen algorithm. I would like to create loadable module .so and run clang with my e.g. "cfl-anders-improved.so" to avoid the "long" way - generating IR, running opt with my improved algorithm to generate optimalized code and then building it. Is a such thing even possible for Alias analyses in Clang? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180308/72f51c8f/attachment.html>
Hal Finkel via llvm-dev
2018-Mar-09 04:38 UTC
[llvm-dev] Externally loadable Alias Analysis pass
Hi, David, We do have an infrastructure for incorporating custom AA providers into the pipeline. I've never tried it, but take a look at unittests/Analysis/AliasAnalysisTest.cpp (that may provide some of what you need). -Hal On 03/08/2018 08:52 AM, Dávid Bolvanský via llvm-dev wrote:> Hello, > > I am currently working with the implementation of CFL Andersen > algorithmand I am trying to do some improvements to the Andersen > algorithm. > > I would like to create loadable module .so and run clang with my e.g. > "cfl-anders-improved.so" to avoid the "long" way - generating IR, > running opt with my improved algorithm to generate optimalized code > and then building it. > > Is a such thing even possible for Alias analyses in Clang? > > Thanks > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-- Hal Finkel Lead, Compiler Technology and Programming Languages Leadership Computing Facility Argonne National Laboratory -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180308/f209b258/attachment.html>
Dávid Bolvanský via llvm-dev
2018-Mar-09 13:46 UTC
[llvm-dev] Externally loadable Alias Analysis pass
I am currectly experimenting with -Xclang option.. I have a simple pass (to just print function names). I ran: clang -Xclang -load -Xclang LLVMHello.so t.c but nothing was printed, no output from the pass. when I run: opt -load LLVMHello.so -hello t.ll I get the output from pass (i.e. list of function names) Part of the source ode of the Hello pass: struct Hello : public FunctionPass { static char ID; // Pass identification, replacement for typeid Hello() : FunctionPass(ID) {} bool runOnFunction(Function &F) override { errs().write_escaped(F.getName()) << '\n'; return false; } }; } 2018-03-09 14:44 GMT+01:00 Dávid Bolvanský <david.bolvansky at gmail.com>:> I am currectly experimenting with -Xclang option.. I have a simple pass > (to just print function names). > > I ran: clang -Xclang -load -Xclang LLVMHello.so t.c > > but nothing was printed, no output from the pass. > > when I run: opt -load LLVMHello.so -hello t.ll > > I get the output from pass (i.e. list of function names) > > Part of the source ode of the Hello pass: > struct Hello : public FunctionPass { > static char ID; // Pass identification, replacement for typeid > Hello() : FunctionPass(ID) {} > > bool runOnFunction(Function &F) override { > errs().write_escaped(F.getName()) << '\n'; > return false; > } > }; > } > > 2018-03-09 5:38 GMT+01:00 Hal Finkel <hfinkel at anl.gov>: > >> Hi, David, >> >> We do have an infrastructure for incorporating custom AA providers into >> the pipeline. I've never tried it, but take a look at >> unittests/Analysis/AliasAnalysisTest.cpp (that may provide some of what >> you need). >> >> -Hal >> On 03/08/2018 08:52 AM, Dávid Bolvanský via llvm-dev wrote: >> >> Hello, >> >> I am currently working with the implementation of CFL Andersen >> algorithmand I am trying to do some improvements to the Andersen algorithm. >> >> I would like to create loadable module .so and run clang with my e.g. >> "cfl-anders-improved.so" to avoid the "long" way - generating IR, running >> opt with my improved algorithm to generate optimalized code and then >> building it. >> >> Is a such thing even possible for Alias analyses in Clang? >> >> Thanks >> >> >> _______________________________________________ >> LLVM Developers mailing listllvm-dev at lists.llvm.orghttp://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> >> >> -- >> Hal Finkel >> Lead, Compiler Technology and Programming Languages >> Leadership Computing Facility >> Argonne National Laboratory >> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180309/fe00fcf1/attachment-0001.html>