There are several standard ways to get information about PCI slot numbering. The $PIR table being as old as the PCI standard, itself. The $PIR table will give you a mapping of how each PCI bus/dev is physically labelled. There are also newer standards using ACPI and SMBIOS tables for the same. (The newer standards also give a mechanism to label embedded devices with their physical label, which the older $PIR lacked.)
You are probably thinking of the older problem where NIC enumeration changed from depth-first search to breadth-first, changing the order in which ethX's were labelled.
This new mechanism completely solves the problem by relying on long-standing standards.