search for: setpreservesall

Displaying 20 results from an estimated 111 matches for "setpreservesall".

2012 Mar 02
2
[LLVMdev] Interactions between module and loop passes
...re my "usage" information: int main(...){ Module m = ... //Read module PassManager pm; pm.add(new ModPass1); pm.add(new LoopPass); pm.add(new ModPass2); pm.run(m); } class ModPass1 : public ModulePass{ virtual void getAnalysisUsage(AnalysisUsage&AU) const{ AU.setPreservesAll(); } }; class LoopPass : public LoopPass{ virtual void getAnalysisUsage(AnalysisUsage&AU) const{ AU.setRequires<ModPass1>(); AU.setPreservesAll(); } }; class ModPass2 : public ModulePass{ virtual void getAnalysisUsage(AnalysisUsage&AU) const{ AU.setRequires<L...
2009 May 11
2
[LLVMdev] Pass Manager hangs with CallGraph and LoopSimplify
...Scalar.h" #include "llvm/Analysis/CallGraph.h" using namespace llvm; class Before : public ModulePass { public: static char ID; Before() : ModulePass(&ID) {} void getAnalysisUsage(AnalysisUsage &au) const { au.addRequired< CallGraph >(); au.setPreservesAll(); } bool runOnModule(Module &m) { return false; } }; class After : public FunctionPass { public: static char ID; After() : FunctionPass(&ID) {} void getAnalysisUsage(AnalysisUsage &au) const { au.addRequiredID( LoopSimplifyID ); au.addRequired<...
2002 Dec 01
1
[LLVMdev] PassManager error message hard to decipher
.... . . virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<FunctionLiveVarInfo>(); AU.addRequired<CoalesceCopies>(); } . . . }; class FunctionLiveVarInfo : public FunctionPass { . . . virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); } . . . }; class CoalesceCopies : public FunctionPass { . . . virtual void getAnalysisUsage(AnalysisUsage &AU) { AU.setPreservesAll(); AU.addRequired<FunctionLiveVarInfo>(); AU.addRequired<UnionSSAVars>(); AU.addRequired<DominanceForest>(); } . . . }; clas...
2012 Mar 02
0
[LLVMdev] Interactions between module and loop passes
...= ... //Read module > PassManager pm; > > pm.add(new ModPass1); > pm.add(new LoopPass); > pm.add(new ModPass2); > pm.run(m); > > } > > class ModPass1 : public ModulePass{ > > virtual void getAnalysisUsage(AnalysisUsage&AU) const{ > AU.setPreservesAll(); > } > }; > > class LoopPass : public LoopPass{ > > virtual void getAnalysisUsage(AnalysisUsage&AU) const{ > AU.setRequires<ModPass1>(); I'm pretty sure a LoopPass cannot require a ModulePass. Ciao, Duncan. > AU.setPreservesAll(); > } &...
2016 Jan 22
4
LLVM - getAnalysisUsage()
Hi, I am using llvm-3.8 for my project. Following is my getAnalysisUsage() method: virtual void getAnalysisUsage(AnalysisUsage &AU) const override { AU.setPreservesAll(); AU.addRequired<X>(); AU.addRequired<Y>(); AU.addRequired<Z>(); } Now, if I call getAnalysis<X>(*F), instead of invoking just the X pass, all the passes, i.e., X, Y and Z are being invoked. Could anyone help me in this regard? Thanks -- Syed
2019 Aug 14
2
Doubt regarding getAnalysisUsage
Hi, I have a doubt regarding *getAnalysisUsage.* My assumption is that, as analysis passes will not change the IR, all the passes required by an analysis pass should be preserved. Say, I have an analysis pass which requires another analysis pass called *SomeAnalysis* and I have not added *AU.addPreserved<SomeAnalysis>() *to my pass. Would the pass manager still considers the *SomeAnlaysis
2009 May 11
0
[LLVMdev] Pass Manager hangs with CallGraph and LoopSimplify
...; > > > using namespace llvm; > > class Before : public ModulePass { > public: > static char ID; > Before() : ModulePass(&ID) {} > > void getAnalysisUsage(AnalysisUsage &au) const { > au.addRequired< CallGraph >(); > au.setPreservesAll(); > } > > bool runOnModule(Module &m) { return false; } > }; > > class After : public FunctionPass { > public: > static char ID; > > After() : FunctionPass(&ID) {} > > void getAnalysisUsage(AnalysisUsage &au) const { >...
2018 May 07
2
Preservation of CallGraph (by BasicBlockPass, FunctionPass)
...Globals Alias Analysis FunctionPass Manager BasicBlockPass Manager Dead Instruction Elimination Call Graph SCC Pass Manager Function Integration/Inlining FunctionPass Manager Module Verifier Print Module IR FPPassManager:: getAnalysisUsage is doing setPreservesAll(), but is it correct that the FunctionPass Manager always preserves the CallGraph? My real problem is that when I use a foo.ll input that looks like this: ;---------------------------------------------------------------- target triple = "x86_64-unknown-linux-gnu" @b = external global...
2006 May 01
2
[LLVMdev] How to link the right libraries?
...vm; namespace { struct MacFoo : public MachineFunctionPass { virtual bool runOnMachineFunction(MachineFunction &Fn) { std::cerr << " calling run machine function.\n"; return false; } virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); } virtual const char *getPassName() const { return "run on machine function"; } }; RegisterOpt<MacFoo> Z("allocpty", "Register Allocation Prototype Pass"); struct FuncFoo : public FunctionPass { virtual bool runOnFunction(Function...
2010 Nov 22
0
[LLVMdev] pass visibility question
...ires a 'MemoryDependenceAnalysis' pass which needs an alias analysis (see below). class GlobalLiveValues : public ModulePass { void GlobalLiveValues::getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<CallGraph>(); AU.addRequired<LocalLiveValue>(); AU.setPreservesAll(); } }; class LocalLiveValue : public FunctionPass { void LocalLiveValue::getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<UnifyFunctionExitNodes>(); AU.addRequired<MemoryDependenceAnalysis>(); AU.setPreservesAll(); } }; void MemoryDependenceAnalysis::...
2006 Sep 18
3
[LLVMdev] Manipulate order of optimizations in llvm-ld
Hi, I've written a couple of passes, and I intend to use them using llvm-ld (loading works fine). However, I can't seem to figure out how to put them first, i.e. before all other optimizations (inlining, internalizing, ... should only kick in after my passes). Omitting AnalysisUsage::setPreservesAll() doesn't help and there is no AnalysisUsage::invalidateAll(). Does anybody know a workaround? Kind regards, Bram Adams GH-SEL, INTEC, Ghent University (Belgium)
2018 Jan 28
4
Polly Dependency Analysis in MyPass
...&It : SI) { assert(It.second && "Invalid SCoP object!"); dp.recomputeDependences(It.second.get(), polly::Dependences::AL_Access); } virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequiredTransitive<polly::ScopInfoWrapperPass>(); AU.setPreservesAll(); } }; } char mypass::ID = 0; static RegisterPass<mypass> X("mypass", "mypass World Pass", false, false); please help. i have been trying a lot. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/ll...
2008 Nov 30
3
[LLVMdev] Error when using getAnalysis
Hi, I'm trying to use the function getAnalysis. This is the code I'm using : void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<LoopInfo>(); AU.setPreservesAll(); } virtual bool runOnModule(Module &M) { LoopInfo &LI = getAnalysis<LoopInfo>(); } I get following error when I try to run my pass : opt: /net/hc295/nwarkari/llvm/llvm-2.3/include/llvm/PassAnalysisSupport.h:193: AnalysisType& llvm::Pass::getAnalysisID(const l...
2011 Nov 30
0
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
The following code is causing an "UNREACHABLE executed!" and a stack dump, any ideas? namespace { struct myPass : public CallGraphSCCPass { static char ID; myPass() : CallGraphSCCPass(ID) {} virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AU.addRequired<LoopInfo>(); } virtual bool runOnSCC(CallGraphSCC &SCC) { for (CallGraphSCC::iterator CGNodeItr = SCC.begin(), CFNodeItrE=SCC.end();CGNodeItr!=CGNodeItrE;++CGNodeItr) } const CallGraphNode *CGNode = *CGNodeItr; F...
2005 Sep 05
2
[LLVMdev] Pass is not automatically registered
...s"); I traced into struct RegisterAnalysis ctor, but my pass doesn't appear. I put it in an anonymous namespace, it doesn't work too. The class definitions: class DependenceAnalyzer : public MachineFunctionPass { virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AU.addRequired<LiveIntervals>(); AU.addRequired<LiveVariables>(); MachineFunctionPass::getAnalysisUsage(AU); } class RegAllocMultibank : public MachineFunctionPass { virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<LiveInterv...
2011 Nov 21
5
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
I would have thought this would have been possible. On Thu, Nov 17, 2011 at 3:49 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: > So is this simply not possible? > > > On Thu, Nov 17, 2011 at 10:31 AM, Ryan Taylor <ryta1203 at gmail.com> wrote: > >> Nick, >> >> Thanks for this info, though this didn't help my problem at all. >> >>
2011 Jan 31
2
[LLVMdev] llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid && "pid cannot be 0"' failed.
...uot; << F.getName(); if (F.empty()) errs() << " is empty." << "\n"; else errs() << "\n"; return modified; }; // pass interface to other passes virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AU.addRequired<DominatorTree>(); } }; // end struc Dfl // Identifier variable for the pass char Dfl::ID = 0; // Register the pass static RegisterPass<Dfl> X("dfl","emit cfg in dfl format" , false, false); }
2018 May 07
0
Preservation of CallGraph (by BasicBlockPass, FunctionPass)
...; Dead Instruction Elimination > > Call Graph SCC Pass Manager > > Function Integration/Inlining > > FunctionPass Manager > > Module Verifier > > Print Module IR > > > > > > FPPassManager:: getAnalysisUsage is doing setPreservesAll(), > > but is it correct that the FunctionPass Manager always preserves the > CallGraph? > > > > > > My real problem is that when I use a foo.ll input that looks like this: > > > > ;---------------------------------------------------------------- > > tar...
2013 Jun 22
2
[LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
...{ addPass(createTest()); return false; } in NVPTXTest.h namespace llvm{ class NVPTXTest : public ModulePass { void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); } }; extern ModulePass *createTest(); } in NVPTXTest.cpp...
2011 Jan 31
2
[LLVMdev] Error : llvm/include/llvm/Pass.h:188: error: incomplete type 'llvm::DominatorTree' used in nested name specifier
...t;; else errs() << "\n"; // DT = &getAnalysis<DominatorTree>(); modified = printDfl(Out, &F); // , &DT); return modified; }; // pass interface to other passes virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AU.addRequired<DominatorTree>(); /// ***error line *********** } }; // end struc Dfl