Skip to content

Commit 7c2365e

Browse files
committed
Merge pull request #2709 from trentxintong/SFSO
Remove some dead code
2 parents f36c6d7 + 920410f commit 7c2365e

File tree

2 files changed

+0
-40
lines changed

2 files changed

+0
-40
lines changed

include/swift/SIL/Projection.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -767,8 +767,6 @@ class ProjectionTreeNode {
767767
NullablePtr<SILInstruction> createProjection(SILBuilder &B, SILLocation Loc,
768768
SILValue Arg) const;
769769

770-
std::string getNameEncoding(const ProjectionTree &PT) const;
771-
772770
SILInstruction *
773771
createAggregate(SILBuilder &B, SILLocation Loc,
774772
ArrayRef<SILValue> Args) const;
@@ -833,13 +831,6 @@ class ProjectionTree {
833831
/// All debug instructions (debug_value, debug_value_addr) are ignored.
834832
void computeUsesAndLiveness(SILValue Base);
835833

836-
/// Return a name encoding of the projection tree.
837-
std::string getNameEncoding() const;
838-
839-
/// Initialize an empty projection tree with an existing, computed projection
840-
/// tree.
841-
void initializeWithExistingTree(const ProjectionTree &PT);
842-
843834
/// Create a root SILValue iout of the given leaf node values by walking on
844835
/// the projection tree.
845836
SILValue computeExplodedArgumentValue(SILBuilder &Builder,

lib/SIL/Projection.cpp

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -875,19 +875,6 @@ createProjection(SILBuilder &B, SILLocation Loc, SILValue Arg) const {
875875
return Proj->createProjection(B, Loc, Arg);
876876
}
877877

878-
std::string
879-
ProjectionTreeNode::getNameEncoding(const ProjectionTree &PT) const {
880-
std::string Encoding;
881-
const ProjectionTreeNode *Node = this;
882-
while (Node) {
883-
if (Node->isRoot())
884-
break;
885-
Encoding += std::to_string(Node->Proj->getIndex());
886-
Node = Node->getParent(PT);
887-
}
888-
return Encoding;
889-
}
890-
891878
void
892879
ProjectionTreeNode::
893880
processUsersOfValue(ProjectionTree &Tree,
@@ -1156,24 +1143,6 @@ ProjectionTree::~ProjectionTree() {
11561143
// when the BPA allocator is free.
11571144
}
11581145

1159-
void
1160-
ProjectionTree::initializeWithExistingTree(const ProjectionTree &PT) {
1161-
LiveLeafIndices = PT.LiveLeafIndices;
1162-
for (const auto &N : PT.ProjectionTreeNodes) {
1163-
ProjectionTreeNodes.push_back(new (Allocator.Allocate())
1164-
ProjectionTreeNode(*N));
1165-
}
1166-
}
1167-
1168-
std::string ProjectionTree::getNameEncoding() const {
1169-
std::string Encoding;
1170-
for (unsigned index : LiveLeafIndices) {
1171-
const ProjectionTreeNode *Node = ProjectionTreeNodes[index];
1172-
Encoding += Node->getNameEncoding(*this);
1173-
}
1174-
return Encoding;
1175-
}
1176-
11771146
SILValue
11781147
ProjectionTree::computeExplodedArgumentValueInner(SILBuilder &Builder,
11791148
SILLocation Loc,

0 commit comments

Comments
 (0)