similar to: Effectiveness of llvm optimisation passes

Displaying 20 results from an estimated 10000 matches similar to: "Effectiveness of llvm optimisation passes"

2017 Sep 22
0
Effectiveness of llvm optimisation passes
Have -O0 on your clang command line causes all functions to get marked with an 'optnone' attribute that prevents opt from being able to optimize them later. You should also add "-Xclang -disable-O0-optnone" to your command line. ~Craig On Thu, Sep 21, 2017 at 10:04 PM, Yi Lin via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Hi all, > > I am trying to
2017 Sep 22
1
Effectiveness of llvm optimisation passes
I noticed that there is a '-run-pass' argument for llc. I am wondering if I can do a similar approach with machine level optimisations/passes for llc. Are those passes optional (so I can turn them off)? And how can I get MIR format as llc expects with '-run-pass'? Thanks a lot. Cheers, Yi On 22/9/17 15:10, Craig Topper wrote: > Have -O0 on your clang command line causes
2019 Nov 13
2
Difference between clang -O1 -Xclang -disable-O0-optnone and clang -O0 -Xclang -disable-O0-optnone in LLVM 9
Hello, I m trying to test individual O3 optimizations/ replicating O3 behavior on IR. I took unoptimized IR (O0), used disable-o0-optnone via (*clang -O0 -Xclang -disable-O0-optnone*). I read somewhere about *clang -O1 -Xclang -disable-O0-optnone,* so I also tested on this initial IR. I have observed by using individual optimizations, the performance (i.e time) is better when the base/initial
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.
2019 Jan 28
2
How to generate .bc file using configure && make on Mac OS X?
This works great. > You can also try using the gllvm wrapper: https://github.com/SRI-CSL/gllvm ; it's quite reliable and easy to use in my experience. Just to be sure. Only one version of bc file will be generated that corresponds to the compiler options provide at configure? The original approach using ld.gold will provide several .bc files that correspond to different stages of the
2019 Jan 28
2
How to generate .bc file using configure && make on Mac OS X?
> > but doesn't emit optnone and nounwind attributes > s/nounwind/noinline On Mon, Jan 28, 2019 at 11:35 AM Jakub (Kuba) Kuderski < kubakuderski at gmail.com> wrote: > As far as I understand, gllvm doesn't run LTO pipeline or any cross-module > optimization, and the optimization level provided is only used to compile > each Translation Unit separately. > If you
2018 Jan 06
2
Relationship between clang, opt and llc
@Craig and @Michael After installing clang-5.0 (download from http://releases.llvm.org, does not have Flang build's slowdown mention above), 1. clang++ -O0 -Xclang -disable-O0-optnone -Xclang -disable-llvm-passes -c -emit-llvm -o a.bc LULESH.cc; opt -O3 a.bc -o b.bc; llc -O3 -filetype=obj b.bc -o b.o ; clang++ b.o -o b.out; ./b.out 20 runtime: 2.354069e+01 2. clang++ -O1 -Xclang
2017 Sep 18
2
Clang/LLVM 5.0 optnone attribute with -O0
Hi, We have a research LLVM-based domain-specific code generator that we want to upgrade form LLVM 4.0 to 5.0. The code generator is written as an out-of-tree loadable module for opt. Till Clang 4.0 we were compiling the front-end code (annotated C++) using -O0. The generated bitcode was further processed using opt with our module loaded. In Clang 5.0 we see that using -O0 adds the optnone
2018 Jan 06
2
Relationship between clang, opt and llc
Thanks a lot, it is clear to me now. BTW, for Clang's slowdown, I submit an issue here: https://github.com/flang-compiler/flang/issues/356 I have no idea about the root cause. Maybe due to debug symbols. But, I already use -DCMAKE_BUILD_TYPE=Release. Anyway, I believe there is a bug somewhere. On Sat, Jan 6, 2018 at 3:43 PM, Craig Topper <craig.topper at gmail.com> wrote: >
2018 Jan 06
3
Relationship between clang, opt and llc
I don't think "clang -help" prints options about optimizations. Clang itself doesn't have direct support for fine grained optimization control. Just the flag for levels -O0/-O1/-O2/-O3. This is intended to be simple and sufficient interface for most users who just want to compile their code. So I don't think there's a way to pass just -dse to clang. opt on the other hand
2018 Jan 06
0
Relationship between clang, opt and llc
What I am trying is to compile a program with different sets of optimization flags. If there is no fine-grained control over clang optimization flags, it would be impossible to achieve what I intend. Although there is fine-grained control via opt, for a large-scale projects, clang-opt-llc pipeline may not be a drop-in solution. On Fri, Jan 5, 2018 at 10:00 PM, Craig Topper <craig.topper at
2018 Jan 06
0
Relationship between clang, opt and llc
-disable-O0-optnone has no effect with anything other than -O0. -O0 being passed to clang also causes all functions to be marked noinline. I don't know if there is a command line option to turn that off. I recommend passing "-O1 -Xclang -disable-llvm-passes" to clang. Passing -O0 very specifically means disable optimizations. ~Craig On Sat, Jan 6, 2018 at 12:25 PM, toddy wang
2018 Jan 06
0
Relationship between clang, opt and llc
Why are you using build directions from "flang" which is a fortran compiler and maintained by different people than the LLVM/clang community? But then compiling C/C++ code? Their bug database should be used for filing bugs against the fortran compiler not a C/C++ compiler issue. ~Craig On Sat, Jan 6, 2018 at 1:04 PM, toddy wang <wenwangtoddy at gmail.com> wrote: > Thanks a
2018 Jan 06
4
Relationship between clang, opt and llc
O0 didn't start applying optnone until r304127 in May 2017 which is after the 4.0 family was branched. So only 5.0, 6.0, and trunk have that behavior. Commit message copied below Author: Mehdi Amini <joker.eph at gmail.com> Date: Mon May 29 05:38:20 2017 +0000 IRGen: Add optnone attribute on function during O0 Amongst other, this will help LTO to correctly handle/honor
2018 Jan 06
0
Relationship between clang, opt and llc
Craig, thanks a lot! I'm actually confused by clang optimization flags. If I run clang -help, it will show many optimizations (denoted as set A) and non-optimization options (denoted as set B). If I run llvm-as < /dev/null | opt -O0/1/2/3 -disable-output -debug-pass=Arguments, it also shows many optimization flags (denote as set C). There are many options in set C while not in set A,
2017 Sep 18
1
Clang/LLVM 5.0 optnone attribute with -O0
You can also add the -Xclang -disable-O0-optnone flag to your command line. This will disable the implicit optnone when compiling with O0. Cheers, Michael On Mon, Sep 18, 2017 at 7:27 AM +0200, "Craig Topper via llvm-dev" <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote: To prevent optnone from being added you can replace -O0 with "-O1 -Xclang
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 Jan 07
2
Relationship between clang, opt and llc
On Jan 5, 2018 11:30 PM, "toddy wang via llvm-dev" <llvm-dev at lists.llvm.org> wrote: What I am trying is to compile a program with different sets of optimization flags. If there is no fine-grained control over clang optimization flags, it would be impossible to achieve what I intend. LLD has -lto-newpm-passes (and the corresponding -lto-newpm-aa-pipeline) which allows you to
2018 Jan 07
2
Relationship between clang, opt and llc
No, I meant LLD, the LLVM linker. This option for LLD is relevant for exploring different pass pipelines for link time optimization. It is essentially equivalent to the -passes flag for 'opt'. Such a flag doesn't make much sense for 'llc' because llc mostly runs backend passes, which are much more difficult to construct custom pipelines for (backend passes are often required
2018 Jan 08
2
Relationship between clang, opt and llc
Hi Toddy, You can achieve what you're looking for with a pipeline based on `clang -Ox` + `opt -Ox` + `llc -Ox` (or lld instead of llc), but this won't be guarantee'd to be well supported across releases of the compiler. Otherwise, if there are some performance-releated (or not...) command line options you think clang is missing / would benefit, I invite you to propose adding them to