[PATCH] D23694: [NVPTX] Switch nvptx-use-infer-addrspace to true.

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 18 14:41:55 PDT 2016


jlebar updated this revision to Diff 68614.
jlebar added a comment.

Update tests.


https://reviews.llvm.org/D23694

Files:
  llvm/lib/Target/NVPTX/NVPTXInferAddressSpaces.cpp
  llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
  llvm/test/CodeGen/NVPTX/access-non-generic.ll
  llvm/test/CodeGen/NVPTX/addrspacecast.ll

Index: llvm/test/CodeGen/NVPTX/addrspacecast.ll
===================================================================
--- llvm/test/CodeGen/NVPTX/addrspacecast.ll
+++ llvm/test/CodeGen/NVPTX/addrspacecast.ll
@@ -1,5 +1,7 @@
-; RUN: llc < %s -march=nvptx -mcpu=sm_20 -disable-nvptx-favor-non-generic | FileCheck %s -check-prefix=PTX32
-; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 -disable-nvptx-favor-non-generic | FileCheck %s -check-prefix=PTX64
+; RUN: llc < %s -march=nvptx -mcpu=sm_20 -disable-nvptx-favor-non-generic \
+; RUN:   -nvptx-use-infer-addrspace=false | FileCheck %s -check-prefix=PTX32
+; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 -disable-nvptx-favor-non-generic \
+; RUN:   -nvptx-use-infer-addrspace=false | FileCheck %s -check-prefix=PTX64
 
 
 define i32 @conv1(i32 addrspace(1)* %ptr) {
Index: llvm/test/CodeGen/NVPTX/access-non-generic.ll
===================================================================
--- llvm/test/CodeGen/NVPTX/access-non-generic.ll
+++ llvm/test/CodeGen/NVPTX/access-non-generic.ll
@@ -1,6 +1,7 @@
 ; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s --check-prefix PTX
 ; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s --check-prefix PTX
-; RUN: llc < %s  -march=nvptx64 -mcpu=sm_20 -nvptx-use-infer-addrspace | FileCheck %s --check-prefix PTX
+; RUN: llc < %s  -march=nvptx64 -mcpu=sm_20 -nvptx-use-infer-addrspace=true | FileCheck %s --check-prefix PTX
+; RUN: llc < %s  -march=nvptx64 -mcpu=sm_20 -nvptx-use-infer-addrspace=false | FileCheck %s --check-prefix PTX
 ; RUN: opt < %s -S -nvptx-favor-non-generic -dce | FileCheck %s --check-prefix IR
 ; RUN: opt < %s -S -nvptx-infer-addrspace | FileCheck %s --check-prefix IR --check-prefix IR-WITH-LOOP
 
Index: llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
===================================================================
--- llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
+++ llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
@@ -51,7 +51,7 @@
 using namespace llvm;
 
 static cl::opt<bool> UseInferAddressSpaces(
-    "nvptx-use-infer-addrspace", cl::init(false), cl::Hidden,
+    "nvptx-use-infer-addrspace", cl::init(true), cl::Hidden,
     cl::desc("Optimize address spaces using NVPTXInferAddressSpaces instead of "
              "NVPTXFavorNonGenericAddrSpaces"));
 
Index: llvm/lib/Target/NVPTX/NVPTXInferAddressSpaces.cpp
===================================================================
--- llvm/lib/Target/NVPTX/NVPTXInferAddressSpaces.cpp
+++ llvm/lib/Target/NVPTX/NVPTXInferAddressSpaces.cpp
@@ -87,9 +87,6 @@
 // Finally, it fixes the undef in %y' so that
 //   %y' = phi float addrspace(3)* [ %input, %y2' ]
 //
-// TODO: This pass is experimental and not enabled by default. Users can turn it
-// on by setting the -nvptx-use-infer-addrspace flag of llc. We plan to replace
-// NVPTXNonFavorGenericAddrSpaces with this pass shortly.
 //===----------------------------------------------------------------------===//
 
 #define DEBUG_TYPE "nvptx-infer-addrspace"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23694.68614.patch
Type: text/x-patch
Size: 2984 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160818/bd586a82/attachment.bin>


More information about the llvm-commits mailing list