[DSE] Allow DSE to optimize MemorySSA by default.

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

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D113712
This commit is contained in:
Florian Hahn 2021-12-01 08:29:23 +00:00
parent bdcc5aadf5
commit 7de410440d
No known key found for this signature in database
GPG Key ID: EEF712BB5E80EBBA
2 changed files with 3 additions and 3 deletions

View File

@ -166,8 +166,8 @@ static cl::opt<unsigned> MemorySSAPathCheckLimit(
// 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

View File

@ -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"