SPIRV-Tools/source/util
Alan Baker 802cf053c7 Merge arithmetic with non-trivial constant operands
Adding basis of arithmetic merging

* Refactored constant collection in ConstantManager
* New rules:
 * consecutive negates
 * negate of arithmetic op with a constant
 * consecutive muls
 * reciprocal of div

* Removed IRContext::CanFoldFloatingPoint
 * replaced by Instruction::IsFloatingPointFoldingAllowed
* Fixed some bad tests
* added some header comments

Added PerformIntegerOperation

* minor fixes to constants and tests
* fixed IntMultiplyBy1 to work with 64 bit ints
* added tests for integer mul merging

Adding test for vector integer multiply merging

Adding support for merging integer add and sub through negate

* Added tests

Adding rules to merge mult with preceding divide

* Has a couple tests, but needs more
* Added more comments

Fixed bug in integer division folding

* Will no longer merge through integer division if there would be a
remainder in the division
* Added a bunch more tests

Adding rules to merge divide and multiply through divide

* Improved comments
* Added tests

Adding rules to handle mul or div of a negation

* Added tests

Changes for review

* Early exit if no constants are involved in more functions
* fixed some comments
* removed unused declaration
* clarified some logic

Adding new rules for add and subtract

* Fold adds of adds, subtracts or negates
* Fold subtracts of adds, subtracts or negates
* Added tests
2018-02-27 13:02:13 -05:00
..
bit_stream.cpp Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
bit_stream.h Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
bitutils.h Add barrier instructions validation pass 2018-02-05 13:14:55 -05:00
hex_float.h Merge arithmetic with non-trivial constant operands 2018-02-27 13:02:13 -05:00
huffman_codec.h Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
ilist_node.h Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
ilist.h Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
move_to_front.h Fixed harmless uninit var warning 2018-01-31 17:49:01 -05:00
parse_number.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
parse_number.h Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
string_utils.cpp Added option --preserve-numeric-ids to tools/spirv-as 2017-04-13 14:13:33 -04:00
string_utils.h Validator checks if operands require extension 2017-03-14 13:39:43 -04:00