dawn-cmake/src/sem
Ben Clayton 6cdb1bf7c0 resolver: Fix constant propagation for POC
Pipeline overidable constants are not compile-time constant.
If a module-scope const has an [[override]] decoration, do not assign
the constant value to it, as this will propagate, and the constant value
may become inlined in places that should be overridable.

Also: Rename sem::GlobalVariable::IsPipelineConstant() to
IsOverridable() to make it clearer that this is not a compile-time known
value. Add SetIsOverridable() so we can correctly set the
IsOverridable() flag even when there isn't an ID.

Change-Id: I5ede9dd180d5ff1696b3868ea4313fc28f93af4b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/69140
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-11-11 19:12:36 +00:00
..
array.cc sem::Type: Replace GetDefaultAlignAndSize() with Size() and Align() 2021-07-22 18:56:54 +00:00
array.h Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
atomic_type.cc validation: function scope variable store type must be constructible 2021-07-28 22:43:36 +00:00
atomic_type.h validation: function scope variable store type must be constructible 2021-07-28 22:43:36 +00:00
atomic_type_test.cc sem: Add atomic type 2021-06-17 15:48:39 +00:00
binding_point.h Resolver: Validate resource binding decorations 2021-05-10 19:16:46 +00:00
block_statement.cc Rework Resolver so that we construct semantic types in a single pass. 2021-11-05 16:51:38 +00:00
block_statement.h Rework Resolver so that we construct semantic types in a single pass. 2021-11-05 16:51:38 +00:00
bool_type.cc sem::Type: Replace GetDefaultAlignAndSize() with Size() and Align() 2021-07-22 18:56:54 +00:00
bool_type.h sem::Type: Replace GetDefaultAlignAndSize() with Size() and Align() 2021-07-22 18:56:54 +00:00
bool_type_test.cc Remove sem::AccessControl 2021-05-14 17:51:13 +00:00
call.cc Rework Resolver so that we construct semantic types in a single pass. 2021-11-05 16:51:38 +00:00
call.h Rework Resolver so that we construct semantic types in a single pass. 2021-11-05 16:51:38 +00:00
call_target.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
call_target.h Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
constant.cc Rework Resolver so that we construct semantic types in a single pass. 2021-11-05 16:51:38 +00:00
constant.h Rework Resolver so that we construct semantic types in a single pass. 2021-11-05 16:51:38 +00:00
depth_multisampled_texture_type.cc Implement texture_depth_multisampled_2d 2021-07-26 22:19:48 +00:00
depth_multisampled_texture_type.h Implement texture_depth_multisampled_2d 2021-07-26 22:19:48 +00:00
depth_multisampled_texture_type_test.cc Implement texture_depth_multisampled_2d 2021-07-26 22:19:48 +00:00
depth_texture_type.cc diag: Add System enumerator to all diagnostics 2021-06-24 11:27:36 +00:00
depth_texture_type.h Remove Clone() from sem::Types 2021-05-05 16:55:22 +00:00
depth_texture_type_test.cc Remove sem::AccessControl 2021-05-14 17:51:13 +00:00
expression.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
expression.h Rework Resolver so that we construct semantic types in a single pass. 2021-11-05 16:51:38 +00:00
external_texture_type.cc Remove Clone() from sem::Types 2021-05-05 16:55:22 +00:00
external_texture_type.h Remove Clone() from sem::Types 2021-05-05 16:55:22 +00:00
external_texture_type_test.cc Remove sem::AccessControl 2021-05-14 17:51:13 +00:00
f32_type.cc sem::Type: Replace GetDefaultAlignAndSize() with Size() and Align() 2021-07-22 18:56:54 +00:00
f32_type.h sem::Type: Replace GetDefaultAlignAndSize() with Size() and Align() 2021-07-22 18:56:54 +00:00
f32_type_test.cc Remove sem::AccessControl 2021-05-14 17:51:13 +00:00
for_loop_statement.cc Rework Resolver so that we construct semantic types in a single pass. 2021-11-05 16:51:38 +00:00
for_loop_statement.h Rework Resolver so that we construct semantic types in a single pass. 2021-11-05 16:51:38 +00:00
function.cc Rework Resolver so that we construct semantic types in a single pass. 2021-11-05 16:51:38 +00:00
function.h HLSL: workaround FXC sometimes failing with 'not all control paths return a result' in functions with discard 2021-11-10 14:38:34 +00:00
i32_type.cc sem::Type: Replace GetDefaultAlignAndSize() with Size() and Align() 2021-07-22 18:56:54 +00:00
i32_type.h sem::Type: Replace GetDefaultAlignAndSize() with Size() and Align() 2021-07-22 18:56:54 +00:00
i32_type_test.cc Remove sem::AccessControl 2021-05-14 17:51:13 +00:00
if_statement.cc Rework Resolver so that we construct semantic types in a single pass. 2021-11-05 16:51:38 +00:00
if_statement.h Rework Resolver so that we construct semantic types in a single pass. 2021-11-05 16:51:38 +00:00
info.cc Rename sem_*.cc to *.cc 2021-04-19 15:20:03 +00:00
info.h Rework Resolver so that we construct semantic types in a single pass. 2021-11-05 16:51:38 +00:00
intrinsic.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
intrinsic.h Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
intrinsic_test.cc intrinsics: textureSampleCompareLevel() 2021-06-14 15:29:34 +00:00
intrinsic_type.cc Implement atomicSub intrinsic 2021-08-26 15:26:25 +00:00
intrinsic_type.cc.tmpl sem: Split sem::Variable into global, local and parameter 2021-07-22 13:24:59 +00:00
intrinsic_type.h Implement atomicSub intrinsic 2021-08-26 15:26:25 +00:00
intrinsic_type.h.tmpl sem: Split sem::Variable into global, local and parameter 2021-07-22 13:24:59 +00:00
loop_statement.cc Rework Resolver so that we construct semantic types in a single pass. 2021-11-05 16:51:38 +00:00
loop_statement.h Rework Resolver so that we construct semantic types in a single pass. 2021-11-05 16:51:38 +00:00
matrix_type.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
matrix_type.h Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
matrix_type_test.cc Remove sem::AccessControl 2021-05-14 17:51:13 +00:00
member_accessor_expression.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
member_accessor_expression.h Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
multisampled_texture_type.cc diag: Add System enumerator to all diagnostics 2021-06-24 11:27:36 +00:00
multisampled_texture_type.h Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
multisampled_texture_type_test.cc Have TypesBuilder::F32() return ast::F32 2021-05-19 19:51:22 +00:00
node.cc sem: Have sem::Type derive from sem::Node 2021-05-06 15:52:33 +00:00
node.h sem: Have sem::Type derive from sem::Node 2021-05-06 15:52:33 +00:00
parameter_usage.cc intrinsic-gen: Additional functionality 2021-06-03 09:16:14 +00:00
parameter_usage.cc.tmpl src/sem: Generate ParameterUsage from intrinsics.def 2021-06-01 10:00:10 +00:00
parameter_usage.h intrinsic-gen: Additional functionality 2021-06-03 09:16:14 +00:00
parameter_usage.h.tmpl src/sem: Generate ParameterUsage from intrinsics.def 2021-06-01 10:00:10 +00:00
pipeline_stage_set.h resolver: Validate pipline stage use for intrinsics 2021-06-03 16:07:34 +00:00
pointer_type.cc diag: Add System enumerator to all diagnostics 2021-06-24 11:27:36 +00:00
pointer_type.h Remove depreated APIs and WGSL 2021-07-06 10:20:19 +00:00
pointer_type_test.cc Add optional access to ptr<> 2021-06-04 22:17:37 +00:00
reference_type.cc diag: Add System enumerator to all diagnostics 2021-06-24 11:27:36 +00:00
reference_type.h Remove depreated APIs and WGSL 2021-07-06 10:20:19 +00:00
reference_type_test.cc Add optional access to ptr<> 2021-06-04 22:17:37 +00:00
sampled_texture_type.cc diag: Add System enumerator to all diagnostics 2021-06-24 11:27:36 +00:00
sampled_texture_type.h Remove Clone() from sem::Types 2021-05-05 16:55:22 +00:00
sampled_texture_type_test.cc Have TypesBuilder::F32() return ast::F32 2021-05-19 19:51:22 +00:00
sampler_type.cc Remove Clone() from sem::Types 2021-05-05 16:55:22 +00:00
sampler_type.h Remove Clone() from sem::Types 2021-05-05 16:55:22 +00:00
sampler_type_test.cc sem: Split sem::Variable into global, local and parameter 2021-07-22 13:24:59 +00:00
sem_array_test.cc sem::Type: Replace GetDefaultAlignAndSize() with Size() and Align() 2021-07-22 18:56:54 +00:00
sem_struct_test.cc ast: Keep style consistent 2021-10-15 17:33:10 +00:00
statement.cc Rework Resolver so that we construct semantic types in a single pass. 2021-11-05 16:51:38 +00:00
statement.h Rework Resolver so that we construct semantic types in a single pass. 2021-11-05 16:51:38 +00:00
storage_texture_type.cc wgsl: Deprecate [[access]] decorations 2021-06-04 20:41:47 +00:00
storage_texture_type.h wgsl: Deprecate [[access]] decorations 2021-06-04 20:41:47 +00:00
storage_texture_type_test.cc wgsl: Deprecate [[access]] decorations 2021-06-04 20:41:47 +00:00
struct.cc Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
struct.h Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
switch_statement.cc Rework Resolver so that we construct semantic types in a single pass. 2021-11-05 16:51:38 +00:00
switch_statement.h Rework Resolver so that we construct semantic types in a single pass. 2021-11-05 16:51:38 +00:00
test_helper.h Move type/* files to sem/ directory 2021-04-19 22:54:43 +00:00
texture_type.cc Resolver: Add ast -> sem type resolving 2021-04-21 13:47:12 +00:00
texture_type.h Resolver: Add ast -> sem type resolving 2021-04-21 13:47:12 +00:00
texture_type_test.cc Remove duplicated tests on ast::TextureType 2021-05-21 19:40:23 +00:00
type.cc castable: Infer Is() TO type from predicate 2021-08-23 15:16:42 +00:00
type.h sem::Type: Replace GetDefaultAlignAndSize() with Size() and Align() 2021-07-22 18:56:54 +00:00
type_manager.cc Move type/* files to sem/ directory 2021-04-19 22:54:43 +00:00
type_manager.h Move type/* files to sem/ directory 2021-04-19 22:54:43 +00:00
type_manager_test.cc Move type/* files to sem/ directory 2021-04-19 22:54:43 +00:00
type_mappings.h writer/hlsl: Simplify emission logic, clean up output 2021-06-16 09:19:36 +00:00
u32_type.cc sem::Type: Replace GetDefaultAlignAndSize() with Size() and Align() 2021-07-22 18:56:54 +00:00
u32_type.h sem::Type: Replace GetDefaultAlignAndSize() with Size() and Align() 2021-07-22 18:56:54 +00:00
u32_type_test.cc Remove sem::AccessControl 2021-05-14 17:51:13 +00:00
variable.cc resolver: Fix constant propagation for POC 2021-11-11 19:12:36 +00:00
variable.h resolver: Fix constant propagation for POC 2021-11-11 19:12:36 +00:00
vector_type.cc sem::Type: Replace GetDefaultAlignAndSize() with Size() and Align() 2021-07-22 18:56:54 +00:00
vector_type.h Make all ast and sem pointers const 2021-10-19 18:38:54 +00:00
vector_type_test.cc sem: Rename `Vector::size()` to `Vector::Width()` 2021-07-22 18:31:34 +00:00
void_type.cc Remove Clone() from sem::Types 2021-05-05 16:55:22 +00:00
void_type.h Remove Clone() from sem::Types 2021-05-05 16:55:22 +00:00