History log of /freebsd-10.2-release/contrib/llvm/patches/patch-r274442-llvm-r221709-debug-oom.diff
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 285830 23-Jul-2015 gjb

- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
builds.
- Update newvers.sh to reflect RC1.
- Update __FreeBSD_version to reflect 10.2.
- Update default pkg(8) configuration to use the quarterly branch.[1]

Discussed with: re, portmgr [1]
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 274696 19-Nov-2014 dim

MFC r274442:

Pull in r221709 from upstream llvm trunk (by Frédéric Riss):

Totally forget deallocated SDNodes in SDDbgInfo.

What would happen before that commit is that the SDDbgValues associated with
a deallocated SDNode would be marked Invalidated, but SDDbgInfo would keep
a map entry keyed by the SDNode pointer pointing to this list of invalidated
SDDbgNodes. As the memory gets reused, the list might get wrongly associated
with another new SDNode. As the SDDbgValues are cloned when they are transfered,
this can lead to an exponential number of SDDbgValues being produced during
DAGCombine like in http://llvm.org/bugs/show_bug.cgi?id=20893

Note that the previous behavior wasn't really buggy as the invalidation made
sure that the SDDbgValues won't be used. This commit can be considered a
memory optimization and as such is really hard to validate in a unit-test.

This should fix abnormally large memory usage and resulting OOM crashes
when compiling certain ports with debug information.

Reported by: Dmitry Marakasov <amdmi3@amdmi3.ru>
Upstream PRs: http://llvm.org/PR19031 http://llvm.org/PR20893

MFC r274483:

The fix imported into llvm in r274442 contains some C++11 constructs,
which gcc in base cannot handle. Replace these with C++98 equivalents.

While here, add the patch for the adapted fix.

Reported by: bz, kib
Pointy hat to: dim


# 274483 13-Nov-2014 dim

The fix imported into llvm in r274442 contains some C++11 constructs,
which gcc in base cannot handle. Replace these with C++98 equivalents.

While here, add the patch for the adapted fix.

Reported by: bz, kib
Pointy hat to: dim
MFC after: 1 week
X-MFC-With: r274442