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
|
|
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 cleans up the include paths to be relative to the top level
directory. Various include-what-you-use fixes have been added.
|
|
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 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.
|
|
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.
|
|
Previously the adjacency messages would output the last line of the file
as the disassembly. This is incorrect, as we have an instruction they
can be attached too. This CL fixes the messages to attach to the correct
line number.
|
|
This CL changes validate.cpp to use diag providing an explicit
instruction. This changes the result of the function end checks to not
output a disassembly anymore as printing the last line of the module
didn't seem to make sense.
|
|
This CL changes the signature of diag() to accept an Instruction instead
of the instructions position.
A deprecated variant that accepts the position is available but will be
removed in the near future.
|
|
* Combines OpAccessChain, OpInBoundsAccessChain, OpPtrAccessChain and
OpInBoundsPtrAccessChain
* New folding rule to fold add with 0 for integers
* Converts to a bitcast if the result type does not match the operand
type
V
|
|
This CL moves the SPIRV_TIMER_ENABLED preprocesser guard to encompass
the includes along with the source. Currently we will try to pull in
sys/resource.h on machines which may not have the file available and the
build will fail. If we don't need timers, then we don't need the
includes as well.
|
|
Currently, some instructions will be missing from the list of
ordered_instructions. This will cause issues due to the debug change
which passed the last instruction into subsequent passes.
This CL moves the addition to the ordered list out of the
RegisterInstruction method into AddOrderedInstruction. This method is
called first in ProcessInstruction and the CapabilitiesPass and IdPass
are updated to take an Instruction parameter.
|
|
This CL removes the redundant operator name from the error messages in
validate_composites. The operator will be printed on the next line with
the disassembly.
|
|
This CL splits the switch in ImagePass into individual validate
functions. The error messages have been updated to drop the
suffix/prefix of the opcode name since it will be displayed in the
disassembly.
|
|
This CL moves the OpVectorShuffle ID check out of validate_id and into
validate_composites with the rest of the composite checks.
|
|
This Cl splits the CompositePass switch to have one method per case
label. This makes the code a lot simpler to follow.
|