Displaying 20 results from an estimated 8000 matches similar to: "[LLVMdev] MemoryDependenceAnalysis in ModulePass"
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
2009 Mar 20
2
[LLVMdev] Problem with MemoryDependenceAnalysis
Devang Patel wrote:
> On Mar 20, 2009, at 8:13 AM, Amr Yehia wrote:
>
>
>> Dear all,
>>
>> I am having a problem adding a MemoryDependenceAnalysis pass to a
>> Module
>> Pass i created, it gives me the following error when i add
>> (Info.addRequired<MemoryDependenceAnalysis>();) it in the
>> getAnalysisUsage(AnalysisUsage &Info)
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) {
2011 Oct 14
0
[LLVMdev] pass utilizing MemoryDependenceAnalysis?
In runOnFunction(), you should check to see if the function F is a
declaration before calling getAnalysis(F). Calling
getAnalysis<FunctionPass>() on a function that is a declaration will
trigger an assertion if the function is just a declaration.
To see if a function is a declaration, call its isDeclaration() method
(i.e. if (F->isDeclaration()) ... )
-- John T.
On 10/13/11 8:09
2011 Oct 14
2
[LLVMdev] pass utilizing MemoryDependenceAnalysis?
#include "llvm/Module.h"
#include "llvm/Analysis/MemoryDependenceAnalysis.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
struct Hello: public ModulePass {
public:
static char ID;
MemoryDependenceAnalysis *MD;
Hello(): ModulePass(ID) {
;;
}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
2008 Dec 02
2
[LLVMdev] Error when using getAnalysis
Hi,
I had a question about this as well. The documentation about writing a
pass shows an example like what John wrote, calling a function pass within
a module pass on a per function basis. However, if I code it that way, I
still get the same error:
opt: /x/jeffhao/llvm/llvm/include/llvm/PassAnalysisSupport.h:232:
AnalysisType& llvm::Pass::getAnalysisID(const llvm::PassInfo*,
2011 Oct 13
0
[LLVMdev] pass utilizing MemoryDependenceAnalysis?
My pass(that I want to use MemoryDependenceAnalysis) is a ModulePass.
When I changed my assignment to:
MD = &getAnalysis<MemoryDependenceAnalysis>(F);
It fixed my initial problem but left me with:
Assertion failed: (ResultPass && "Unable to find requested
analysis info"), function getAnalysisID
On Thu, Oct 13, 2011 at 1:43 PM, ret val <retval386 at
2009 Mar 20
0
[LLVMdev] Problem with MemoryDependenceAnalysis
On Mar 20, 2009, at 8:13 AM, Amr Yehia wrote:
> Dear all,
>
> I am having a problem adding a MemoryDependenceAnalysis pass to a
> Module
> Pass i created, it gives me the following error when i add
> (Info.addRequired<MemoryDependenceAnalysis>();) it in the
> getAnalysisUsage(AnalysisUsage &Info) function.
>
If MemoryDependenceAnalysis requires any module
2009 Mar 20
2
[LLVMdev] Problem with MemoryDependenceAnalysis
Dear all,
I am having a problem adding a MemoryDependenceAnalysis pass to a Module
Pass i created, it gives me the following error when i add
(Info.addRequired<MemoryDependenceAnalysis>();) it in the
getAnalysisUsage(AnalysisUsage &Info) function.
adding callgraph pass ... done
opt: /net/home/yehia/llvm/llvm-2.4/include/llvm/Target/TargetData.h:114:
2009 Apr 10
2
[LLVMdev] Pass Manager Restriction?
Good to know. I was referencing a local copy of 2.3 docs which didn't
include the "does not require any module passes" statement. It appears
the docs were changed two days before 2.4 was released in November. I
suppose I should update my docs more often.
Are there any plans to change this restriction, or any best practices
to get similar behavior? Since immutable pass is a subclass
2011 Oct 13
2
[LLVMdev] pass utilizing MemoryDependenceAnalysis?
I wrote a pass(that is to be loaded by opt) that I would like to use
in conjunction with MemoryDependenceAnalysis. I have tried using by
including its header and adding this to my pass:
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
errs() << "addRequired called\n";
AU.addRequired<MemoryDependenceAnalysis>();
}
And in my
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
2008 Dec 02
1
[LLVMdev] Error when using getAnalysis
Sure. I've attached the code for the test pass I wrote, as well as the
code and bitcode for the testcase I'm running. All the functionality has
been stripped out of the pass, and the pass compiles without a problem, but
the error appears when the pass is run.
Jeff
On Tue, 2 Dec 2008 11:06:44 -0800, Devang Patel <dpatel at apple.com> wrote:
> On Dec 2, 2008, at 10:40 AM, Jeff
2008 Dec 02
0
[LLVMdev] Error when using getAnalysis
On Dec 2, 2008, at 10:40 AM, Jeff Yeong-Peng Hao wrote:
>
> Hi,
>
> I had a question about this as well. The documentation about
> writing a
> pass shows an example like what John wrote, calling a function pass
> within
> a module pass on a per function basis. However, if I code it that
> way, I
> still get the same error:
>
> opt:
2010 Nov 22
0
[LLVMdev] pass visibility question
Hi developers,
I have some problems using a non-default alias analysis. I wrote a
modulepass which needs a functionpass. The functionpass needs a type
bases alias analysis instead of the basicaa. I added the command line
parameter for this analysis to the opt invocation as follows:
opt -tbaa -global-live-values test.bc
The 'global-live-values' pass preserves all and requires a
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 Aug 11
1
[LLVMdev] How to use a FunctionPass in a ModulePass?
Hi, Devang. Thank you for your reply.
But in my case, my ModulePass requires another FunctionPass (e.g.
MemoryDependenceAnalysis) rather than the opposite direction. Is it also
limited?
-
gauss
Devang Patel-2 wrote:
>
> 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.
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 ,
2009 Mar 24
1
[LLVMdev] Problem with MemoryDependenceAnalysis
actually i only created a new Module pass and tried to getAnalysis of
MemoryDependenceAnalysis from it, i didn't use TargetData directly
to regenerate the error i am attaching a c file containing an example
code to regenerate the error. with its Makefile
the command line i used is:
opt -time-passes -analyze -load
${LLVM_PATH}/Release/lib/.libs/libMYMODULEPASS.so -MyModulePass < test.bc
2010 Sep 15
0
[LLVMdev] getAnalysis<LoopInfo> from ModulePass
hi,
On Wed, Sep 15, 2010 at 8:21 PM, Mariusz Grad <mariusz.grad at gmail.com> wrote:
> Hi,
>
> I wrote tiny ModulePass which iterates over functions and then uses getAnalysis<LoopInfo> in order to get informations about the loop.
> It compiles smoothly, but whenever I try to run it I got error like this:
> opt: .. PassAnalysisSupport.h:203: AnalysisType&