search for: runonscc

Displaying 20 results from an estimated 41 matches for "runonscc".

2010 Jul 16
2
[LLVMdev] Function::getName in CallGraphSCCPass causes bus error
...ly using the lib/Transforms/Hello example. I simply mix in these changes: #include "llvm/CallGraphSCCPass.h" ... struct Hello : public CallGraphSCCPass { static char ID; // Pass identification, replacement for typeid Hello() : CallGraphSCCPass(&ID) {} virtual bool runOnSCC(std::vector<CallGraphNode *> &SCC) { CallGraphNode *node = SCC.front(); Function *function = node->getFunction(); StringRef str = function->getName(); return false; } }; And when I run the pass with opt, I get: 0 libLLVM-2.7.dylib 0xe0b...
2010 Jul 19
0
[LLVMdev] Function::getName in CallGraphSCCPass causes bus error
Hi Trevor, > struct Hello : public CallGraphSCCPass { > static char ID; // Pass identification, replacement for typeid > Hello() : CallGraphSCCPass(&ID) {} > virtual bool runOnSCC(std::vector<CallGraphNode *> &SCC) { > CallGraphNode *node = SCC.front(); > Function *function = node->getFunction(); > StringRef str = function->getName(); maybe function is NULL? This is the case for the "external node". Ciao,...
2011 Nov 30
0
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
...nd 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; Function *F = CGNode->getFunction(); if (!F->isDeclar...
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 Nov 30
2
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
...>   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; >                   Function *F = CGNode->getFunction(); >             ...
2018 Nov 16
2
Help with a pass
...think I have properly amended the source extending my pass from CallGraphSCCPass but unfortunately every time I run it, it crashes. I tried with llvm-6 and llvm-7. I notice that if I change EP_EarlyAsPossible to anything else it does not crash but I don't see the expected string printed by the runOnSCC. Could you help me to solve this problem? How should I create the pass? Thanks for your time [1] https://www.cs.cornell.edu/~asampson/blog/llvm.html -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181116/c...
2015 Oct 22
8
RFC: Inlining report
...ost (from InlineCost.h) is augmented to include the primary reason a call site was inlined. The class Inliner has been augmented with an InlineReport, which is created when an Inliner is constructed. The InlineReport is updated using calls to the member functions of these three classes in Inliner::runOnSCC() and the functions called by it. Before any inlining is done in a particular call to runOnSCC(), the map MF is updated so that each Function (caller or callee) that will be examined for inlining has a corresponding InlineReportFunction in the map. (The map MCS is also updated in a similar way, b...
2011 Dec 01
1
[LLVMdev] Problem getting LoopInfo inside non-LoopPass
...pace { >  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; >                  Function *F = CGNode->getFunction(); >                  if...
2013 Sep 23
0
[LLVMdev] Cannot get Alias Analysis?
...r &pmgr);* * ~AnalysisDriver();* * * * virtual void getAnalysisUsage(AnalysisUsage &AU) const {* * AU.addRequired<CallGraph>();* * AU.addRequired<AliasAnalysis>();* * AU.addPreserved<AliasAnalysis>();* * }* * * * bool run(Module &module);* * virtual bool runOnSCC(CallGraphSCC &scc);* * virtual bool runOnFunction(Function *f) = 0;* * * * virtual const char *getPassName() const {* * return "AnalysisDriver";* * }* * * *private:* * void registerDriver();* *};* *char AnalysisDriver::Pid;* * * *AnalysisDriver::AnalysisDriver(PassManager &am...
2006 Sep 29
2
[LLVMdev] FunctionPass requiring SCCs
...FunctionPass F that needs a list of all the SCCs for use in its doFinalization() method. Let's say I write a CallGraphSCCPass C that creates an array of all SCCs. Let C be required by F, and let F call getAnalysis<C>() from its doFinalization() method. Am I guaranteed that C's runOnSCC() method will have executed on all SCCs before F's doFinalization() method? In other words, when F calls getAnalysis<C>() from its doFinalization() method, am I guaranteed that C will have been able to build the array of SCCs? If not, how else might I structure things? Regards, Ryan
2006 Mar 21
2
[LLVMdev] problem loading analysis results from Inliner pass
...rying to access an analysis pass from the Inliner pass, and I'm having a lot of trouble getting that to work - I can verify that my pass is loaded and run (it is a dynamically loaded pass that is part of an analysisgroup), however, when I access it using getAnalysis<> from within Inliner::runOnSCC, I am instead getting the default, dummy version of my analysis, which should be overridden by the one that was brought in with -load. I'm having a hard time debugging this, so any tips for how to track the problem down would be appreciated. I am running on Linux, and the version of LLVM I am...
2011 Nov 30
0
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
...GraphSCCPass { > > 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; > > Function *F = CGNode->getFunction(...
2010 May 11
1
[LLVMdev] All CallInsts mayHaveSideEffects
Hi, All CallInsts should return true for Instruction::mayHaveSideEffects() because functions are not guaranteed to halt. Inliner::runOnSCC calls isInstructionTriviallyDead to determine whether code can be dead code eliminated. isInstructionTriviallyDead returns true if Instruction::mayHaveSideEffects() returns false. A function that potentially runs forever based on its input but does not write to memory will be dead code eliminated w...
2010 Jun 09
1
[LLVMdev] Segmentation fault 'cause of accessing function arguments
...0x0000000100010e89 llvm::Function::hasLazyArguments() const + 21 5 opt 0x00000001000114e3 llvm::Function::CheckLazyArguments() const + 21 6 opt 0x000000010013a421 llvm::Function::arg_begin() + 21 7 LLVMRCI.dylib 0x0000000101483e02 (anonymous namespace)::RCI::runOnSCC(llvm::CallGraphSCC&) + 184 8 opt 0x0000000100205686 (anonymous namespace)::CGPassManager::RunPassOnSCC(llvm::Pass*, llvm::CallGraphSCC&, llvm::CallGraph&, bool&, bool&) + 230 9 opt 0x0000000100205abe (anonymous namespace)::CGPassManager::RunAllPasse...
2015 Dec 07
4
[LLVMdev] Path forward on profile guided inlining?
...9; and the frequency of the block containing the 'foo' -> > 'bar' callsite. Even when the new CGSCC level BFI analysis is in place, > this incremental update is useful to minimize computation. > > Invalidation: Once inlining is completed in an SCC (at the end of > runOnSCC), the entries for functions in that SCC are invalidated since > other passes run by the CGSCC pass manager (including those run by the > function pass manager run under CGSCC pass manager) might affect the > computed BFI for the functions in the SCC. > > When the new PM infrastructur...
2011 Dec 01
0
[LLVMdev] Problem getting LoopInfo inside non-LoopPass
...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; > > Function *F = CGNode->getFunction(); >...
2006 Sep 18
2
[LLVMdev] llvm-g++: Internal error
...llvm::CallGraphNode::removeCallEdgeTo(llvm::CallGraphNode*)+0x41)[0x83c1ac d] gccld((anonymous namespace)::PruneEH::DeleteBasicBlock(llvm::BasicBlock*)+0x175) [0x838c82f] gccld((anonymous namespace)::PruneEH::SimplifyFunction(llvm::Function*)+0x2cf)[0 x838cc55] gccld((anonymous namespace)::PruneEH::runOnSCC(std::vector<llvm::CallGraphNode*, std::allocator<llvm::CallGraphNode*> > const&)+0x6e)[0x838cefe] gccld(llvm::CallGraphSCCPass::runOnModule(llvm::Module&)+0x84)[0x83c430a] gccld(llvm::ModulePassManager::runPass(llvm::ModulePass*, llvm::Module*)+0x1f)[0 x84761ef] gccld(llvm::Pass...
2010 Mar 26
0
[LLVMdev] [PATCH] Before/After IR Dumps
...; > in the create*PrinterPass interfaces. > > Any additional feedback from anyone? This is looking much better, thanks. I'd still prefer using StringRef instead of std::string here because it cleans up the interface, but I won't insist. Please don't do this though: + bool runOnSCC(std::vector<CallGraphNode *> &SCC) { + ModulePass *Printer = createPrintModulePass(Banner, &Out); + Printer->runOnModule(*M); + delete Printer; + return false; It would be better to just loop over the callgraphnodes and call F->print(Out) on the functions for each n...
2006 Mar 21
0
[LLVMdev] problem loading analysis results from Inliner pass
...nalysis pass from the Inliner pass, and > I'm having a lot of trouble getting that to work - I can verify that > my pass is loaded and run (it is a dynamically loaded pass that is > part of an analysisgroup), however, when I access it using > getAnalysis<> from within Inliner::runOnSCC, I am instead getting the > default, dummy version of my analysis, which should be overridden by > the one that was brought in with -load. What sort of pass is it? The inliner is a ModulePass, so the only thing it can getAnalysis<> are modulepasses and immutablepasses: functionpasses...
2006 Sep 14
1
[LLVMdev] use LLVM to convert C++ code to C code
...CallEdgeTo(llvm::CallGraphNode*)+0x3d)[0x837697f]<br> gccld((anonymous namespace)::PruneEH::DeleteBasicBlock(llvm::BasicBlock*)+0x16f)[0x8348265]<br> gccld((anonymous namespace)::PruneEH::SimplifyFunction(llvm::Function*)+0x2d4)[0x8347eee]<br> gccld((anonymous namespace)::PruneEH::runOnSCC(std::vector<llvm::CallGraphNode*, std::allocator<llvm::CallGraphNode*> > const&)+0x76)[0x8347804]<br> gccld(llvm::CallGraphSCCPass::runOnModule(llvm::Module&)+0x99)[0x8378e29]<br> gccld(llvm::ModulePassManager::runPass(llvm::ModulePass*, llvm::Module*)+0x1b)[0x842a11...