mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-01 07:30:31 +00:00
Calling TLI->getNumRegisters creates a circular dependency when building LLVM using cmake.
Get the number of registers by calling getTypeLegalizationCost. PR14199. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166911 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8a5ec5d415
commit
e49816076c
@ -270,7 +270,7 @@ unsigned VectorTargetTransformImpl::getCmpSelInstrCost(unsigned Opcode,
|
||||
return getScalarizationOverhead(ValTy, true, false) + Num * Cost;
|
||||
}
|
||||
|
||||
// Unknown scalar opcode.
|
||||
// Unknown scalar opcode.
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -300,6 +300,8 @@ VectorTargetTransformImpl::getMemoryOpCost(unsigned Opcode, Type *Src,
|
||||
|
||||
unsigned
|
||||
VectorTargetTransformImpl::getNumberOfParts(Type *Tp) const {
|
||||
return TLI->getNumRegisters(Tp->getContext(), TLI->getValueType(Tp));
|
||||
std::pair<unsigned, EVT> LT =
|
||||
getTypeLegalizationCost(Tp->getContext(), TLI->getValueType(Tp));
|
||||
return LT.first;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user