Displaying 20 results from an estimated 10000 matches similar to: "Replication -O3 optimizations manually"
2018 Aug 17
4
Replication -O3 optimizations manually
Hi, Stefano
I also have the problem as described by Emanuele. You say that clang schedules target-independent and target-dependent passes.
However, when I use lli to execute bitcode generated by opt with -O3 or with the same optimization passes as -O3, the performance are still different.
So, are there some special operations by -O3 option? I read the source code of opt, but I cannot find the
2018 Aug 17
2
Replication -O3 optimizations manually
Hi Zide,
I think I found the right way to reach my goal.
I used the following command:
clang -O3 -Xclang -disable-llvm-optzns main.c -S -emit-llvm -o main.ll
to generate an IR file enriched by all the metadata that otherwise wouldn't be generated with -O0. Moreover, -disable-llvm-optzns flag ensures that none of the optimization passes has been applied yet to the IR.
In this way, I can
2019 May 09
2
Is it possible to reproduce the result of opt -O3 manually?
Dear developers,
I am trying to reproduce the results of applying opt -O3 to a source file
in the form of LLVM IR. I want to get the same IR by manually ordering the
passes used by O3 and passing them to opt.
To illustrate what I am doing on an example, as an input I use linpack
benchmark from the LLVM test suite[1]:
1. First I produce the intermediate representation using clang:
clang -O3
2019 May 13
2
Is it possible to reproduce the result of opt -O3 manually?
I think this has to do with how the pass manager is populated when we give
-O3 vs when we give particular pass names.
Some passes have multiple createXYZPass() methods that accept arguments
too. These methods call non-default pass constructors, which in turn cause
the passes to behave in a different manner.
eg:
Pass *llvm::createLICMPass() { return new LegacyLICMPass(); }
Pass
2017 Feb 17
3
LLVM social in Italy anyone interested?
Hi all,
is there any Italian developer that can be interested in a LLVM social event/meetup in Italy?
Best,
---
Marco Bambini
http://creolabs.com
http://twitter.com/sqlabs
2019 Oct 13
2
Replicate Individual O3 optimizations
Hello,
I want to study the individual O3 optimizations. For this I am using
following commands, but unable to replicate O3 behavior.
1. Documents/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang -O1
-Xclang -disable-llvm-passes -emit-llvm -S vecsum.c -o vecsum-noopt.ll
2. Documents/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang -O3
-mllvm -debug-pass=Arguments -emit-llvm -S
2019 Oct 19
3
Replicate Individual O3 optimizations
On Thu, Oct 17, 2019 at 11:22 AM David Greene via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> hameeza ahmed via llvm-dev <llvm-dev at lists.llvm.org> writes:
>
> > Hello,
> > I want to study the individual O3 optimizations. For this I am using
> > following commands, but unable to replicate O3 behavior.
> >
> > 1.
2012 Jun 12
2
[LLVMdev] How to use LLVM optimizations with clang
Thanks again.
I executed the following command line
llc -O3 comb.ll.bc -debug-pass=Arguments
and got
Pass Arguments: -targetdata -targetpassconfig -no-aa -tbaa
-targetlibinfo -basicaa -collector-metadata -machinemoduleinfo
-machine-branch-prob -preverify -domtree -verify -loops -loop-simplify
-scalar-evolution -loop-simplify -iv-users -loop-reduce -gc-lowering
-unreachableblockelim
2019 Oct 24
2
Replicate Individual O3 optimizations
I run matrix multiplication code with both the approaches o3 at clang and
o3 at opt. clang o3 is about 2.97x faster than opt o3.
On Mon, Oct 21, 2019 at 8:24 AM Neil Nelson <nnelson at infowest.com> wrote:
> is_sorted.cpp
> bool is_sorted(int *a, int n) {
>
> for (int i = 0; i < n - 1; i++)
>
> if (a[i] > a[i + 1])
> return false;
> return
2012 Jun 12
0
[LLVMdev] How to use LLVM optimizations with clang
Hi,
> I executed the following command line
>
> llc -O3 comb.ll.bc -debug-pass=Arguments
>
> and got
>
> Pass Arguments: -targetdata -targetpassconfig -no-aa -tbaa
> -targetlibinfo -basicaa -collector-metadata -machinemoduleinfo
> -machine-branch-prob -preverify -domtree -verify -loops -loop-simplify
> -scalar-evolution -loop-simplify -iv-users -loop-reduce
2012 Dec 24
1
How to ensure -O3 on Win64
Hi,
Similar questions have come up before on the list and elsewhere but I
haven't found a solution yet.
winbuilder's install.out shows data.table's .c files compiled with -O3
on Win32 but -O2 on Win64. The same happens on R-Forge. I gather that
some packages don't work with -O3 so the default is -O2.
I've tried this in data.table's Makevars (entire contents) :
====
2020 Jul 02
2
flags to reproduce clang -O3 with opt -O3
Hello,
I've been trying to figure out how to reproduce the results of a single
clang -O3 compilation to a binary with a multi-step process using opt.
Specifically I have:
clang -O3 foo.c -o foo.exe
which I want to replicate with:
clang -O0 -c -emit-llvm foo.c
opt -O3 foo.bc -o foo_o.bc
clang foo_o.bc -o foo.exe
Any hints / suggestions on what additional flags I need to produce the same
2014 Dec 03
3
[LLVMdev] Reproducing clang -O3 with opt
This is probably a trivial question but the way I used to do this turns out to be flawed.
I used run clang with -O0 -emit-llvm and then use the resulting IR with opt -O3. The problem is that clang at -O0 does not generate TBAA metadata so the passes run by opt behave differently.
What’s the recommended way of doing this?
Thanks,
Adam
2020 Jul 03
2
flags to reproduce clang -O3 with opt -O3
Awesome, thanks!
I'd like to have the last step (llc in your example) not perform
additional optimization passes, such as O3, and simply use the O3 pass from
opt in the previous line.
Do you happen to know if I should use 'llc -O0 foo_o.bc -o foo.exe' instead
to achieve this?
On Thu, Jul 2, 2020 at 6:35 PM Mehdi AMINI <joker.eph at gmail.com> wrote:
>
>
> On Thu,
2020 Aug 05
2
llc -O2 vs. llc -O3 --> same debug-pass=Executions but output.obj differs?
Hello,
I'm trying to minimize the processing time for llc -O3 by using a three
step compilation process of
1. llc input.bc -stopafter=targetlibinfo -o input.mir
2. llc -run-pass={....min passes...} input.mir -o opt.mir
3. llc -startafter=machine-opt-remark-emitter -filetype=obj opt.mir -o
final.obj
Examining the passes produced by llc for O1,O2,O3 I compared (with XXX =
{1,2,3}):
llc
2012 Jun 12
2
[LLVMdev] How to use LLVM optimizations with clang
Thanks alot. How can we view those optimization which are enabled when we do
llc -O3 comb.ll
Are these the same as the ones produced by the following command line
llvm-as < /dev/null | opt -O3 -disable-output -debug-pass=Arguments
Regards
Shahzad
On Tue, Jun 12, 2012 at 1:01 PM, Duncan Sands <baldrick at free.fr> wrote:
>> Yes. But how exactly code generation (optimized one)
2012 Jun 12
0
[LLVMdev] How to use LLVM optimizations with clang
Hi,
On 12/06/12 13:09, Abdul Wahid Memon wrote:
> Thanks alot. How can we view those optimization which are enabled when we do
>
> llc -O3 comb.ll
llc -O3 comb.ll -debug-pass=Arguments
>
> Are these the same as the ones produced by the following command line
no, as I mentioned before they are of a completely different nature
to the optimizations that opt does.
Ciao, Duncan.
2013 Apr 11
4
[LLVMdev] Decouple LoopVectorizer from O3
Hello,
I am trying out the LoopVectorizer(LV) pass and would like to decouple it
from O3 which is currently required to run LV. I want to do this because I
want to understand the behaviour of LV by trying simple loops but the O3
mostly optimises away the loop body.
Any ideas would be appreciated.
Best,
Anadi.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2011 Mar 31
1
gcc -O3 -march=barcelona breaks Wine
I've been playing with compilation options to try and improve response times, I haven't compiled the results, which in hindsight I now realise I should have! (Never mind!)
However, I have got the following results building with GCC 4.5.1:
gcc -O3
Works fine
gcc -march=barcelona
Works fine
gcc -O2 -march=barcelona -fgcse-after-reload -finline-functions -fipa_cp_clone
2010 Sep 03
6
[LLVMdev] Why clang inlines with -O3 flag and opt doesn't?
When I compile my C fibonacci example fib.c with 'clang -O3 -c -emit-llvm -o fib-clang.bc fib.c&& llvm-dis fib-clang.bc' I get fib-clang.ll that has some degree of inlining in it.
But when I get an equivalent to fib.c file fib.ll and run it through opt with the command 'llvm-as fib.ll&& opt -O3 fib.bc -o fib-opt.bc&& llvm-dis fib-opt.bc' resulting