Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJaebaek Seo <jaebaek@google.com>2021-09-02 17:45:51 +0300
committerGitHub <noreply@github.com>2021-09-02 17:45:51 +0300
commit0c09258e073bdbae19d2de8386125b35b783928b (patch)
treefb19f7b901f8b4033ee5ebac1823b2e68c845259 /tools
parentbd3a271ce3fcc8b9ed8e6eb2e94392d1b220adc9 (diff)
Set threshold for reduce-load-size pass (#4499)
Allow uses to set the threshold for spirv-opt reduce-load-size pass
Diffstat (limited to 'tools')
-rw-r--r--tools/opt/opt.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index 28770cb91..d5036fc30 100644
--- a/tools/opt/opt.cpp
+++ b/tools/opt/opt.cpp
@@ -387,9 +387,12 @@ Options (in lexicographical order):)",
Change the scope of private variables that are used in a single
function to that function.)");
printf(R"(
- --reduce-load-size
+ --reduce-load-size[=<threshold>]
Replaces loads of composite objects where not every component is
- used by loads of just the elements that are used.)");
+ used by loads of just the elements that are used. If the ratio
+ of the used components of the load is less than the <threshold>,
+ we replace the load. <threshold> is a double type number. If
+ it is bigger than 1.0, we always replaces the load.)");
printf(R"(
--redundancy-elimination
Looks for instructions in the same function that compute the