Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] statically linked passes"
2018 Jan 29
2
Polly Dependency Analysis in MyPass
i put following line in CMakeLists.txt;
add_subdirectory(mypass)
then used make -j9
then i used following and run on canonicalize IR
$ opt -load lib/LLVMmypass.so -mypass vec-sum.preopt.ll
On Mon, Jan 29, 2018 at 9:39 PM, Michael Kruse <llvmdev at meinersbur.de>
wrote:
> 2018-01-29 10:18 GMT-06:00 hameeza ahmed <hahmed2305 at gmail.com>:
> > I tried writing
2018 Jun 25
2
How to include a opt pass in clang driver
Hello,
I have written a pass for the IR and I can run it with opt -load
lib/LLVMMyPass.so -mypass -myarguments -S -o output.ll < output.bc
I have registered my pass with the following code:
static RegisterPass<MyPass>
X("mypass", "MyPass Pass (with getAnalysisUsage implemented)");
How do I include the same pass in the clang driver. I tried running the
pass:
clang
2018 Jun 25
2
How to include a opt pass in clang driver
Hi Eli,
I have tried that:
static void registerMyPass(const PassManagerBuilder &,
llvm::legacy::PassManagerBase &PM) {
PM.add(new MyPass());
}
static RegisterStandardPasses
RegisterMyPass(PassManagerBuilder::EP_OptimizerLast,
registerMyPass);
It still couldn't find my pass.
Regards,
Soham Sinha
PhD Student,
2010 Oct 15
5
[LLVMdev] How do I find all memory allocations in an llvm ir code file?
I tried to compile this snippet of C++ code:
void FuncTest() {
int* a = new int;
int* b = new int[2];
}
using:
clang test.cpp -S -emit-llvm -o - > test.llvm
and obtained this:
define void @_Z8FuncTestv() {
entry:
%a = alloca i32*, align 4
%b = alloca i32*, align 4
%call = call noalias i8* @_Znwj(i32 4)
%0 = bitcast i8* %call to i32*
store i32* %0, i32** %a, align 4
2011 May 30
1
[LLVMdev] opt refuses to load a pass
Hi,
I'm having problems while using a custom pass with opt. The pass
compiles and links just fine but, when I try to use it with opt:
opt -load LLVMmyPass.so -my-flag -f aes.bc -o aes_bb.bc
opt refuses to load it with the following error:
Error opening 'LLVMmyPass.so': LLVMmyPass.so: undefined symbol:
_ZN4llvm9DebugFlagE
-load request ignored.
and then complains that the flag
2010 Mar 08
2
[LLVMdev] Machine Function pass
I am trying to write a MachineFunction pass and build it as a loadable module.
I want the pass to run after prolog/epilog emmiter. So far, I have been using
MachineFunctionPass, but by inserting it to lib/Codegen and hacking the
LLVMTargetMachine file, and Pass.h files.
I have created a directory "lib/Transforms/MyPass", and inside I have
the code of the pass (which is just a
2019 Aug 31
3
Usage of the jumptable attribute
Hello everyone,
I'm new to LLVM (which is a really great project by the way) and I hope
this is the right place for my question.
In the LLVM Language Reference Manual I found the "jumptable" function
attribute, which seems to be exactly what I need for my project (where I
want to add one level of indirection to every function call), but I have
trouble figuring out, how to use
2004 Oct 23
1
[LLVMdev] UPDATE: Makefile.rules Changes (IMPORTANT)
If you're on the new Makefile system, you will want to update your
Makefile.rules. The patch below provides some important fixes for
parallel builds and dependencies. It also adds some new features like
the -local targets. For example, you can now build "all-local" to build
the local directory without recursing into subdirectories.
See the comments below for details of the change.
2010 Oct 15
0
[LLVMdev] How do I find all memory allocations in an llvm ir code file?
As others have mentioned, C++ mangles names (i.e., it changes the name
of a symbol into a string that contains both the name, scope, and type
of the variable or function), so if you know what the mangled name is of
your allocator, you can recognize it.
Additionally, I believe that functions with return values marked with
the noalias attribute are, essentially, memory allocators because the
2013 Feb 27
1
[LLVMdev] Compilation problem when addind a library
Hi !
Here is the situation. I created a pass in lib/Transforms/Obfuscation. I added a createFlattening() in IPO.h and in my code
to be able to use it in PassManagerBuilder.cpp (lib/Transforms/IPO) in the method PopulateModulePassManager() so I can add my pass to standard passes.
It all works if I add all my files in the lib/Transforms/IPO directory.
But I want to keep them away in the
2011 Sep 23
3
[LLVMdev] statically link pass to clang
Hi all,
A question about statically linking a pass to clang instead of dynamically
loading it at runtime. I am stumped on this bug for a while. I inserted a
pass under lib/Transforms/mypass directory, registered it with
INITIALIZE_PASS and defined createMyPass in the pass. Also I added file
mypass.h in include/llvm/Transforms/ to expose the accessor functions that
expose my passes. Entries are
2007 Mar 23
1
[LLVMdev] strange pass behaviour
Hi
I have written a pass which creates some scheduling information. Its called MParSchedule.
This pass works with opt. But when feeding it my experimental backend it seems to loose
instructions and fails to work. I am loading this stuff as .so libraries under linux and i am
using the amd64 version with a self compiled llvm-gcc.
With this call it works:
opt
2006 Sep 02
2
[LLVMdev] Adding register allocator to LLVM
On 9/2/06, Chris Lattner <sabre at nondot.org> wrote:
>
> Make sure to add it to Codegen/LinkAllCodegenComponents.h.
I'm sure I did. I did so from the first time and I also needed to add my
library .a file to the USEDLIBS variable within llc makefile to build llc.
I wonder how lli links with all the rest LLVM as it seems to include no lib
within its makefile. May be I need to
2006 Sep 02
0
[LLVMdev] Adding register allocator to LLVM
On Sat, 2 Sep 2006, Anton Vayvod wrote:
> I'm sure I did. I did so from the first time and I also needed to add my
> library .a file to the USEDLIBS variable within llc makefile to build llc.
> I wonder how lli links with all the rest LLVM as it seems to include no lib
> within its makefile. May be I need to include/link my lib somewhere else?
Ah, that's probably it. Try
2005 May 19
3
[LLVMdev] [Cygwin] llvm 'make install' build errors
Reid,
I think it is the first time it is run that the errors occcur !?
Not sure but that would seem logical.
Aaron
2011 Sep 26
0
[LLVMdev] statically link pass to clang
2011/9/27 Zeng Bin <ezengbin at gmail.com>:
>
>
> On Sun, Sep 25, 2011 at 8:45 PM, NAKAMURA Takumi <geek4civic at gmail.com>
> wrote:
>>
>> 2011/9/24 Zeng Bin <ezengbin at gmail.com>:
>> > A question about statically linking a pass to clang instead of
>> > dynamically
>> > loading it at runtime. I am stumped on this bug for a
2011 Dec 13
1
[LLVMdev] [PATCH] utils/unittest: Consistency of gtest and gtest_main libs.
$(llvm-config --libs | tr " " "\n" | grep gtest) returns:
-lgtest_main
-lgtest
instead of non-valid:
-lLLVMgtest_main
-lLLVMgtest
It also fixes:
$(ld): cannot find -lLLVMgtest
$(ld): cannot find -lLLVMgtest_main
---
unittests/Makefile.unittest | 2 +-
utils/llvm-build/llvmbuild/componentinfo.py | 4 ++--
utils/llvm-build/llvmbuild/main.py |
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
2013 Jun 11
2
[LLVMdev] how to opt -load on cygwin
Hello everyone,
I'm trying to load and run a pass on Cygwin target:
opt -load=mypass.dll -mypass
There is an LLVM example - Hello, however lib/Transforms/Makefile says
# No support for plugins on windows targets
and then excludes Hello from build
ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW Minix))
PARALLEL_DIRS := $(filter-out Hello, $(PARALLEL_DIRS))
endif
On the other hand, I
2013 Jul 22
0
[LLVMdev] How to additionally compile the source files in subdirectories when using Makefile?
Hi guys,
I am writing a LLVM pass plugin, and just simply add a directory mypass into llvm/lib/Transforms. But since I don't hope this directory to contain too many source files, I add some subdirectories.
For instance, there are 2 files inside *mypass/sub: basic.h, basic.cpp. Here is the structure of the directory llvm/lib/Transforms/mypass
$tree mypass
mypass
├── Makefile
├──