[PATCH] D96166: [NVPTX][NewPM] Temporarily disable NVPTX passes in new PM pipeline

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 8 09:46:25 PST 2021


tra added inline comments.


================
Comment at: llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp:232-233
+  //       FunctionPassManager FPM(DebugPassManager);
+  //       FPM.addPass(NVVMReflectPass(Subtarget.getSmVersion()));
+  //       FPM.addPass(NVVMIntrRangePass(Subtarget.getSmVersion()));
+  //       PM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM)));
----------------
If we didn't run `NVVMReflectPass` before with the new PM and didn't fail, I'm very surprised.
This pass is necessary for using NVIDIA's `libdevice` bitcode. Without the pass we'd probably see compiler complaining about unresolved reference to `__nvvm_reflect` function.

`NVVMIntrRangePass` applies known range values to some CUDA functions which may allow compiler to optimize a bit better. Can be skipped w/o too much impact.

I don't know anything about `createModuleToFunctionPassAdaptor`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96166/new/

https://reviews.llvm.org/D96166



More information about the llvm-commits mailing list