message: Updated arguments for CM passes
diff: @@ -510,12 +510,16 @@ void Optimize(llvm::Module *module, int optLevel) {
  // Currently ISPC uses CM runtime on Windows and L0 runtime on Linux.
  // TODO: rework this as soon as we move to L0 runtime completely
  if (g->target_os == TargetOS::windows) {
  - optPM.add(llvm::createCMImpParamPass(true));
  + optPM.add(llvm::createCMImpParamPass(/*IsCMRT*/ true));
  } else {
  - optPM.add(llvm::createCMImpParamPass(false));
  + optPM.add(llvm::createCMImpParamPass(/*IsCMRT*/ false));
  }
  optPM.add(llvm::createCMABIPass());
  - optPM.add(llvm::createCMKernelArgOffsetPass(g->target->getGenxGrfSize()));
  + if (g->target_os == TargetOS::windows) {
  + optPM.add(llvm::createCMKernelArgOffsetPass(g->target->getGenxGrfSize(), /* OCLCodeGen*/ false));
  + } else {
  + optPM.add(llvm::createCMKernelArgOffsetPass(g->target->getGenxGrfSize(), /* OCLCodeGen*/ true));
  + }
  optPM.add(llvm::createGenXReduceIntSizePass());
  optPM.add(CreatePromoteToPrivateMemoryPass());
  }
  @@ -650,9 +654,9 @@ void Optimize(llvm::Module *module, int optLevel) {
  // Currently ISPC uses CM runtime on Windows and L0 runtime on Linux.
  // TODO: rework this as soon as we move to L0 runtime completely
  if (g->target_os == TargetOS::windows) {
  - optPM.add(llvm::createCMImpParamPass(true));
  + optPM.add(llvm::createCMImpParamPass(/*IsCMRT*/ true));
  } else {
  - optPM.add(llvm::createCMImpParamPass(false));
  + optPM.add(llvm::createCMImpParamPass(/*IsCMRT*/ false));
  }
  optPM.add(llvm::createCMABIPass());
  }
  @@ -768,7 +772,11 @@ void Optimize(llvm::Module *module, int optLevel) {
  optPM.add(llvm::createConstantMergePass());
  #ifdef ISPC_GENX_ENABLED
  if (g->target->getISA() == Target::GENX) {
  - optPM.add(llvm::createCMKernelArgOffsetPass(g->target->getGenxGrfSize()));
  + if (g->target_os == TargetOS::windows) {
  + optPM.add(llvm::createCMKernelArgOffsetPass(g->target->getGenxGrfSize(), /* OCLCodeGen*/ false));
  + } else {
  + optPM.add(llvm::createCMKernelArgOffsetPass(g->target->getGenxGrfSize(), /* OCLCodeGen*/ true));
  + }
  }
  #endif
  // Should be the last
  