summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuiling Song <ruiling.song@intel.com>2014-06-27 14:17:57 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-06-30 11:50:54 +0800
commit3aa325c8a047f7176f3e00be597139eff8c9da32 (patch)
tree3964167abe93c0a2770853522f83e776503ac0f1
parent88bf22368b92e32014b94dddb6a5dceb66d1a12c (diff)
downloadbeignet-3aa325c8a047f7176f3e00be597139eff8c9da32.tar.gz
GBE: disable GVN pass when optLevel is zero.
GVN pass may generate some i256 data type, which our backend could not handle. So, only enable it when optLevel > 0. Signed-off-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
-rw-r--r--backend/src/llvm/llvm_to_gen.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/backend/src/llvm/llvm_to_gen.cpp b/backend/src/llvm/llvm_to_gen.cpp
index 50b3a197..153b11db 100644
--- a/backend/src/llvm/llvm_to_gen.cpp
+++ b/backend/src/llvm/llvm_to_gen.cpp
@@ -221,7 +221,8 @@ namespace gbe
passes.add(createConstantPropagationPass());
passes.add(createLowerSwitchPass());
passes.add(createPromoteMemoryToRegisterPass());
- passes.add(createGVNPass()); // Remove redundancies
+ if(optLevel > 0)
+ passes.add(createGVNPass()); // Remove redundancies
passes.add(createPrintfParserPass());
passes.add(createScalarizePass()); // Expand all vector ops
passes.add(createDeadInstEliminationPass()); // Remove simplified instructions