Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Critical sections cleanup"
2014 Jun 02
2
[LLVMdev] PassRegistry thread safety and ManagedStatic interaction
The mutex could be made an actual global static instead of a ManagedStatic.
This guarantees it would be constructed before main, and live until the
end of main. So even in PassRegistry's destructor, which would get call
during llvm_shutdown(), it would always have the same mutex. Ideally I'd
like to just delete the mutex, as it doesn't seem like anyone is using it
in a
2014 Jun 02
2
[LLVMdev] PassRegistry thread safety and ManagedStatic interaction
I actually had an idea about how to fix this in a relatively painless
manner. Although given my experience over the past 4 days, it might not be
best to call it painless without first trying :)
The idea is to make a StaticPassRegistry. RegisterPass<> only touches the
StaticPassRegistry, and nothing else touches the StaticPassRegistry. So
once you enter main(), StaticPassRegistry can be
2014 Jun 01
3
[LLVMdev] PassRegistry thread safety and ManagedStatic interaction
+cc original authors of these changes.
Is PassRegistry intended to be thread-safe? The header file explicitly
says that PassRegistry is not thread-safe, but there are mutexes and
locking used in the code. This is actually creating a problem, because of
a subtle bug involving static initialization order and shutdown.
In particular, the RegisterPass<> static template will get invoked
2012 Jan 13
2
[LLVMdev] Memory leaks in LLVM on linux
I am trying to figure out how to free up some memory that seems to be lost when running valgrind under our internal application. The stack traces I get are:
==19966== 4 bytes in 1 blocks are still reachable in loss record 1 of 12
==19966== at 0x402569A: operator new(unsigned int) (vg_replace_malloc.c:255)
==19966== by 0x5D9BBE8: void* llvm::object_creator<llvm::PassRegistry>()
2015 Feb 24
2
[LLVMdev] Removing contention in PassRegistry accesses to speed up compiles
Hi,
We use LLVM libraries to compile C++ code and noticed slow downs when
multiple threads of a process were compiling at once. *perf *indicated that
most of the CPU time was spent in a spin lock, which was being
locked/unlocked from llvm::PassRegistry::getPassInfo().
We read the relevant LLVM code and found out that PassRegistry is a
ManagedStatic and is shared among all threads in case of a
2008 Oct 30
2
[LLVMdev] Error in registration of Pass
Hi ,
I get the following error when I try and load a certain pass I have made.
Can anyone help me out? What could be the problem? And how can I remove it?
opt: Pass.cpp:147:
void<unnamed>::PassRegistrar::RegisterPass(llvm::PassInfo&): Assertion
`Inserted && "Pass registered multiple times!"' failed.
Aborted (core dumped)
Thanks
Nipun
--------------
2015 Feb 26
0
[LLVMdev] Removing contention in PassRegistry accesses to speed up compiles
We have root caused the segfault - it was due to a caching layer we have in
our code, which is to avoid duplicate compilations. Basically,
llvm::JIT::getPointerToFunction() looks up PassRegistry, but as our change
introduces a separate PassRegistry for each thread, this means that the
thread that calls llvm::JIT::getPointerToFunction() should have appropriate
PassRegistry setup. In our setup, some
2009 Jun 19
2
[LLVMdev] Problems creating a pass
Hello,
Following the tutorial for writing a pass, I found the next problem.
*****************************
:~/llvm/test$ opt -load ../llvm/Debug/lib/mypass.so -mypass < hello.bc >
/dev/null
opt: Pass.cpp:151: void<unnamed>::PassRegistrar::RegisterPass(const
llvm::PassInfo&): Assertion `Inserted && "Pass registered multiple times!"'
failed.
Aborted
2007 Jul 25
2
[LLVMdev] Writing a pass for the opt tool: likely documentation bug
Hi,
I'm currently attempting to implement a pass that will hopefully run
under the opt tool. Currently, I'm having some difficulties -- the
sample code for the Hello pass (see
http://llvm.org/docs/WritingAnLLVMPass.html) doesn't work. The first
error is that the section starting 'As a while, the cpp file looks
like:' omits the declaration for char Hello::ID = 0 that is
2009 Dec 15
2
[LLVMdev] Running a pass
Hello LLVM,
I am following the document "Writing an LLVM Pass". When I ran "opt -load
../../../Debug/lib/MyPass.so -mypass < hello.bc > /dev/null" I got the next
error:
***@ubuntu:~/test$ opt -load ../../llvm/Debug/lib/MyPass.so -mypass <
hello.bc > /dev/null
opt: Pass.cpp:159: void<unnamed>::PassRegistrar::RegisterPass(const
llvm::PassInfo&): Assertion
2008 Oct 14
1
[LLVMdev] Help needed with Hello World Pass
I have just started using llvn and I am running in the following error when
trying to run Hello World Pass in the llvm documentation.
opt: /usr/local/llvm/src/lib/VMCore/Pass.cpp:158: void
<unnamed>::PassRegistrar::RegisterPass(llvm::PassInfo&): Assertion `Inserted
&& "Pass
registered multiple times!"' failed.
The problem gets resolved if the Hello.so library is
2013 Mar 28
0
[LLVMdev] Avoid Valgrind's still-reachable leak warnings
Hi, I'm Ryo Onodera.
This is my first post to this mailing list. Fist, thanks for creating
a great library!
We're using LLVM to support JIT in Rubinius (an alternative
implementation of Ruby, a dynamic programming language).
I'm submitting a small patch for a minor issue.
It solves still-reachable leak warnings from Valgrind. Example
warnings are shown at the end of this mail.
As
2009 Jun 19
0
[LLVMdev] Problems creating a pass
Did you try changing the name from Hello to MyHello or something like
that? I seem to remember having a similar problem. My tutorial code
names the struct MyHello and then registers it as follows:
RegisterPass<MyHello> X("myhello", "My Hello World Pass");
You will likely need to change the Makefile as well.
Scott
On Fri, Jun 19, 2009 at 11:15 AM, Juan Carlos Martinez
2008 Mar 31
2
[LLVMdev] Pass registered multiple times!
Hi,
I'm writing my first hello world Pass with the class name First, but
when I tried to load it using opt, I got the following error:
/var/soft/llvm-2.2-build/lib/Transforms/Hello$ opt
-load ../../../Debug/lib/First.so --help
opt: /var/soft/llvm-2.2/lib/VMCore/Pass.cpp:157:
void<unnamed>::PassRegistrar::RegisterPass(llvm::PassInfo&): Assertion
`Inserted && "Pass
2008 Sep 22
2
[LLVMdev] Problems with written function pass
Hello,
my name is Marc. I wrote a llvm function pass by using the "hello
world" tutorial. But this selfwritten pass (GA_VHDL_Pass) dependes
on another function pass (GenomePass). GenomePass also dependes on
two other function passes. The Pass GenomePass generates an object,
which is used in my GA-VHDL_Pass.
When I compile my Make file I always get this error message:
2007 Jul 25
0
[LLVMdev] Writing a pass for the opt tool: likely documentation bug
Sarah,
We have Hello pass in svn at
lib/Transforms/Hello
This is a working example. I will update documentation to include
"char Hello::ID = 0".
On Jul 25, 2007, at 1:51 PM, Sarah Thompson wrote:
> Hi,
>
> I'm currently attempting to implement a pass that will hopefully run
> under the opt tool. Currently, I'm having some difficulties -- the
> sample code
2009 Dec 15
0
[LLVMdev] Running a pass
Juan Carlos Martinez Santos wrote:
> Hello LLVM,
>
> I am following the document "Writing an LLVM Pass". When I ran "opt
> -load ../../../Debug/lib/MyPass.so -mypass < hello.bc > /dev/null" I
> got the next error:
>
> ***@ubuntu:~/test$ opt -load ../../llvm/Debug/lib/MyPass.so -mypass <
> hello.bc > /dev/null
> opt: Pass.cpp:159:
2010 Jun 02
3
[LLVMdev] can't run the Hello Pass: either not registered or registered multiple times, what is the problem?
I am trying to run the HELLO LLVM Pass under WinXP/MinGW, by following
the precise steps available at
http://www.llvm.org/docs/WritingAnLLVMPass.html.
The pass failed to run, giving me the following error:
opt -load Release/lib/Hello.dll -hello < ./hello.bc > /dev/null
opt.exe: Unknown command line argument '-hello'. Try:
'C:\MSYS\opt\llvm-2.7\bin\opt.exe -help'
make:
2009 Jul 19
0
[LLVMdev] LLVM Hello Pass load error when using opt -load Hello.so
Hey Chuck,
I'm afraid I can't reproduce your error but...a problem you may run
into later is that opt will complain with
opt: llvm/lib/VMCore/Pass.cpp:149:
void<unnamed>::PassRegistrar::RegisterPass(const llvm::PassInfo&):
Assertion `Inserted && "Pass registered multiple times!"' failed.
Aborted
I "fixed" this by replacing the LLVMLIBS line in
2011 Nov 08
2
[LLVMdev] loadable passes with dependencies?
Sorry to keep dragging this out on you. Im now getting: Assertion
failed: (ResultPass && "getAnalysis*() called on an analysis that was
not " "'required' by pass!"), function getAnalysisID
But I already have:
void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<DominatorTree>();
}
And changed the bottom of my pass too:
char Hello::ID =