forked from OSchip/llvm-project
DAG: Check if a value is divergent before requiresUniformRegister
This avoids a potentially expensive scan if we already know it doesn't matter.
This commit is contained in:
parent
b4275bcbe4
commit
792d9b5719
|
@ -387,8 +387,8 @@ unsigned FunctionLoweringInfo::CreateRegs(Type *Ty, bool isDivergent) {
|
|||
}
|
||||
|
||||
unsigned FunctionLoweringInfo::CreateRegs(const Value *V) {
|
||||
return CreateRegs(V->getType(), DA && !TLI->requiresUniformRegister(*MF, V) &&
|
||||
DA->isDivergent(V));
|
||||
return CreateRegs(V->getType(), DA && DA->isDivergent(V) &&
|
||||
!TLI->requiresUniformRegister(*MF, V));
|
||||
}
|
||||
|
||||
/// GetLiveOutRegInfo - Gets LiveOutInfo for a register, returning NULL if the
|
||||
|
|
Loading…
Reference in New Issue