third_party_spirv-tools/source/opt
qining 380f36eae1 Fold spec constants to normal constants (values fixed)
For the spec constants defined by OpSpecConstantOp and
OpSpecContantComposite, if all of their operands are constants with
determined values (normal constants whose values are fixed), calculate
the correct values of the spec constants and re-define them as normal
constants.

In short, this pass replaces all the spec constants defined by
OpSpecContantOp and OpSpecConstantComposite with normal constants when
possible. So far not all valid operations of OpSpecConstantOp are
supported, we have several constriction here:

1) Only 32-bit integer and boolean (both scalar and vector) are
supported for any arithmetic operations. Integers in other width (like
64-bit) are not supported.
2) OpSConvert, OpFConvert, OpQuantizeToF16, and all the
operations under Kernel capability, are not supported.
3) OpCompositeInsert is not supported.

Note that this pass does not unify normal constants. This means it is
possible to have new generatd constants defining the same values.
2016-08-29 08:58:53 -04:00
..
basic_block.h IrLoader gracefully handles incomplete blocks and functions 2016-08-26 10:15:15 -04:00
CMakeLists.txt Fold spec constants to normal constants (values fixed) 2016-08-29 08:58:53 -04:00
constants.h Fold spec constants to normal constants (values fixed) 2016-08-29 08:58:53 -04:00
def_use_manager.cpp Refine the DefUseManager 2016-08-17 23:13:01 -04:00
def_use_manager.h Refine the DefUseManager 2016-08-17 23:13:01 -04:00
fold_spec_const_op_composite.cpp Fold spec constants to normal constants (values fixed) 2016-08-29 08:58:53 -04:00
function.cpp IrLoader gracefully handles incomplete blocks and functions 2016-08-26 10:15:15 -04:00
function.h ForEachInst optionally runs on attached debug line insts 2016-08-25 11:43:22 -04:00
instruction.cpp ForEachInst optionally runs on attached debug line insts 2016-08-25 11:43:22 -04:00
instruction.h Create const overloads for begin() and end() in Instruction. 2016-08-26 21:58:49 -04:00
ir_loader.cpp IrLoader gracefully handles incomplete blocks and functions 2016-08-26 10:15:15 -04:00
ir_loader.h IrLoader gracefully handles incomplete blocks and functions 2016-08-26 10:15:15 -04:00
iterator.h Make clear that we are using ptrdiff_t as the iterator difference type. 2016-08-16 11:21:08 -04:00
libspirv.cpp Add a home brewed make_unique to ease creating unique_ptrs. 2016-08-24 09:41:55 -04:00
libspirv.hpp Use friendly disassembly output 2016-07-28 09:39:42 -04:00
make_unique.h Add a home brewed make_unique to ease creating unique_ptrs. 2016-08-24 09:41:55 -04:00
module.cpp Create const overloads for begin() and end() in Instruction. 2016-08-26 21:58:49 -04:00
module.h Add Module::ComputeIdBound 2016-08-26 16:27:12 -04:00
pass_manager.h Pass manager recomputes Id bound automatically. 2016-08-27 13:19:18 -04:00
pass.h Separate pass.h from passes.h 2016-08-09 17:16:52 -04:00
passes.cpp Fold spec constants to normal constants (values fixed) 2016-08-29 08:58:53 -04:00
passes.h Fold spec constants to normal constants (values fixed) 2016-08-29 08:58:53 -04:00
reflect.h Promote ir namespace and create draft libspirv.{h|c}pp. 2016-06-28 14:52:34 -04:00
type_manager.cpp Create an iterator class for in-memory representation. 2016-08-11 18:35:12 -04:00
type_manager.h Make analyses RAII-like and turn disable copy/move constructors. 2016-08-15 13:41:47 -04:00
types.cpp Optimization: Add type class hierarchy. 2016-08-10 12:53:17 -04:00
types.h Add a method in the types to check whether there is no decoration on a 2016-08-26 12:09:21 -04:00