diff options
author | Jaebaek Seo <jaebaek@google.com> | 2021-09-02 17:45:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-02 17:45:51 +0300 |
commit | 0c09258e073bdbae19d2de8386125b35b783928b (patch) | |
tree | fb19f7b901f8b4033ee5ebac1823b2e68c845259 /tools | |
parent | bd3a271ce3fcc8b9ed8e6eb2e94392d1b220adc9 (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.cpp | 7 |
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 |