llvm-6502/lib/Transforms/Utils
David Blaikie f93662d3d5 DebugInfo: Use distinct inlinedAt MDLocations to avoid separate inlined calls being coalesced
When two calls from the same MDLocation are inlined they currently get
treated as one inlined function call (creating difficulty debugging,
duplicate variables, etc).

Clang worked around this by including column information on inline calls
which doesn't address LTO inlining or calls to the same function from
the same line and column (such as through a macro). It also didn't
address ctor and member function calls.

By making the inlinedAt locations distinct, every call site has an
explicitly distinct location that cannot be coalesced with any other
call.

This can produce linearly (2x in the worst case where every call is
inlined and the call instruction has a non-call instruction at the same
location) more debug locations. Any increase beyond that are in cases
where the Clang workaround was insufficient and the new scheme is
creating necessary distinct nodes that were being erroneously coalesced
previously.

After this change to LLVM the incomplete workarounds in Clang. That
should reduce the number of debug locations (in a build without column
info, the default on Darwin, not the default on Linux) by not creating
pseudo-distinct locations for every call to an inline function.

(oh, and I made the inlined-at chain rebuilding iterative instead of
recursive because I was having trouble wrapping my head around it the
way it was - open to discussion on the right design for that function
(including going back to a recursive solution))

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226736 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-21 22:57:29 +00:00
..
AddDiscriminators.cpp IR: Split Metadata from Value 2014-12-09 18:38:53 +00:00
ASanStackFrameLayout.cpp
BasicBlockUtils.cpp [PM] Replace the Pass argument to SplitEdge with specific analyses used 2015-01-19 12:36:53 +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 [PM] Move TargetLibraryInfo into the Analysis library. 2015-01-15 02:16:27 +00:00
BypassSlowDivision.cpp
CloneFunction.cpp Rename MapValue(Metadata*) to MapMetadata() 2014-12-19 06:06:18 +00:00
CloneModule.cpp Remove a bad cast in CloneModule() 2014-12-23 08:23:45 +00:00
CMakeLists.txt
CmpInstAnalysis.cpp
CodeExtractor.cpp
CtorUtils.cpp
DemoteRegToStack.cpp
FlattenCFG.cpp
GlobalStatus.cpp
InlineFunction.cpp DebugInfo: Use distinct inlinedAt MDLocations to avoid separate inlined calls being coalesced 2015-01-21 22:57:29 +00:00
InstructionNamer.cpp
IntegerDivision.cpp
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 [PM] Replace the Pass argument in MergeBasicBlockIntoOnlyPred with 2015-01-20 01:37:09 +00:00
LoopSimplify.cpp [PM] Lift the analyses into the interface for 2015-01-19 03:03:39 +00:00
LoopUnroll.cpp [PM] Now that LoopInfo isn't in the Pass type hierarchy, it is much 2015-01-18 01:25:51 +00:00
LoopUnrollRuntime.cpp [PM] Replace the Pass argument to SplitEdge with specific analyses used 2015-01-19 12:36:53 +00:00
LowerExpectIntrinsic.cpp
LowerInvoke.cpp
LowerSwitch.cpp [SwitchLowering] Handle destinations on multiple phi instructions 2014-12-02 18:31: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
ModuleUtils.cpp
PromoteMemoryToRegister.cpp [PM] Split the AssumptionTracker immutable pass into two separate APIs: 2015-01-04 12:03:27 +00:00
SimplifyCFG.cpp fix {typo, build failure} in r225760 2015-01-13 04:17:47 +00:00
SimplifyIndVar.cpp [PM] Remove a dead field. 2015-01-17 14:31:35 +00:00
SimplifyInstructions.cpp [PM] Separate the TargetLibraryInfo object from the immutable pass. 2015-01-15 10:41:28 +00:00
SimplifyLibCalls.cpp [PM] Replace an abuse of inheritance to override a single function with 2015-01-21 02:11:59 +00:00
SSAUpdater.cpp
SymbolRewriter.cpp SymbolRewriter: use iplist::splice 2015-01-05 17:56:32 +00:00
UnifyFunctionExitNodes.cpp
Utils.cpp
ValueMapper.cpp IR: Move MDNode clone() methods from ValueMapper to MDNode, NFC 2015-01-20 02:56:57 +00:00