[all-commits] [llvm/llvm-project] 4abdb8: [SSAUpdater] Avoid un-necessary SmallVector stores...
Jeremy Morse via All-commits
all-commits at lists.llvm.org
Tue Jul 16 04:28:58 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4abdb85ef2b659a0ee919a4509dd6a82901351b5
https://github.com/llvm/llvm-project/commit/4abdb85ef2b659a0ee919a4509dd6a82901351b5
Author: Jeremy Morse <jeremy.morse at sony.com>
Date: 2024-07-16 (Tue, 16 Jul 2024)
Changed paths:
M llvm/include/llvm/Support/GenericIteratedDominanceFrontier.h
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list