Address spaces in MC are completely untested

Tom Stellard tom at stellard.net
Thu Jun 27 15:10:39 PDT 2013


On Thu, Jun 27, 2013 at 09:43:43AM -0400, Rafael EspĂ­ndola wrote:
> Reviewing http://llvm-reviews.chandlerc.com/D1043 I noticed that
> implementation of address spaces in MC was a bit messy. Parts of some
> streamers support it, others parts ignore it and yet others assert
> that it is 0.
> 
> I wanted to refactor it, but there is a problem: We don't have *any*
> tests. Is this used only by out of tree targets? What about R600,
> doesn't it use address spaces? Only for dynamic memory?
> 

R600 uses address spaces, but I don't think we currently use any MC
features that need to be aware of them.  We only emit code and not much
else.

-Tom

> Another option is that all data in object files is in the default
> address space for all targets and this patch removes dead code.
> Without tests it is hard to tell.
> 
> If you have an out of tree target that uses address spaces, please try
> this patch and let me know if it breaks something for you.
> 
> This was added back in r63377 by Sanjiv Gupta from microchip, so it is
> possible that this was only used by PIC and is really dead code.
> 
> Cheers,
> Rafael


> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list