[llvm-dev] [cfe-dev] RFC: Implementing -fno-delete-null-pointer-checks in clang
James Courtier-Dutton via llvm-dev
llvm-dev at lists.llvm.org
Fri Apr 27 09:24:49 PDT 2018
Hi,
Turning this on its head. Adding a warning saying something like
"Warning: NULL point check being optimized out at line X" might be
useful.
The developer might spot that and think "Ah! maybe I put that check in
the wrong place!"
Kind Regards
James
On 18 April 2018 at 19:21, Tim Northover via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
> On 18 April 2018 at 18:13, Manoj Gupta via cfe-dev
> <cfe-dev at lists.llvm.org> wrote:
>> Therefore, I would like to implement support for this flag (maybe with a
>> different name),
>
> I'd suggest -mdo-what-i-mean; the whole idea is horribly
> underspecified, and basically rips up the LangRef in favour of a
> nebulous set of good and bad optimizations (probably as dictated by
> the ones that have bitten someone who wrote bad code recently and was
> grumpy enough about it to complain at us).
>
> In particular I'm skeptical that the address space solution actually
> works. What they actually mean is probably not so much about removing
> the icmps, but about the control-flow decisions based on them. And
> LLVM might not be aware that any given conditional branch comes from a
> tainted comparison.
>
> Cheers.
>
> Tim.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
More information about the llvm-dev
mailing list