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)
commit6605ff8efeb041013f9dc4d97be9feb212af93b5
tree46e733a0a9c10c194bf49a20f41933a9a5ca0eb4
parent3393cfdef8d2ecdbe93ea97d1d912abc83644cbe
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

llvm-svn: 243590
llvm/include/llvm/IR/Value.h