1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 05:52:53 +02:00
llvm-mirror/lib
Duncan P. N. Exon Smith cdcaadaa39 Linker: Fix references to uniqued nodes after r243883
r243883 started moving 'distinct' nodes instead of duplicated them in
lib/Linker.  This had the side-effect of sometimes not cloning uniqued
nodes that reference them.  I missed a corner case:

    !named = !{!0}
    !0 = !{!1}
    !1 = distinct !{!0}

!0 is the entry point for "remapping", and a temporary clone (say,
!0-temp) is created and mapped in case we need to model a uniquing
cycle.

    Recursive descent into !1.  !1 is distinct, so we leave it alone,
    but update its operand to !0-temp.

Pop back out to !0.  Its only operand, !1, hasn't changed, so we don't
need to use !0-temp.  !0-temp goes out of scope, and we're finished
remapping, but we're left with:

    !named = !{!0}
    !0 = !{!1}
    !1 = distinct !{null} ; uh oh...

Previously, if !0 and !0-temp ended up with identical operands, then
!0-temp couldn't have been referenced at all.  Now that distinct nodes
don't get duplicated, that assumption is invalid.  We need to
!0-temp->replaceAllUsesWith(!0) before freeing !0-temp.

I found this while running an internal `-flto -g` bootstrap.  Strangely,
there was no case of this in the open source bootstrap I'd done before
commit...

llvm-svn: 243961
2015-08-04 06:42:31 +00:00
..
Analysis [LAA] Remove unused pointer partition argument from addRuntimeCheck, NFC 2015-08-04 05:16:20 +00:00
AsmParser Fix with a bit more care. (but only a bit) 2015-08-03 20:55:00 +00:00
Bitcode DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
CodeGen [SDAG] Fix a result chain in ExpandUnalignedLoad 2015-08-04 06:29:12 +00:00
DebugInfo [dwarfdump] Ignore scattered relocations for mach-o. 2015-07-31 20:22:50 +00:00
ExecutionEngine -Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11 2015-08-03 22:30:24 +00:00
Fuzzer [libFuzzer] more refactoring of the Mutator and adding tests to it 2015-08-01 02:23:06 +00:00
IR Introduce enum value for previously defined metadata -- make.implicit 2015-08-04 04:41:34 +00:00
IRReader Return a unique_ptr from getLazyBitcodeModule and parseBitcodeFile. NFC. 2015-06-16 22:27:55 +00:00
LibDriver Add support for producing thin archives in llvm-lib. 2015-07-17 16:01:11 +00:00
LineEditor
Linker Linker: Move distinct MDNodes instead of cloning 2015-08-03 17:09:38 +00:00
LTO Remove access to the DataLayout in the TargetMachine 2015-07-24 16:04:22 +00:00
MC Use range-based for loops. NFC 2015-08-02 22:34:02 +00:00
Object Use early return NFC. 2015-08-03 00:10:33 +00:00
Option Add an ArgList::AddAllArgs that accepts a vector of OptSpecifier. 2015-07-29 17:34:41 +00:00
Passes
ProfileData Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Support Remove the configure and cmake checks for sys/wait.h 2015-08-04 06:29:58 +00:00
TableGen TableGen: Support folding casts from bits to int 2015-07-31 01:12:06 +00:00
Target ARM: support windows division routines 2015-08-04 03:57:56 +00:00
Transforms Linker: Fix references to uniqued nodes after r243883 2015-08-04 06:42:31 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile