search for: addpreserved

Displaying 20 results from an estimated 85 matches for "addpreserved".

2012 Feb 15
1
[LLVMdev] addRequired vs addPreserved
what are the differences between the addRequired and addPreserved in LLVM Pass Managers. Thanks
2015 Jul 29
1
[LLVMdev] Loop Dependence Analysis(getDistance())
...but it is has some logical but and giving segmentation fault. void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AU.addRequired<PostDominatorTree>(); AU.addRequired<LoopInfo>(); AU.addRequired<DependenceAnalysis>(); AU.addPreserved<DependenceAnalysis>(); AU.addRequired<ScalarEvolution>(); AU.addPreserved<ScalarEvolution>(); AU.addRequired<AliasAnalysis>(); AU.addPreserved<AliasAnalysis>(); AU.addRequired<MemoryDependenceAnalysis>(); AU.addPreserved<MemoryDependenceAnaly...
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 *as preserved? -- Regards, DTharun -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190814/75f08c92/attachment.html...
2014 Apr 04
3
[LLVMdev] Add a new information and preserve it in LLVM
...tion is that I have some information W, some transform passes may change it, after these passes, I need the new W. What I did is to create an analysis pass similar to scalar-evolution or loopinfo, I can get the information by using getAnalysis<W>(); and preserve this information W by using AU.addPreserved<W>();. Then the problem came, for the module pass, the information can’t be preserved. (I found this: To the best of my knowledge, the LLVM pass manager never preserves a FunctionPass analysis that is requested by a ModulePass; every time you call getAnalysis for a function, the FunctionPass...
2012 Nov 09
0
[LLVMdev] Loop carried dependence analysis?
...;getDirection(nestingLevel); // Returns DVEntry::ALL if (const SCEV* scev = dependence->getDistance(nestingLevel)) // Returns null {...} } void ExtractFeatures::getAnalysisUsage(AnalysisUsage &analysisUsage) const { analysisUsage.addRequired<LoopInfo>(); analysisUsage.addPreserved<LoopInfo>(); analysisUsage.addRequired<ScalarEvolution>(); analysisUsage.addPreserved<ScalarEvolution>(); analysisUsage.addRequired<AliasAnalysis>(); analysisUsage.addPreserved<AliasAnalysis>(); analysisUsage.addRequired<MemoryDependenceAnalysis&...
2006 Jul 05
0
[LLVMdev] Critical edges
..., and tell me if it is likely to generate incorrect code (besides the problem of not inserting branch instructions)? Thanks a lot, Fernando Code --------------------------------------------------------------- void CriticalEdgeRemoval_Fer::getAnalysisUsage (AnalysisUsage & AU) const { AU.addPreserved<ETForest>(); AU.addPreserved<DominatorSet>(); AU.addPreserved<ImmediateDominators>(); AU.addPreserved<DominatorTree>(); AU.addPreserved<DominanceFrontier>(); AU.addPreserved<LoopInfo>(); AU.addPreservedID(LoopSimplifyID); } bool Critical...
2006 May 03
1
[LLVMdev] Patch for transform dependencies
...// modifies the CFG! class LowerSwitch : public FunctionPass { 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...
2006 Jul 04
2
[LLVMdev] Critical edges
On Tue, 4 Jul 2006, Fernando Magno Quintao Pereira wrote: > However, it does not remove all the critical edges. I am getting a very > weird dataflow graph (even without the Break Critical edges pass). The > dataflow generated by MachineFunction::dump() for the program below is > given here: > http://compilers.cs.ucla.edu/fernando/projects/soc/images/loop_no_crit2.pdf ... > The
2016 Feb 08
2
LoopIdiomRegognize vs Preserved
Hi, I'm having problems with the LoopIdiomRegognizer crashing on me with An asserting value handle still pointed to this value! UNREACHABLE executed at ../lib/IR/Value.cpp:695! If I remove AU.addPreserved<LoopInfoWrapperPass>(); or AU.addPreserved<AAResultsWrapperPass>(); everything goes well. The C-code triggering this is void foo(int a[10][10]) { int i, j, k; for (i = 0; i < 1; i++) { for (j = 0; j < 2; j++) { for (k = 0; k < 10; k++)...
2012 Mar 23
3
[LLVMdev] Function Pass Manager
Hi, I'm writing a function pass 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...
2011 May 30
1
[LLVMdev] about writing a functionpass requiring a modulepass
...AU) const {* * AU.addRequired<CallGraph>();* * AU.setPreservesAll();* *}* Then, I assumes the UnreachableBlockElim (inherited from FunctionPass) requires myPass, by revising the related function as follows: *UnreachableBlockElim::getAnalysisUsage(AnalysisUsage &AU) const { * * AU.addPreserved<DominatorTree>();* * AU.addPreserved<ProfileInfo>();* * AU.addRequired<StaticProfilePass>();* * * * }* Then, i built it, it is OK. I went on to run it. It failed with a segment error. By debugging, it is found that in the following code from *PMTopLevelManager::schedu...
2011 Aug 22
1
[LLVMdev] Infinite loop when adding a new analysis pass
...p;AU) const { AU.setPreservesCFG(); AU.addRequired<DominatorTree>(); AU.addRequired<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_P...
2016 Feb 10
2
LoopIdiomRegognize vs Preserved
...;>> I'm having problems with the LoopIdiomRegognizer crashing on me with >>> >>> An asserting value handle still pointed to this value! >>> UNREACHABLE executed at ../lib/IR/Value.cpp:695! >>> >>> If I remove >>> >>> AU.addPreserved<LoopInfoWrapperPass>(); >>> >>> or >>> >>> AU.addPreserved<AAResultsWrapperPass>(); >>> >>> everything goes well. >>> >>> The C-code triggering this is >>> >>> void foo(int a[10][10]) >&g...
2009 Sep 22
1
[LLVMdev] Preserving Analysis in ALL Passes
...e tried to add ProfileInfo directly in Pass.h:getAnalysisUsage() but that produces nasty circular library dependecies. I also tried to simply store a pointer to the ProfileInfo in Module but then the PassManager gets confused resulting in double freed memory. The only thing that helps is adding addPreserved<ProfileInfo>() to each pass, but thats quite tedious to do... Any suggestions? Thanks, Andi
2012 Nov 06
1
[LLVMdev] Adding function attributes
...nline detected\n"; } } return modified; } virtual void getAnalysisUsage(AnalysisUsage &analysisUsage) const { analysisUsage.addRequired<LoopInfo>(); analysisUsage.addPreserved<LoopInfo>(); analysisUsage.addRequired<ScalarEvolution>(); analysisUsage.addPreserved<ScalarEvolution>(); analysisUsage.addRequired<DependenceAnalysis>(); analysisUsage.addPreserved<DependenceAnalysis>();...
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", &qu...
2016 Feb 09
2
LoopIdiomRegognize vs Preserved
...[llvm-dev] LoopIdiomRegognize vs Preserved > > Hi, > > I'm having problems with the LoopIdiomRegognizer crashing on me with > > An asserting value handle still pointed to this value! > UNREACHABLE executed at ../lib/IR/Value.cpp:695! > > If I remove > > AU.addPreserved<LoopInfoWrapperPass>(); > > or > > AU.addPreserved<AAResultsWrapperPass>(); > > everything goes well. > > The C-code triggering this is > > void foo(int a[10][10]) > { > int i, j, k; > > for (i = 0; i < 1; i++) { >...
2012 Oct 30
1
[LLVMdev] Error when trying to chain two llvm transform passes
On Oct 30, 2012, at 3:15 PM, Krzysztof Parzyszek <kparzysz at codeaurora.org> wrote: > On 10/30/2012 4:10 PM, Ashwin kumar wrote: >> >> Assertion failed: (PI && "Expected required passes to be initialized"), >> function schedulePass, file PassManager.cpp, line 597. >> >> >> I register the passes using RegisterPass function call.
2014 Apr 18
2
[LLVMdev] PassManager Woes
...n the PassManager, but I happen to be going through it > fairly carefully right now. You didn't state which passes were Module > Passes and which were Function Passes (or other types). Sorry, I did mean to include that. They are all FunctionPasses. > One thing I have noticed is that addPreserved() doesn't seem to really > do anything. I would have thought it would be used in helping > determine the last users of a pass, but that doesn't appear to be the > case. It seems to mess with a structure called InheritedAnalysis, but > that in turn is never really used for anythi...
2005 Sep 07
3
[LLVMdev] LiveIntervals invalidates LiveVariables?
I though LiveVariables may be invalidated by LiveIntervals, but it's declared not: void LiveIntervals::getAnalysisUsage(AnalysisUsage &AU) const { AU.addPreserved<LiveVariables>(); AU.addRequired<LiveVariables>(); ... LiveInterval may coalesce virtual registers and remove identity moves instructions: bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) { ... // perform a final pass over the instructions and compute spill...