Displaying 20 results from an estimated 604 matches for "runonmodul".
Did you mean:
runonmodule
2019 Apr 02
2
How can I use llvm::LoopInfo in the runOnModule method?
...d to have a LoopInfo object in a function pass, and add addRequired
in getAnalysisUsage, and then use getAnalysis in runOnFunction(). It worked
OK.
Now I want to have a module pass to traverse the functions, and similarly,
I want to have to loop information of the functions.
When I did the above in runOnModule, and build the module pass, the
following error popped out, and the compile did not succeed:
[ 50%] Building CXX object src/CMakeFiles/SkeletonPass.dir/Skeleton.cpp.o
/home/**/Desktop/skeleton/src/Skeleton.cpp: In member function
‘virtual bool llvm::SkeletonPass::runOnModule(llvm::Module&)’:...
2019 Apr 03
3
How can I use llvm::LoopInfo in the runOnModule method?
...fo object in a function pass, and add addRequired in getAnalysisUsage, and then use getAnalysis in runOnFunction(). It worked OK.
>> Now I want to have a module pass to traverse the functions, and similarly, I want to have to loop information of the functions.
>> When I did the above in runOnModule, and build the module pass, the following error popped out, and the compile did not succeed:
>>
>> [ 50%] Building CXX object src/CMakeFiles/SkeletonPass.dir/Skeleton.cpp.o
>> /home/**/Desktop/skeleton/src/Skeleton.cpp: In member function ‘virtual bool llvm::SkeletonPass::runOnMo...
2013 May 30
0
[LLVMdev] unexpectedly loop hanging
Hi Alexandru,
> /*==5134== Invalid write of size 4
> ==5134== at 0x4039280: (anonymous
> namespace)::Hello::runOnModule(llvm::Module&) (in
> /home/alex/llvm/Release+Asserts/lib/Hello.so)
> ==5134== by 0x8E33DE3: llvm::MPPassManager::runOnModule(llvm::Module&) (in
> /home/alex/llvm/Release+Asserts/bin/opt)
> ==5134== by 0x8E3726F: llvm::PassManagerImpl::run(llvm::Module&) (in
> /home...
2013 May 30
2
[LLVMdev] unexpectedly loop hanging
...unsigned long)(nb)' failed.*
2. gdb -
*Program received signal SIGABRT, Aborted.
0xb7fdd424 in __kernel_vsyscall ()*
3. valgrind - it executes all the code and at the problematic loop
iteration I have :
*==5134== Invalid write of size 4
==5134== at 0x4039280: (anonymous
namespace)::Hello::runOnModule(llvm::Module&) (in
/home/alex/llvm/Release+Asserts/lib/Hello.so)
==5134== by 0x8E33DE3: llvm::MPPassManager::runOnModule(llvm::Module&)
(in /home/alex/llvm/Release+Asserts/bin/opt)
==5134== by 0x8E3726F: llvm::PassManagerImpl::run(llvm::Module&) (in
/home/alex/llvm/Release+Assert...
2011 Jun 15
3
[LLVMdev] Cannot use function pass in a module pass
...s/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 ~/llvm/Debug+Asserts/lib/MyPassLibrary.so
-mymodulepass < input.bc >/dev/null
MyModulePass::runOnModule
MyFunctionPass::runOnFunction(process)
opt: /***/llvm/include/llvm/MyFunctionPass.h:241: AnalysisType&
llvm::Pass::getAnalysisID(llvm::AnalysisID, llvm::Function&) [with
AnalysisType = {anonymous}::MyFunctionPass, llvm::AnalysisID = const
void*]: Assertion `ResultPass && "Unab...
2012 Nov 16
1
[LLVMdev] AddressSanitizer depends on order of doFinalization
Hello All,
There is an issue in AddressSanitizer today because it depends on it's doFinalization method be called before the Printer method to output the final code (that is the printer runOnModule call). This assumption seems invalid as the doFinalization method should AFAIK only be used for clean up tasks independent of activities of other passes.
When I try to call doFinalization inside the MPPassManager::runOnModule method (to avoid changing the API to add doInitialization and doFinaliz...
2011 Jun 16
0
[LLVMdev] Cannot use function pass in a module pass
...is a function with no body.
You need to do something like:
if (!(F->isDeclaration())) {
getAnalysis<FunctionPassName>(F);
...
}
-- John T.
> [***@*** ***]$ opt -load ~/llvm/Debug+Asserts/lib/MyPassLibrary.so
> -mymodulepass< input.bc>/dev/null
> MyModulePass::runOnModule
> MyFunctionPass::runOnFunction(process)
> opt: /***/llvm/include/llvm/MyFunctionPass.h:241: AnalysisType&
> llvm::Pass::getAnalysisID(llvm::AnalysisID, llvm::Function&) [with
> AnalysisType = {anonymous}::MyFunctionPass, llvm::AnalysisID = const
> void*]: Assertion `ResultP...
2011 Jun 16
1
[LLVMdev] Cannot use function pass in a module pass
...mething like:
>
> if (!(F->isDeclaration())) {
> getAnalysis<FunctionPassName>(F);
> ...
> }
>
> -- John T.
>
>> [***@*** ***]$ opt -load ~/llvm/Debug+Asserts/lib/MyPassLibrary.so
>> -mymodulepass< input.bc>/dev/null
>> MyModulePass::runOnModule
>> MyFunctionPass::runOnFunction(process)
>> opt: /***/llvm/include/llvm/MyFunctionPass.h:241: AnalysisType&
>> llvm::Pass::getAnalysisID(llvm::AnalysisID, llvm::Function&) [with
>> AnalysisType = {anonymous}::MyFunctionPass, llvm::AnalysisID = const
>> void*]...
2012 Feb 08
2
[LLVMdev] Crash/Assert on -loop-reduce
...63
9 opt 0x000000000050102e
10 opt 0x0000000000689184
llvm::LPPassManager::runOnFunction(llvm::Function&) + 836
11 opt 0x0000000000801f9f
llvm::FPPassManager::runOnFunction(llvm::Function&) + 351
12 opt 0x000000000080221b
llvm::FPPassManager::runOnModule(llvm::Module&) + 59
13 opt 0x000000000080236a
llvm::MPPassManager::runOnModule(llvm::Module&) + 282
14 opt 0x0000000000802941
llvm::PassManagerImpl::run(llvm::Module&) + 337
15 opt 0x0000000000802e4a llvm::PassManager::run(llvm::Module&)
+ 10
16...
2012 Nov 16
5
[LLVMdev] Assert with getZExtValue()?
...runk/include/llvm/ADT/APInt.h:1217
#4 getZExtValue (this=<value optimized out>)
at /home/ryan/llvm/llvm_core/trunk/include/llvm/Constants.h:117
#5 cdfgPassClass::storeInstr (this=<value optimized out>) at
a2c_pass.cpp:2125
#6 0x00007ffff6c73dc1 in (anonymous namespace)::CDFGPass::runOnModule
(this=0x16c2fa0,
M=<value optimized out>) at a2c_pass.cpp:2949
#7 0x0000000000f4cd4e in llvm::MPPassManager::runOnModule(llvm::Module&) ()
#8 0x0000000000f4d813 in llvm::PassManagerImpl::run(llvm::Module&) ()
#9 0x0000000000f4d94a in llvm::PassManager::run(llvm::Module&) (...
2012 Nov 05
2
[LLVMdev] Adding function attributes
Hi Duncan, thanks for the quick answer.
Yes I'm sure the runOnModule is being called, and when I dump the functions
before exiting the method I can see the AlwaysInline attribute.
I'll check InlineAlways.cpp and will reimplement as last resource but I
still wonder why this is not working.
On Mon, Nov 5, 2012 at 5:03 PM, Duncan Sands <baldrick at free.fr&g...
2013 May 30
2
[LLVMdev] unexpectedly loop hanging
...nges for to use clang++ or I can debug
using the Makefile.common?
On Thu, May 30, 2013 at 1:57 PM, Duncan Sands <baldrick at free.fr> wrote:
> Hi Alexandru,
>
> > /*==5134== Invalid write of size 4
>
>> ==5134== at 0x4039280: (anonymous
>> namespace)::Hello::**runOnModule(llvm::Module&) (in
>> /home/alex/llvm/Release+**Asserts/lib/Hello.so)
>> ==5134== by 0x8E33DE3: llvm::MPPassManager::**runOnModule(llvm::Module&)
>> (in
>> /home/alex/llvm/Release+**Asserts/bin/opt)
>> ==5134== by 0x8E3726F: llvm::PassManagerImpl::run(**...
2012 Nov 05
2
[LLVMdev] Adding function attributes
...s. However, the changes to the function seem to be lost after exiting
my pass because the AlwaysInline attribute is not in the output LLVM IR.
Maybe the function iterator passed by the module object actually points to
copies of the functions?
Any help is much appreciated
Code
====
virtual bool runOnModule(Module& m)
{
Module* module = &m;
for (Module::iterator functionIter = module->begin(); functionIter !=
module->end(); functionIter++)
functionIter->addFnAttr(llvm::Attributes::AlwaysInline);
return true;
}
Command line
===========
clang -O0 -S -emit-llvm -...
2012 Jan 12
2
[LLVMdev] Extract Loop Failing
...9
4 LLVMEXITCDFG.so 0x00007ffe202b80d7
5 opt 0x00000000006fc6e7
llvm::LPPassManager::runOnFunction(llvm::Function&) + 1143
6 opt 0x0000000000882557
llvm::FPPassManager::runOnFunction(llvm::Function&) + 551
7 opt 0x00000000008825db
llvm::FPPassManager::runOnModule(llvm::Module&) + 75
8 opt 0x0000000000882197
llvm::MPPassManager::runOnModule(llvm::Module&) + 503
9 opt 0x0000000000882299
llvm::PassManagerImpl::run(llvm::Module&) + 137
10 opt 0x00000000004ac451 main + 4881
11 libc.so.6 0x00007ffe204d9eff...
2017 Nov 30
1
How to count instructions in a function?
Thanks so much John! That works :)
Previously I wrote a pass that inherited from CallGraphWrapperPass and used
its getCallGraph() function within runOnModule() which resulted in
segmentation faults for me. Not sure why that happened, perhaps callgraph
wasn't setup by the time runOnModule() was called internally. If you know
why, kindly enlighten me and perhaps document the behavior for the benefit
of others.
Your email was the best thing to happen...
2012 Jan 12
4
[LLVMdev] Extract Loop Failing
...t 0x00000000006fc6e7
>> llvm::LPPassManager::runOnFunction(llvm::Function&) + 1143
>> 6 opt 0x0000000000882557
>> llvm::FPPassManager::runOnFunction(llvm::Function&) + 551
>> 7 opt 0x00000000008825db
>> llvm::FPPassManager::runOnModule(llvm::Module&) + 75
>> 8 opt 0x0000000000882197
>> llvm::MPPassManager::runOnModule(llvm::Module&) + 503
>> 9 opt 0x0000000000882299
>> llvm::PassManagerImpl::run(llvm::Module&) + 137
>> 10 opt 0x00000000004ac451 main...
2011 May 23
2
[LLVMdev] Debug llc crash using bugpoint
...000f2b9c6 llvm::DwarfDebug::endModule() + 1954
9 llc 0x0000000000f1502a
llvm::AsmPrinter::doFinalization(llvm::Module&) + 790
10 llc 0x00000000012e595b
llvm::FPPassManager::doFinalization(llvm::Module&) + 67
11 llc 0x00000000012e9f82
llvm::FPPassManager::runOnModule(llvm::Module&) + 120
12 llc 0x00000000012e9a47
llvm::MPPassManager::runOnModule(llvm::Module&) + 381
13 llc 0x00000000012eae89
llvm::PassManagerImpl::run(llvm::Module&) + 111
14 llc 0x00000000012eaeeb llvm::PassManager::run(llvm::Module&)
+ 33
15...
2009 Jul 13
2
[LLVMdev] Aliasing on bitcode.
...we do static lockset analysis. I need to get Aliasing information statically given the .bc file of the application. Is there any library in LLVM which already implements the aliasing? (does it support multi-threaded apps?) What is the best way of doing it (I want to extract aliasing information in runOnModule() function in the pass I am working on)?
Thanks a lot,
::Saman Zonouz
UIUC PhD CS student
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090713/93137a01/attachment.html>
2012 Nov 05
0
[LLVMdev] Adding function attributes
...s
> because the AlwaysInline attribute is not in the output LLVM IR.
>
> Maybe the function iterator passed by the module object actually points to
> copies of the functions?
As far as I can see your code should work. Most likely it isn't being run
at all - did you check that your runOnModule method is actually being called?
Ciao, Duncan.
>
> Any help is much appreciated
>
>
> Code
> ====
> virtual bool runOnModule(Module& m)
> {
> Module* module = &m;
>
> for (Module::iterator functionIter = module->begin(); functionIter !=
>...
2012 Feb 08
2
[LLVMdev] Crash/Assert on -loop-reduce
...0x0000000000689184
> > llvm::LPPassManager::runOnFunction(llvm::Function&) + 836
> > 11 opt 0x0000000000801f9f
> > llvm::FPPassManager::runOnFunction(llvm::Function&) + 351
> > 12 opt 0x000000000080221b
> > llvm::FPPassManager::runOnModule(llvm::Module&) + 59
> > 13 opt 0x000000000080236a
> > llvm::MPPassManager::runOnModule(llvm::Module&) + 282
> > 14 opt 0x0000000000802941
> > llvm::PassManagerImpl::run(llvm::Module&) + 337
> > 15 opt 0x0000000000802e4a...