[all-commits] [llvm/llvm-project] f69393: [SelectionDAG] Transitively copy NodeExtraInfo on ...
Marco Elver via All-commits
all-commits at lists.llvm.org
Thu Mar 2 14:08:39 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f693932fbea7abc3f65907dd0b0e3d4ffe0b9918
https://github.com/llvm/llvm-project/commit/f693932fbea7abc3f65907dd0b0e3d4ffe0b9918
Author: Marco Elver <elver at google.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
M llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
M llvm/test/CodeGen/X86/pcsections-atomics.ll
Log Message:
-----------
[SelectionDAG] Transitively copy NodeExtraInfo on RAUW
During legalization of the SelectionDAG, some nodes are replaced with
arch-specific nodes. These may be complex nodes, where the root node no
longer corresponds to the node that should carry the extra info.
Fix the issue by copying extra info to the new node and all its new
transitive operands during RAUW. See code comments for more details.
This fixes the remaining pcsections-atomics.ll tests on X86.
v2: Optimize copyExtraInfo() deep copy. For now we assume that only
NodeExtraInfo that have PCSections set require deep copy. Furthermore,
limit the depth of graph search while pre-populating the visited set,
assuming the to-be-replaced subgraph 'From' has limited complexity. An
assertion catches if the maximum depth needs to be increased.
Reviewed By: dvyukov
Differential Revision: https://reviews.llvm.org/D144677
More information about the All-commits
mailing list