From: Pan Xiuli <xiuli....@intel.com> We found that in some loops there will be constant bool values that do not change with loop, and LLVM can unswitch these bool value out of the loop for less compare. V2: Fix a typo
Signed-off-by: Pan Xiuli <xiuli....@intel.com> --- backend/src/llvm/llvm_to_gen.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/llvm/llvm_to_gen.cpp b/backend/src/llvm/llvm_to_gen.cpp index 37919ec..1f30239 100644 --- a/backend/src/llvm/llvm_to_gen.cpp +++ b/backend/src/llvm/llvm_to_gen.cpp @@ -370,6 +370,7 @@ namespace gbe #else passes.add(new DataLayout(DL)); #endif + passes.add(createLoopUnswitchPass(true)); // Print the code before further optimizations passes.add(createIntrinsicLoweringPass()); passes.add(createStripAttributesPass()); // Strip unsupported attributes and calling conventions. -- 2.7.4 _______________________________________________ Beignet mailing list Beignet@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/beignet