summaryrefslogtreecommitdiff
path: root/source/opt/fold.h
diff options
context:
space:
mode:
authorSteven Perron <stevenperron@google.com>2018-02-15 10:41:01 -0500
committerSteven Perron <31666470+s-perron@users.noreply.github.com>2018-02-16 13:49:47 -0500
commit3756b387f3c5c5e56d3c0d5983082f294f652eb0 (patch)
tree0b4adc32d00e99d8c46218c308766084b5aa31fd /source/opt/fold.h
parentefe286cd326e80f4a0a0a826cbf6be3be9814894 (diff)
downloadSPIRV-Tools-3756b387f3c5c5e56d3c0d5983082f294f652eb0.tar.gz
SPIRV-Tools-3756b387f3c5c5e56d3c0d5983082f294f652eb0.tar.bz2
SPIRV-Tools-3756b387f3c5c5e56d3c0d5983082f294f652eb0.zip
Get CCP to use the constant floating point rules.
Fixes #1311
Diffstat (limited to 'source/opt/fold.h')
-rw-r--r--source/opt/fold.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/opt/fold.h b/source/opt/fold.h
index 439ed2b6..9c6028df 100644
--- a/source/opt/fold.h
+++ b/source/opt/fold.h
@@ -18,12 +18,16 @@
#include <cstdint>
#include <vector>
+#include "const_folding_rules.h"
#include "constants.h"
#include "def_use_manager.h"
namespace spvtools {
namespace opt {
+// Returns a reference to the ConstnatFoldingRules instance.
+const ConstantFoldingRules& GetConstantFoldingRules();
+
// Returns the result of folding a scalar instruction with the given |opcode|
// and |operands|. Each entry in |operands| is a pointer to an
// analysis::Constant instance, which should've been created with the constant