Skip to content

CFG to instructions creates too many label IDs #117288

Closed
@iritkatriel

Description

@iritkatriel

_PyCfg_ToInstructionSequence creates an instruction sequence where the jump target labels are equal to the offsets of the jump targets. This by passes the "labelmap" mechanism of the instruction sequence data structure (the mapping is done at source) but also requires creating more label IDs (so a larger label map is built in the background).

It would be more efficient, and more logical, for this function to act like codegen, and use logical (incremental) labels which are later mapped to offset.

Linked PRs

Metadata

Metadata

Assignees

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions