llvm-project
4abdb85e - [SSAUpdater] Avoid un-necessary SmallVector stores (#97820)

Commit
1 year ago
[SSAUpdater] Avoid un-necessary SmallVector stores (#97820) The default template for the generic IDF calculator fetching block-children will, by default: * Fetch the children range from the relevant `GraphTraits`, * Store all child nodes in a `SmallVector`, * Return that `SmallVector` into the IDF calculator. The only place this `SmallVector` is used is in a for-range loop... thus there's no reason why we can't just iterate over the child range from `GraphTraits`, instead of storing all the nodes locally then iterating over the local copy. (If the children of a node change during IDF calculation, everything is broken anyway). This yields a 0.14% debug-info build performance improvement on the compile time tracker, as InstrRefBasedLDV uses the SSA updater intensively on all functions.
Author
Parents
Loading