[PATCH] D113712: [DSE] Allow DSE to optimize MemorySSA by default.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 11 13:39:31 PST 2021


fhahn created this revision.
fhahn added reviewers: nikic, asbirlea, george.burgess.iv.
Herald added a subscriber: hiraditya.
fhahn requested review of this revision.
Herald added a project: LLVM.

This allows for better optimization of 'stores-of-existing-values' and
possibly helps passes further down the pipeline.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113712

Files:
  llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
  llvm/test/Transforms/DeadStoreElimination/stores-of-existing-values.ll


Index: llvm/test/Transforms/DeadStoreElimination/stores-of-existing-values.ll
===================================================================
--- llvm/test/Transforms/DeadStoreElimination/stores-of-existing-values.ll
+++ llvm/test/Transforms/DeadStoreElimination/stores-of-existing-values.ll
@@ -1,7 +1,7 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt -basic-aa -dse -dse-optimize-memoryssa=false -S %s | FileCheck --check-prefixes=CHECK,UNOPT %s
 ; RUN: opt -basic-aa -dse -dse-optimize-memoryssa -S %s | FileCheck --check-prefixes=CHECK,OPT %s
-; RUN: opt -basic-aa -dse -S %s | FileCheck --check-prefixes=CHECK,UNOPT %s
+; RUN: opt -basic-aa -dse -S %s | FileCheck --check-prefixes=CHECK,OPT %s
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
 
Index: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
@@ -166,8 +166,8 @@
 // those cases, the flag can be used to check if DSE's MemorySSA optimizations
 // impact follow-up passes.
 static cl::opt<bool>
-    OptimizeMemorySSA("dse-optimize-memoryssa", cl::init(false), cl::Hidden,
-                      cl::desc("Allow DSE to optimize memory accesses"));
+    OptimizeMemorySSA("dse-optimize-memoryssa", cl::init(true), cl::Hidden,
+                      cl::desc("Allow DSE to optimize memory accesses."));
 
 //===----------------------------------------------------------------------===//
 // Helper functions


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113712.386652.patch
Type: text/x-patch
Size: 1719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211111/b383483d/attachment.bin>


More information about the llvm-commits mailing list