1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00

[NVPTX][NewPM] Temporarily disable NVPTX passes in new PM pipeline

These passes are causing numerical discrepancies after being added to
the pipeline. Disable while investigating.

Reviewed By: rupprecht

Differential Revision: https://reviews.llvm.org/D96166
This commit is contained in:
Arthur Eubanks 2021-02-05 11:14:12 -08:00
parent 12b402639e
commit 4e8e81b683
2 changed files with 14 additions and 10 deletions

View File

@ -222,14 +222,17 @@ void NVPTXTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB,
return false;
});
PB.registerPipelineStartEPCallback(
[this, DebugPassManager](ModulePassManager &PM,
PassBuilder::OptimizationLevel Level) {
FunctionPassManager FPM(DebugPassManager);
FPM.addPass(NVVMReflectPass(Subtarget.getSmVersion()));
FPM.addPass(NVVMIntrRangePass(Subtarget.getSmVersion()));
PM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM)));
});
// FIXME: these passes are causing numerical discrepancies, investigate and
// re-enable.
// PB.registerPipelineStartEPCallback(
// [this, DebugPassManager](ModulePassManager &PM,
// PassBuilder::OptimizationLevel Level) {
// FunctionPassManager FPM(DebugPassManager);
// FPM.addPass(NVVMReflectPass(Subtarget.getSmVersion()));
// FPM.addPass(NVVMIntrRangePass(Subtarget.getSmVersion()));
// PM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM)));
// });
}
TargetTransformInfo

View File

@ -1,9 +1,10 @@
; Libdevice in recent CUDA versions relies on __CUDA_ARCH reflecting GPU type.
; Verify that __nvvm_reflect() is replaced with an appropriate value.
;
; RUN: opt %s -S -nvvm-reflect -O2 -mtriple=nvptx64 \
; FIXME: fix pass and re-enable under new PM
; RUN: opt %s -S -nvvm-reflect -O2 -enable-new-pm=0 -mtriple=nvptx64 \
; RUN: | FileCheck %s --check-prefixes=COMMON,SM20
; RUN: opt %s -S -nvvm-reflect -O2 -mtriple=nvptx64 -mcpu=sm_35 \
; RUN: opt %s -S -nvvm-reflect -O2 -enable-new-pm=0 -mtriple=nvptx64 -mcpu=sm_35 \
; RUN: | FileCheck %s --check-prefixes=COMMON,SM35
@"$str" = private addrspace(1) constant [12 x i8] c"__CUDA_ARCH\00"