similar to: [LLVMdev] Why change "sub x, 5" to "add x, -5" ?

Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] Why change "sub x, 5" to "add x, -5" ?"

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. > >
2012 Nov 30
1
[LLVMdev] clang : assert ignored with -O1 ?!
Hi all, I work on an embedded target, in which function assert is an infinite while(1) loop. It is a common technique to set a breakpoint in the loop, in case some error occurs while debugging. It looks like clang simply *removes* any call to assert when compiling with -O1 (not -O0). note 1 : the name 'assert' is not the problem. note 2 : if the while(1) loop has some side effect,
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
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
2012 Nov 28
2
[LLVMdev] MIPs backend generates wrong reloc info for static data
Hi all, I use llvm-clang with a MIPS target, and it seems that the backend generates wrong reloc info. I attach a very simple test case. * Compile test.c with 'clang -internal-as -g' * use mips-elf-objdump -S to get the generate assembly code (see test.lst) * use mips-elf-readelf -a to look for relocation info (see test.readelf) All relocations for static data are 0000 ?! I did not
2015 Jun 30
2
[LLVMdev] Hwo to guess PC-relative offset
> De : Joerg Sonnenberger [mailto:joerg at britannica.bec.de] > > Well, MCFixup is what a relocation is represented as internally. They get > resolved to a fixed value and replaced, if evaluateAsAbsolute is true. > Hi Joerg, Actually it fails to get resolved to a fixed value. When I compile to .o then objdump it I can see that a symbol holding the constant value was created in
2007 Feb 19
10
"dst cache overflow" messages and crash
Hi, I regularly have errors (kernel: dst cache overflow) and crash of a firewall under Linux 2.6.17 and the route patch from Julian Anastasov. With rtstat I see that the route cache size increases regularly without never decreasing. I have this parameters: fw:/proc/sys/net/ipv4/route# grep . * error_burst:1250 error_cost:250 gc_elasticity:15 gc_interval:60 gc_min_interval:0
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
2015 Jun 29
2
[LLVMdev] Hwo to guess PC-relative offset
Dear LLVM crew, I have been writing a new LLVM backend with a very simple instruction set. moving a constant value to a register is selected as a load of the constant, with a PC-relative positive offset. Thus, the constant should be stored in .text section, after the load instruction, and offset should be computed at compile time (not link time). I struggle to find out : - how llvm handle
2018 Mar 09
2
Yet another print problem samba4
> Le 9 mars 2018 à 15:42, Rowland Penny via samba <samba at lists.samba.org> a écrit : > > On Fri, 9 Mar 2018 14:59:51 +0100 > Frédéric Goudal via samba <samba at lists.samba.org> wrote: > >> Hello, >> >> After digging for hours in different web site, read several times the >> samba wiki, here is my problem. I want to setup a print server for
2011 Dec 27
2
[LLVMdev] InstCombine "pessimizes" trunc i8 to i1?
Hi! before InstCombine (llvm::createInstructionCombiningPass()) I have a trunc from i8 to i1 and then a select: %45 = load i8* @myGlobal, align 1 %tobool = trunc i8 %45 to i1 %cond = select i1 %tobool, float 1.000000e+00, float -1.000000e+00 after instCombine I have: %29 = load i8* @myGlobal, align 1 %30 = and i8 %29, 1 %tobool = icmp ne i8 %30, 0 %cond = select i1 %tobool, float 1.000000e+00,
2011 Dec 28
0
[LLVMdev] InstCombine "pessimizes" trunc i8 to i1?
On Dec 27, 2011, at 5:09 AM, Jochen Wilhelmy wrote: > Hi! > > before InstCombine (llvm::createInstructionCombiningPass()) I have > a trunc from i8 to i1 and then a select: > > %45 = load i8* @myGlobal, align 1 > %tobool = trunc i8 %45 to i1 > %cond = select i1 %tobool, float 1.000000e+00, float -1.000000e+00 > > after instCombine I have: > > %29 = load i8*
2011 Dec 28
3
[LLVMdev] InstCombine "pessimizes" trunc i8 to i1?
>> Hi! >> >> before InstCombine (llvm::createInstructionCombiningPass()) I have >> a trunc from i8 to i1 and then a select: >> >> %45 = load i8* @myGlobal, align 1 >> %tobool = trunc i8 %45 to i1 >> %cond = select i1 %tobool, float 1.000000e+00, float -1.000000e+00 >> >> after instCombine I have: >> >> %29 = load i8*
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 Sep 09
3
[LLVMdev] failed folding with constant array with opt -O3
I have the following simplified llvm ir, which basically returns value based on the first value of a constant array. ---- ; ModuleID = 'simple_ir3.txt' @f.b = constant [1 x i32] [i32 1], align 4 ; constant array with value 1 at the first element define void @f(i32* nocapture %l0) { entry: %fc_ = alloca [1 x i32] %f.b.v = load [1 x i32]* @f.b store [1 x i32] %f.b.v, [1 x
2018 Mar 09
2
Yet another print problem samba4
Hello, After digging for hours in different web site, read several times the samba wiki, here is my problem. I want to setup a print server for windows client with a cups backend where for now one printer run. I have setup my linux host as a member of my domain. I can use smbclient with both a user login/password or the Admin one and logon is accepted. But… I can’t see my printers in share… when
2011 Dec 29
0
[LLVMdev] InstCombine "pessimizes" trunc i8 to i1?
I think Chris is saying that the and is necessary because with your i1 trunc you're ignoring all of the high bits. The and implements that. If you don't want this behavior, don't generate the trunc in the first place and just compare the full width to zero. Reid On Wed, Dec 28, 2011 at 6:45 AM, Jochen Wilhelmy <j.wilhelmy at arcor.de>wrote: > > >> Hi! >
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
2016 Dec 02
4
Is the instruction %4 = select i1 %tobool.i, metadata !12, metadata !10 legal?
Hi, The phase of instruction combine cannot handle the instruction %4 = select i1 %tobool.i, metadata !12, metadata !10 generated by the phase of CFG simplification and the compiler generates an assertion failure. I wonder whether this is valid LLVM IR: %4 = select i1 %tobool.i, metadata !12, metadata !10 Before CFGSimplify cond.true.i: ; preds = %entry
2007 Mar 09
2
Mark on FTP passive traffic
Hi, I use for a customer a Linux router/firewall with 1 internal interface connected to the LAN and 3 external interfaces connected to 3 different ISP. I use a kernel 2.6.17 with a routes patch from Julian Anastasov. I mark outgoing FTP traffic for the routing. With the rules below I do not have a problem with the active/normal FTP to connect on FTP server. But the passive FTP does not pass