Displaying 20 results from an estimated 5000 matches similar to: "[LLVMdev] Regarding llvm"
2012 Sep 17
0
[LLVMdev] Profile Info with Machine Function Pass Fails
Hi,
I am trying to run a profiling pass for each Machine Basic Block so that I
can get execution count for them, but I am getting assertion error when I
run it through clang. I have used MachineProfileInfo and Profile estimator
as dependent passes over my pass. I am sending you the code for my pass.
the error says:
void llvm::PMTopLevelManager::schedulePass(llvm::Pass*): Assertion `PI &&
2012 Sep 26
0
[LLVMdev] Error while loading profile information
Hi all,
I am trying to load a profile information (llvmprof.out) which has been
separately created, to get the execution count of each basic block and use
it to estimate the execution count of machine basic blocks for getting how
many times any instruction gets executed, for ARM specifically. The error
on running the code comes as:
clang: PassManager.cpp:601: void
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
2013 Jun 21
2
[LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
Hello,
I want to write a modulePass in addPreEmitPass() for NVPTX, but I encounter
an assertion failed when executing clang.
Here is my error message.
====
Pass 'NVPTX Assembly Printer' is not initialized.
Verify if there is a pass dependency cycle.
Required Passes:
llc: /home/pyyu/local/llvm/lib/IR/PassManager.cpp:637: void
llvm::PMTopLevelManager::schedulePass(llvm::Pass*): Assertion
2016 Mar 24
0
Help with pass manager
The problems happens because PMTopLevelManager::findAnalysisPassInfo(AnalysisID AID) returns nullptr in PMTopLevelManager::addImmutablePass(ImmutablePass *P).
This because PassRegistry::getPassRegistry()->getPassInfo(AID) call in it returns nullptr as well.
Should I probably register the pass I want to add with PassRegistry::registerPass(const PassInfo &PI, bool ShouldFree) ?
I didn’t do it
2016 Mar 30
1
Help with pass manager
Passes all need to be initialized before they are added into a pass manager.
Are you calling TargetLibraryInfoWrapperPass::initializePass anywhere?
-Chris
> On Mar 24, 2016, at 10:41 AM, Lorenzo Laneve via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> The problems happens because PMTopLevelManager::findAnalysisPassInfo(AnalysisID AID) returns nullptr in
2012 Oct 31
1
[LLVMdev] Lifetime analysis of variables within a module
Hi all,
I'm looking for a LLVM method/class/strategy to know the lifetime of
every variable/value used in a given Module.
I want to know the variables that must be alive at the input and at the
end of every function call (and every BasicBlock).
By creating a pass inheriting from ModulePass I can reach up to here:
virtual bool runOnFunction(Function &F) {
...
for
2013 Feb 22
0
[LLVMdev] An error:Pass 'Runtime Evaluation' is not initialized
Hi,all:
I am a new at writing LLVM PASS, i write a pass like this :
using namespace llvm;
namespace {
class RuntimeEval : public ModulePass {
public:
static char ID; // Pass identification, replacement for typeid
RuntimeEval() : ModulePass(ID) {
}
virtual bool runOnModule(Module &M) {
return false;
}
};
}
char HSASupportedRuntimeEval::ID = 0;
2013 Jun 21
0
[LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
Are you sure you are initializing your pass properly? Can you show a
stripped down version of your pass?
On Fri, Jun 21, 2013 at 7:27 AM, Anthony Yu <swpenim at gmail.com> wrote:
> Hello,
>
> I want to write a modulePass in addPreEmitPass() for NVPTX, but I
> encounter an assertion failed when executing clang.
>
> Here is my error message.
> ====
> Pass 'NVPTX
2011 May 04
0
[LLVMdev] 2.9 segfault when requesting for both LoopInfo and DominatorTree analyses.
Hi Michael, hi Duncan,
yesterday I stumbled over something that might be related.
At least I could also just be doing some initialization wrong or
something in this direction...
In my case, I hit a segfault in PassInfo::isAnalysisGroup() after
PassManager.add(myModulePass) is called.
My setup seems fairly simple, the attached code should reproduce the error.
Compile with
g++ test.cpp
2016 Mar 04
4
Regarding Usage of opt
Hi,
I am new to llvm, and recently am playing with opt. I want to use opt to
apply one optimization pass to a .bc file. However, I encounter some
problems which I failed to find the answers on the internet. Any
suggestions are highly appreciated.
Question 1:
For example, I issued the following command
$: opt-trunk -si-lower-control-flow t.c_00.bc -o t.c_01.bc
Then I got the following
2011 May 04
1
[LLVMdev] 2.9 segfault when requesting for both LoopInfo and DominatorTree analyses.
Your constructor is not calling initializeTestMPPass(), and you're
using RegisterPass which I think was deprecated in favor of
INITIALIZE_PASS. You can look at, for example,
lib/Transforms/Scalar/IndVarSimplify.cpp for examples of how to
initialize, e.g. having "INITIALIZE_PASS_DEPENDENCY(LoopInfo)"
sandwiched between BEGIN and END. Note that you'll want a forward
declaration of
2012 Mar 21
0
[LLVMdev] llvm seg fault when specifying addRequiredTransitive in module pass
Hi all,
I am using llvm to perform some static analysis with a module pass. In
getAnalysisUsage(), I specified some required passes by:
addRequiredTransitive<LoopInfo>();
When I run my pass using opt, it crashes with segmentation fault with
callstack:
#0 0x0877aebd in llvm::PMTopLevelManager::findAnalysisUsage
(this=0x8c10934, P=0xb15b988) at PassManager.cpp:573
#1 0x0877aa9b in
2011 Dec 06
0
[LLVMdev] Assertion `PI && "Expected required passes to be initialized"' failed for AliasAnalysis.
Hi Alexander,
I had the same error:
sincos: /home/marcusmae/rpmbuild/BUILD/llvm/lib/VMCore/PassManager.cpp:635:
void llvm::PMTopLevelManager::schedulePass(llvm::Pass*): Assertion `PI
&& "Expected required passes to be initialized"' failed.
The solution was to add:
PassRegistry &Registry = *PassRegistry::getPassRegistry();
initializeCore(Registry);
2011 May 17
0
[LLVMdev] 2.9 segfault when requesting for both LoopInfo and DominatorTree analyses.
Hi,
I am running into the same issue with a module pass, that calls
LoopInfo.(does not call DominatorTree)
I am using RegisterPass, since it is a dynamically loaded module(as per
lib/Transforms/Hello)
It does seem possible from the discussion, to use LoopInfo inside a
ModulePass.
I am wondering what the fix to this problem was.
Also, the code works in 2.7.(I did not try 2.8)
Thanks,
Arushi
2011 May 04
0
[LLVMdev] 2.9 segfault when requesting for both LoopInfo and DominatorTree analyses.
Hi Michael,
> When migrating my project to 2.9, I've encountered a strange segfault
> where if a ModulePass's getAnalysisUsage adds LoopInfo and
> DominatorTree, then llvm::PMTopLevelManager::findAnalysisUsage will
> segfault.
I suggest you build LLVM with assertions enabled - then you should get a
helpful error message rather than a segfault. I think you are not allowed
to
2016 Mar 24
0
Help with pass manager
> On Mar 23, 2016, at 5:41 PM, Lorenzo Laneve <lore97drk at icloud.com> wrote:
>
> The stack trace:
> llvm::PMTopLevelManager::addImmutablePass(llvm::ImmutablePass*)
> llvm::PMTopLevelManager::schedulePass(llvm::Pass*)
> moduleToObjectFile(llvm::Module*,std::string&,llvm::LLVMContext&)
Without mapping to line numbers this is not very helpful: moduleToObjectFile
2011 May 03
4
[LLVMdev] 2.9 segfault when requesting for both LoopInfo and DominatorTree analyses.
When migrating my project to 2.9, I've encountered a strange segfault
where if a ModulePass's getAnalysisUsage adds LoopInfo and
DominatorTree, then llvm::PMTopLevelManager::findAnalysisUsage will
segfault. What's odd is that if I rearrange this (add required for
DominatorTree before LoopInfo), it does not segfault. I realize that
LoopInfo requires and preserves DominatorTree, but this
2016 Mar 24
0
Help with pass manager
This code path is not likely to crash usually. Did you build LLVM yourself? Which version are you using and can you reduce the test case to be "minimal" so that someone can reproduce?
(for instance you don't need a module to create a pass manager)
--
Mehdi
> On Mar 23, 2016, at 5:50 PM, Lorenzo Laneve <lore97drk at icloud.com> wrote:
>
> Sorry, that's a pure
2013 Dec 02
2
[LLVMdev] Segmentation fault when traverse call graph
Dear everyone,
I want to traverse call graph, but I have some trouble .
In my pass MyPass which need to traverse call graph, I firstly added the
CallGraph analysis to the pass requirements by
*AU.addRequired<CallGraph>();*
My pass MyPass then will be added to a pass manager by
*manager.add(new MyPass());*
and then I want to traverse the call graph such as:
CallGraph CG =