search for: hello3

Displaying 11 results from an estimated 11 matches for "hello3".

Did you mean: hello
2009 Dec 18
1
[LLVMdev] Compiling a raw binary with llvm/clang
$ clang -ffunction-sections -fdata-sections -Os -nostartfiles -c -o hello.o hello.c $ clang -ffunction-sections -fdata-sections -Os -nostartfiles -c -o test.o test.c $ llvm-ld -s -o hello2 hello.o $ llc hello2.bc -o hello3 $ ld -o hello_B hello3 --oformat binary ld:hello3: file format not recognized; treating as linker script ld:hello3:1: syntax error I am guessing that is what you meant by the "then use the same procedure you were originally using." right? Sorry for the hasle. Thank you for your help, Ve...
2007 Apr 25
2
[LLVMdev] ModulePass that requires FunctionPass
...rong? Thanks! Basically I changed the HelloWorld sample pass to be a ModulePass and tried to use the LoopInfo pass inside the runOnModule routine. See below for the source code and error messages. BTW, I am playing with the LLVM TOT. //=========Modified HelloWorld Pass===============// struct Hello3 : public ModulePass { virtual bool runOnModule(Module &M) { HelloCounter++; for (Module::iterator i = M.begin(), e = M.end(); i != e; ++i) { LoopInfo &LI = getAnalysis<LoopInfo>(*i); std::string fname = i->getName(); EscapeString(fname);...
2009 Dec 17
0
[LLVMdev] Compiling a raw binary with llvm/clang
On Thu, Dec 17, 2009 at 1:00 PM, LiteHacker <vilmer88 at gmail.com> wrote: > > Indeed ld does link it. The reason I am using llvm-ld, is for its unique > functionality. > I intend to link to object files together (created by cling), and link them > with llvm-ld. > The main feature that I am currently interested in is the ability to have > "inline functions"
2009 Dec 17
3
[LLVMdev] Compiling a raw binary with llvm/clang
Indeed ld does link it. The reason I am using llvm-ld, is for its unique functionality. I intend to link to object files together (created by cling), and link them with llvm-ld. The main feature that I am currently interested in is the ability to have "inline functions" between two object files. This was basically impossible with gcc. Is there any way to make the raw binary with llvm?
2011 May 03
0
[LLVMdev] Loop-Unroll optimization
...effect of loop-unrolling *manish at manish:~/Test2$ llvm-gcc-4.2 -O2 -emit-llvm Hello.c -c -o Hello.bc* *manish at manish:~/Test2$ opt-2.8 -loops Hello.bc -o Hello1.bc* *manish at manish:~/Test2$ opt-2.8 -loopsimplify Hello1.bc -o Hello2.bc* *manish at manish:~/Test2$ opt-2.8 -indvars Hello2.bc -o Hello3.bc* *manish at manish:~/Test2$ opt-2.8 -loop-unroll Hello3.bc -o Hello4.bc* *manish at manish:~/Test2$ llvm-dis-2.8 Hello4.bc* My *Hello.c* looks like: for(i=0; i< 1000; i++) { c[i] = a[i] + b[i]; } printf("%d\n", c[999]); -------------------------------------------...
2011 May 04
1
[LLVMdev] Loop-Unroll optimization
...> *manish at manish:~/Test2$ llvm-gcc-4.2 -O2 -emit-llvm Hello.c -c -o Hello.bc > * > *manish at manish:~/Test2$ opt-2.8 -loops Hello.bc -o Hello1.bc* > *manish at manish:~/Test2$ opt-2.8 -loopsimplify Hello1.bc -o Hello2.bc* > *manish at manish:~/Test2$ opt-2.8 -indvars Hello2.bc -o Hello3.bc* > *manish at manish:~/Test2$ opt-2.8 -loop-unroll Hello3.bc -o Hello4.bc* > *manish at manish:~/Test2$ llvm-dis-2.8 Hello4.bc* > > My *Hello.c* looks like: > for(i=0; i< 1000; i++) > { > c[i] = a[i] + b[i]; > } > > printf("%d\n", c[9...
2011 May 03
3
[LLVMdev] Loop-Unroll optimization
Hi, You might want to try running -loops -loop-simplify before loop unroll. >From loop simplify.cpp This pass performs several transformations to transform natural loops into a00011 // simpler form, which makes subsequent analyses and transformations simpler and00012 // more effective. Arushi On Tue, May 3, 2011 at 2:17 PM, Manish Gupta <mgupta.iitr at gmail.com> wrote: > You
2017 Oct 26
2
LLVM v6.0 Internalize and GlobalDCE PASS can not work together?
Hi Hal, Thanks for your hint! $ /opt/llvm-svn/bin/opt -S -internalize -internalize-public-api-list=main -globaldce hello3.ll -o hello3.dce.ll    it works :) But I argue that `main` Function should be inserted into ExternalNames by default: Index: lib/Transforms/IPO/Internalize.cpp =================================================================== --- lib/Transforms/IPO/Internalize.cpp  (revision 316540) +++ lib/T...
2020 May 04
2
[EXTERNAL] How to get branch coverage by using 'source-based code coverage'
...} else { int b = 6; b = 4; } return 0; } *Coverage build commands* #!/bin/bash g++ -o simple -fno-exceptions -fno-inline -fprofile-arcs -ftest-coverage simple.cc ./simple "foo" ./simple "bar" ./simple "hello1" ./simple "hello2" ./simple "hello3" ./simple "hello4" ./simple "hello5" ./simple "hello6" ./simple "hello7" ./simple "hello8" lcov --rc lcov_branch_coverage=1 --capture --directory . --output-file simple.lcov.info genhtml simple.lcov.info --function-coverage --branch-coverage --...
2020 May 03
2
[EXTERNAL] How to get branch coverage by using 'source-based code coverage'
Hi, Alan Really very excited to receive your email and sorry to be slow replying, it has been exceptionally busy over the last few days ;( Your explanation made the problem clear to me. So gcov branch coverage should be called condition coverage and clang region coverage is branch coverage in fact(also known as *decision/C1*), right? And llvm/clang will support all the following coverage
2017 Oct 25
3
LLVM v6.0 Internalize and GlobalDCE PASS can not work together?
Hi LLVM developers, $ cat hello.c #include <stdio.h> void foo() { } int main(int argc, char *argv[]) {   for (int i = 0; i < 10; i++) {     printf("%d\n", i);   }   return 0; } $ /opt/llvm-svn/bin/clang --version Fedora clang version 6.0.0 (trunk 316308) (based on LLVM 6.0.0svn) Target: x86_64-redhat-linux Thread model: posix InstalledDir: /opt/llvm-svn/bin $