Skip to content

Commit a03d7bf

Browse files
committed
Add FIXME comments with suggestions to improve test case maintenance.
1 parent ba03bef commit a03d7bf

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

include/swift/SIL/SILCloner.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,10 @@ void SILCloner<ImplClass>::visitBlocksDepthFirst(
614614
assert(preorderBlocks.empty());
615615

616616
// First clone the CFG region.
617+
//
618+
// FIXME: Add reverse iteration to SILSuccessor, then convert this to an RPOT
619+
// traversal. We would prefer to keep CFG regions in RPO order, and this would
620+
// be more scalable for functions with many large switches.
617621
SmallVector<SILBasicBlock *, 8> dfsWorklist(1, startBB);
618622
while (!dfsWorklist.empty()) {
619623
auto *BB = dfsWorklist.pop_back_val();

lib/Serialization/SerializeSIL.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,10 @@ void SILSerializer::writeSILFunction(const SILFunction &F, bool DeclOnly) {
411411
BasicBlockMap.clear();
412412
// Assign a value ID to each SILInstruction that has value and to each basic
413413
// block argument.
414+
//
415+
// FIXME: Add reverse iteration to SILSuccessor and convert this to a "stable"
416+
// RPO order. Currently, the serializer inverts the order of successors each
417+
// time they are processed.
414418
unsigned ValueID = 0;
415419
llvm::ReversePostOrderTraversal<SILFunction *> RPOT(
416420
const_cast<SILFunction *>(&F));

0 commit comments

Comments
 (0)