Skip to content

Commit bc4b239

Browse files
committed
Add a TODO with potential CheckAny optimization
1 parent 9836fb5 commit bc4b239

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/utils/TableGen/DecoderEmitter.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,6 +1663,11 @@ void DecoderTableEmitter::emitCheckAnyNode(const CheckAnyNode *N,
16631663
return;
16641664
}
16651665

1666+
// TODO: Emit single OPC_Scope and check at runtime where the scope ends.
1667+
// Not that it would save much space: OPC_Scope means we've resolved
1668+
// a conflict, and there aren't many of them. AMDGPU is an exception,
1669+
// it has ~3.5K OPC_Scope opcodes, but most, if not all scopes contain
1670+
// only two children.
16661671
for (const DecoderTreeNode *Child : drop_end(N->children())) {
16671672
emitOpcode("OPC_Scope");
16681673
emitULEB128(computeNodeSize(Child));

0 commit comments

Comments
 (0)