[LLVMdev] Another missed optimization opportunity?

Caldarale, Charles R Chuck.Caldarale at unisys.com
Wed Apr 24 12:29:10 PDT 2013


> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of Scott Pakin
> Subject: [LLVMdev] Another missed optimization opportunity?

> I'm doing the equivalent of "myarray[5]++" (on an
> "extern int *myarray"), repeated three times:


> I had expected the three increments by 1 to
> be collapsed into a single increment by 3:

> Is there some semantic reason that the increments aren't allowed to be
> combined, or is this a missed optimization opportunity in LLVM?

Is this a potential aliasing effect?  Since myarray is defined as a pointer, not an array, it's theoretically possible that the address therein refers to the same memory location as the pointer itself.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.





More information about the llvm-dev mailing list