Re: A bug in vrp_meet?

2019-03-20 Thread Richard Biener
On Tue, Mar 19, 2019 at 8:53 PM Jeff Law wrote: > > On 3/6/19 3:05 AM, Richard Biener wrote: > > On Tue, Mar 5, 2019 at 10:36 PM Jeff Law wrote: > >> > >> On 3/5/19 7:44 AM, Richard Biener wrote: > >> > >>> So fixing it properly with also re-optimize_stmt those stmts so we'd CSE > >>> the MAX_EXP

Re: Indicating function exit points in debug data

2019-03-20 Thread Richard Biener
On Tue, Mar 19, 2019 at 9:38 PM Justin Paston-Cooper wrote: > > Hello, > > In my message https://sourceware.org/ml/gdb/2019-03/msg00042.html to > the gdb mailing list, I asked whether it would be possible to > implement a command which breaks at all exit points of the current > stack frame. This w

Re: Indicating function exit points in debug data

2019-03-20 Thread Justin Paston-Cooper
On Wed, 20 Mar 2019 at 08:31, Richard Biener wrote: > > On Tue, Mar 19, 2019 at 9:38 PM Justin Paston-Cooper > wrote: > > > > Hello, > > > > In my message https://sourceware.org/ml/gdb/2019-03/msg00042.html to > > the gdb mailing list, I asked whether it would be possible to > > implement a comma

RISC-V sibcall optimization with save-restore

2019-03-20 Thread Paulo Matos
Hi, I am working on trying to get RISC-V 32 emitting sibcalls even in the present of `-msave-restore`, for a client concerned with generated code size. Take a look at what current gcc generates for: int __attribute__ ((noinline)) bar () { return 3; } int __attribute__ ((noinline))

Re: GCC turns &~ into | due to undefined bit-shift without warning

2019-03-20 Thread Moritz Strübe
Hey. Am 11.03.2019 um 12:17 schrieb Jakub Jelinek: On Mon, Mar 11, 2019 at 11:06:37AM +, Moritz Strübe wrote: On 11.03.2019 at 10:14 Jakub Jelinek wrote: You could build with -fsanitize=undefined, that would tell you at runtime you have undefined behavior in your code (if the SingleDiff h

Re: GCC turns &~ into | due to undefined bit-shift without warning

2019-03-20 Thread Christophe Lyon
On 20/03/2019 15:08, Moritz Strübe wrote: Hey. Am 11.03.2019 um 12:17 schrieb Jakub Jelinek: On Mon, Mar 11, 2019 at 11:06:37AM +, Moritz Strübe wrote: On 11.03.2019 at 10:14 Jakub Jelinek wrote: You could build with -fsanitize=undefined, that would tell you at runtime you have undefine

Re: GCC turns &~ into | due to undefined bit-shift without warning

2019-03-20 Thread Moritz Strübe
Hey. Am 20.03.2019 um 15:26 schrieb Christophe Lyon: You can -fsanitize-undefined-trap-on-error, which doesn't increase size too much, it is less user-friendly, but still should catch the UB. Wouldn't this fail to link? I thought the sanitizers need some runtime libraries which are only avail

Re: GCC turns &~ into | due to undefined bit-shift without warning

2019-03-20 Thread Jakub Jelinek
On Wed, Mar 20, 2019 at 02:08:09PM +, Moritz Strübe wrote: > Ok, I played around a bit. Interestingly, if I set -fsanitize=udefined and > -fsanitize-undefined-trap-on-error the compiler detects that it will always > trap, and optimizes the code accordingly (the code after the trap is > remov

Re: GCC turns &~ into | due to undefined bit-shift without warning

2019-03-20 Thread Andrew Haley
On 3/20/19 2:08 PM, Moritz Strübe wrote: > > Ok, I played around a bit. Interestingly, if I set > -fsanitize=udefined and -fsanitize-undefined-trap-on-error the > compiler detects that it will always trap, and optimizes the code > accordingly (the code after the trap is removed).* Which kind of >

Re: Indicating function exit points in debug data

2019-03-20 Thread Segher Boessenkool
On Wed, Mar 20, 2019 at 10:13:23AM +, Justin Paston-Cooper wrote: > Section 6.2.5.2 outlines the line number information state machine's > opcodes. One of them is "DW_LNS_set_epilogue_begin". Its definition > is: > > - > The DW_LNS_set_epilogue_begin opcode takes no operands. It sets the >

Re: Indicating function exit points in debug data

2019-03-20 Thread Tom Tromey
> "Segher" == Segher Boessenkool writes: >> Section 6.2.5.2 outlines the line number information state machine's >> opcodes. One of them is "DW_LNS_set_epilogue_begin". Its definition >> is: Segher> How should this work with shrink-wrapping? The whole point of that is Segher> you do not tea

Re: RISC-V sibcall optimization with save-restore

2019-03-20 Thread Jim Wilson
On 3/20/19 5:25 AM, Paulo Matos wrote: I am working on trying to get RISC-V 32 emitting sibcalls even in the present of `-msave-restore`, for a client concerned with generated code size. This won't work unless you define a new set of restore functions. The current ones restore the return addr