Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] How to visualise Clang optimisation phases"
2010 Jul 19
0
[LLVMdev] How to visualise Clang optimisation phases
Having a look at clang's source, you can find in
"lib/CodeGen/BackendUtil.cpp" the functions where clang builds the
passes to emit code. The optimization passes used are there and you can
simulate them via the "opt" utility, by running each pass one at a time.
LLVM also declares standard module/function passes on
include/llvm/Support/StandardPasses.h. Have a look and see
2010 Jul 19
1
[LLVMdev] How to visualise Clang optimisation phases
> Having a look at clang's source, you can find in
> "lib/CodeGen/BackendUtil.cpp" the functions where clang builds the
> passes to emit code. The optimization passes used are there and you can
> simulate them via the "opt" utility, by running each pass one at a time.
> LLVM also declares standard module/function passes on
>
2016 Nov 09
2
Optimisation passes introducing address space casts
Hi,
I’ve recently encountered an issue where the `instcombine` pass replaces an `llvm.memcpy` between two distinct address spaces with an `addrspacecast` instruction.
As an example, see the trivial OpenCL kernel attached. I’m compiling like this:
clang -cc1 -triple spir64-unknown-unknown -x cl -O0 -emit-llvm array_init.cl -o before.ll
This yields an `llvm.memcpy` to copy the array
2015 Dec 02
3
Is there a way to pass Optimization passes to clang?
On Wed, Dec 2, 2015 at 10:39 AM, David Chisnall <David.Chisnall at cl.cam.ac.uk
> wrote:
> On 2 Dec 2015, at 18:30, Phil Tomson <phil.a.tomson at gmail.com> wrote:
> >
> >> If you want to pass LLVM arguments to clang, then you must prefix them
> with -llvm (e.g. -mllvm -loops -mllvm lcssa).
> >
> >
> > I just tried this:
> > CFLAGS +=
2017 Jan 02
3
Optimisation passes introducing address space casts
Hi Mehdi,
Thanks for the reply - I’ve finally got round to trying to fix this based on your suggestion. I’ve got something that mostly works, but I just wanted to double-check something about the regression tests before I post a patch.
> The memcpy is supposed to be equivalent to a sequence of load and store. Here we are just failing to keep the property that the load is performed through
2017 Oct 03
2
Change in optimisation with UB in mind
Hi Sanjoy,
Yes these are C tests (from 'gcc.c-torture/execute'), and as I indicated in my original message, the tests are not valid because the behaviour is undefined. However, it was while investigating these new failures in these tests that I realised that this optimisation existed.
The optimisation itself is perfectly valid, but it does mean that integer underflow will no longer be
2013 Jul 18
1
Building with debug symbols and different optimisation levels
Hello,
I would like to build samba at different optimisation levels with debug
symbols, in order to test a static analysis tool I have developed. I have
found the configure option "--enable-developer", which I presume enables
debug symbols and sets optimisation to O0, however I would also like to be
able to enable debug symbols and set the optimisation level to O2.
I cannot find a way
2011 Sep 08
3
global optimisation with inequality constraints
Dear All,
I would like to minimise a nonlinear function subject to linear inequality constraints as part of an R program. I have been using the constrOptim function. I have tried all of the methods that come with Optim, but nothing finds the correct solution. If I use the correct solution as the vector of starting values, though, my program does output the correct solution and optimum - the
2017 Sep 29
2
Change in optimisation with UB in mind
With LLVM v5.0, I found failures in some of the 'gcc.c-torture/execute' tests due to a change in the optimisation where undefined behaviour is involved. The tests that fail are the '20040409-[123].c' tests.
The underlying failure is due to the optimisation of the following:
int test2(int x) { return x + INT_MIN; }
from using an ADD instruction to using an OR instruction.
2013 Sep 05
2
[LLVMdev] Optimisation pass to move an alloca'd array to a global constant array
Hi All,
I was wondering if there is an optimisation pass that moves a stack
allocated array, initialised with constant values, to a global constant
array.
And if there is such a pass, what requirements are there for it to operate?
My optimised IR is below. As you can see an array of 5 integers is
created with alloca, then each element is stored to in turn. It would
be nice if this array was
2017 Jun 24
3
Definitive list of optimisations at each optimisation level
I am often asked what optimisations "our" compiler performs at each level.
But "our" compiler is actually CLang/LLVM which we have retargeted to our
proprietary target.
Most of the work we do is in maintaining our target specific backend.
Certainly there are optimisations that we do to take best advantage of our
instruction set during lowering and instruction selection, and
2009 Feb 05
2
Non-linear optimisation
Hi there,
I have a piece of Matlab code I use to optimise a trding strategy. If there
are any Matlab/R specialists out there, I would appreciate your help in
doing the exact same optimisation in R.
I suspect I would use nlm() in R but am not sure where to define my
constraints.
I have attached my Matlab code below for reference.
Many thanks.
Constraints
function [c,ceq]=TriskellConstraints(X)
2017 Jan 03
2
Optimisation passes introducing address space casts
OK, I’ve hit one more existing regression test that I’m weary of:
define void @test2_addrspacecast() {
%A = alloca %T
%B = alloca %T
%a = addrspacecast %T* %A to i8 addrspace(1)*
%b = addrspacecast %T* %B to i8 addrspace(1)*
call void @llvm.memcpy.p1i8.p0i8.i64(i8 addrspace(1)* %a, i8* bitcast (%T* @G to i8*), i64 124, i32 4, i1 false)
call void
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
2008 Feb 27
2
[LLVMdev] Passing parameters to LLVM optimisation passes
I'm fairly new to LLVM, and am writing an optimisation pass to be run by
'opt'. However, i'd like this pass to be parameterisable; as such i'd like
to be able to pass an option to it (preferably via the command line to
'opt').
e.g. so i can do something like this "opt -load mypass.so
-MyPass=MyPassOption < inputfile.bc ..."
(for example one thing I would
2014 Jan 14
5
[Bug 10380] New: Non-Nested Folder Optimisation
https://bugzilla.samba.org/show_bug.cgi?id=10380
Summary: Non-Nested Folder Optimisation
Product: rsync
Version: 3.1.0
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P5
Component: core
AssignedTo: wayned at samba.org
ReportedBy: me at haravikk.com
2011 Dec 19
2
Constrained Optimisation
Dear All
I have a constrained optimisation problem, I want to maximise the following
function
t(weights) %*% CovarianceMatrix %*% weights
for the weights,
subject to constraints on each element within the weights & the weights
vector summing to 1.
i.e.
weights = (x1, x2, x3), where x1 is within some given range (a +b, a - b).
I have tried to do this using the optim function in R,
2017 Oct 03
2
Change in optimisation with UB in mind
Yes, the hairy-edges of undefined behaviour - UB is UB.
It does mean that given:
__attribute__((noinline)) int foo(int a, int b) { return a + b; }
int bar1(int x) { return foo(x, INT_MIN); }
int bar2(int x) { return x + INT_MIN; }
'bar1' and 'bar2' have different outcomes.
However, I think that the new optimisation is neat and valid and I am not suggesting that it should
2017 Jun 24
2
Definitive list of optimisations at each optimisation level
Right but then you'll have to call each opt level. Have u looked in the
pass manager?
On Jun 24, 2017 3:52 PM, "Sean Silva via llvm-dev" <llvm-dev at lists.llvm.org>
wrote:
> The most definitive list you can probably hope to get will be obtained by
> passing -mllvm -debug-pass=Structure to a clang invocation.
>
> -- Sean Silva
>
> On Jun 24, 2017 7:10 AM,