[PATCH] SLSR: Pass address space to isLegalAddressingMode

Jingyue Wu jingyue at google.com
Tue Jun 9 11:40:06 PDT 2015


LGTM.

Some architectures (rarely GPUs I assume) can fold multiple regular integer operations into one pointer arithmetic instruction (such as leal in x86). The other place handles that case. I think, for that scenario, it is safe to assume AS = 0 for now. Otherwise, you'd iterate through all address spaces to find any one in which the integer arithmetics can be folded into address computation.


================
Comment at: test/Transforms/StraightLineStrengthReduce/R600/reassociate-geps-and-slsr-addrspace.ll:108
@@ +107,1 @@
+}
\ No newline at end of file

----------------
I'd add an EOL just to be consistent with other files in the LLVM tree.

http://reviews.llvm.org/D10341

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list