Age | Commit message (Collapse) | Author | Files | Lines |
|
Fixes #1800
* Refactored duplication of code between OpCopyMemory and
OpCopyMemorySized validation
* Fixed some bugs in OpCopyMemorySized validation
* Replaced asserts with checks
* Added new tests
|
|
* Replaced uses in opcode validation of current_function()
* Added non-const accessor to function lookup in ValidationState_t
* Updated a couple bad tests due to check reordering
|
|
exactly as GCC would. I.e. -Wall translates to /Wall, which is an alias for -Weverything. This causes massive C++98 compat warnings logspam. (#1808)
|
|
This CL deletes methods from bit stream which are never used and moves
several to the anonymous namespace in the bit_stream test file.
|
|
This CL removes the templating from the MoveToFront code as all non-test
code uses uint32_t as the variable.
|
|
This CL removes the un-needed virtual qualifiers from methods already
marked as override.
|
|
|
|
This Cl cleans up the include paths to be relative to the top level
directory. Various include-what-you-use fixes have been added.
|
|
1.
BUILD.gn: Don't use the extra Chromium clang warnings
Also removes the unused .gn secondary_sources.
2.
Move fuzzers in test/ instead of testing/
This frees up testing/ to be the git subtree of Chromium's src/testing/
that contains test.gni, gtest, gmock and libfuzzer
3.
DEPS: get the whole testing/ subtree of Chromium
4.
BUILD.gn: Simplify the standalone gtest targets
These targets definitions are inspired from ANGLE's and add a variable
that is the path of the googletest directory so that it can be made
overridable in future commits.
6.
BUILD.gn: Add overridable variables for deps dirs
This avoids hardcoded paths to dependencies that make it hard to
integrate SPIRV-Tools in other GN projects.
|
|
The warning should only be applied for Clang builds, it was accidentally
also being included for GCC builds.
|
|
This CL removes the last two 'using namespace' commands.
|
|
This CL rewrites the include guards to make PRESUBMIT.py include guard
check happy.
|
|
|
|
When validating a FunctionCall we can trigger an assert if we are not
currently within a function body. This CL adds verification that we are
within a function before attempting to add a function call.
Issue 1789.
|
|
This CL moves most of the logic out of validation ProcessInstruction and
groups it into validate. This places all of the validation logic in the
same place making it clearer what is running.
The Instruction class is changed to allow setting the function and block
after creation.
|
|
This Cl adds the legalization and size fuzzers for the optimizer. The
main optimizer is renamed to the performance optimizer.
|
|
The spirv-opt fuzzer is not registering any passes to run, so it is not
currently testing anything. For now we will just register the
performance passes.
We should add different fuzzers for the legalization pass
(RegisterLegalizationPasses()), and the size passes
(RegisterSizePasses()).
|
|
This CL changes the stats aggregator to use
ValidateBinaryAndKeepValidationState to process the binary. This means
we can remove ValidateInstructionAndUpdateValidationState which expects
to be able to call ProcessInstruction in the validate anonymous
namespace. This decouples the stats aggregator from how validation
processes the binary.
|
|
In the merge return pass, we will split a block, but not update the phi
instructions that reference the block. Since the branch in the original
block is now part of the block with the new id, the phi nodes must be
updated.
This commit will change this.
I have also considered other places where an id of a basic block could
be referenced, and I don't think any of them need to change.
1) Branch and merge instructions: These jump to the start of the
original block, and so we want them to jump to the block that uses the
original id. Nothing needs to change.
2) Names and decorations: I don't think it matters with block keeps the
name, and there are no decorations that apply to basic blocks.
Fixes #1736.
|
|
There are several validation passes which loop over all ordered
instructions. This CL combines those into a single loop, calling each
pass as needed.
|
|
The instruction counter is the same as the size of the
ordered_instruction list when we insert a new instruction. This Cl
removes instruction_counter_ and uses that instead.
|
|
* Refactored the Memory class of instructions in the spec out Id
validation and into a new pass
* Tests unmodified
* some minor disassembly changes
* minor style changes
|
|
Many of the files have using std::<foo> statements in them, but then the
use of <foo> will be inconsistently std::<foo> or <foo> scattered
through the file. This CL removes all of the using statements and
updates the code to have the required std:: prefix.
|
|
This CL removes the two diag() overloads and leaves only the version
which accepts an Instruction. This is safer as we never use the
implicit location from the validation state.
|
|
The SPIRV-Tools target doesn't build anything, it just depends on the other libraries. As such, there is no static_library generated and this should be a group() instead.
|
|
This CL updates the diag() call in validate_capability to provide the
instruction.
|
|
When creating a new phi for a value in the function, merge return will
rewrite all uses of an id that are no longer dominated by its
definition. Uses that are not in a basic block, like OpName or
decorations, are not dominated, but they should not be replaced.
Fixes #1736.
|
|
This CL updates the diag() calls in validate_type_unique to pass the
relevant instruction.
|
|
This CL updates the diag() calls in validate_primitives to provide the
relevant instruction.
|
|
This CL upldates diag() calls in validate_non_uniform to provide the
relevant instruction.
|
|
This CL updates the diag() calls in validate_logicals to provide the
Instruction.
|
|
This CL updates the diag() call in validate_literals to provide the
relevant instruction.
|
|
This CL updates the diag() calls in validate_layout to pass the relevant
instruction.
|
|
This CL upldates validate_interface to pass the instruction to the
diag() method.
|
|
This CL updates validate_instruction to pass the Instruction to diag().
|
|
This CL updates the diag() calls in validate_image to provide the
relvant instruction.
|
|
This CL updates the diag() usage in validate_ext_inst to provide the
relevant instruction.
|
|
This CL updates diag() in validate_derivatives to provide the
instruction of interest.
|
|
Several of the diag() calls in validate_decorations do not provide the
line number, and will output the last line in the file. This CL updates
the diag() calls to provide the instruction of interest.
|
|
This CL removes the two deque's from ValidationState and converts them
into std::vectors. In order to maintain the stability of instructions we
walk over the binary and counter the instructions and functions in the
ValidationState constructor and reserve the required number of items in
the module_functions_ and ordered_instructions_ vectors.
Issue #1176.
|
|
This CL updates validate_datarules to provide the instruction to diag().
|
|
|
|
This CL updates validate_conversion to provide the instruction to diag()
calls.
|
|
This CL updates the diag() calls in validate_composites to provide the
instruction directly.
|
|
This CL updates the diag() calls in validate_cfg to provide the
associated instruction. This fixes a couple places where we output the
last line of the file instead of the instruction as the disassembly.
|
|
This CL updates the calls to diag() in vlidate_builtings to provide the
instruction.
|
|
This Cl upldates the diag() calls to pass the instruction in
validate_bitwise.
|
|
This CL updates validate_barriers to provide an explicit instruction
when calling diag().
|
|
This CL updates validate_atomics to explicitly provide the instruction
when caling diag().
|
|
This CL updates the diag() calls in validate_arithmetics to explicitly
provide the instruction the diagnostic is attached too.
|