[PATCH] D10289: LoopStrengthReduce: Try to pass address space to isLegalAddressingMode

hfinkel at anl.gov hfinkel at anl.gov
Sun Jul 26 05:43:13 PDT 2015

hfinkel added inline comments.

Comment at: lib/Transforms/Scalar/LoopStrengthReduce.cpp:106
@@ -105,1 +105,3 @@
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.).

Comment at: lib/Transforms/Scalar/LoopStrengthReduce.cpp:3178
@@ -3152,1 +3177,3 @@
+        std::pair<size_t, int64_t> P = getUse(
+            S, LSRUse::Basic, MemAccessTy(nullptr, UNKNOWN_ADDRESS_SPACE));
         LF.LUIdx = P.first;
MemAccessTy(nullptr, UNKNOWN_ADDRESS_SPACE) -> MemAccessTy()

(or do you want MemAccessTy::getUnknown()?)


More information about the llvm-commits mailing list