similar to: [LLVMdev] clang : assert ignored with -O1 ?!

Displaying 20 results from an estimated 8000 matches similar to: "[LLVMdev] clang : assert ignored with -O1 ?!"

2015 Jul 08
5
[LLVMdev] Why change "sub x, 5" to "add x, -5" ?
Dear all, I have been working on a new LLVM backend. Some instructions, like sub, can take an positive constante, encoded into 5 bits thus lower than 32, and a register, as operands. Unfortunately, DAGCombiner.cpp changes patterns like 'sub x, 5' into 'add x,-5'. Similarly, I found changes in some IR to IR passes, with no clear gain (at least not clear to me), and even penalty
2013 Aug 07
1
[LLVMdev] DSA - LocalDataStructures pass does not create DSGraphs
Hallo. I wanted to use the DSA from the poolalloc project as a starting point for static C code analysis (for me it has some benefits to work on LLVM-IR (generated by clang) instead of C code). Currently there is no poolalloc version 3.3. Therefore I wrote a quick patch to make poolalloc 3.2 compile with llvm 3.3 (mostly adaptions to file relocations were necessary). The patch is attached as
2016 May 12
3
Why LR is saved before calling a 'noreturn' function ?
Dear all, I don't get how llvm handles functions with __attribute__((noreturn)). It seems that LR register is backed up on the stack whilst it will never be used to return from a 'noreturn' function. I have this problem with a home-made backend but it seems that ARM flavour of clang has same behaviour. By the way, SP is also saved, I don't understand why. Is there a syntax error
2016 Dec 02
2
Is the instruction %4 = select i1 %tobool.i, metadata !12, metadata !10 legal?
To reproduce the issue, please use the command line "opt -simplifycfg filename". target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" %struct.G = type { %struct.ordered_index_node*, i32 } %struct.ordered_index_node = type { %struct.B, %struct.F } %struct.B = type { i32 } %struct.F = type { i32*, i32* }
2014 May 23
2
[LLVMdev] clang -O2 versus opt -O2 | llc | clang
I'm investigating a miscompilation bug ( http://llvm.org/bugs/show_bug.cgi?id=19823 ), but I've run into a problem: the output of the program is different when I compile the IR with clang compared to opt | llc | clang. Any clues on how to resolve this difference? $ ./opt -O1 19823.ll | ./llc | ./clang -x assembler - -o a.out ; ./a.out ; echo $? 1 $ ./opt -O2 19823.ll | ./llc | ./clang -x
2015 Jul 09
2
[LLVMdev] How to add a new target/toolchain to Clang ?
Hi all, I have been developping a out-of-tree backend. I would like to integrate it with clang. Note that my backend is rather simple, generates elf32, and I do not need about linux, libary paths, ... Can someone give me a pointer to a readme, an article, or maybe a good (i.e. simple) example ? Note :on a second step, I would like to support inline assembly in C code.. -- Frederic Heitzmann
2018 Aug 23
2
[RFC] "Properly" Derive Function/Argument/Parameter Attributes
After I spend some time working with the function attribute* deduction pass** [1,3], I would like to propose a "proper" organization***. Why? Because we do not derive nearly as many attributes as we could****, while we do maintain various (separate and diffently organized) "data-flow-like analyses" to do so. What else? I propose a single optimistic data-flow
1998 Sep 09
3
HELP : Samba is very slow
I have an Access application that work with some shared database file. The file is ~ 3 Mb. Since I have a Linux system with Samba, this application work very slow. I have multiple user with win95 on this file. Is there an option for allowing multiple access without cache ? any other idea ? Thanks. ___________________________________________________________ S?bastien HEITZMANN
2012 Dec 25
2
[LLVMdev] [DragonEgg] Strange call to @"\01__isoc99_fscanf"
Dear all, First of all, Merry Christmas! :) While testing a File I/O sample program, I've encountered a link failure due to missing implementation of "\01__isoc99_fscanf" function. I think this function should be named "__isoc99_fscanf" instead. Please see the program code and LLVM IR generated by DragonEgg and clang below. It shows that clang generates
2016 Dec 14
2
llvm.trap() from -O1 optimization
Hello, This is likely to be some small issue, but I am unable to figure out the solution. The following code, when run through `opt' with the -O1 flag, replaces the call to foo() with a call to llvm.trap() followed by an `unreachable' instruction. ===================== target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" target triple =
2015 Jul 10
2
[LLVMdev] How to add a new target/toolchain to Clang ?
Thanks Tom for your help, it as indeed very easy to make the link with the linker (not sick joke). Unfortunately, clang generates object files for target x86_64, even though I try --target --triple, --arch, ... What is the trick to tell him which target to use ? -- Fred ps: not looked yet at inline assembly 2015-07-09 18:40 GMT+02:00 Tom Stellard <tom at stellard.net>: > On Thu, Jul
2019 Mar 25
2
[IndVars] Rewriting exit value of SCEV add expressions
Hi, I found issues with INDVARS <-> LSR passes interactions after https://reviews.llvm.org/rL346397. There were two main changes in this commit: 1. Previously we were propagating SCEV add expressions even if DefInst of exit value has hard uses inside the loop. After rL346397 we forbid propagation of SCEV add expressions if DefInst of exit value has hard use inside the loop. 2. Previously
2015 Jul 10
3
[LLVMdev] Why change "sub x, 5" to "add x, -5" ?
2015-07-08 17:58 GMT+02:00 escha <escha at apple.com>: > [...] > > If you want to “revert" this sort of thing, you can do it at Select() time > or PreprocessISelDAG(), which is what I did on an out-of-tree backend to > turn add X, -C into sub X, C on selection time. This still lets all the > intermediate optimizations take advantage of the canonicalization. > >
2013 Aug 26
0
[LLVMdev] Question about boolean type variable generation of Global Variable Optimization
Hi all, I have tested a simple example with '-Ox' optimization options and saw transformation from specific global variable to boolean variable. I would like to know what kind of advantages come from this . The simplified example is as following: Source code: static unsigned int g_3461 = 0xffffffff; unsigned int test(unsigned int a) { printf("g_3461=%d\n", g_3461);
2008 Aug 12
4
[LLVMdev] Eliminating gotos
Hi, Comments inline. Ben On 12/08/2008 03:14, "Owen Anderson" <resistor at mac.com> wrote: >> We would like to develop a code generator using LLVM for a target language >> that does not support conditional branches and in fact only supports >> structured control flow, eg. If and while. What's the difference between an "if" and a conditional
2018 Mar 08
1
[RFC] jump threading on std::pair<int, bool>
Hi, While comparing the code by LLVM and GCC for some major libraries, I found that LLVM fails to apply jump threading with a method whose return type is std::pair<int, bool> (actually, any pair of 32-bit values like std::pair<bool, int> and std::pair<int, int>). For example, jump threading does not work for the if statement in func. std::pair<int, bool> callee(int v) {
2012 May 22
0
[LLVMdev] Some small changes to the memory dependence analysis API
Hey folks , I was thinking of making some small, optional-for-callers only changes to the memdep API, and before I did it, thought i'd post here and make sure nobody thought it was egregiously stupid. There are two related issues i'm trying to solve, both of which occur in uses like GVN, where we are trying to prove equivalence between a load/store/call with some other load/store/call:
2009 Jul 19
2
[LLVMdev] Unnecessary i16 -> i32 type promotion
If I have an '&' operator inside an 'if' statement, LLVM seems to always promote a 16 bit integer type to a 32 bit integer type. I don't want this to happen because my back-end only supports 16 bit types. Why is this happening? Where might this be happening, so I can fix it? It doesn't seem to happen with the '|' operator, only '&'. Thanks!
2016 Dec 07
1
Expected constant simplification not happening
Hello Has there been any progress on this topic ? The 3.9 optimizer output is still the same as I just looked. https://llvm.org/bugs/show_bug.cgi?id=24448 Ciao Nat! Sanjay Patel schrieb: > [cc'ing Zia] > > We have this transform with -Os for some cases after: > http://reviews.llvm.org/rL244601 > http://reviews.llvm.org/D11363 > > but something in this example is
2008 Aug 12
0
[LLVMdev] Eliminating gotos
On Aug 12, 2008, at 2:39 AM, Benedict Gaster wrote: > [bg] Consider the LLVM code: > > define i32 @foo(i32 %x, i32 %y) { > entry: > %tobool = icmp eq i32 %x, 0 ; <i1> [#uses=1] > br i1 %tobool, label %ifelse, label %ifthen > > ifthen: ; preds = %entry > %add = add i32 %x, 10 ; <i32> [#uses=1] > ret i32 %add > >