2021-12-09 19:41:47 +00:00
|
|
|
From 449c00f9b32ffb71be7e8274871e1f383b046ca2 Mon Sep 17 00:00:00 2001
|
2021-12-06 03:53:27 +00:00
|
|
|
From: Dave Airlie <airlied@redhat.com>
|
|
|
|
Date: Mon, 6 Dec 2021 13:49:10 +1000
|
|
|
|
Subject: [PATCH] optimizer: restore previous ABI.
|
|
|
|
|
|
|
|
The change in
|
|
|
|
commit 4ac8e5e541ea992dc6f44a4d4eb065a8fe0888ec
|
|
|
|
Author: Greg Fischer <greg@lunarg.com>
|
|
|
|
Date: Wed Sep 15 12:38:34 2021 -0600
|
|
|
|
|
|
|
|
Add preserve_interface mode to aggressive_dead_code_elim (#4520)
|
|
|
|
|
|
|
|
Broke the C++ ABI for spirv-tools shared libraries on Linux, for not a great reason.
|
|
|
|
|
|
|
|
Restore the previous ABI.
|
|
|
|
---
|
2021-12-09 19:41:47 +00:00
|
|
|
include/spirv-tools/optimizer.hpp | 3 ++-
|
|
|
|
source/opt/optimizer.cpp | 5 +++++
|
|
|
|
2 files changed, 7 insertions(+), 1 deletion(-)
|
2021-12-06 03:53:27 +00:00
|
|
|
|
|
|
|
diff --git a/include/spirv-tools/optimizer.hpp b/include/spirv-tools/optimizer.hpp
|
2021-12-09 19:41:47 +00:00
|
|
|
index 21059cbe..d9c511af 100644
|
2021-12-06 03:53:27 +00:00
|
|
|
--- a/include/spirv-tools/optimizer.hpp
|
|
|
|
+++ b/include/spirv-tools/optimizer.hpp
|
|
|
|
@@ -519,7 +519,8 @@ Optimizer::PassToken CreateDeadInsertElimPass();
|
|
|
|
// interface are considered live and are not eliminated. This mode is needed
|
|
|
|
// by GPU-Assisted validation instrumentation, where a change in the interface
|
|
|
|
// is not allowed.
|
|
|
|
-Optimizer::PassToken CreateAggressiveDCEPass(bool preserve_interface = false);
|
|
|
|
+Optimizer::PassToken CreateAggressiveDCEPass();
|
2021-12-09 19:41:47 +00:00
|
|
|
+Optimizer::PassToken CreateAggressiveDCEPass(bool preserve_interface);
|
2021-12-06 03:53:27 +00:00
|
|
|
|
|
|
|
// Creates a remove-unused-interface-variables pass.
|
|
|
|
// Removes variables referenced on the |OpEntryPoint| instruction that are not
|
|
|
|
diff --git a/source/opt/optimizer.cpp b/source/opt/optimizer.cpp
|
2021-12-09 19:41:47 +00:00
|
|
|
index e74db26f..32a3d01e 100644
|
2021-12-06 03:53:27 +00:00
|
|
|
--- a/source/opt/optimizer.cpp
|
|
|
|
+++ b/source/opt/optimizer.cpp
|
2021-12-09 19:41:47 +00:00
|
|
|
@@ -764,6 +764,11 @@ Optimizer::PassToken CreateLocalMultiStoreElimPass() {
|
2021-12-06 03:53:27 +00:00
|
|
|
MakeUnique<opt::SSARewritePass>());
|
|
|
|
}
|
|
|
|
|
|
|
|
+Optimizer::PassToken CreateAggressiveDCEPass() {
|
2021-12-09 19:41:47 +00:00
|
|
|
+ return MakeUnique<Optimizer::PassToken::Impl>(
|
2021-12-06 03:53:27 +00:00
|
|
|
+ MakeUnique<opt::AggressiveDCEPass>(false));
|
|
|
|
+}
|
|
|
|
+
|
2021-12-09 19:41:47 +00:00
|
|
|
Optimizer::PassToken CreateAggressiveDCEPass(bool preserve_interface) {
|
|
|
|
return MakeUnique<Optimizer::PassToken::Impl>(
|
|
|
|
MakeUnique<opt::AggressiveDCEPass>(preserve_interface));
|
2021-12-06 03:53:27 +00:00
|
|
|
--
|
|
|
|
2.33.1
|
|
|
|
|