diff options
author | Yonah Goldberg <ygoldberg@nvidia.com> | 2025-04-10 18:33:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-10 18:33:37 -0700 |
commit | 701d726ef09ea89909df9bd2fdc63c63758fe8d6 (patch) | |
tree | 2035b1f60ae979ef302818f816a19dd82213fefc /llvm/lib/CodeGen/MachineOperand.cpp | |
parent | 1711996805c506f5717193aaeedf3752dfdd900d (diff) | |
download | llvm-701d726ef09ea89909df9bd2fdc63c63758fe8d6.zip llvm-701d726ef09ea89909df9bd2fdc63c63758fe8d6.tar.gz llvm-701d726ef09ea89909df9bd2fdc63c63758fe8d6.tar.bz2 |
[NVPTX] Improve NVVMReflect Efficiency (#134416)
The NVVMReflect pass simply replaces calls to nvvm-reflect functions
with the appropriate constant, either the architecture number, or
nvvm-reflect-ftz, found in the module's metadata.
The implementation is inefficient and does this by traversing through
all instructions to find calls. The common case is that you never call
nvvm-reflect, so this traversal is costly.
This PR:
- Updates the pass so that it finds the reflect functions by name, and
then traverses through their uses to find the calls directly.
- Adds a line (245) to make sure the dead nvvm-reflect definitions are
erased.
- Adds the ability to set reflect values via command line
Diffstat (limited to 'llvm/lib/CodeGen/MachineOperand.cpp')
0 files changed, 0 insertions, 0 deletions