search for: o1

Displaying 20 results from an estimated 1181 matches for "o1".

2015 Feb 09
2
[LLVMdev] Is "clang -O1" the same as "clang -O0 + opt -O1"?
Hello, I encounter a bug that pumped during execution of "clang -O1". However the bug cannot be reproduced by using "clang -O0 + opt -O1". It seems that "clang -O1" is not the same as "clang -O0 + opt -O1". According to the generated LLVM IRs are large, I would like to use bugpoint with "clang -O1" directly instead of us...
2013 Jan 31
5
Modify objects in function
...I program on a larger S4 project for a package, and I arrived at a point where I have to think a little harder on implementation style (especially to spare users complex object handling). I have a function foo(), taking as input arguments two S4 objects of different class type foo <- function(o1, o2) { o1 at att1 <- producesomething() o2 at att2 <- producesomethingelse() } Of course, this functions does not change the objects in the global environment. Now I have two choices 1. Change the objects and return a list with both objects: foo <- function(o1, o2) { o1 at att1...
2008 Sep 27
0
compute posterior mean by numerical integration
..."loglike" <- function(t, omega, beta) { n <- length(t)-1 res <- n * log(omega) + n * log(beta) - beta * sum(cumsum(t[-length(t)])) - omega * (1-exp(-beta * cumsum(t)[n])) return(res) } ## log prior density "prior" <- function(omega, beta, o1, o2, b1, b2) { if(o1 && o2 && b1 && b2) res <- dgamma(omega, o1, o2, log=T) + dgamma(beta, b1, b2, log=T) else res <- 0 ## noninformative prior return(res) } ## log posterior density "logPost" <- function(t, omega, beta, o1, o2, b1, b2...
2014 Nov 24
3
[LLVMdev] bx instruction getting generated in arm assembly for O1
Hi Mayur, > On 24 Nov 2014, at 07:00, MAYUR PANDEY <mayur.p at samsung.com> wrote: > In the assembly generated with O0, we are getting the "blx" instruction whereas with O1 we get "bx" (in 3.4.2 we used to get "blx" for both O0 and O1). > > Is this because of this patch: [llvm] r214959 - ARM: do not generate BLX instructions on Cortex-M CPUs Isn't this just the usual tail call optimisations kicking in at O1? Or is there some problem...
2006 Jun 26
0
[klibc 35/43] sparc support for klibc
...ile mode 100644 index 0000000..e53848a --- /dev/null +++ b/usr/klibc/arch/sparc/__muldi3.S @@ -0,0 +1,27 @@ + .global .umul + .section ".text" + .align 4 + .global __muldi3 + .type __muldi3, #function + .proc 017 +__muldi3: + save %sp, -104, %sp + mov %i1, %o0 + call .umul, 0 + mov %i3, %o1 + mov %o0, %l2 + mov %o1, %l3 + mov %i1, %o0 + call .umul, 0 + mov %i2, %o1 + mov %i0, %o1 + mov %o0, %l0 + call .umul, 0 + mov %i3, %o0 + mov 0, %l1 + add %l0, %o0, %l0 + addcc %l3, %l1, %i1 + addx %l2, %l0, %i0 + jmp %i7+8 + restore + .size __muldi3, .-__muldi3 diff --git a/usr/klibc/arch/spar...
2018 Jan 29
2
Debuggability of -O1 level
Hello all, I've found an old post (November 2016) http://lists.llvm.org/pipermail/llvm-dev/2016-November/107006.html which discussed debug information for optimized code. At the end of that discussion, Adrian broached the interest in making -O1 only enable optimizations. I see in the code ( *clang/lib/Frontend/CompilerInvocation.cpp*, in function *getOptimizationLevel*) that *-Og* option is equivalent to *-O1*. Does this mean any progress on making *-O1* the GCC's *-Og*? If not, would someone kindly tell me what is holding the debugga...
2017 Jan 06
2
LLVMTargetMachine with optimization level passed from clang.
...lt;sgundapa at codeaurora.org> wrote: > > > > Here is a problem scenario. > > > > I want to enable a backend pass at -O2 or above. > > if (TM->getOptLevel() >= CodeGenOpt::Default) > > addPass(&xxxxx); > > > > This pass will be run at -O1 too since clang is creating the > TargetMachine with CodeGenOpt::Default for -O1. > > Right, you can’t. Can somebody explain why it's not a bug that -O1 and -O2 are identical? Thanks, --paulr > (You wrote yesterday "I want the optimization to be turned on at -O1 and > abo...
2017 Jan 06
3
LLVMTargetMachine with optimization level passed from clang.
Here is a problem scenario. I want to enable a backend pass at -O2 or above. if (TM->getOptLevel() >= CodeGenOpt::Default) addPass(&xxxxx); This pass will be run at -O1 too since clang is creating the TargetMachine with CodeGenOpt::Default for -O1. --Sumanth G -----Original Message----- From: mehdi.amini at apple.com [mailto:mehdi.amini at apple.com] Sent: Friday, January 6, 2017 12:37 PM To: Sumanth Gundapaneni <sgundapa at codeaurora.org> Cc: jpaquette a...
2012 Nov 20
3
[LLVMdev] Possible bug in LLC at -O1
Hi I am seeing an issue (compiled application seg faults) when llc is used at -O1. I first need to triage out which optimization/pass is responsible for the seg fault. As such I am following this strategy: disable gradually those passes at -O1 which do not exist at -O0. For this I used -pass-debug=Structure. [ diff pasted at the end for reference] The problem is I have used alm...
2018 May 31
2
-O1 with clang and gcc
Hi, The binary gotten via clang's `-O1` runs much slower (3x) than that gotten via GCC's `-O1`. Reproducible with: https://github.com/m-chaturvedi/test_valgrind_slowdown We are seeing this difference between gcc and clang at other places as well. The `-O0` and `-O2` times are comparable, however. Are there some compile time fl...
2012 Nov 22
0
[LLVMdev] Possible bug in LLC at -O1
On 20 November 2012 15:10, Anitha B Gollamudi <anitha.boyapati at gmail.com> wrote: > Hi > > I am seeing an issue (compiled application seg faults) when llc is > used at -O1. I first need to triage out which optimization/pass is > responsible for the seg fault. As such I am following this strategy: > disable gradually those passes at -O1 which do not exist at -O0. For > this I used -pass-debug=Structure. [ diff pasted at the end for > reference] > > T...
2018 Jan 29
0
Debuggability of -O1 level
...ticular and improving the debugging of optimized code in general. I am hopeful that we can eventually reach a point where we can define an –Og that is as debuggable as –O0 while still having distinctly better runtime performance. Whether –Og becomes its own thing, or ends up as a redefinition of –O1, remains to be decided. Thanks for your interest, and giving me a reason to write up this little summary. And if you are motivated to help with the project, that's great! --paulr From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Son Tuan VU via llvm-dev Sent: Monday,...
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 IR is generated via *clang -O1 -Xclang -disable-O0-optnone*. In case of *clang -O0 -Xclang -disable-O0-optnone* initi...
2009 Sep 16
5
[LLVMdev] FYI: Phoronix GCC vs. LLVM-GCC benchmarks
Since we are in the area, what *should* O1 do? It's basically good for nothing, since it doesn't tune for size or performance. The only good I personally ever have for it is once in a while there is a miscompile at -O1 which narrows the problem. Would it be crazy to make -O1 equivalent to -Os? - Daniel On Wednesday, September 1...
2013 Nov 26
5
[LLVMdev] Disabling certain optimizations at -O1?
...izations, mostly dealing with hoisting/merging common code including function calls, that breaks stack trace symbolization in a very bad way. int f(int x) { if (x == 1) report("a"); else if (x == 2) report("b"); return 0; } For example, in the above function (at -O1) both calls to report() are done from the same PC. As a result, stack trace (from inside report()) will point to the same source line no matter what branch was actually taken. In practice, these two (or more) lines may be very far from each other. This makes stack traces misleading and very hard to...
2018 May 31
1
-O1 with clang and gcc
Thanks for the quick reply. `-O0` is too slow with Valgrind and `-O2` is not recommended. We use `-O1` in Valgrind runs. > Use of -O2 and above is not recommended as Memcheck occasionally reports uninitialised-value errors which don't really exist. http://valgrind.org/docs/manual/quick-start.html On Thu, May 31, 2018 at 5:34 PM, Michael Kruse <llvmdev at meinersbur.de> wrote: >...
2017 Jan 05
3
LLVMTargetMachine with optimization level passed from clang.
I want the optimization to be turned on at -O1 and above. In my case, it is a target independent back-end pass. (Eg: MachinePipeliner) On 2017-01-04 18:10, Mehdi Amini wrote: >> On Jan 4, 2017, at 4:03 PM, Sumanth Gundapaneni via llvm-dev >> <llvm-dev at lists.llvm.org> wrote: >> >> I see the BackendUtil.cpp of...
2018 Jan 29
2
Debuggability of -O1 level
My experience is that just running mem2reg (while disabling virtually all other passes ) in O1 will substantially improve debuggability while giving acceptable performance. On Mon, Jan 29, 2018 at 11:39 AM, via llvm-dev <llvm-dev at lists.llvm.org> wrote: > (Remembering to +llvm-dev this time…) > > > > There has been some progress in the direction of improving debuggab...
2017 Jan 06
2
LLVMTargetMachine with optimization level passed from clang.
getOptLevel() gets the level from TargetMachine which is created by the Backendutil in clang with either "Default", "None" or "Aggressive". Threre is no correspondence for "Less". This boils down to , if I pass "-O1", the Target Machine is created with CodeGenOpt::Default. I am available on IRC @ sgundapa. -----Original Message----- From: jpaquette at apple.com [mailto:jpaquette at apple.com] Sent: Thursday, January 5, 2017 12:24 PM To: sgundapa at codeaurora.org Cc: LLVM Developers <llvm-dev at lis...
2018 May 31
0
-O1 with clang and gcc
What are you trying to achieve? If faster runs is the goal, why not compile with -O2? Michael 2018-05-31 16:27 GMT-05:00 M. Chaturvedi via llvm-dev <llvm-dev at lists.llvm.org>: > Hi, > > The binary gotten via clang's `-O1` runs much slower (3x) than that gotten > via GCC's `-O1`. > > Reproducible with: > > https://github.com/m-chaturvedi/test_valgrind_slowdown > > We are seeing this difference between gcc and clang at other places as well. > > The `-O0` and `-O2` times are comparable,...