[PATCH] D10289: LoopStrengthReduce: Try to pass address space to isLegalAddressingMode
Matt Arsenault
Matthew.Arsenault at amd.com
Mon Jul 27 12:13:43 PDT 2015
arsenm added inline comments.
================
Comment at: lib/Transforms/Scalar/LoopStrengthReduce.cpp:106
@@ -105,1 +105,3 @@
+#define UNKNOWN_ADDRESS_SPACE ~0u
+
----------------
hfinkel wrote:
> There's no need for this to be a pre-processor macro, we can say:
>
> static const unsigned UnknownAddressSpace = ~0u;
>
> and make it a member of MemAccessTy.
>
> Also, please comment that this is used to initialize the AddressSpace member of MemAccessTy, for non-pointer types, but that ~0u is actually a legal address space value (unless we want to change that, but that requires updating the AsmParser, etc.).
>
>
Is there some header where this should go? There are a few other places that call isLegalAddressingMode in other passes where it's unclear what the address space would mean.
Address spaces > 24 bits are already disallowed by the code in other places although I'm not sure this is documented anywhere.
http://reviews.llvm.org/D10289
More information about the llvm-commits
mailing list