1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 22:12:57 +02:00
llvm-mirror/lib/Transforms/Utils
Duncan P. N. Exon Smith aa712f8848 ValueMapper: Avoid recursion in mapSimplifiedMetadata, NFC
The main change is to delay materializing GlobalValue initializers from
Mapper::mapValue until Mapper::~Mapper.  This effectively removes all
recursion from mapSimplifiedMetadata, as promised in r265270.
mapSimplifiedMetadata calls mapValue for ConstantAsMetadata nodes to
find the mapped constant, and now it shouldn't be possible for mapValue
to indirectly re-invoke mapMetadata.  I'll add an assertion to that
effect in a follow-up (separated so that the assertion can easily be
reverted independently, if it comes to that).

This a step toward a broader goal: converting Mapper::mapMetadataImpl
from a recursive to an iterative algorithm.

When a BlockAddress points at a BasicBlock inside an unmaterialized
function body, we need to delay it until the function body is
materialized in Mapper::~Mapper.  This commit creates a temporary
BasicBlock and returns a new BlockAddress, then RAUWs the BasicBlock
once it is known.  This situation should be extremely rare since a
BlockAddress is usually used from within the function it's referencing
(and BlockAddress itself is rare).

There should be no observable functionality change.

llvm-svn: 265273
2016-04-03 20:17:45 +00:00
..
AddDiscriminators.cpp Remove llvm::getDISubprogram in favor of Function::getSubprogram 2016-03-11 02:14:16 +00:00
ASanStackFrameLayout.cpp Update to use new name alignTo(). 2016-01-14 21:06:47 +00:00
BasicBlockUtils.cpp [LV] Preserve LoopInfo when store predication is used 2016-03-15 18:06:20 +00:00
BreakCriticalEdges.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
BuildLibCalls.cpp Fix Clang-tidy readability-redundant-control-flow warnings; other minor fixes. 2016-02-02 18:20:45 +00:00
BypassSlowDivision.cpp Clarify that the bypassSlowDivision optimization operates on a single BB [v2] 2016-01-04 23:18:58 +00:00
CloneFunction.cpp Cloning: Reduce complexity of debug info cloning and fix correctness issue. 2016-03-30 22:05:13 +00:00
CloneModule.cpp Preserve extern_weak linkage in CloneModule. 2016-03-31 20:21:31 +00:00
CMakeLists.txt [ThinLTO] Move global processing from Linker to TransformUtils (NFC) 2016-02-10 18:11:31 +00:00
CmpInstAnalysis.cpp
CodeExtractor.cpp [IR] Reformulate LLVM's EH funclet IR 2015-12-12 05:38:55 +00:00
CtorUtils.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
DemoteRegToStack.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
Evaluator.cpp Add #include "llvm/Support/raw_ostream.h" to fix Windows build. 2016-02-03 03:16:37 +00:00
FlattenCFG.cpp LPM: Stop threading Pass * through all of the loop utility APIs. NFC 2015-12-15 19:40:57 +00:00
FunctionImportUtils.cpp Rework linkInModule(), making it oblivious to ThinLTO 2016-03-19 00:40:31 +00:00
GlobalStatus.cpp GlobalOpt does not treat externally_initialized globals correctly 2015-10-12 13:20:52 +00:00
InlineFunction.cpp Don't insert stackrestore on deoptimizing returns 2016-04-01 02:51:30 +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 TransformUtils: Avoid getNodePtrUnchecked() in integer division, NFC 2016-02-21 20:14:29 +00:00
LCSSA.cpp [AA] Preserve the AA results wrapper pass as well as BasicAA in a few 2016-02-19 03:12:14 +00:00
LLVMBuild.txt [PM/AA] Remove the last relics of the separate IPA library from LLVM, 2015-08-18 17:51:53 +00:00
Local.cpp [RS4GC] Lower calls to @llvm.experimental.deoptimize 2016-03-25 20:12:13 +00:00
LoopSimplify.cpp [LoopSimplify] Reuse changeToUnreachable 2016-01-24 19:32:52 +00:00
LoopUnroll.cpp Use some braces to format this a little better. 2016-03-15 03:01:31 +00:00
LoopUnrollRuntime.cpp Enable non-power-of-2 #pragma unroll counts. 2016-03-25 14:24:52 +00:00
LoopUtils.cpp Remove HasFnAttribute guards to getFnAttribute calls 2016-03-30 15:41:12 +00:00
LoopVersioning.cpp [LoopVersioning] Relax an assert for LCSSA PHIs 2016-03-22 18:38:15 +00:00
LowerInvoke.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
LowerSwitch.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
Mem2Reg.cpp [Mem2Reg] Respect optnone 2015-12-11 13:36:59 +00:00
MemorySSA.cpp Fix "warning: variabl 'XX’ set but not used" in release build (variable used in assertion, NFC) 2016-04-02 05:34:19 +00:00
MetaRenamer.cpp Whoops, remove trailing whitespace. 2015-08-27 05:37:12 +00:00
ModuleUtils.cpp [ModuleUtils] Use range-based loop. NFC. 2016-03-23 00:43:35 +00:00
PromoteMemoryToRegister.cpp Remove uses of builtin comma operator. 2016-02-18 22:09:30 +00:00
SanitizerStats.cpp Fix Clang-tidy modernize-use-nullptr and modernize-use-override warnings; other minor fixes. 2016-01-26 18:48:36 +00:00
SimplifyCFG.cpp [SimlifyCFG] Prevent passes from destroying canonical loop structure, especially for nested loops 2016-03-29 04:08:57 +00:00
SimplifyIndVar.cpp [IndVars] Make the fix for PR26973 more obvious; NFCI 2016-03-18 20:37:11 +00:00
SimplifyInstructions.cpp [Utils] Put includes in correct order. NFC. 2015-11-24 18:57:06 +00:00
SimplifyLibCalls.cpp [SimplifyLibCalls] Garbage collect dead code. 2016-04-03 01:46:52 +00:00
SplitModule.cpp Preserve blockaddress use edges in the module splitter. 2016-03-31 21:55:11 +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 Make some headers self-contained, remove unused includes that violate layering. 2016-01-27 16:05:37 +00:00
UnifyFunctionExitNodes.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
Utils.cpp This patch adds MemorySSA to LLVM. 2016-02-02 22:46:49 +00:00
ValueMapper.cpp ValueMapper: Avoid recursion in mapSimplifiedMetadata, NFC 2016-04-03 20:17:45 +00:00