diff options
| author | Tim Foley <tfoley@nvidia.com> | 2017-08-17 09:46:19 -0700 |
|---|---|---|
| committer | Tim Foley <tfoley@nvidia.com> | 2017-08-17 11:22:22 -0700 |
| commit | 5de3003af561bad33680940ab1809622c428e94b (patch) | |
| tree | ceb6f8b5f4d3c7e941f4edd47984b426d03fb980 /source/slang/parser.cpp | |
| parent | 5230ad2edb28e176d0d7d2a9873ffb8f65285269 (diff) | |
IR generation cleanup work
- Make all instructions store their argument count for now, so we can iterate over them easily.
- Longer term we might try to optimize for space because the common case is that the operand count is known, but keeping it simpler seems better for now
- Split apart the creation of an instruction from adding it to a parent
- Use the above capability to make sure that we add a function to its parent *after* all the parameter/result type emission has occured.
- Perform simple value numbering for types during IR creation
- This logic also tries to pick a good parent for any type instructions, so that types don't get created local to a function unless they really need to
- Create all constants at global scope, and re-use when values are identical
Diffstat (limited to 'source/slang/parser.cpp')
0 files changed, 0 insertions, 0 deletions
