[llvm] r186767 - Disallow global aliases to bitcast between address spaces

Matt Arsenault arsenm2 at gmail.com
Sun Jul 21 02:10:25 PDT 2013


On Jul 21, 2013, at 1:20 , Duncan Sands <duncan.sands at gmail.com> wrote:

> Hi Matt,
> 
> On 20/07/13 19:46, Matt Arsenault wrote:
>> Author: arsenm
>> Date: Sat Jul 20 12:46:05 2013
>> New Revision: 186767
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=186767&view=rev
>> Log:
>> Disallow global aliases to bitcast between address spaces
> 
> I thought you already disallowed bitcast between address spaces.
The current plan is to disallow bitcasts between address spaces with different sizes, and continue to allow them if the sizes are the same, but that isn't enforced now.

> Why is any special logic needed for global aliases?  Does this mean that the verifier is
> not systematic enough, and doesn't visit every bitcast expression?


This is just the first part and I thought it made sense to do this small piece separately. I'm still working on handling other cases in another patch (http://llvm-reviews.chandlerc.com/D1083). The verifier visits every bitcast *instruction*, but catching all of the places bitcasts can be used in constantexprs is turning out to be kind of a pain. I don't see a more general way to find all constantexpr bitcasts besides searching all the places they can be used, checking global aliases and global initializers.





More information about the llvm-commits mailing list