[cfe-dev] [llvm-dev] RFC: Implementing -fno-delete-null-pointer-checks in clang

Tim Northover via cfe-dev cfe-dev at lists.llvm.org
Thu Apr 19 14:53:34 PDT 2018


On 19 April 2018 at 22:36, Manoj Gupta via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> I was looking around for the cases where AddrSpace !=0 are checked. Seems
> like there are a bunch of optimizations that will fail to apply for non zero
> address spaces.

Isn't that exactly what we want? Did you look in enough detail to
determine that these optimizations *should* have applied? I'd be
pretty interested to know what we disable for the others, because the
the null thing is the only guarantee I knew about that we made.

Also, I'm pretty unconvinced optimization should be our first priority
here. That smacks of the untenable (IMO) option 2. Whatever we do I
want a program with well-defined semantics at the end. Starting from a
known good position and enabling desirable optimizations that we have
decided are valid is a significantly better path than starting with
"you might get lucky" and disabling extra optimizations that are
reported to us.

I realise this actually argues against my datalayout suggestion too,
so I'm getting a lot more convinced by Eli (& Duncan).

Cheers.

Tim.



More information about the cfe-dev mailing list