Browse Source

Disable LoopUnswitchPass.

Xiang Li 8 years ago
parent
commit
b1479680bb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/Transforms/IPO/PassManagerBuilder.cpp

+ 1 - 1
lib/Transforms/IPO/PassManagerBuilder.cpp

@@ -374,7 +374,7 @@ void PassManagerBuilder::populateModulePassManager(
   // Rotate Loop - disable header duplication at -Oz
   MPM.add(createLoopRotatePass(SizeLevel == 2 ? 0 : -1));
   MPM.add(createLICMPass());                  // Hoist loop invariants
-  MPM.add(createLoopUnswitchPass(SizeLevel || OptLevel < 3));
+  //MPM.add(createLoopUnswitchPass(SizeLevel || OptLevel < 3)); // HLSL Change - may move barrier inside divergent if.
   MPM.add(createInstructionCombiningPass());
   MPM.add(createIndVarSimplifyPass());        // Canonicalize indvars
   MPM.add(createLoopIdiomPass());             // Recognize idioms like memset.