[LLVMdev] Incorrect loop optimization when building the Linux kernel
hfinkel at anl.gov
Mon Dec 8 13:56:59 PST 2014
----- Original Message -----
> From: "Joerg Sonnenberger" <joerg at britannica.bec.de>
> To: "David Majnemer" <david.majnemer at gmail.com>
> Cc: "Chengyu Song" <csong84 at gatech.edu>, "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
> Sent: Monday, December 8, 2014 2:22:47 PM
> Subject: Re: [LLVMdev] Incorrect loop optimization when building the Linux kernel
> On Mon, Dec 08, 2014 at 11:46:45AM -0800, David Majnemer wrote:
> > I'm pretty sure this is fixed in r223684. This particular use of
> > zero-sized arrays should defeat any chance of compile-time address
> > equality.
> I object that change. It's a horrible special case hack for either a
> fundamental issue in the IR or plain UB on the source level.
I don't understand why you feel this way. It is a special case, yes, but zero-sized types often induce special cases. The fact that we need to apply this to opaque types is somewhat unfortunate, but regardless, the fact that a zero-sized object can be assigned an address overlapping with another object just seems like a fact of which the constant folder needs to be aware.
> As such,
> should be reverted.
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
More information about the llvm-dev