Revert "Disable ReplaceLDS pass, patch up tests to match"
authorhsmahesha <mahesha.comp@gmail.com>
Wed, 1 Sep 2021 15:48:00 +0000 (21:18 +0530)
committerhsmahesha <mahesha.comp@gmail.com>
Wed, 1 Sep 2021 15:49:39 +0000 (21:19 +0530)
This reverts commit 50ad3478bdd3f0643ee94f6663293af5b3c27afe.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D109062

19 files changed:
llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
llvm/test/CodeGen/AMDGPU/llc-pipeline.ll
llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-call-diamond-shape.ll
llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-call-selected_functions.ll
llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-call-to-declare-only-func.ll
llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-ignore-global-scope-use.ll
llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-ignore-inline-asm-call.ll
llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-ignore-kernel-only-used-lds.ll
llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-ignore-not-reachable-lds.ll
llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-ignore-small-lds.ll
llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-indirect-call-diamond-shape.ll
llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-indirect-call-selected_functions.ll
llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-indirect-call-signature-match.ll
llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-split-entry-bb-after-alloca.ll
llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-use-multiple-lds.ll
llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-use-same-lds.ll
llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-use-within-const-expr1.ll
llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-use-within-const-expr2.ll
llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-use-within-phi-inst.ll

index 0004827..e0874d6 100644 (file)
@@ -293,7 +293,7 @@ static cl::opt<bool> EnableStructurizerWorkarounds(
 
 static cl::opt<bool> EnableLDSReplaceWithPointer(
     "amdgpu-enable-lds-replace-with-pointer",
-    cl::desc("Enable LDS replace with pointer pass"), cl::init(false),
+    cl::desc("Enable LDS replace with pointer pass"), cl::init(true),
     cl::Hidden);
 
 static cl::opt<bool, true> EnableLowerModuleLDS(
index 73909dc..b8b059f 100644 (file)
@@ -42,6 +42,7 @@
 ; GCN-O0-NEXT:      Inliner for always_inline functions
 ; GCN-O0-NEXT:    A No-Op Barrier Pass
 ; GCN-O0-NEXT:    Lower OpenCL enqueued blocks
+; GCN-O0-NEXT:    Replace within non-kernel function use of LDS with pointer
 ; GCN-O0-NEXT:    Lower uses of LDS variables from non-kernel functions
 ; GCN-O0-NEXT:    FunctionPass Manager
 ; GCN-O0-NEXT:      Expand Atomic instructions
 ; GCN-O1-NEXT:      Inliner for always_inline functions
 ; GCN-O1-NEXT:    A No-Op Barrier Pass
 ; GCN-O1-NEXT:    Lower OpenCL enqueued blocks
+; GCN-O1-NEXT:    Replace within non-kernel function use of LDS with pointer
 ; GCN-O1-NEXT:    Lower uses of LDS variables from non-kernel functions
 ; GCN-O1-NEXT:    FunctionPass Manager
 ; GCN-O1-NEXT:      Infer address spaces
 ; GCN-O1-OPTS-NEXT:      Inliner for always_inline functions
 ; GCN-O1-OPTS-NEXT:    A No-Op Barrier Pass
 ; GCN-O1-OPTS-NEXT:    Lower OpenCL enqueued blocks
+; GCN-O1-OPTS-NEXT:    Replace within non-kernel function use of LDS with pointer
 ; GCN-O1-OPTS-NEXT:    Lower uses of LDS variables from non-kernel functions
 ; GCN-O1-OPTS-NEXT:    FunctionPass Manager
 ; GCN-O1-OPTS-NEXT:      Infer address spaces
 ; GCN-O2-NEXT:      Inliner for always_inline functions
 ; GCN-O2-NEXT:    A No-Op Barrier Pass
 ; GCN-O2-NEXT:    Lower OpenCL enqueued blocks
+; GCN-O2-NEXT:    Replace within non-kernel function use of LDS with pointer
 ; GCN-O2-NEXT:    Lower uses of LDS variables from non-kernel functions
 ; GCN-O2-NEXT:    FunctionPass Manager
 ; GCN-O2-NEXT:      Infer address spaces
 ; GCN-O3-NEXT:      Inliner for always_inline functions
 ; GCN-O3-NEXT:    A No-Op Barrier Pass
 ; GCN-O3-NEXT:    Lower OpenCL enqueued blocks
+; GCN-O3-NEXT:    Replace within non-kernel function use of LDS with pointer
 ; GCN-O3-NEXT:    Lower uses of LDS variables from non-kernel functions
 ; GCN-O3-NEXT:    FunctionPass Manager
 ; GCN-O3-NEXT:      Infer address spaces
index 28650ba..5498809 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -mtriple=amdgcn--  -amdgpu-replace-lds-use-with-pointer -amdgpu-enable-lds-replace-with-pointer=true < %s | FileCheck %s
+; RUN: opt -S -mtriple=amdgcn-- -amdgpu-replace-lds-use-with-pointer < %s | FileCheck %s
 
 ; DESCRIPTION:
 ;
index 6a35d86..abc17de 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -mtriple=amdgcn--  -amdgpu-replace-lds-use-with-pointer -amdgpu-enable-lds-replace-with-pointer=true < %s | FileCheck %s
+; RUN: opt -S -mtriple=amdgcn-- -amdgpu-replace-lds-use-with-pointer < %s | FileCheck %s
 
 ; DESCRIPTION:
 ;
index a5e2054..6f3663c 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -mtriple=amdgcn--  -amdgpu-replace-lds-use-with-pointer -amdgpu-enable-lds-replace-with-pointer=true < %s | FileCheck %s
+; RUN: opt -S -mtriple=amdgcn--  -amdgpu-replace-lds-use-with-pointer < %s | FileCheck %s
 
 ; DESCRIPTION:
 ;
index 7c1de3b..34a97da 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -mtriple=amdgcn--  -amdgpu-replace-lds-use-with-pointer -amdgpu-enable-lds-replace-with-pointer=true < %s | FileCheck %s
+; RUN: opt -S -mtriple=amdgcn-- -amdgpu-replace-lds-use-with-pointer < %s | FileCheck %s
 
 ; DESCRIPTION:
 ;
index 1d04b9d..580b375 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -mtriple=amdgcn--  -amdgpu-replace-lds-use-with-pointer -amdgpu-enable-lds-replace-with-pointer=true < %s | FileCheck %s
+; RUN: opt -S -mtriple=amdgcn-- -amdgpu-replace-lds-use-with-pointer < %s | FileCheck %s
 
 ; DESCRIPTION:
 ;
index f890164..34a624b 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -mtriple=amdgcn--  -amdgpu-replace-lds-use-with-pointer -amdgpu-enable-lds-replace-with-pointer=true < %s | FileCheck %s
+; RUN: opt -S -mtriple=amdgcn-- -amdgpu-replace-lds-use-with-pointer < %s | FileCheck %s
 
 ; DESCRIPTION ;
 ;
index df82e38..385d78c 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -mtriple=amdgcn--  -amdgpu-replace-lds-use-with-pointer -amdgpu-enable-lds-replace-with-pointer=true < %s | FileCheck %s
+; RUN: opt -S -mtriple=amdgcn-- -amdgpu-replace-lds-use-with-pointer < %s | FileCheck %s
 
 ; DESCRIPTION ;
 ;
index fe454c7..7f73177 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -mtriple=amdgcn--  -amdgpu-replace-lds-use-with-pointer -amdgpu-enable-lds-replace-with-pointer=true < %s | FileCheck %s
+; RUN: opt -S -mtriple=amdgcn-- -amdgpu-replace-lds-use-with-pointer < %s | FileCheck %s
 
 ; DESCRIPTION ;
 ;
index 5d36a1c..df3cfe7 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -mtriple=amdgcn--  -amdgpu-replace-lds-use-with-pointer -amdgpu-enable-lds-replace-with-pointer=true < %s | FileCheck %s
+; RUN: opt -S -mtriple=amdgcn-- -amdgpu-replace-lds-use-with-pointer < %s | FileCheck %s
 
 ; DESCRIPTION:
 ;
index 61bb91a..41ab55c 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -mtriple=amdgcn--  -amdgpu-replace-lds-use-with-pointer -amdgpu-enable-lds-replace-with-pointer=true < %s | FileCheck %s
+; RUN: opt -S -mtriple=amdgcn-- -amdgpu-replace-lds-use-with-pointer < %s | FileCheck %s
 
 ; DESCRIPTION:
 ;
index 55fd210..671f989 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -mtriple=amdgcn--  -amdgpu-replace-lds-use-with-pointer -amdgpu-enable-lds-replace-with-pointer=true < %s | FileCheck %s
+; RUN: opt -S -mtriple=amdgcn-- -amdgpu-replace-lds-use-with-pointer < %s | FileCheck %s
 
 ; DESCRIPTION:
 ;
index 80122cf..ec7bd54 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -mtriple=amdgcn--  -amdgpu-replace-lds-use-with-pointer -amdgpu-enable-lds-replace-with-pointer=true < %s | FileCheck %s
+; RUN: opt -S -mtriple=amdgcn--  -amdgpu-replace-lds-use-with-pointer < %s | FileCheck %s
 
 ; DESCRIPTION:
 ;
index b2c6928..314f909 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -mtriple=amdgcn--  -amdgpu-replace-lds-use-with-pointer -amdgpu-enable-lds-replace-with-pointer=true < %s | FileCheck %s
+; RUN: opt -S -mtriple=amdgcn-- -amdgpu-replace-lds-use-with-pointer < %s | FileCheck %s
 
 ; DESCRIPTION:
 ;
index c0a614f..453b5fd 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -mtriple=amdgcn--  -amdgpu-replace-lds-use-with-pointer -amdgpu-enable-lds-replace-with-pointer=true < %s | FileCheck %s
+; RUN: opt -S -mtriple=amdgcn-- -amdgpu-replace-lds-use-with-pointer < %s | FileCheck %s
 
 ; DESCRIPTION:
 ;
index 858f9be..763af6a 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -mtriple=amdgcn--  -amdgpu-replace-lds-use-with-pointer -amdgpu-enable-lds-replace-with-pointer=true < %s | FileCheck %s
+; RUN: opt -S -mtriple=amdgcn-- -amdgpu-replace-lds-use-with-pointer < %s | FileCheck %s
 
 ; DESCRIPTION:
 ;
index 43d120d..24bcee3 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -mtriple=amdgcn--  -amdgpu-replace-lds-use-with-pointer -amdgpu-enable-lds-replace-with-pointer=true < %s | FileCheck %s
+; RUN: opt -S -mtriple=amdgcn-- -amdgpu-replace-lds-use-with-pointer < %s | FileCheck %s
 
 ; DESCRIPTION:
 ; There is one lds global defined here, and this lds is used within a single non-kernel
index f228599..616439a 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -mtriple=amdgcn--  -amdgpu-replace-lds-use-with-pointer -amdgpu-enable-lds-replace-with-pointer=true < %s | FileCheck %s
+; RUN: opt -S -mtriple=amdgcn-- -amdgpu-replace-lds-use-with-pointer < %s | FileCheck %s
 
 ; DESCRIPTION:
 ;