aboutsummaryrefslogtreecommitdiff
path: root/test/opt/pass_remove_duplicates_test.cpp
AgeCommit message (Collapse)Author
2018-08-07Fixup readabilty/inheritance warnings (#1805)dan sinclair
This CL removes the un-needed virtual qualifiers from methods already marked as override.
2018-08-03Cleanup includes. (#1795)dan sinclair
This Cl cleans up the include paths to be relative to the top level directory. Various include-what-you-use fixes have been added.
2018-07-11Move tests into namespaces (#1689)dan sinclair
This CL moves the test into namespaces based on their directories.
2018-07-09Move the ir namespace to opt. (#1680)dan sinclair
This CL moves the files in opt/ to consistenly be under the opt:: namespace. This frees up the ir:: namespace so it can be used to make a shared ir represenation.
2018-06-29Revert change and stop running remove duplicates.Steven Perron
Revert "Don't merge types of resources" This reverts commit f393b0e48014867eaada2044841cd7e0140b3d0d, but leaves the tests that were added. Added new test. These test are the so that, if someone tries the same change I made, they will see the test that they need to handle. Don't run remove duplicates in -O and -Os Romve duplicates was run to help reduce compile time when looking for types in the type manager. I've run compile time test on three sets of shaders, and the compile time does not seem to change. It should be safe to remove it.
2018-06-27Don't merge types of resourcesSteven Perron
When doing reflection users care about the names of the variable, the name of the type, and the name of the members. Remove duplicates breaks this because it removes the names one of the types when merging. To fix this we have to keep the different types around for each resource. This commit adds code to remove duplicates to look for the types uses to describe resources, and make sure they do not get merged. However, allow merging of a type used in a resource with something not used in a resource. Was done when the non resource type came second. This could have a negative effect on compile time, but it was not expected to be much. Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/1372.
2018-03-05Avoid generating duplicate names when merging typesSteven Perron
The merging types we do not remove other information related to the types. We simply leave it duplicated, and hope it is removed later. This is what happens with decorations. They are removed in the next phase of remove duplicates. However, for OpNames that is not the case. We end up with two different names for the same id, which does not make sense. The solution is to remove the names and decorations for the type being removed instead of rewriting them to refer to the other type. Note that it is possible that if the first type does not have a name, then the types will end up with no name. That is fine because the names should not have any semantic significance anyway. The was identified in issue #1372, but this does not fix that issue.
2017-12-19Opt: Fix implementation and comment of AreDecorationsTheSamePierre Moreau
Target should not be ignored when comparing decorations in RemoveDuplicates Opt: Remove unused code in RemoveDuplicateDecorations