IR: Implement Value::mergeUseLists() iteratively
authorMatthias Braun <matze@braunis.de>
Wed, 29 Jul 2015 23:22:48 +0000 (23:22 +0000)
committerMatthias Braun <matze@braunis.de>
Wed, 29 Jul 2015 23:22:48 +0000 (23:22 +0000)
commit6821f63c91b111e0e6f427654c4b6272214a57f1
tree7be108dd8c0c6af6e23ed89edd81fe99de168b7c
parent7fe19725001547077aa737d1018a90207432acce
IR: Implement Value::mergeUseLists() iteratively

This avoids stack overflows when the the compiler does not perform tail call
elimination. Apparently this happens for MSVC with the /Ob2 switch which
may be used by external code including this header.

Reported by and based on a patch from Jean-Francois Riendeau.

Related to rdar://21900756

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243590 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Value.h