Add general folding infrastructure.
authorSteven Perron <stevenperron@google.com>
Wed, 24 Jan 2018 18:26:33 +0000 (13:26 -0500)
committerDavid Neto <dneto@google.com>
Fri, 2 Feb 2018 17:24:11 +0000 (12:24 -0500)
commitbc1ec9418b89c996de85d68d28d070e6b2991a48
tree945d8e40153acf44f622bef85ffe0612decc0f66
parent1c0056c339227ca9e337ce3d2f5b83b1f8ccb1e5
Add general folding infrastructure.

Create the folding engine that will

1) attempt to fold an instruction.
2) iterates on the folding so small folding rules can be easily combined.
3) insert new instructions when needed.

I've added the minimum number of rules needed to test the features above.
Android.mk
source/opt/CMakeLists.txt
source/opt/fold.cpp
source/opt/folding_rules.cpp [new file with mode: 0644]
source/opt/folding_rules.h [new file with mode: 0644]
source/opt/instruction.h
source/opt/ir_builder.h
test/opt/fold_test.cpp