similar to: Programmatically Toggle Specific LLVM Optimizations

Displaying 20 results from an estimated 1000 matches similar to: "Programmatically Toggle Specific LLVM Optimizations"

2018 Jul 10
2
Programmatically Toggle Specific LLVM Optimizations
Hi Michael! Thanks for your reply. I managed to add a small amount of code to PassManager to have this feature implemented. One can now turn off a pass by doing opt -disablepass=licm or clang -mllvm -disablepass=licm to turn off, for example, loop invariant code motion. I programmed the command line option to be really hidden. This maybe a useful thing to have in the trunk for people who
2015 Dec 20
3
How to run InternalizePass
I'm working on a whole program optimizer that uses LLVM as a library, and one of the things I want to do is eliminate dead global functions and variables even when they are not local to a module. (This understandably doesn't happen by default because the optimizer has to assume it could be compiling a library rather than a program.) I've actually written a function to do this, but
2017 Apr 10
3
Relationship between clang, opt and llc
Hi folks, I am wondering about the relationship clang, opt and llc. I understand that this has been asked, e.g., http://stackoverflow.com/questions/40350990/relationship-between-clang-opt-llc-and-llvm-linker. Sorry for posting a similar question again, but I still have something that hasn't been resolved yet. More specifically I am wondering about the following two approaches compiling
2020 Apr 04
2
Running opt O1 outside of llvm
Hi, I would like to run the -O1 pass sequence followed by -reg2mem from an out of tree project which uses llvm. I am using the following code snippet to do so but in some cases, my method is also vectorising the code, which doesn't happen when running the same sequence(-S -O1 -reg2mem) through opt. Can someone please help me find what I am missing? Thanks, Akash. *
2017 Apr 11
2
Relationship between clang, opt and llc
> On Apr 10, 2017, at 5:21 PM, Craig Topper via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > clang -O0 does not disable all optimization passes modify the IR.; In fact it causes most functions to get tagged with noinline to prevent inlinining It also disable lifetime instrinsics emission and TBAA, etc. > > What you really need to do is > > clang -O3 -c
2017 Apr 11
3
Relationship between clang, opt and llc
It's really nice of you pointing out the -Xclang option, it makes things much easier. I really appreciate your help! Best, Peizhao On Mon, Apr 10, 2017 at 10:12 PM, Mehdi Amini <mehdi.amini at apple.com> wrote: > > On Apr 10, 2017, at 5:21 PM, Craig Topper via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > clang -O0 does not disable all optimization passes
2013 Nov 07
1
[LLVMdev] SLP vectorizer turned on in commit r190916 which says nothing about it - how to turn it off?
Revision 190916 Commit message: "Lift alignment restrictions for load/store folding on VINSERTF128/VEXTRACTF128. Fixes PR17268." Actual contents of the commit includes Index: tools/opt/opt.cpp =================================================================== --- tools/opt/opt.cpp (revision 190915) +++ tools/opt/opt.cpp (revision 190916) @@ -462,6 +462,7 @@
2018 Jan 05
0
Relationship between clang, opt and llc
I tried the following on LULESH1.0 serial version ( https://codesign.llnl.gov/lulesh/LULESH.cc) 1. clang++ -O3 LULESH.cc; ./a.out 20 Runtime: 9.487353 second 2. clang++ -O0 -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: 24.15 seconds 3. clang++ -O3 -Xclang -disable-llvm-passes -c
2016 May 09
2
Some questions about phase ordering in OPT and LLC
On Mon, May 09, 2016 at 01:07:07PM -0700, Mehdi Amini via llvm-dev wrote: > > > On May 9, 2016, at 10:43 AM, Ricardo Nobre via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > > > Hi, > > > > I'm a PhD student doing phase ordering as part of my PhD topic and I would like to ask some questions about LLVM. > > > > Executing the following
2012 Mar 22
4
[LLVMdev] Execution Engine: CodeGenOpt level
Hi, How can I dynamically change the code generation optimization level (e.g., None) of a JIT in other to recompile a function with a new optimization level (e.g., Default)? Thank you. Best regards, Nurudeen.
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
2016 May 09
4
Some questions about phase ordering in OPT and LLC
Hi, I'm a PhD student doing phase ordering as part of my PhD topic and I would like to ask some questions about LLVM. Executing the following command to see what passes does OPT execute when targeting a SPARC V8 processor: /opt/clang+llvm-3.7.1-x86_64-linux-gnu-ubuntu-15.10/bin/llvm-as < /dev/null | /opt/clang+llvm-3.7.1-x86_64-linux-gnu-ubuntu-15.10/bin/opt -O3 -march=sparc -mcpu=v8
2018 Jan 05
2
Relationship between clang, opt and llc
If you pass -O0 to clang, most functions will be tagged with an optnone function attribute that will prevent opt and llc even if you pass -O3 to opt and llc. This is the mostly likely cause for the slow down in 2. You can disable the optnone function attribute behavior by passing "-Xclang -disable-O0-optnone" to clang ~Craig On Fri, Jan 5, 2018 at 1:19 PM, toddy wang via llvm-dev <
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,
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
@Zhaopei, thanks for the clarification. @Craig and @Michael, for clang 4.0.1, -Xclang -disable-O0-optnone gives the following error message. From which version -disable-O0-optnone gets supported? [twang15 at c89 temp]$ clang++ -O0 -Xclang -disable-O0-optnone -Xclang -disable-llvm-passes -c -emit-llvm -o a.bc LULESH.cc error: unknown argument: '-disable-O0-optnone' [twang15 at c89
2018 Jan 07
2
Relationship between clang, opt and llc
Hi, "SetC" options are LLVM cl::opt options, they are intended for LLVM developer and experimentations. If a settings is intended to be used as a public API, there is usually a programmatic way of setting it in LLVM. "SetA" is what clang as a C++ compiler exposes to the end-user. Internally clang will (most of the time) use one or multiple LLVM APIs to propagate a settings.
2015 Nov 06
2
Repeated application of optimization passes
Within the LLVM pass manager infrastructure, suppose we have two transformation passes, pass A makes some improvements, then pass B does likewise, but this creates opportunities for pass A to create further improvements (e.g. suppose B was function inlining) so it's desirable to run A again. How does the LLVM pass manager currently deal with this? -------------- next part -------------- An
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