[DAG] Add SelectionDAG::MaxRecursionDepth constant
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 19 Sep 2019 12:58:43 +0000 (12:58 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 19 Sep 2019 12:58:43 +0000 (12:58 +0000)
commitc65dd89804d35fbd6170b61a0d1494df0576d352
tree23afb2cb0e22463061583308301287e5dbd22bbf
parent13bdae8541c3fc5acf6ee7de78ec5ab8446848e4
[DAG] Add SelectionDAG::MaxRecursionDepth constant

As commented on D67557 we have a lot of uses of depth checks all using magic numbers.

This patch adds the SelectionDAG::MaxRecursionDepth constant and moves over some general cases to use this explicitly.

Differential Revision: https://reviews.llvm.org/D67711

llvm-svn: 372315
llvm/include/llvm/CodeGen/SelectionDAG.h
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp