mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-11 11:34:02 +00:00
remove some llvmcontext arguments that are now dead post-refactoring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112104 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e6f7c267df
commit
aafe626c7f
@ -251,11 +251,6 @@ public:
|
|||||||
std::fill(ValueTypeActions, array_endof(ValueTypeActions), 0);
|
std::fill(ValueTypeActions, array_endof(ValueTypeActions), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// FIXME: This Context argument is now dead, zap it.
|
|
||||||
LegalizeAction getTypeAction(LLVMContext &Context, EVT VT) const {
|
|
||||||
return getTypeAction(VT);
|
|
||||||
}
|
|
||||||
|
|
||||||
LegalizeAction getTypeAction(EVT VT) const {
|
LegalizeAction getTypeAction(EVT VT) const {
|
||||||
if (!VT.isExtended())
|
if (!VT.isExtended())
|
||||||
return getTypeAction(VT.getSimpleVT());
|
return getTypeAction(VT.getSimpleVT());
|
||||||
@ -281,8 +276,8 @@ public:
|
|||||||
/// it is already legal (return 'Legal') or we need to promote it to a larger
|
/// it is already legal (return 'Legal') or we need to promote it to a larger
|
||||||
/// type (return 'Promote'), or we need to expand it into multiple registers
|
/// type (return 'Promote'), or we need to expand it into multiple registers
|
||||||
/// of smaller integer type (return 'Expand'). 'Custom' is not an option.
|
/// of smaller integer type (return 'Expand'). 'Custom' is not an option.
|
||||||
LegalizeAction getTypeAction(LLVMContext &Context, EVT VT) const {
|
LegalizeAction getTypeAction(EVT VT) const {
|
||||||
return ValueTypeActions.getTypeAction(Context, VT);
|
return ValueTypeActions.getTypeAction(VT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getTypeToTransformTo - For types supported by the target, this is an
|
/// getTypeToTransformTo - For types supported by the target, this is an
|
||||||
@ -296,7 +291,7 @@ public:
|
|||||||
assert((unsigned)VT.getSimpleVT().SimpleTy <
|
assert((unsigned)VT.getSimpleVT().SimpleTy <
|
||||||
array_lengthof(TransformToType));
|
array_lengthof(TransformToType));
|
||||||
EVT NVT = TransformToType[VT.getSimpleVT().SimpleTy];
|
EVT NVT = TransformToType[VT.getSimpleVT().SimpleTy];
|
||||||
assert(getTypeAction(Context, NVT) != Promote &&
|
assert(getTypeAction(NVT) != Promote &&
|
||||||
"Promote may not follow Expand or Promote");
|
"Promote may not follow Expand or Promote");
|
||||||
return NVT;
|
return NVT;
|
||||||
}
|
}
|
||||||
@ -311,17 +306,16 @@ public:
|
|||||||
EltVT : EVT::getVectorVT(Context, EltVT, NumElts / 2);
|
EltVT : EVT::getVectorVT(Context, EltVT, NumElts / 2);
|
||||||
}
|
}
|
||||||
// Promote to a power of two size, avoiding multi-step promotion.
|
// Promote to a power of two size, avoiding multi-step promotion.
|
||||||
return getTypeAction(Context, NVT) == Promote ?
|
return getTypeAction(NVT) == Promote ?
|
||||||
getTypeToTransformTo(Context, NVT) : NVT;
|
getTypeToTransformTo(Context, NVT) : NVT;
|
||||||
} else if (VT.isInteger()) {
|
} else if (VT.isInteger()) {
|
||||||
EVT NVT = VT.getRoundIntegerType(Context);
|
EVT NVT = VT.getRoundIntegerType(Context);
|
||||||
if (NVT == VT)
|
if (NVT == VT) // Size is a power of two - expand to half the size.
|
||||||
// Size is a power of two - expand to half the size.
|
|
||||||
return EVT::getIntegerVT(Context, VT.getSizeInBits() / 2);
|
return EVT::getIntegerVT(Context, VT.getSizeInBits() / 2);
|
||||||
else
|
|
||||||
// Promote to a power of two size, avoiding multi-step promotion.
|
// Promote to a power of two size, avoiding multi-step promotion.
|
||||||
return getTypeAction(Context, NVT) == Promote ?
|
return getTypeAction(NVT) == Promote ?
|
||||||
getTypeToTransformTo(Context, NVT) : NVT;
|
getTypeToTransformTo(Context, NVT) : NVT;
|
||||||
}
|
}
|
||||||
assert(0 && "Unsupported extended type!");
|
assert(0 && "Unsupported extended type!");
|
||||||
return MVT(MVT::Other); // Not reached
|
return MVT(MVT::Other); // Not reached
|
||||||
@ -334,7 +328,7 @@ public:
|
|||||||
EVT getTypeToExpandTo(LLVMContext &Context, EVT VT) const {
|
EVT getTypeToExpandTo(LLVMContext &Context, EVT VT) const {
|
||||||
assert(!VT.isVector());
|
assert(!VT.isVector());
|
||||||
while (true) {
|
while (true) {
|
||||||
switch (getTypeAction(Context, VT)) {
|
switch (getTypeAction(VT)) {
|
||||||
case Legal:
|
case Legal:
|
||||||
return VT;
|
return VT;
|
||||||
case Expand:
|
case Expand:
|
||||||
|
@ -100,8 +100,7 @@ public:
|
|||||||
/// it is already legal or we need to expand it into multiple registers of
|
/// it is already legal or we need to expand it into multiple registers of
|
||||||
/// smaller integer type, or we need to promote it to a larger type.
|
/// smaller integer type, or we need to promote it to a larger type.
|
||||||
LegalizeAction getTypeAction(EVT VT) const {
|
LegalizeAction getTypeAction(EVT VT) const {
|
||||||
return
|
return (LegalizeAction)ValueTypeActions.getTypeAction(VT);
|
||||||
(LegalizeAction)ValueTypeActions.getTypeAction(*DAG.getContext(), VT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// isTypeLegal - Return true if this type is legal on this target.
|
/// isTypeLegal - Return true if this type is legal on this target.
|
||||||
|
@ -75,7 +75,7 @@ private:
|
|||||||
|
|
||||||
/// getTypeAction - Return how we should legalize values of this type.
|
/// getTypeAction - Return how we should legalize values of this type.
|
||||||
LegalizeAction getTypeAction(EVT VT) const {
|
LegalizeAction getTypeAction(EVT VT) const {
|
||||||
switch (ValueTypeActions.getTypeAction(*DAG.getContext(), VT)) {
|
switch (ValueTypeActions.getTypeAction(VT)) {
|
||||||
default:
|
default:
|
||||||
assert(false && "Unknown legalize action!");
|
assert(false && "Unknown legalize action!");
|
||||||
case TargetLowering::Legal:
|
case TargetLowering::Legal:
|
||||||
@ -108,8 +108,7 @@ private:
|
|||||||
|
|
||||||
/// isTypeLegal - Return true if this type is legal on this target.
|
/// isTypeLegal - Return true if this type is legal on this target.
|
||||||
bool isTypeLegal(EVT VT) const {
|
bool isTypeLegal(EVT VT) const {
|
||||||
return (ValueTypeActions.getTypeAction(*DAG.getContext(), VT) ==
|
return ValueTypeActions.getTypeAction(VT) == TargetLowering::Legal;
|
||||||
TargetLowering::Legal);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// IgnoreNodeResults - Pretend all of this node's results are legal.
|
/// IgnoreNodeResults - Pretend all of this node's results are legal.
|
||||||
|
@ -869,7 +869,7 @@ unsigned TargetLowering::getVectorTypeBreakdown(LLVMContext &Context, EVT VT,
|
|||||||
// If there is a wider vector type with the same element type as this one,
|
// If there is a wider vector type with the same element type as this one,
|
||||||
// we should widen to that legal vector type. This handles things like
|
// we should widen to that legal vector type. This handles things like
|
||||||
// <2 x float> -> <4 x float>.
|
// <2 x float> -> <4 x float>.
|
||||||
if (NumElts != 1 && getTypeAction(Context, VT) == Promote) {
|
if (NumElts != 1 && getTypeAction(VT) == Promote) {
|
||||||
RegisterVT = getTypeToTransformTo(Context, VT);
|
RegisterVT = getTypeToTransformTo(Context, VT);
|
||||||
if (isTypeLegal(RegisterVT)) {
|
if (isTypeLegal(RegisterVT)) {
|
||||||
IntermediateVT = RegisterVT;
|
IntermediateVT = RegisterVT;
|
||||||
|
@ -433,9 +433,9 @@ static bool OptimizeNoopCopyExpression(CastInst *CI, const TargetLowering &TLI){
|
|||||||
// If these values will be promoted, find out what they will be promoted
|
// If these values will be promoted, find out what they will be promoted
|
||||||
// to. This helps us consider truncates on PPC as noop copies when they
|
// to. This helps us consider truncates on PPC as noop copies when they
|
||||||
// are.
|
// are.
|
||||||
if (TLI.getTypeAction(CI->getContext(), SrcVT) == TargetLowering::Promote)
|
if (TLI.getTypeAction(SrcVT) == TargetLowering::Promote)
|
||||||
SrcVT = TLI.getTypeToTransformTo(CI->getContext(), SrcVT);
|
SrcVT = TLI.getTypeToTransformTo(CI->getContext(), SrcVT);
|
||||||
if (TLI.getTypeAction(CI->getContext(), DstVT) == TargetLowering::Promote)
|
if (TLI.getTypeAction(DstVT) == TargetLowering::Promote)
|
||||||
DstVT = TLI.getTypeToTransformTo(CI->getContext(), DstVT);
|
DstVT = TLI.getTypeToTransformTo(CI->getContext(), DstVT);
|
||||||
|
|
||||||
// If, after promotion, these are the same types, this is a noop copy.
|
// If, after promotion, these are the same types, this is a noop copy.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user