mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
Teach the SLP Vectorizer that keeping some values live over a callsite can have a cost.
Some types, such as 128-bit vector types on AArch64, don't have any callee-saved registers. So if a value needs to stay live over a callsite, it must be spilled and refilled. This cost is now taken into account. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214859 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -230,6 +230,11 @@ unsigned TargetTransformInfo::getReductionCost(unsigned Opcode, Type *Ty,
|
||||
return PrevTTI->getReductionCost(Opcode, Ty, IsPairwise);
|
||||
}
|
||||
|
||||
unsigned TargetTransformInfo::getCostOfKeepingLiveOverCall(ArrayRef<Type*> Tys)
|
||||
const {
|
||||
return PrevTTI->getCostOfKeepingLiveOverCall(Tys);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
struct NoTTI final : ImmutablePass, TargetTransformInfo {
|
||||
@@ -613,6 +618,11 @@ struct NoTTI final : ImmutablePass, TargetTransformInfo {
|
||||
unsigned getReductionCost(unsigned, Type *, bool) const override {
|
||||
return 1;
|
||||
}
|
||||
|
||||
unsigned getCostOfKeepingLiveOverCall(ArrayRef<Type*> Tys) const override {
|
||||
return 0;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
} // end anonymous namespace
|
||||
|
||||
Reference in New Issue
Block a user