similar to: [LLVMdev] Different results using -emit-llvm and llc together than just using -S?

Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] Different results using -emit-llvm and llc together than just using -S?"

2013 Mar 13
0
[LLVMdev] Different results using -emit-llvm and llc together than just using -S?
Ryan Taylor wrote: > Why would the generated assembly results for a piece of code be > different if I did this: > > clang -S -emit-llvm sample.c -o sample.ll > llc sample.ll -o sample.s > > then if I did this: > > clang -S sample.c -o sample.s For one example, 'llc' defaults to -O2 but clang defaults to -O0. In general, clang sets up the equivalent of an
2013 Mar 13
1
[LLVMdev] Different results using -emit-llvm and llc together than just using -S?
Anton, Is this true even at -O0? Thanks. On Wed, Mar 13, 2013 at 3:28 AM, Anton Korobeynikov <anton at korobeynikov.info > wrote: > llc and clang have different set of defaults. > > E.g. llc defaults to frame pointer elimination, etc. > > On Wed, Mar 13, 2013 at 4:13 AM, Ryan Taylor <ryta1203 at gmail.com> wrote: > > Why would the generated assembly results
2013 Mar 13
0
[LLVMdev] Different results using -emit-llvm and llc together than just using -S?
llc and clang have different set of defaults. E.g. llc defaults to frame pointer elimination, etc. On Wed, Mar 13, 2013 at 4:13 AM, Ryan Taylor <ryta1203 at gmail.com> wrote: > Why would the generated assembly results for a piece of code be different if > I did this: > > clang -S -emit-llvm sample.c -o sample.ll > llc sample.ll -o sample.s > > then if I did this: >
2012 Aug 15
2
[LLVMdev] clang promoting local to global
#define r10(p,q,r,s) 0x##s##r##q##p #undef r #define r r10 const word it_tab[4][256] = { r(const, const, const, const), r(.......), r(.......) ....... }; All of this is done inside the function I want the alloc in. The variable is not declared/defined/used anywhere else. On Wed, Aug 15, 2012 at 12:00 PM, Eli Friedman <eli.friedman at gmail.com>wrote: > On Wed, Aug 15, 2012
2017 Jun 29
3
Definitive list of optimisations at each optimisation level
On Mon, Jun 26, 2017 at 5:04 AM, ORiordan, Martin <martin.oriordan at intel.com > wrote: > Thanks Sean and Silva. > > > > I guess what I was seeking was a URL that I could point (non-compiler) > people at, but I guess no such reference exists. What I can do if > reference bot the source manager and use ‘-mllvm -debug-pass=Structure’ > for each optimisation level,
2015 Apr 20
3
[LLVMdev] Why are imm shifts where imm >= width type eliminated entirely?
Ok, this makes sense. So, my follow up is then why, as in Mips, R600, etc... the bit value is checked in the tablegen. Seems that we should expect it to fit anyways if it still exists at this point? I'm having a hard time trying to get shl to take a PatLeaf for Imm instead of an ImmLeaf. On Mon, Apr 20, 2015 at 4:11 PM, David Majnemer <david.majnemer at gmail.com> wrote: > >
2015 Apr 20
3
[LLVMdev] Why are imm shifts where imm >= width type eliminated entirely?
For example: unsigned int x, y; void foo() { y = x >> 129; } Where int is a 16bit type, the .ll is producing only 'ret void' at O3. At O0 the .ll looks fine but then llc gets rid of it an simply returns. I'm just curious what the reasoning is for this? It isn't trying to set y to anything at all. Thanks. -------------- next part -------------- An HTML attachment was
2012 Aug 15
2
[LLVMdev] clang promoting local to global
On Wed, Aug 15, 2012 at 3:17 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: > So there are some #define (defined outside the function scope) that use > it_tab that are used inside the function, is this why it is promoting it to > a global? Macros shouldn't matter. Please give a complete testcase and steps to reproduce. And please don't top-post. -Eli > > On Wed,
2012 Aug 15
0
[LLVMdev] clang promoting local to global
So there are some #define (defined outside the function scope) that use it_tab that are used inside the function, is this why it is promoting it to a global? On Wed, Aug 15, 2012 at 2:57 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: > #define r10(p,q,r,s) 0x##s##r##q##p > #undef r > #define r r10 > const word it_tab[4][256] = { r(const, const, const, const), >
2017 Jun 25
2
Definitive list of optimisations at each optimisation level
I agree, it's much clearer, it just takes runs at multiple opt levels and therefore I don't find it to be a "one stop shop". On Jun 24, 2017 8:44 PM, "Sean Silva" <chisophugis at gmail.com> wrote: > Looking at PassManagerBuilder can be useful because there are sometimes > comments giving some idea of the intent of the particular choice of passes, > but
2012 Aug 15
2
[LLVMdev] clang promoting local to global
Eli, thanks for responding, unfortunately, this did not resolve my issue. It's a locally allocated array in the C code, but I'm not seeing any alloca in the IR just geps from the variable, which is never setup. On Wed, Aug 15, 2012 at 11:33 AM, Eli Friedman <eli.friedman at gmail.com>wrote: > On Wed, Aug 15, 2012 at 11:26 AM, Ryan Taylor <ryta1203 at gmail.com> wrote: >
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 using "clang -O0"
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,
2014 Aug 15
3
[LLVMdev] Is it possible to tie two defs together?
For example, if you have something like: .... vreg3 = LD operation vreg4 = vreg2 * vreg1 ... Where I would like vreg3 and vreg4 to map to the same physical register? Imagine that the second instruction has an implicit arithmetic operation tied to vreg 4 such that vreg4 is both an input and output and the initial value of vreg4 is loaded into vreg3, so such that vreg4 = vreg3. Is this possible
2011 Jun 09
3
[LLVMdev] -fplugin-arg-dragonegg-enable-gcc-optzns status
Duncan, Below are the tabulated compile times and executable sizes. A) gcc 4.5.4svn using -msse3 -ffast-math -O3 -fno-tree-vectorize B) gcc 4.5.4svn/dragonegg using -msse3 -ffast-math -O3 -fno-tree-vectorize -fplugin-arg-dragonegg-enable-gcc-optzns C) gcc 4.5.4svn/dragonegg using -msse3 -ffast-math -O3 -fno-tree-vectorize Compile time (seconds) Benchmark A) stock B) gcc 4.5.4/ C)
2011 Jun 09
0
[LLVMdev] -fplugin-arg-dragonegg-enable-gcc-optzns status
Hi Jack, thanks for doing this. > Below are the tabulated compile times and executable sizes. > > A) gcc 4.5.4svn using -msse3 -ffast-math -O3 -fno-tree-vectorize > B) gcc 4.5.4svn/dragonegg using -msse3 -ffast-math -O3 -fno-tree-vectorize -fplugin-arg-dragonegg-enable-gcc-optzns > C) gcc 4.5.4svn/dragonegg using -msse3 -ffast-math -O3 -fno-tree-vectorize These numbers really
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
2012 Aug 15
0
[LLVMdev] clang promoting local to global
On Wed, Aug 15, 2012 at 11:40 AM, Ryan Taylor <ryta1203 at gmail.com> wrote: > Eli, thanks for responding, unfortunately, this did not resolve my issue. > It's a locally allocated array in the C code, but I'm not seeing any alloca > in the IR just geps from the variable, which is never setup. That's strange; I just checked, and -fno-merge-all-constants definitely does
2017 Sep 22
5
Effectiveness of llvm optimisation passes
Hi all, I am trying to understand the effectiveness of various llvm optimisations when a language targets llvm (or C) as its backend. The following is my approach (please correct me if I did anything wrong): I am trying to explicitly control the optimisations passes in llvm. I disable optimisation in clang, but instead emit unoptimized llvm IR, and use opt to optimise that. These are what I
2011 Dec 06
8
[LLVMdev] GetElementPtr
Does a transform exist to breakdown the GEP? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111206/e88dddfe/attachment.html>