diff options
author | GregF <greg@LunarG.com> | 2018-01-26 17:05:33 -0700 |
---|---|---|
committer | Steven Perron <stevenperron@google.com> | 2018-01-30 08:52:14 -0500 |
commit | f28b1061736a7034f66389f74408ce4955767a43 (patch) | |
tree | dd56edf130c0cd24edaf75d21c815f83ec72be83 /tools | |
parent | 1b46f7ecad32f99e0b28702505a192d7bf680bd7 (diff) |
InsertExtractElim: Split out DeadInsertElim as separate pass
Diffstat (limited to 'tools')
-rw-r--r-- | tools/opt/opt.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index c007b0ae..e072084e 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -118,6 +118,10 @@ Options (in lexicographical order): --eliminate-dead-functions Deletes functions that cannot be reached from entry points or exported functions. + --eliminate-dead-insert + Deletes unreferenced inserts into composites, most notably + unused stores to vector components, that are not removed by + aggressive dead code elimination. --eliminate-dead-variables Deletes module scope variables that are not referenced. --eliminate-insert-extract @@ -425,6 +429,8 @@ OptStatus ParseFlags(int argc, const char** argv, Optimizer* optimizer, optimizer->RegisterPass(CreateCommonUniformElimPass()); } else if (0 == strcmp(cur_arg, "--eliminate-dead-const")) { optimizer->RegisterPass(CreateEliminateDeadConstantPass()); + } else if (0 == strcmp(cur_arg, "--eliminate-dead-inserts")) { + optimizer->RegisterPass(CreateDeadInsertElimPass()); } else if (0 == strcmp(cur_arg, "--eliminate-dead-variables")) { optimizer->RegisterPass(CreateDeadVariableEliminationPass()); } else if (0 == strcmp(cur_arg, "--fold-spec-const-op-composite")) { |