mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-06 01:24:35 +00:00
Shrink wrapping in PEI:
- reduces _static_ callee saved register spills and restores similar to Chow's original algorithm. - iterative implementation with simple heuristic limits to mitigate compile time impact. - handles placing spills/restores for multi-entry, multi-exit regions in the Machine CFG without splitting edges. - passes test-suite in LLCBETA mode. Added contains() method to ADT/SparseBitVector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71438 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -641,8 +641,8 @@ public:
|
|||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Intersect our bitmap with the complement of the RHS and return true if ours
|
// Intersect our bitmap with the complement of the RHS and return true
|
||||||
// changed.
|
// if ours changed.
|
||||||
bool intersectWithComplement(const SparseBitVector &RHS) {
|
bool intersectWithComplement(const SparseBitVector &RHS) {
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
ElementListIter Iter1 = Elements.begin();
|
ElementListIter Iter1 = Elements.begin();
|
||||||
@ -685,8 +685,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Three argument version of intersectWithComplement. Result of RHS1 & ~RHS2
|
// Three argument version of intersectWithComplement.
|
||||||
// is stored into this bitmap.
|
// Result of RHS1 & ~RHS2 is stored into this bitmap.
|
||||||
void intersectWithComplement(const SparseBitVector<ElementSize> &RHS1,
|
void intersectWithComplement(const SparseBitVector<ElementSize> &RHS1,
|
||||||
const SparseBitVector<ElementSize> &RHS2)
|
const SparseBitVector<ElementSize> &RHS2)
|
||||||
{
|
{
|
||||||
@ -775,6 +775,14 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Return true iff all bits set in this SparseBitVector are
|
||||||
|
// also set in RHS.
|
||||||
|
bool contains(const SparseBitVector<ElementSize> &RHS) const {
|
||||||
|
SparseBitVector<ElementSize> Result(*this);
|
||||||
|
Result &= RHS;
|
||||||
|
return (Result == RHS);
|
||||||
|
}
|
||||||
|
|
||||||
// Return the first set bit in the bitmap. Return -1 if no bits are set.
|
// Return the first set bit in the bitmap. Return -1 if no bits are set.
|
||||||
int find_first() const {
|
int find_first() const {
|
||||||
if (Elements.empty())
|
if (Elements.empty())
|
||||||
@ -875,6 +883,8 @@ operator-(const SparseBitVector<ElementSize> &LHS,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Dump a SparseBitVector to a stream
|
// Dump a SparseBitVector to a stream
|
||||||
template <unsigned ElementSize>
|
template <unsigned ElementSize>
|
||||||
void dump(const SparseBitVector<ElementSize> &LHS, llvm::OStream &out) {
|
void dump(const SparseBitVector<ElementSize> &LHS, llvm::OStream &out) {
|
||||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user