search for: passnam

Displaying 20 results from an estimated 33 matches for "passnam".

Did you mean: passname
2014 Sep 29
2
[LLVMdev] questions about getAnalysisUsage
Hi, I notice that there are several different methods called inside getAnalysisUsage(). The parameters of addRequiredID and addPreservedID are passID. What is the difference between Required and Preserved? There are also function named addRequired<PassName>() called. What is the difference between addRequired<PassName>() and addRequiredID(PassID)? Thanks a lot! Best, Linhai
2011 Jan 12
1
[LLVMdev] About adding a pass into llvm
I have seen INITIALIZE_PASS(LiveVariables, "livevars", "Live Variable Analysis", false, false); in the llvm/lib/codegen/LiveVariables.cpp, where LiveVariables is a subclass of MachineFunctionPass, and #define INITIALIZE_PASS(passName, arg, name, cfg, analysis) \ static RegisterPass<passName> passName ## _info(arg, name, cfg, analysis) in PassSupport.h Is this code used to register and initialize a pass? This kind of registration is just the way illustrated in the hello example at http://llvm.org/docs/WritingAnLLVMPass...
2016 Mar 22
1
Passing llvm option -mem2reg to clang
...p;) > 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>(); > > See: > > > http://www.llvm.org/docs/doxygen/html/classllvm_1_1Pass.html#ab78af013d3a11515403da8517f8f3d4a > > Remember to include the necessary header files. Thi...
2019 Nov 21
2
[CodeGen] Read/Write Machine IR from/to Persistent File
Dear LLVM developers, Just as LLVM IR can be read/write via persistent bitcode (*.bc *.ll) files, is there any similar implementation in LLVM to read/write Machine IR (MIR) via a persistent file? If not and I would like to add it (e.g. for ARM or RISC-V), could you direct me materials and/or LLVM source code modules where I should start with? Best Regards, Lele Ma -------------- next part
2020 Jan 24
3
Module::createRNG() and new PassManager
...e each pass is defined as a llvm::PassInfoMixIn<DerivedT> instead of inheriting from llvm::Pass, it doesn't seem possible to obtain the underlying llvm::Pass * from e.g. llvm::ModuleAnalysisManager. Would it make sense to change the definition/implementation to Module::CreateRNG(StringRef PassName)? Please CC me on responses. Thanks, Dominic
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
2015 Oct 09
2
Get instance of CallGraph of a module in the pass
...ass(); PM.add(CGWP); CallGraph *CG = &CGWP->getCallGraph(); PM.add(new MyPass(CG)); I get the following error: /home/riyad/installs/llvm-3.7.0/include/llvm/PassSupport.h:95:38: error: no matching constructor for initialization of 'MyPass' Pass *callDefaultCtor() { return new PassName(); } My guess is pass manager needs pass with default constructor. Is there any easy way to get instance of call graph in my pass? Thanks in Advance, Riyad -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20...
2011 Dec 07
2
[LLVMdev] Adding option to LLVM opt to disable a specific pass from command line
Hi all, I would like to add an option for LLVM 'opt' to disable a specific optimization pass from command line. The idea is to have something like: opt -O2 -disable-pass=[passname,...] Do you think it could be useful ? How should I proceed to develop it and commit changes to LLVM trunk ? Thanks for your advices and recommandations. Best Regards Seb -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/a...
2010 Oct 06
2
[LLVMdev] Segmentation Fault of BasicCallGraph?
...tered name, and run the "new" pass, but the result always gives out Segmentation Fault... I am probably missing sth? Implemented another new class, class BasicCallGraph2 : public ModulePass, public CallGraph { ..... ... } The inside code is exact same as BasicCallGraph, except registered passname to be testcgn and the information of the pass. then after enabling and run the new pass, on a test.bc file, there is always a segmentation fault. 0 libLLVM-2.7.so.1 0x00007f5cd87b1d2f 1 libLLVM-2.7.so.1 0x00007f5cd87b238d 2 libpthread.so.0 0x00007f5cd7ba38f0 3 MyPass.so 0x00007f5cd6a5...
2010 Jul 23
0
[LLVMdev] Controlling the order of a FunctionPass
...am that schedules the passes, then it needs to run the prerequisite passes first. See the sc tool in the SAFECode source code for an example. 2) For prerequisite *analysis* passes (like LoopInfo), your ModulePass can declare them as prerequisites and get access to them using the getAnalysis<PassName>(Function *) method. This is documented in the "Writing an LLVM Pass" manual (http://llvm.org/docs/WritingAnLLVMPass.html#getAnalysis). -- John T. > void MyPass::getAnalysisUsage(AnalysisUsage &AU) const { > AU.addRequired<UnifyFunctionExitNodes>(); >...
2010 Jul 22
3
[LLVMdev] Controlling the order of a FunctionPass
On Jul 22, 2010, at 2:05 PM, John Criswell wrote: > If you write your pass as a ModulePass, then you can iterate over the > functions in any order that you want. I had considered that, but my FunctionPass depends on other passes processing the functions first: void MyPass::getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<UnifyFunctionExitNodes>();
2009 Jun 05
1
[LLVMdev] Analysis Pass
Hi, I am trying to set a prerequisite pass. void PassName::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AU.addRequired<LiveVariables>(); } But when i am running the pass with the opt i get this error: undefined symbol: _ZN4llvm13LiveVariables2IDE If you need more information ... Thank you. -------...
2010 Jul 29
1
[LLVMdev] Controlling the order of a FunctionPass
On Jul 23, 2010, at 7:36 AM, John Criswell wrote: > 2) For prerequisite *analysis* passes (like LoopInfo), your ModulePass > can declare them as prerequisites and get access to them using the > getAnalysis<PassName>(Function *) method. Yes, I remember trying this before but was unsuccessful. I made a second attempt just now and am again running into the same issue: bool MyModulePass::runOnModule(Module &M) { for (Module::iterator i = M.begin(), e = M.end(); i != e; ++i) { Function *f...
2012 Oct 30
1
[LLVMdev] Error when trying to chain two llvm transform passes
...se should >> I be doing? > Initializing them. Are you using INITIALIZE_PASS_DEPENDENCY, INITIALIZE_AG_DEPENDENCY, etc? > No. I am not sure how they work . I am trying to use the INITIALIZE_PASS macro. I get the following error error: definition or redeclaration of 'initializeMyPassNamePass' not in a namespace enclosing 'llvm' should i add the passname to a header file ? if so where? Thank you!! > -Krzysztof > > -- > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation > __________________________...
2010 Oct 07
0
[LLVMdev] Segmentation Fault of BasicCallGraph?
...the result always gives out Segmentation Fault... I am > probably missing > sth? > > Implemented another new class, > class BasicCallGraph2 : public ModulePass, public CallGraph { > ..... > ... > } > The inside code is exact same as BasicCallGraph, except registered > passname to be testcgn and the information of the pass. then after > enabling and run the new pass, on a test.bc file, there is always a > segmentation fault. > > 0 libLLVM-2.7.so.1 0x00007f5cd87b1d2f > 1 libLLVM-2.7.so.1 0x00007f5cd87b238d > 2 libpthread.so.0 0x00007f5cd7ba38f0 >...
2004 Sep 02
0
[LLVMdev] Problem with CVS LLVM build in obj != src dir case
....cpp:72: warning: passing negative value `-0x000000001' for converting 2 of `bool llvm::AliasSetTracker::add(llvm::Value*, unsigned int)' Compiling LoopExtractor.cpp /home/wanderer/pkg/build/llvm/src/llvm/include/llvm/PassSupport.h: In function `llvm::Pass* llvm::callDefaultCtor() [with PassName = <unnamed>::LoopExtractor]': /home/wanderer/pkg/build/llvm/src/llvm/include/llvm/PassSupport.h:209: instantiated from `llvm::RegisterOpt<PassName>::RegisterOpt(const char*, const char*, bool) [with PassName = <unnamed>::LoopExtractor]' /home/wanderer/pkg/build/llvm/sr...
2011 Dec 07
0
[LLVMdev] Adding option to LLVM opt to disable a specific pass from command line
Hello, On Dec 7, 2011, at 2:07 AM, Seb wrote: > Hi all, > > I would like to add an option for LLVM 'opt' to disable a specific optimization pass from command line. > > The idea is to have something like: > > opt -O2 -disable-pass=[passname,...] > > Do you think it could be useful ? I have few questions : - Why (and when) would you us this ? - Some of the passes are executed multiple times, how would you select which invocation to disable ? Or would you disable all invocation of such passes ? - Some passes are required by an...
2006 May 17
0
[LLVMdev] Obfuscation with LLVM
...ion& function ); static BasicBlock* ProcessCase( SwitchInst* switchInst, int caseIdx, BasicBlock* prevBB, Value* testValuePtr ); static void ReduceTempVarsLifetime( Function& function ); static bool IsUsedOutsideParentBlock( Instruction* value ); static const std::string PassName; }; --------------------------------------------- MakeDispatcherPass.cpp--------------------------------------------- #include <map> #include <vector> #include <cassert> #include <iostream> #include <exception> #include "llvm/Type.h" #include "llvm/M...
2009 Oct 05
0
[LLVMdev] [Fwd: Re: problem with multiple LLVM passes]
...loading their respective libraries with multiple -load options? > > Yes. I load both the libraries with two -load options. I see both the > passes listed when run opt with --help flag Okay. This means that both passes are loading successfully. > > 2) Do both passes have a static <Passname>::ID variable defined in their > respective .cpp files? > > Yes. I also tried initializing them with different values. Just to be paranoid: each pass is using its own ID varibles, correct? > > 3) Is LiveVars an analysis pass? Does it say that it preserves all > other passes...
2004 Sep 01
2
[LLVMdev] Problem with CVS LLVM build in obj != src dir case
LLVM build without big problems in obj dir == src dir case (for example, last night tester build) But I have problem with building CVS version LLVM in obj dir != src dir case. ======= Finished building ModuleMaker debug executable (without symbols) ======= gmake[2]: Leaving directory `/usr/home/wanderer/pkg/build/llvm/obj/examples/ModuleMaker' gmake[1]: Leaving directory