1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 14:02:52 +02:00
llvm-mirror/lib/Transforms/Utils
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
..
AddDiscriminators.cpp IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
ASanStackFrameLayout.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
BasicBlockUtils.cpp New EH representation for MSVC compatibility 2015-07-31 17:58:14 +00:00
BreakCriticalEdges.cpp [PM/AA] Remove all of the dead AliasAnalysis pointers being threaded 2015-07-22 09:52:54 +00:00
BuildLibCalls.cpp Simplify IRBuilder::CreateCall* by using ArrayRef+initializer_list/braced init only 2015-05-18 22:13:54 +00:00
BypassSlowDivision.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
CloneFunction.cpp [LoopDist] Move loop-versioning helper functions to Cloning, NFC 2015-07-10 18:55:09 +00:00
CloneModule.cpp [Cloning] Teach CloneModule about personality functions 2015-06-30 22:14:01 +00:00
CMakeLists.txt [LoopDist/LoopVer] Move LoopVersioning to a new module, NFC 2015-07-10 18:55:13 +00:00
CmpInstAnalysis.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
CodeExtractor.cpp [opaque pointer type] Start migrating GEP creation to explicitly specify the pointee type 2015-03-14 01:53:18 +00:00
CtorUtils.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
DemoteRegToStack.cpp Fix a bug in DemoteRegToStack where a reload instruction was inserted into the 2015-02-09 06:38:23 +00:00
FlattenCFG.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
GlobalStatus.cpp [CallSite] Make construction from Value* (or Instruction*) explicit. 2015-04-10 14:50:08 +00:00
InlineFunction.cpp New EH representation for MSVC compatibility 2015-07-31 17:58:14 +00:00
InstructionNamer.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
IntegerDivision.cpp Simplify IRBuilder::CreateCall* by using ArrayRef+initializer_list/braced init only 2015-05-18 22:13:54 +00:00
LCSSA.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
LLVMBuild.txt Update libdeps since TLI was moved from Target to Analysis in r226078. 2015-01-15 05:21:00 +00:00
Local.cpp New EH representation for MSVC compatibility 2015-07-31 17:58:14 +00:00
LoopSimplify.cpp New EH representation for MSVC compatibility 2015-07-31 17:58:14 +00:00
LoopUnroll.cpp [PM/AA] Remove all of the dead AliasAnalysis pointers being threaded 2015-07-22 09:52:54 +00:00
LoopUnrollRuntime.cpp [PM/AA] Remove all of the dead AliasAnalysis pointers being threaded 2015-07-22 09:52:54 +00:00
LoopUtils.cpp Refactor RecurrenceInstDesc 2015-06-16 22:59:45 +00:00
LoopVersioning.cpp [LoopVer] Remove unused needsRuntimeChecks(), NFC 2015-08-03 23:32:57 +00:00
LowerInvoke.cpp
LowerSwitch.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Makefile
Mem2Reg.cpp [PM] Split the AssumptionTracker immutable pass into two separate APIs: 2015-01-04 12:03:27 +00:00
MetaRenamer.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
ModuleUtils.cpp [asan] Rename the ABI versioning symbol to '__asan_version_mismatch_check' instead of abusing '__asan_init' 2015-07-23 10:54:06 +00:00
PromoteMemoryToRegister.cpp Fix mem2reg to correctly handle allocas only used in a single block 2015-07-22 10:29:29 +00:00
SimplifyCFG.cpp De-constify pointers to Type since they can't be modified. NFC 2015-08-01 22:20:21 +00:00
SimplifyIndVar.cpp [IndVars] Make loop varying predicates loop invariant. 2015-07-27 21:42:49 +00:00
SimplifyInstructions.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
SimplifyLibCalls.cpp Change Function::getIntrinsicID() to return an Intrinsic::ID. NFC. 2015-05-20 17:16:39 +00:00
SSAUpdater.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
SymbolRewriter.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
UnifyFunctionExitNodes.cpp [LPM] Stop using the string based preservation API. It is an 2015-01-28 04:57:56 +00:00
Utils.cpp
ValueMapper.cpp Linker: Fix references to uniqued nodes after r243883 2015-08-04 06:42:31 +00:00