summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Rong <rong.r.yang@intel.com>2015-09-16 16:49:37 +0800
committerYang Rong <rong.r.yang@intel.com>2016-01-26 10:24:46 +0800
commitc1add7f4e5ccc28cfdb51c4d9bae2d6f4195b7e4 (patch)
tree9e2ef246587051cc4d151d589830cbd771fb4d92
parent6cd2ab7d7063e6e9bfc968dec01428f0983876f4 (diff)
GBE: Move createStripAttributesPass before createInstructionCombiningPass.
Otherwise, createInstructionCombiningPass will convert some call to illegal instruction in llvm3.7, for example utest compiler_time_stamp and test_load_program_from_spir. Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
-rw-r--r--backend/src/llvm/llvm_to_gen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/src/llvm/llvm_to_gen.cpp b/backend/src/llvm/llvm_to_gen.cpp
index 538d1c5a..24d4be79 100644
--- a/backend/src/llvm/llvm_to_gen.cpp
+++ b/backend/src/llvm/llvm_to_gen.cpp
@@ -110,6 +110,7 @@ namespace gbe
MPM.add(createTypeBasedAliasAnalysisPass());
MPM.add(createBasicAliasAnalysisPass());
MPM.add(createIntrinsicLoweringPass());
+ MPM.add(createStripAttributesPass()); // Strip unsupported attributes and calling conventions.
MPM.add(createSamplerFixPass());
MPM.add(createGlobalOptimizerPass()); // Optimize out global vars
@@ -119,7 +120,6 @@ namespace gbe
MPM.add(createInstructionCombiningPass());// Clean up after IPCP & DAE
MPM.add(createCFGSimplificationPass()); // Clean up after IPCP & DAE
MPM.add(createPruneEHPass()); // Remove dead EH info
- MPM.add(createStripAttributesPass()); // Strip unsupported attributes and calling conventions.
MPM.add(createBarrierNodupPass(false)); // remove noduplicate fnAttr before inlining.
MPM.add(createFunctionInliningPass(20000));
MPM.add(createBarrierNodupPass(true)); // restore noduplicate fnAttr after inlining.