llvm-6502/lib/Transforms/Utils
Duncan P. N. Exon Smith 88e419d66e DebugInfo: Remove 'inlinedAt:' field from MDLocalVariable
Remove 'inlinedAt:' from MDLocalVariable.  Besides saving some memory
(variables with it seem to be single largest `Metadata` contributer to
memory usage right now in -g -flto builds), this stops optimization and
backend passes from having to change local variables.

The 'inlinedAt:' field was used by the backend in two ways:

 1. To tell the backend whether and into what a variable was inlined.
 2. To create a unique id for each inlined variable.

Instead, rely on the 'inlinedAt:' field of the intrinsic's `!dbg`
attachment, and change the DWARF backend to use a typedef called
`InlinedVariable` which is `std::pair<MDLocalVariable*, MDLocation*>`.
This `DebugLoc` is already passed reliably through the backend (as
verified by r234021).

This commit removes the check from r234021, but I added a new check
(that will survive) in r235048, and changed the `DIBuilder` API in
r235041 to require a `!dbg` attachment whose 'scope:` is in the same
`MDSubprogram` as the variable's.

If this breaks your out-of-tree testcases, perhaps the script I used
(mdlocalvariable-drop-inlinedat.sh) will help; I'll attach it to PR22778
in a moment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235050 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-15 22:29:27 +00:00
..
AddDiscriminators.cpp DebugInfo: Gut DILocation 2015-04-14 01:35:55 +00:00
ASanStackFrameLayout.cpp [asan] Reuse a common function. 2015-02-16 14:49:37 +00:00
BasicBlockUtils.cpp Teach SplitBlockPredecessors how to handle landingpad blocks. 2015-01-28 23:06:47 +00:00
BreakCriticalEdges.cpp [PM] Remove the Pass argument from all of the critical edge splitting 2015-01-19 12:09:11 +00:00
BuildLibCalls.cpp DataLayout is mandatory, update the API to reflect it with references. 2015-03-10 02:37:25 +00:00
BypassSlowDivision.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
CloneFunction.cpp DebugInfo: Update signature of DICompileUnit::replace*() 2015-04-14 03:51:36 +00:00
CloneModule.cpp Remove a bad cast in CloneModule() 2014-12-23 08:23:45 +00:00
CMakeLists.txt Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +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 [ctorutils] Update and sort includes. NFC. 2015-03-23 19:06:17 +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 utils: Fix segfault in flattencfg 2014-08-13 20:31:53 +00:00
GlobalStatus.cpp [CallSite] Make construction from Value* (or Instruction*) explicit. 2015-04-10 14:50:08 +00:00
InlineFunction.cpp DebugInfo: Remove 'inlinedAt:' field from MDLocalVariable 2015-04-15 22:29:27 +00:00
InstructionNamer.cpp [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-05 09:10:37 +00:00
IntegerDivision.cpp Fix heap-use-after-free bug in expandSDiv when the operands are 2014-11-05 21:28:24 +00:00
LCSSA.cpp [PM] Split the LoopInfo object apart from the legacy pass, creating 2015-01-17 14:16:18 +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 DebugInfo: Require a DebugLoc in DIBuilder::insertDeclare() 2015-04-15 21:18:07 +00:00
LoopSimplify.cpp Re-sort includes with sort-includes.py and insert raw_ostream.h where it's used. 2015-03-23 19:32:43 +00:00
LoopUnroll.cpp [LoopUnrollRuntime] Avoid high-cost trip count computation. 2015-04-14 03:20:38 +00:00
LoopUnrollRuntime.cpp [LoopUnrollRuntime] Avoid high-cost trip count computation. 2015-04-14 03:20:38 +00:00
LowerInvoke.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:55:47 +00:00
LowerSwitch.cpp Re-sort includes with sort-includes.py and insert raw_ostream.h where it's used. 2015-03-23 19:32:43 +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 [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-05 09:10:37 +00:00
ModuleUtils.cpp Move checkInterfaceFunction to ModuleUtils 2015-04-06 21:09:08 +00:00
PromoteMemoryToRegister.cpp Eliminate O(n^2) worst-case behavior in SSA construction 2015-04-08 18:26:20 +00:00
SimplifyCFG.cpp Fix typo. 2015-04-12 18:18:51 +00:00
SimplifyIndVar.cpp [IndVarSimplify] use the "canonical" way to infer no-wrap. 2015-03-04 22:24:23 +00:00
SimplifyInstructions.cpp DataLayout is mandatory, update the API to reflect it with references. 2015-03-10 02:37:25 +00:00
SimplifyLibCalls.cpp [opaque pointer type] More GEP IRBuilder API migrations... 2015-04-03 21:33:42 +00:00
SSAUpdater.cpp DataLayout is mandatory, update the API to reflect it with references. 2015-03-10 02:37:25 +00:00
SymbolRewriter.cpp Purge unused includes throughout libSupport. 2015-03-23 18:07:13 +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 Pass to emit DWARF path discriminators. 2014-03-03 20:06:11 +00:00
ValueMapper.cpp MapMetadata: Allow unresolved metadata if it won't change 2015-03-17 01:14:40 +00:00