mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-06 20:32:19 +00:00
Use VTTI->getNumberOfParts in BBVectorize.
This change reflects VTTI refactoring; no functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166752 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
102a7c088c
commit
dc330f75b7
@ -819,12 +819,13 @@ namespace {
|
|||||||
if (VCost > ICost + JCost)
|
if (VCost > ICost + JCost)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// FIXME: We don't want to fuse to a type that will be split, even
|
// We don't want to fuse to a type that will be split, even
|
||||||
// if the two input types will also be split and there is no other
|
// if the two input types will also be split and there is no other
|
||||||
// associated cost. This check depends on the fact
|
// associated cost.
|
||||||
// that the current implementation of getMemoryOpCost returns only
|
unsigned VParts = VTTI->getNumberOfParts(VType);
|
||||||
// the type-splitting cost.
|
if (VParts > 1)
|
||||||
if (VCost > 1)
|
return false;
|
||||||
|
else if (!VParts && VCost == ICost + JCost)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
CostSavings = ICost + JCost - VCost;
|
CostSavings = ICost + JCost - VCost;
|
||||||
@ -842,13 +843,13 @@ namespace {
|
|||||||
if (VCost > ICost + JCost)
|
if (VCost > ICost + JCost)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// FIXME: We don't want to fuse to a type that will be split, even
|
// We don't want to fuse to a type that will be split, even
|
||||||
// if the two input types will also be split and there is no other
|
// if the two input types will also be split and there is no other
|
||||||
// associated cost. This check depends on the fact
|
// associated cost.
|
||||||
// that the current implementation of getMemoryOpCost returns only
|
unsigned VParts = VTTI->getNumberOfParts(VT1);
|
||||||
// the type-splitting cost (and does nothing else).
|
if (VParts > 1)
|
||||||
unsigned VTypeCost = VTTI->getMemoryOpCost(I->getOpcode(), VT1, 0, 0);
|
return false;
|
||||||
if (VTypeCost > 1)
|
else if (!VParts && VCost == ICost + JCost)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
CostSavings = ICost + JCost - VCost;
|
CostSavings = ICost + JCost - VCost;
|
||||||
|
Loading…
Reference in New Issue
Block a user