From: Xi Wang Subject: Re: [PATCH] fix casts when linearizing compound assignments Date: Fri, 8 Jun 2012 15:57:04 -0400 Message-ID: References: <1339152460-17411-1-git-send-email-xi.wang@gmail.com> <56898225-DCA7-465E-BFD8-7D9D084A243B@gmail.com> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mail-gh0-f174.google.com ([209.85.160.174]:50325 "EHLO mail-gh0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933699Ab2FHT5J (ORCPT ); Fri, 8 Jun 2012 15:57:09 -0400 Received: by ghrr11 with SMTP id r11so1544055ghr.19 for ; Fri, 08 Jun 2012 12:57:09 -0700 (PDT) In-Reply-To: Sender: linux-sparse-owner@vger.kernel.org List-Id: linux-sparse@vger.kernel.org To: Pekka Enberg Cc: Linus Torvalds , linux-sparse@vger.kernel.org, Jeff Garzik , Benjamin Herrenschmidt , Christopher Li On Jun 8, 2012, at 3:47 PM, Pekka Enberg wrote: > Yeah. I'd really prefer we avoid any special tricks with LLVM and just > do what clang does. This is not really a special trick: http://llvm.org/docs/GetElementPtr.html#int I won't worry about optimizations; an alias analysis that takes care of inttoptr/ptrtoint should work. I agree that using getelementptr looks more llvm-ish anyway. :-) - xi