[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
Loading
Please sign in to comment