AMDGPU: Remove redundant opt level check
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 7 Aug 2017 18:12:48 +0000 (18:12 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 7 Aug 2017 18:12:48 +0000 (18:12 +0000)
addOptimizedRegAlloc isn't used for -O0 already.

llvm-svn: 310275

llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp

index 53e8255..0511bb1 100644 (file)
@@ -799,8 +799,7 @@ void GCNPassConfig::addFastRegAlloc(FunctionPass *RegAllocPass) {
 }
 
 void GCNPassConfig::addOptimizedRegAlloc(FunctionPass *RegAllocPass) {
-  if (getOptLevel() > CodeGenOpt::None)
-    insertPass(&MachineSchedulerID, &SIOptimizeExecMaskingPreRAID);
+  insertPass(&MachineSchedulerID, &SIOptimizeExecMaskingPreRAID);
 
   // This must be run immediately after phi elimination and before
   // TwoAddressInstructions, otherwise the processing of the tied operand of