Displaying 7 results from an estimated 7 matches for "llvmmypass".
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 "-my-flag" cannot be found. A quick
look at googl...
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
p...
2010 Oct 21
2
[LLVMdev] statically linked passes
...east I get errors while trying to create one).
So I have it working with CMake on windows but when I try to run the
same code base on mac I get unresolved externals. Here is what I have
done so far in the build system:
Within lib/Transforms/MyPass I have:
Makefile:
LEVEL = ../../..
LIBRARYNAME = LLVMMyPass
BUILD_ARCHIVE = 1
include $(LEVEL)/Makefile.common
CMakeLists.txt
add_llvm_library(LLVMMyPass MyPass.cpp)
And within the Transforms directory I added my directory to the list
of PARALLEL_DIRS within the Makefile there.
In the root llvm directory's CMakeLists.txt I added a call to
add_subdire...
2018 Jun 25
2
How to include a opt pass in clang driver
...omputer Science
Boston University
On Mon, Jun 25, 2018 at 3:58 PM Friedman, Eli <efriedma at codeaurora.org>
wrote:
> On 6/25/2018 1:38 PM, Soham Sinha via llvm-dev wrote:
> > 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 includ...
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 following code. Could you please help me on this? What to
> >...
2019 Aug 31
3
Usage of the jumptable attribute
...And I wrote a program test.c:
#include <stdio.h>
void foo() {
puts("Hello World");
}
int main() {
foo();
}
I compiled it to test.ll and ran it through opt:
clang -O0 -emit-llvm -S -o test.ll test.c
build/bin/opt -load build/lib/LLVMMyPass.so -mypass -S -o
test.out.ll test.ll
The output (test.out.ll) was identical to test.ll except for the 3
occurrences of jumptable and the last 2 occurrences of unnamed_addr:
; ModuleID = 'test.ll'
source_filename = "test.c"
target datalayout = "e-m:e-i64:64-...
2010 Mar 08
2
[LLVMdev] Machine Function pass
...; MF.getFunction()->getName().data() << ":\n";
return false;
}
};
}
char MyPass::ID = 0;
static RegisterPass<MyPass> X("mypass", "MyPass Pass");
-----------------------
And a makefile:
-----------------------
LEVEL = ../../..
LIBRARYNAME = LLVMMyPass
LOADABLE_MODULE = 1
USEDLIBS =
include $(LEVEL)/Makefile.common
-----------------------
I managed to build the pass, but when I use it, i get:
-----------------------
opt -load ~/.../libLLVMMyPass.so
Error opening 'libLLVMMyPass.so': libLLVMMyPass.so: undefined symbol: _ZNK4llvm19Machin...