Pārlūkot izejas kodu

Disable LoopUnswitchPass.

Xiang Li 8 gadi atpakaļ
vecāks
revīzija
5ffacb3b8f
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      lib/Transforms/IPO/PassManagerBuilder.cpp

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

@@ -354,7 +354,7 @@ void PassManagerBuilder::populateModulePassManager(
   // Rotate Loop - disable header duplication at -Oz
   // Rotate Loop - disable header duplication at -Oz
   MPM.add(createLoopRotatePass(SizeLevel == 2 ? 0 : -1));
   MPM.add(createLoopRotatePass(SizeLevel == 2 ? 0 : -1));
   MPM.add(createLICMPass());                  // Hoist loop invariants
   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(createInstructionCombiningPass());
   MPM.add(createIndVarSimplifyPass());        // Canonicalize indvars
   MPM.add(createIndVarSimplifyPass());        // Canonicalize indvars
   MPM.add(createLoopIdiomPass());             // Recognize idioms like memset.
   MPM.add(createLoopIdiomPass());             // Recognize idioms like memset.