search for: addpreservedid

Displaying 20 results from an estimated 30 matches for "addpreservedid".

Did you mean: addpreserved
2006 May 03
1
[LLVMdev] Patch for transform dependencies
...ionPass { public: - bool runOnFunction(Function &F); + virtual bool runOnFunction(Function &F); + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + // This is a cluster of orthogonal Transforms + AU.addPreserved<UnifyFunctionExitNodes>(); + AU.addPreservedID(PromoteMemoryToRegisterID); + AU.addPreservedID(LowerSelectID); + } + typedef std::pair<Constant*, BasicBlock*> Case; typedef std::vector<Case>::iterator CaseItr; private: Index: ./lib/Transforms/Scalar/Mem2Reg.cpp =============================================...
2012 Mar 23
3
[LLVMdev] Function Pass Manager
...which is dynamically loaded by opt and I need some analysis and passes to be run before my pass: virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<LoopInfo>(); AU.addPreserved<LoopInfo>(); AU.addRequiredID(LoopSimplifyID); AU.addPreservedID(LoopSimplifyID); AU.addRequiredID(LCSSAID); AU.addPreservedID(LCSSAID); AU.addRequired<ScalarEvolution>(); AU.addPreserved<ScalarEvolution>(); } When I run it with opt -load, I'm getting the following error: Unable to schedule 'Canonicalize nat...
2012 Apr 12
0
[LLVMdev] Function Pass Manager
...ionPass { static char ID; // Pass identification, replacement for typeid MyPass() : FunctionPass(ID) { initializeMyPassPass(*PassRegistry::getPassRegistry()); } virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequiredID(LoopSimplifyID); AU.addPreservedID(LoopSimplifyID); } virtual bool runOnFunction(Function &F); }; } char MyPass::ID = 0; INITIALIZE_PASS_BEGIN(MyPass, "mypass", "mypass", false, false) INITIALIZE_PASS_DEPENDENCY(LoopSimplify) INITIALIZE_PASS_END(MyPass, "mypass", &quot...
2012 Aug 06
3
[LLVMdev] How to call some transformation passes (LoopRotate and LoopUnroll) from my own pass
...e opt). I wrote a Module pass which already calls other analysis and transformation passes in its getAnalysisUsage method: void MyPass::getAnalysisUsage(AnalysisUsage& AU) const { AU.addRequired<LoopInfo>(); AU.addPreserved<LoopInfo>(); AU.addRequiredID(LoopSimplifyID); AU.addPreservedID(LoopSimplifyID); AU.addRequiredID(LCSSAID); AU.addPreservedID(LCSSAID); } However, I couldn't figure out how to call the LoopRotate and LoopUnroll passes since I cannot use addRequiredID or addRequired for these two transformations. In Scalar.h, I found: > Pass *createLoopUnrollPa...
2013 Apr 03
1
[LLVMdev] YSU_Student
...t). I wrote a Module pass which already calls other analysis and transformation passes in its getAnalysisUsage method: void MyPass::getAnalysisUsage(AnalysisUsage& AU) const { AU.addRequired<LoopInfo>(); AU.addPreserved<LoopInfo>(); AU.addRequiredID(LoopSimplifyID); AU.addPreservedID(LoopSimplifyID); AU.addRequiredID(LCSSAID); AU.addPreservedID(LCSSAID); } However, I couldn't figure out how to call the LoopRotate and LoopUnroll passes since I cannot use addRequiredID or addRequired for these two transformations. how can I do it ?
2012 Aug 06
0
[LLVMdev] How to call some transformation passes (LoopRotate and LoopUnroll) from my own pass
...already calls other analysis and transformation passes in > its getAnalysisUsage method: > > > void MyPass::getAnalysisUsage(AnalysisUsage& AU) const { > AU.addRequired<LoopInfo>(); > AU.addPreserved<LoopInfo>(); > AU.addRequiredID(LoopSimplifyID); > AU.addPreservedID(LoopSimplifyID); > AU.addRequiredID(LCSSAID); > AU.addPreservedID(LCSSAID); > } > > However, I couldn't figure out how to call the LoopRotate and > LoopUnroll passes since I cannot use addRequiredID or addRequired for > these two transformations. > > In Scalar...
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,...
2011 May 16
2
[LLVMdev] InstructionCombining.cpp inconsistency in whether it modifies the CFG?
...ake, or is there deeper meaning here? InstructionCombining.cpp:73-82 char InstCombiner::ID = 0; INITIALIZE_PASS(InstCombiner, "instcombine", "Combine redundant instructions", false, false) void InstCombiner::getAnalysisUsage(AnalysisUsage &AU) const { AU.addPreservedID(LCSSAID); AU.setPreservesCFG(); }
2012 Jun 05
2
[LLVMdev] Function Pass Manager
...ass identification, replacement for typeid > MyPass() : FunctionPass(ID) { > initializeMyPassPass(*PassRegistry::getPassRegistry()); > } > virtual void getAnalysisUsage(AnalysisUsage&AU) const { > AU.addRequiredID(LoopSimplifyID); > AU.addPreservedID(LoopSimplifyID); > } > virtual bool runOnFunction(Function&F); > }; > } Is LoopSimplifyID an analysis pass or a transform (optimization) pass? You cannot reliably use the addRequired() method to force a transform pass to run before another pass; there are cases in...
2012 Jul 23
0
[LLVMdev] llvm::LoopPass
...llo . I'm trying to implement LoopPass. Here is simple code :    class LoopParser: public llvm::LoopPass   {     public:       static char ID;     public:       virtual void getAnalysisUsage(llvm::AnalysisUsage &AU) const       {         AU.addRequiredID(llvm::LoopSimplifyID);         AU.addPreservedID(llvm::LoopSimplifyID);         AU.addRequired<llvm::LoopInfo>();       }       virtual bool runOnLoop(llvm::Loop* IncomingLoop,                              llvm::LPPassManager& LPM_Ref)      { return false; }       LoopParser() : llvmLoopPass(ID)       {}   }; char LoopParser::ID = 0;...
2012 Jul 23
1
[LLVMdev] llvm::LoopPass
...ode : > > class LoopParser: public llvm::LoopPass > { > public: > static char ID; > > public: > virtual void getAnalysisUsage(llvm::AnalysisUsage &AU) const > { > AU.addRequiredID(llvm::LoopSimplifyID); > AU.addPreservedID(llvm::LoopSimplifyID); > AU.addRequired<llvm::LoopInfo>(); > } > > virtual bool runOnLoop(llvm::Loop* IncomingLoop, > llvm::LPPassManager& LPM_Ref) > { return false; } > > LoopParser() : llvmLoopPass...
2008 Jul 12
0
[LLVMdev] Little bug in LoopInfo after Rotate?
...artin.hidalgo at gmail.com> wrote: > I would need to operate in the two loops in rotated form. It can be > considered a bug or I have to introduce manually the header (or modify > myself the ConsiderForLoop to my particular problem)? Try adding "AU.addRequiredID(LoopSimplifyID);AU.addPreservedID(LoopSimplifyID);" to your transformation pass. -Eli
2011 May 16
0
[LLVMdev] InstructionCombining.cpp inconsistency in whether it modifies the CFG?
...> InstructionCombining.cpp:73-82 > > char InstCombiner::ID = 0; > INITIALIZE_PASS(InstCombiner, "instcombine", > "Combine redundant instructions", false, false) > > void InstCombiner::getAnalysisUsage(AnalysisUsage&AU) const { > AU.addPreservedID(LCSSAID); > AU.setPreservesCFG(); > } > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
2012 Jul 13
4
[LLVMdev] adding new data types to llvm
Hello . I would like to add new custom data type to llvm C parser, I use LLVM/Clang version 3.1. Adding new type instructions from llvm.org site are out of date (http://llvm.org/docs/ExtendingLLVM.html#type). Could you please provide me with guidance? Thanks in advance, Edvard  -------------- next part -------------- An HTML attachment was scrubbed... URL:
2011 Aug 22
1
[LLVMdev] Infinite loop when adding a new analysis pass
...Required<LoopInfo>(); AU.addRequiredID(LoopSimplifyID); AU.addRequired<AliasAnalysis>(); AU.addRequired<MyAnalysis>(); // Add this AU.addPreserved<AliasAnalysis>(); AU.addPreserved("scalar-evolution"); AU.addPreservedID(LoopSimplifyID); } char LICM::ID = 0; INITIALIZE_PASS_BEGIN(LICM, "licm", "Loop Invariant Code Motion", false, false) INITIALIZE_PASS_DEPENDENCY(DominatorTree) INITIALIZE_PASS_DEPENDENCY(LoopInfo) INITIALIZE_PASS_DEPENDENCY(LoopSimplify) INITIALIZE_PASS_DEPENDENCY(MyAnalys...
2012 Jun 05
2
[LLVMdev] Function Pass Manager
...; MyPass() : FunctionPass(ID) { >>> initializeMyPassPass(*PassRegistry::getPassRegistry()); >>> } >>> virtual void getAnalysisUsage(AnalysisUsage&AU) const { >>> AU.addRequiredID(LoopSimplifyID); >>> AU.addPreservedID(LoopSimplifyID); >>> } >>> virtual bool runOnFunction(Function&F); >>> }; >>> } >> >> Is LoopSimplifyID an analysis pass or a transform (optimization) pass? > > It is a transform pass (it can alter the CFG). > >>...
2012 Jun 05
0
[LLVMdev] Function Pass Manager
...t for typeid >> MyPass() : FunctionPass(ID) { >> initializeMyPassPass(*PassRegistry::getPassRegistry()); >> } >> virtual void getAnalysisUsage(AnalysisUsage&AU) const { >> AU.addRequiredID(LoopSimplifyID); >> AU.addPreservedID(LoopSimplifyID); >> } >> virtual bool runOnFunction(Function&F); >> }; >> } > > Is LoopSimplifyID an analysis pass or a transform (optimization) pass? It is a transform pass (it can alter the CFG). > You cannot reliably use the addRequired()...
2008 Jul 12
3
[LLVMdev] Little bug in LoopInfo after Rotate?
Hello, I have two for loops (one inside the other), that after indvars, looprotate, etc. (the important here is the loop rotate), is similar to this (I've stripped the real operations): define i32 @f() nounwind { entry: br label %bb1 bb1: ; preds = %bb3, %bb1, %entry %i.0.reg2mem.0.ph = phi i32 [ 0, %entry ], [ %i.0.reg2mem.0.ph, %bb1 ], [ %indvar.next9, %bb3 ] ;
2011 Dec 14
2
[LLVMdev] Adding dependency on MemoryDependenceAnalysis pass to LICM causes opt to get stuck in addPass
...U.addRequired<LoopInfo>(); AU.addRequiredID(LoopSimplifyID); AU.addRequired<MemoryDependenceAnalysis>(); // <--- added AU.addRequired<AliasAnalysis>(); AU.addPreserved<AliasAnalysis>(); AU.addPreserved("scalar-evolution"); AU.addPreservedID(LoopSimplifyID); AU.addRequired<TargetLibraryInfo>(); } ..add to the initialize pass list: char LICM::ID = 0; INITIALIZE_PASS_BEGIN(LICM, "licm", "Loop Invariant Code Motion", false, false) INITIALIZE_PASS_DEPENDENCY(DominatorTree) INITIALIZE_PASS_DEPENDENCY(Lo...
2010 Nov 17
1
[LLVMdev] L->isLoopInvariant giving wrong results?
...; bool runOnLoop(Loop * L, LPPassManager &lpm); virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesCFG(); AU.addRequired<DominatorTree>(); AU.addRequired<LoopInfo>(); AU.addRequiredID(LoopSimplifyID); AU.addPreserved<ScalarEvolution>(); AU.addPreservedID(LoopSimplifyID); } }; } char MyLoopPass::ID=0; INITIALIZE_PASS(MyLoopPass, "myLICM", "simple LICM pass", false, false); bool MyLoopPass::runOnLoop(Loop * L, LPPassManager &lpm){ //find loop pre-header BasicBlock* pre=L->getLoopPreheader(); curLoop=L; changed=false; Basi...