Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] Pass Manager Question"
2009 Mar 20
0
[LLVMdev] Pass Manager Question
On Mar 19, 2009, at 11:43 AM, John Criswell wrote:
> Dear All,
>
> If I have a ModulePass that requires a FunctionPass, and I include a
> line like the following:
>
> <variable> = &getAnalysis<TheFunctionPass>(*Function);
>
> ... will the PassManager blindly re-run the FunctionPass each time the
> ModulePass requests it, or does it use the Pass
2007 Dec 18
0
[LLVMdev] Another Pass Manager Assertion
On Dec 18, 2007, at 10:55 AM, John Criswell wrote:
> Dear All,
>
> The attached code (which is a contrived test case) hits the following
> assertion:
>
> test:
> /home/vadve/criswell/src/llvm22/include/llvm/PassAnalysisSupport.h:
> 226:
> AnalysisType& llvm::Pass::getAnalysisID(const llvm::PassInfo*,
> llvm::Function&) [with AnalysisType = Pass1]: Assertion
2009 Apr 09
3
[LLVMdev] Pass Manager Restriction?
Having a ModulePass that requires a FunctionPass that in turn requires
another ModulePass results in an assertion being fired. Is this
expected behavior (that seems to be undocumented), or a bug?
Specifically, the following code will emit the assertion:
[VMCore/PassManager.cpp:1597: virtual void
llvm::ModulePass::assignPassManager(llvm::PMStack&,
llvm::PassManagerType): Assertion
2009 Apr 10
0
[LLVMdev] Pass Manager Restriction?
"A module pass can use function level passes (e.g. dominators) using
getAnalysis interfacegetAnalysis<DominatorTree>(Function), if the
function pass does not require any module passes."
http://llvm.org/docs/WritingAnLLVMPass.html
In your case, A module pass (ModPass2) is trying tu use function level
pass (FunPass1) which uses module level pass (ModPass1). This is not
2011 Nov 10
4
[LLVMdev] Problem getting LoopInfo inside non-LoopPass
John,
This did not work. It compiles (isDeclaration was the name of the
function) and I passed a reference (&F) (F is a function pointer). I still
get the opt load error from the original message (UNREACHABLE exectuted!).
Thanks.
On Thu, Nov 10, 2011 at 10:00 AM, Ryan Taylor <ryta1203 at gmail.com> wrote:
> 1. Ok will do.
> 2. Ok, will do.
> 3. It's a CallGraphPass. I
2009 Aug 10
2
[LLVMdev] How to use a FunctionPass in a ModulePass?
Hi, all:
I wanted to use a FunctionPass (e.g. *MemoryDependenceAnalysis*) in a
ModulePass, and then I used the method "getAnalysis<*
MemoryDependenceAnalysis*>(llvm::Function *)" described at
http://llvm.org/docs/WritingAnLLVMPass.html#ModulePass to get the
FunctionPass. But , it still crashed when I invoked this pass in tool 'opt'.
However, if I change my pass to
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>();
2010 Jul 24
2
[LLVMdev] Controlling the order of a FunctionPass
John Criswell wrote:
> Trevor Harmon wrote:
>> 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:
2011 Oct 15
1
[LLVMdev] pass utilizing MemoryDependenceAnalysis?
This gives me: Assertion failed: (0 && "Unable to find on the fly
pass"), function getOnTheFlyPass, file PassManager.cpp
#include "llvm/Module.h"
#include "llvm/Analysis/MemoryDependenceAnalysis.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
struct Hello: public FunctionPass {
public:
static char ID;
Hello(): FunctionPass(ID) {
2007 Dec 18
2
[LLVMdev] Another Pass Manager Assertion
Dear All,
The attached code (which is a contrived test case) hits the following
assertion:
test:
/home/vadve/criswell/src/llvm22/include/llvm/PassAnalysisSupport.h:226:
AnalysisType& llvm::Pass::getAnalysisID(const llvm::PassInfo*,
llvm::Function&) [with AnalysisType = Pass1]: Assertion `ResultPass &&
"getAnalysis*() called on an analysis that was not "
2010 Jul 23
0
[LLVMdev] Controlling the order of a FunctionPass
Trevor Harmon wrote:
> 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:
>
Two things to consider:
1) The PassManager
2010 May 10
2
[LLVMdev] [Fwd: Error while running my pass with opt]
ambika wrote:
> Here is getAnalysisUsage() i am using,
>
> void getAnalysisUsage(AnalysisUsage &AU) const {
> AU.setPreservesAll();
> AU.addRequired<DominatorTree>();
> }
>
> and then I use it as,
>
>
> bool ptrTest::runOnModule(Module &M) {
>
> DominatorTree &DT = getAnalysis<DominatorTree>();
> ......
>
2009 Aug 10
0
[LLVMdev] How to use a FunctionPass in a ModulePass?
On Mon, Aug 10, 2009 at 3:35 AM, gauss<gausszhch at gmail.com> wrote:
> Hi, all:
>
> I wanted to use a FunctionPass (e.g. MemoryDependenceAnalysis) in a
> ModulePass, and then I used the method
> "getAnalysis<MemoryDependenceAnalysis>(llvm::Function *)" described at
> http://llvm.org/docs/WritingAnLLVMPass.html#ModulePass to get the
> FunctionPass. But ,
2011 Mar 03
2
[LLVMdev] how can I have LoopInfo in a module pass?
Thanks John, I modify my code to like this:
bool XXX::ModulePass(Module &M){
....
LoopInfo &li = getAnalysis<LoopInfo>(fi);
....
}
Here fi is a Function* pointing to main().
Now when I run the pass, another error shows up:
AnalysisType& llvm::Pass::getAnalysisID(const llvm::PassInfo*, llvm::Function&) [with AnalysisType = llvm::LoopInfo]: Assertion `ResultPass
2014 Apr 04
3
[LLVMdev] Add a new information and preserve it in LLVM
Hello,
I am trying to add some thing into LLVM, while I encountered some problems.
So my situation 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
2010 Apr 13
2
[LLVMdev] The "scope" of passes
Devang Patel wrote:
> On Mon, Apr 12, 2010 at 6:41 PM, ether zhhb <etherzhhb at gmail.com> wrote:
>
>
>> that's because FunctionPass implement the "addLowerLevelRequiredPass"
>> function, but others not.
>>
>> so, is there any special reason that only "addLowerLevelRequiredPass" is
>> allow?
>>
>>
>
>
2011 Nov 10
1
[LLVMdev] Problem getting LoopInfo inside non-LoopPass
On 11/10/11 11:48 AM, Ryan Taylor wrote:
> John,
>
> Thanks, this does not compile though, I get this error:
First, please CC the llvmdev list. That way, others having the same
question can see the conversation, and others on the list can help
correct any errors I make.
:)
>
> cdfg_pass.cpp:511:11: error: ‘class llvm::Function’ has no member
> named ‘getDeclaration’
2011 Jun 15
3
[LLVMdev] Cannot use function pass in a module pass
Hi. I'm trying to implement a module pass which can be dynamically
loaded by `opt` (against up-to-date llvm from svn).
Despite what the tutorial
(http://llvm.org/docs/WritingAnLLVMPass.html) states in my module pass
I cannot perform getAnalysis and fetch the function pass result.
When trying to do so `opt` fails with the following mesage:
[***@*** ***]$ opt -load
2010 May 11
0
[LLVMdev] [Fwd: Error while running my pass with opt]
John Criswell wrote:
> ambika wrote:
>> Here is getAnalysisUsage() i am using,
>>
>> void getAnalysisUsage(AnalysisUsage&AU) const {
>> AU.setPreservesAll();
>> AU.addRequired<DominatorTree>();
>> }
>>
>> and then I use it as,
>>
>>
>> bool ptrTest::runOnModule(Module&M) {
>>
>>
2015 May 20
3
[LLVMdev] Processing functions in call graph SCC "order" with function-level analyses
So I got very mixed results.
With the CallGraphSCCPass, both `addRequired<DominatorTreeWrapperPass>` and `addRequired<MemoryDependenceAnalysis>` fail at runtime. The LLVM core has just two CallGraphSCCPasses and neither uses neither analyses, so it's hard to find a valid example.
I transformed the pass into a ModulePass, using scc_iterator as shown in CGPassManager to process