[llvm] 6dfa95d - [X86] X86DAGToDAGISel::matchAddressRecursively - use SelectionDAG::MaxRecursionDepth instead of hard coded constant. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 30 05:31:26 PDT 2023
Author: Simon Pilgrim
Date: 2023-07-30T13:31:23+01:00
New Revision: 6dfa95dae10b7aa0d2a5b8fc9d86f4da52271693
URL: https://github.com/llvm/llvm-project/commit/6dfa95dae10b7aa0d2a5b8fc9d86f4da52271693
DIFF: https://github.com/llvm/llvm-project/commit/6dfa95dae10b7aa0d2a5b8fc9d86f4da52271693.diff
LOG: [X86] X86DAGToDAGISel::matchAddressRecursively - use SelectionDAG::MaxRecursionDepth instead of hard coded constant. NFCI.
SelectionDAG::MaxRecursionDepth has the same max depth (with adjusted comparison).
Added:
Modified:
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
index 4380f8c7ae922e..ddb48ab49fee3e 100644
--- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
@@ -2210,7 +2210,7 @@ bool X86DAGToDAGISel::matchAddressRecursively(SDValue N, X86ISelAddressMode &AM,
AM.dump(CurDAG);
});
// Limit recursion.
- if (Depth > 5)
+ if (Depth >= SelectionDAG::MaxRecursionDepth)
return matchAddressBase(N, AM);
// If this is already a %rip relative address, we can only merge immediates
More information about the llvm-commits
mailing list