summaryrefslogtreecommitdiff
path: root/backend/src/ir/context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backend/src/ir/context.cpp')
-rw-r--r--backend/src/ir/context.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/backend/src/ir/context.cpp b/backend/src/ir/context.cpp
index e4aac088..f60d33f4 100644
--- a/backend/src/ir/context.cpp
+++ b/backend/src/ir/context.cpp
@@ -24,6 +24,7 @@
#include "ir/context.hpp"
#include "ir/unit.hpp"
#include "ir/lowering.hpp"
+#include "ir/constopt.hpp"
namespace gbe {
namespace ir {
@@ -82,6 +83,10 @@ namespace ir {
fn->sortLabels();
fn->computeCFG();
+ //TODO: do constant folding and propagation for GEN IR
+ //here as the first step, we just do constant folding for kernel struct args
+ foldFunctionStructArgConstOffset(unit, fn->getName());
+
// Spill function argument to the stack if required and identify which
// function arguments can use constant push
lowerFunctionArguments(unit, fn->getName());