aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugValues.cpp
AgeCommit message (Collapse)AuthorFilesLines
2020-08-22[LiveDebugValues][NFC] Move LiveDebugValues source for refactorJeremy Morse1-1976/+0
This is a pure file move of LiveDebugValues.cpp ahead of the pass being refactored, with an experimental new implementation to follow. The motivation for these changes can be found here: http://lists.llvm.org/pipermail/llvm-dev/2020-June/142368.html And the other related changes can be found in the phabricator stack for this revision: Differential Revision: https://reviews.llvm.org/D83304
2020-06-30RegAlloc: Start using RegisterMatt Arsenault1-15/+15
2020-06-22[DebugInfo] Update MachineInstr to help support variadic DBG_VALUE instructionsstozer1-18/+20
Following on from this RFC[0] from a while back, this is the first patch towards implementing variadic debug values. This patch specifically adds a set of functions to MachineInstr for performing operations specific to debug values, and replacing uses of the more general functions where appropriate. The most prevalent of these is replacing getOperand(0) with getDebugOperand(0) for debug-value-specific code, as the operands corresponding to values will no longer be at index 0, but index 2 and upwards: getDebugOperand(x) == getOperand(x+2). Similar replacements have been added for the other operands, along with some helper functions to replace oft-repeated code and operate on a variable number of value operands. [0] http://lists.llvm.org/pipermail/llvm-dev/2020-February/139376.html<Paste> Differential Revision: https://reviews.llvm.org/D81852
2020-06-18[NFC][LiveDebugValues] Document how LiveDebugValues operatesJeremy Morse1-15/+90
We're missing a plain English explanation of how this pass is supposed to operate -- add one to the file comment. Differential Revision: https://reviews.llvm.org/D80929
2020-06-05[LiveDebugValues] Fix output stream (NFC)Nikita Popov1-11/+10
This should dump to the provided Out, rather than dbgs(), though they coincide in current usage.
2020-06-05[LiveDebugValues] Remove PendingInLocs (NFC)Nikita Popov1-40/+13
PendingInLocs ends up having the same value as InLocs, just computed a bit more indirectly. It is a leftover of a previous implementation approach. This patch drops PendingInLocs, as well as the Diff and Removed calulations, which are no longer needed. Differential Revision: https://reviews.llvm.org/D80868
2020-06-04[LiveDebugValues] Cache LexicalScopes::getMachineBasicBlocks, NFCIVedant Kumar1-23/+5
Summary: Cache the results from getMachineBasicBlocks in LexicalScopes to speed up UserValueScopes::dominates queries. This replaces the caching done in UserValueScopes. Compared to the old caching method, this reduces memory traffic when a VarLoc is copied (e.g. when a VarLocMap grows), and enables caching across basic blocks. When compiling sqlite 3.5.7 (CTMark version), this patch reduces the number of calls to getMachineBasicBlocks from 10,207 to 1,093. I also measured a small compile-time reduction (~ 0.1% of total wall time, on average, on my machine). As a drive-by, I made the DebugLoc in UserValueScopes a const reference to cut down on MetadataTracking traffic. Reviewers: jmorse, Orlando, aprantl, nikic Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80957
2020-06-01[LiveDebugValues] Remove early-exit when testing regmasks, NFCVedant Kumar1-4/+0
In transferRegisterDef, if the instruction has a regmask attached, we'll check if any currently used register is clobbered by the regmask. The early exit in this scan isn't necessary, costs a set lookup, and is almost never taken [1]. Delete it. [1] http://lab.llvm.org:8080/coverage/coverage-reports/coverage/Users/buildslave/jenkins/workspace/coverage/llvm-project/llvm/lib/CodeGen/LiveDebugValues.cpp.html#L1136
2020-06-01[LiveDebugValues] Add LocIndex::u32_{location,index}_t types for ↵Vedant Kumar1-15/+20
readability, NFC This is per Adrian's suggestion in https://reviews.llvm.org/D80684.
2020-06-01[LiveDebugValues] Speed up removeEntryValue, NFCVedant Kumar1-26/+98
Summary: Instead of iterating over all VarLoc IDs in removeEntryValue(), just iterate over the interval reserved for entry value VarLocs. This changes the iteration order, hence the test update -- otherwise this is NFC. This appears to give an ~8.5x wall time speed-up for LiveDebugValues when compiling sqlite3.c 3.30.1 with a Release clang (on my machine): ``` ---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name --- Before: 2.5402 ( 18.8%) 0.0050 ( 0.4%) 2.5452 ( 17.3%) 2.5452 ( 17.3%) Live DEBUG_VALUE analysis After: 0.2364 ( 2.1%) 0.0034 ( 0.3%) 0.2399 ( 2.0%) 0.2398 ( 2.0%) Live DEBUG_VALUE analysis ``` The change in removeEntryValue() is the only one that appears to affect wall time, but for consistency (and to resolve a pending TODO), I made the analogous changes for iterating over SpillLocKind VarLocs. Reviewers: nikic, aprantl, jmorse, djtodoro Subscribers: hiraditya, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80684
2020-05-28[LiveDebugValues] Add cutoffs to avoid pathological behaviorVedant Kumar1-0/+28
Summary: We received a report of LiveDebugValues consuming 25GB+ of RAM when compiling code generated by Unity's IL2CPP scripting backend. There's an initial 5GB spike due to repeatedly copying cached lists of MachineBasicBlocks within the UserValueScopes members of VarLocs. But the larger scaling issue arises due to the fact that prior to range extension, there are 81K basic blocks and 156K DBG_VALUEs: given enough memory, LiveDebugValues would insert 101 million MIs (I counted this by incrementing a counter inside of VarLoc::BuildDbgValue). It seems like LiveDebugValues would have to be rearchitected to support this kind of input (we'd need some new represntation for DBG_VALUEs that get inserted into ~every block via flushPendingLocs). OTOH, large globs of auto-generated code are typically not debugged interactively. So: add cutoffs to disable range extension when the input is too big. I chose the cutoffs experimentally, erring on the conservative side. When compiling a large collection of Apple software, range extension never got disabled. rdar://63418929 Reviewers: aprantl, friss, jmorse, Orlando Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80662
2020-05-26[DwarfExpression] Support entry values for indirect parametersVedant Kumar1-5/+1
Summary: A struct argument can be passed-by-value to a callee via a pointer to a temporary stack copy. Add support for emitting an entry value DBG_VALUE when an indirect parameter DBG_VALUE becomes unavailable. This is done by omitting DW_OP_stack_value from the entry value expression, to make the expression describe the location of an object. rdar://63373691 Reviewers: djtodoro, aprantl, dstenb Subscribers: hiraditya, lldb-commits, llvm-commits Tags: #lldb, #llvm Differential Revision: https://reviews.llvm.org/D80345
2020-05-23TargetLowering.h - remove unnecessary TargetMachine.h include. NFCSimon Pilgrim1-0/+1
Replace with forward declaration and move dependency down to source files that actually need it. Both TargetLowering.h and TargetMachine.h are 2 of the most expensive headers (top 10) in the ClangBuildAnalyzer report when building llc.
2020-04-16[LiveDebugValues] Terminate open ranges on DBG_VALUE $noregJeremy Morse1-1/+3
In D68209, LiveDebugValues::transferDebugValue had a call to OpenRanges.erase shifted, and by accident this led to a code path where DBG_VALUEs of $noreg would not have their open range terminated, allowing variable locations to extend past blocks where they were terminated. This patch correctly terminates the open range, if present, when such a DBG_VAUE is encountered, and adds a test for this behaviour. Differential Revision: https://reviews.llvm.org/D78218
2020-04-07CodeGen: Use Register in TargetFrameLoweringMatt Arsenault1-1/+1
2020-03-20[LiveDebugValues] Speed up collectIDsForRegs, NFCVedant Kumar1-22/+41
Use the advanceToLowerBound operation available on CoalescingBitVector iterators to speed up collection of variables which reside within some set of registers. The speedup comes from avoiding repeated top-down traversals in IntervalMap::find. The linear scan forward from one register interval to the next is unlikely to be as expensive as a full IntervalMap search starting from the root. This reduces time spent in LiveDebugValues when compiling sqlite3 by 200ms (about 0.1% - 0.2% of the total User Time). Depends on D76466. rdar://60046261 Differential Revision: https://reviews.llvm.org/D76467
2020-03-20[ADT] CoalescingBitVector: Avoid initial heap allocation, NFCVedant Kumar1-8/+12
Avoid making a heap allocation when constructing a CoalescingBitVector. This reduces time spent in LiveDebugValues when compiling sqlite3 by 700ms (0.5% of the total User Time). rdar://60046261 Differential Revision: https://reviews.llvm.org/D76465
2020-03-19Reland D73534: [DebugInfo] Enable the debug entry values feature by defaultDjordje Todorovic1-2/+2
The issue that was causing the build failures was fixed with the D76164.
2020-03-13Revert "Reland "[DebugInfo] Enable the debug entry values feature by default""Nico Weber1-2/+2
This reverts commit 5aa5c943f7da155b95564058cd5d50a93eabfc89. Causes clang to assert, see https://bugs.chromium.org/p/chromium/issues/detail?id=1061533#c4 for a repro.
2020-03-10Reland "[DebugInfo] Enable the debug entry values feature by default"Djordje Todorovic1-2/+2
Differential Revision: https://reviews.llvm.org/D73534
2020-03-03[LiveDebugValues] Do not insert DBG_VALUEs after a MBB terminatorVedant Kumar1-0/+7
This fixes a miscompile that happened because a DBG_VALUE interfered with the MachineOutliner's liveness analysis. Inserting a DBG_VALUE after a terminator breaks predicates on MBB such as isReturnBlock(). And the resulting DBG_VALUE cannot be "live". I plan to introduce a MachineVerifier check for this situation in a follow up. rdar://59859175 Testing: check-llvm, LNT build with a stage2 compiler & entry values enabled Differential Revision: https://reviews.llvm.org/D75548
2020-03-02[LiveDebugValues] Prevent some misuse of LocIndex::fromRawInteger, NFCVedant Kumar1-1/+4
Make it a compile-time error to pass an int/unsigned/etc to fromRawInteger. Hopefully this prevents errors of the form: ``` for (unsigned ID : getVarLocs()) { auto VL = LocMap[LocIndex::fromRawInteger(ID)]; ... ```
2020-02-27[LiveDebugValues] Encode register location within VarLoc IDs [3/3]Vedant Kumar1-69/+158
This is part 3 of a 3-part series to address a compile-time explosion issue in LiveDebugValues. --- Start encoding register locations within VarLoc IDs, and take advantage of this encoding to speed up transferRegisterDef. There is no fundamental algorithmic change: this patch simply swaps out SparseBitVector in favor of CoalescingBitVector. That changes iteration order (hence the test updates), but otherwise this patch is NFCI. The only interesting change is in transferRegisterDef. Instead of doing: ``` KillSet = {} for (ID : OpenRanges.getVarLocs()) if (DeadRegs.count(ID)) KillSet.add(ID) ``` We now do: ``` KillSet = {} for (Reg : DeadRegs) for (ID : intervalsReservedForReg(Reg, OpenRanges.getVarLocs())) KillSet.add(ID) ``` By not visiting each open location every time we visit an instruction, this eliminates some potentially quadratic behavior. The new implementation basically does a constant amount of work per instruction because the interval map lookups are very fast. For a file in WebKit, this brings the time spent in LiveDebugValues down from ~2.5 minutes to 4 seconds, reducing compile time spent in that pass from 28% of the total to just over 1%. Before: ``` 2.49 min 27.8% 0 s LiveDebugValues::process 2.41 min 27.0% 5.40 s LiveDebugValues::transferRegisterDef 1.51 min 16.9% 1.51 min LiveDebugValues::VarLoc::isDescribedByReg() const 32.73 s 6.1% 8.70 s llvm::SparseBitVector<128u>::SparseBitVectorIterator::operator++() ``` After: ``` 4.53 s 1.1% 0 s LiveDebugValues::process 3.00 s 0.7% 107.00 ms LiveDebugValues::transferRegisterCopy 892.00 ms 0.2% 406.00 ms LiveDebugValues::transferSpillOrRestoreInst 404.00 ms 0.1% 32.00 ms LiveDebugValues::transferRegisterDef 110.00 ms 0.0% 2.00 ms LiveDebugValues::getUsedRegs 57.00 ms 0.0% 1.00 ms std::__1::vector<>::push_back 40.00 ms 0.0% 1.00 ms llvm::CoalescingBitVector<>::find(unsigned long long) ``` FWIW, I tried the same approach using SparseBitVector, but got bad results. To do that, I had to extend SparseBitVector to support 64-bit indices and expose its lower bound operation. The problem with this is that the performance is very hard to predict: SparseBitVector's lower bound operation falls back to O(n) linear scans in a std::list if you're not /very/ careful about managing iteration order. When I profiled this the performance looked worse than the baseline. You can see the full CoalescingBitVector-based implementation here: https://github.com/vedantk/llvm-project/commits/try-coalescing You can see the full SparseBitVector-based implementation here: https://github.com/vedantk/llvm-project/commits/try-sparsebitvec-find Depends on D74984 and D74985. Differential Revision: https://reviews.llvm.org/D74986
2020-02-27[LiveDebugValues] Encode a location in VarLoc IDs, NFC [2/3]Vedant Kumar1-62/+112
This is part 2 of a 3-part series to address a compile-time explosion issue in LiveDebugValues. --- Each VarLoc has a unique ID: this ID is used to look up a VarLoc in the VarLocMap, and to virtually insert a VarLoc into a VarLocSet. Instead of inserting the VarLoc /itself/ into the VarLocSet, we insert just the ID, because this can be represented efficiently with a SparseBitVector. This change introduces LocIndex, a layer of abstraction on top of VarLoc IDs. Prior to this change, an ID was just an index into a vector. With this change, an ID encodes both an index /and/ a register location. The type-checker ensures that conversions to and from LocIndex are correct. For the moment the register location is always 0 (undef). We have plenty of bits left over to encode physregs, stack slots, and other locations in the future. Differential Revision: https://reviews.llvm.org/D74985
2020-02-20Revert "Reland "[DebugInfo] Enable the debug entry values feature by default""Djordje Todorovic1-2/+2
This reverts commit rGfaff707db82d. A failure found on an ARM 2-stage buildbot. The investigation is needed.
2020-02-19Reland "[DebugInfo] Enable the debug entry values feature by default"Djordje Todorovic1-2/+2
Differential Revision: https://reviews.llvm.org/D73534
2020-02-18Revert "Reland "[DebugInfo] Enable the debug entry values feature by default""Djordje Todorovic1-2/+2
This reverts commit rGa82d3e8a6e67.
2020-02-18Reland "[DebugInfo] Enable the debug entry values feature by default"Djordje Todorovic1-2/+2
This patch enables the debug entry values feature. - Remove the (CC1) experimental -femit-debug-entry-values option - Enable it for x86, arm and aarch64 targets - Resolve the test failures - Leave the llc experimental option for targets that do not support the CallSiteInfo yet Differential Revision: https://reviews.llvm.org/D73534
2020-02-17[LiveDebugValues] Visit open var locs just once in transferRegisterDef, NFCVedant Kumar1-10/+34
For a file in WebKit, this brings the time spent in LiveDebugValues down from 16 minutes to 2 minutes. The reduction comes from iterating the set of open variable locations just once in transferRegisterDef. Post-patch, the most expensive item inside of transferRegisterDef is a call to VarLoc::isDescribedByReg, which we have to do. Testing: I built LNT using the Os-g cmake cache with & without this patch, then diffed the object files to verify there was no binary diff. rdar://59446577 Differential Revision: https://reviews.llvm.org/D74633
2020-02-12Revert "[DebugInfo] Enable the debug entry values feature by default"Djordje Todorovic1-2/+2
This reverts commit rG9f6ff07f8a39. Found a test failure on clang-with-thin-lto-ubuntu buildbot.
2020-02-12[DebugInfo] Enable the debug entry values feature by defaultDjordje Todorovic1-2/+2
This patch enables the debug entry values feature. - Remove the (CC1) experimental -femit-debug-entry-values option - Enable it for x86, arm and aarch64 targets - Resolve the test failures - Leave the llc experimental option for targets that do not support the CallSiteInfo yet Differential Revision: https://reviews.llvm.org/D73534
2020-01-24[DebugInfo][LiveDebugValues] Teach Live Debug Values About Meta InstructionsTom Weaver1-0/+6
Previously LiveDebugValues pass would consider meta instructions that 'fiddle' with liveness of registers as register definitions when transfering register defs. This would mean that, for example, a KILL instruction would cause LiveDebugValues to terminate the range of an earlier DBG_VALUE instruction resulting in the none propogation of said DBG_VALUE instructions into later blocks. This patch adds the check and a helpful comment, fixes a test that previously tested for the broken behaviour by coincidence and adds a test specifically for this. reviewers: vsk, dstenb, djtodoro Differential Revision: https://reviews.llvm.org/D73210
2019-12-13[LiveDebugValues] Omit entry values for DBG_VALUEs with pre-existing expressionsDavid Stenberg1-2/+3
Summary: This is a quickfix for PR44275. An assertion that checks that the DIExpression is valid failed due to attempting to create an entry value for an indirect parameter. This started appearing after D69028, as the indirect parameter started being represented using an DW_OP_deref, rather than with the DBG_VALUE's second operand, meaning that the isIndirectDebugValue() check in LiveDebugValues did not exclude such parameters. A DIExpression that has an entry value operation can currently not have any other operation, leading to the failed isValid() check. This patch simply makes us stop considering emitting entry values for such parameters. To support such cases I think we at least need to do the following changes: * In DIExpression::isValid(): Remove the limitation that a DW_OP_LLVM_entry_value operation can be the only operation in a DIExpression. * In LiveDebugValues::emitEntryValues(): Create an entry value of size 1, so that it only wraps the register operand, and not the whole pre-existing expression (the DW_OP_deref). * In LiveDebugValues::removeEntryValue(): Check that the new debug value has the same debug expression as the original, rather than checking that the debug expression is empty. * In DwarfExpression::addMachineRegExpression(): Modify the logic so that a DW_OP_reg* expression is emitted for the entry value. That is how GCC emits entry values for indirect parameters. That will currently not happen to due the DW_OP_deref causing the !HasComplexExpression to fail. The LocationKind needs to be changed also, rather than always emitting a DW_OP_stack_value for entry values. There are probably more things I have missed, but that could hopefully be a good starting point for emitting such entry values. Reviewers: djtodoro, aprantl, jmorse, vsk Reviewed By: aprantl, vsk Subscribers: hiraditya, llvm-commits Tags: #debug-info, #llvm Differential Revision: https://reviews.llvm.org/D71416
2019-12-05[LiveDebugValues] Silence the unused var warning; NFCDjordje Todorovic1-2/+1
2019-12-05Reland "[LiveDebugValues] Introduce entry values of unmodified params"Djordje Todorovic1-81/+304
Relanding this after resolving the cause of the test failure.
2019-12-03[DebugInfo] Make DebugVariable class available in DebugInfoMetadatastozer1-111/+26
The DebugVariable class is a class declared in LiveDebugValues.cpp which is used to uniquely identify a single variable, using its source variable, inline location, and fragment info to do so. This patch moves this class into DebugInfoMetadata.h, making it available in a much broader scope.
2019-12-03Revert "[LiveDebugValues] Introduce entry values of unmodified params"Djordje Todorovic1-301/+78
This reverts commit rG4cfceb910692 due to LLDB test failing.
2019-12-03[LiveDebugValues] Introduce entry values of unmodified paramsDjordje Todorovic1-78/+301
The idea is to remove front-end analysis for the parameter's value modification and leave it to the value tracking system. Front-end in some cases marks a parameter as modified even the line of code that modifies the parameter gets optimized, that implies that this will cover more entry values even. In addition, extending the support for modified parameters will be easier with this approach. Since the goal is to recognize if a parameter’s value has changed, the idea at very high level is: If we encounter a DBG_VALUE other than the entry value one describing the same variable (parameter), we can assume that the variable’s value has changed and we should not track its entry value any more. That would be ideal scenario, but due to various LLVM optimizations, a variable’s value could be just moved around from one register to another (and there will be additional DBG_VALUEs describing the same variable), so we have to recognize such situation (otherwise, we will lose a lot of entry values) and salvage the debug entry value. Differential Revision: https://reviews.llvm.org/D68209
2019-11-20[DebugInfo] Remove the DIFlagArgumentNotModified debug info flagDjordje Todorovic1-1/+1
Due to changes in D68206, we remove the DIFlagArgumentNotModified and its usage. Differential Revision: https://reviews.llvm.org/D68207
2019-11-13Sink all InitializePasses.h includesReid Kleckner1-0/+1
This file lists every pass in LLVM, and is included by Pass.h, which is very popular. Every time we add, remove, or rename a pass in LLVM, it caused lots of recompilation. I found this fact by looking at this table, which is sorted by the number of times a file was changed over the last 100,000 git commits multiplied by the number of object files that depend on it in the current checkout: recompiles touches affected_files header 342380 95 3604 llvm/include/llvm/ADT/STLExtras.h 314730 234 1345 llvm/include/llvm/InitializePasses.h 307036 118 2602 llvm/include/llvm/ADT/APInt.h 213049 59 3611 llvm/include/llvm/Support/MathExtras.h 170422 47 3626 llvm/include/llvm/Support/Compiler.h 162225 45 3605 llvm/include/llvm/ADT/Optional.h 158319 63 2513 llvm/include/llvm/ADT/Triple.h 140322 39 3598 llvm/include/llvm/ADT/StringRef.h 137647 59 2333 llvm/include/llvm/Support/Error.h 131619 73 1803 llvm/include/llvm/Support/FileSystem.h Before this change, touching InitializePasses.h would cause 1345 files to recompile. After this change, touching it only causes 550 compiles in an incremental rebuild. Reviewers: bkramer, asbirlea, bollu, jdoerfert Differential Revision: https://reviews.llvm.org/D70211
2019-11-13[DebugInfo] Avoid creating entry values for clobbered registersDavid Stenberg1-4/+31
Summary: Entry values are considered for parameters that have register-described DBG_VALUEs in the entry block (along with other conditions). If a parameter's value has been propagated from the caller to the callee, then the parameter's DBG_VALUE in the entry block may be described using a register defined by some instruction, and entry values should not be emitted for the parameter, which can currently occur. One such case was seen in the attached test case, in which the second parameter, which is described by a redefinition of the first parameter's register, would incorrectly get an entry value using the first parameter's register. This commit intends to solve such cases by keeping track of register defines, and ignoring DBG_VALUEs in the entry block that are described by such registers. In a RelWithDebInfo build of clang-8, the average size of the set was 27, and in a RelWithDebInfo+ASan build it was 30. Reviewers: djtodoro, NikolaPrica, aprantl, vsk Reviewed By: djtodoro, vsk Subscribers: hiraditya, llvm-commits Tags: #debug-info, #llvm Differential Revision: https://reviews.llvm.org/D69889
2019-11-13[DebugInfo] Add helper for finding entry value candidates [NFC]David Stenberg1-28/+61
Summary: The conditions that are used to determine if entry values should be emitted for a parameter are quite many, and will grow slightly in a follow-up commit, so move those to a helper function, as was suggested in the code review for D69889. Reviewers: djtodoro, NikolaPrica Reviewed By: djtodoro Subscribers: probinson, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69955
2019-11-08Reland: [TII] Use optional destination and source pair as a return value; NFCDjordje Todorovic1-3/+7
Refactor usage of isCopyInstrImpl, isCopyInstr and isAddImmediate methods to return optional machine operand pair of destination and source registers. Patch by Nikola Prica Differential Revision: https://reviews.llvm.org/D69622
2019-10-31Revert rG57ee0435bd47f23f3939f402914c231b4f65ca5e - [TII] Use optional ↵Simon Pilgrim1-9/+5
destination and source pair as a return value; NFC This is breaking MSVC builds: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/20375
2019-10-31[TII] Use optional destination and source pair as a return value; NFCDjordje Todorovic1-5/+9
Refactor usage of isCopyInstrImpl, isCopyInstr and isAddImmediate methods to return optional machine operand pair of destination and source registers. Patch by Nikola Prica Differential Revision: https://reviews.llvm.org/D69622
2019-10-29Reland [AArch64][DebugInfo] Do not recompute CalleeSavedStackSize (Take 2)Sander de Smalen1-2/+1
llvm/test/DebugInfo/MIR/X86/live-debug-values-reg-copy.mir failed with EXPENSIVE_CHECKS enabled, causing the patch to be reverted in rG2c496bb5309c972d59b11f05aee4782ddc087e71. This patch relands the patch with a proper fix to the live-debug-values-reg-copy.mir tests, by ensuring the MIR encodes the callee-saves correctly so that the CalleeSaved info is taken from MIR directly, rather than letting it be recalculated by the PEI pass. I've done this by running `llc -stop-before=prologepilog` on the LLVM IR as captured in the test files, adding the extra MOV instructions that were manually added in the original test file, then running `llc -run-pass=prologepilog` and finally re-added the comments for the MOV instructions.
2019-10-29Revert rG70f5aecedef9a6e347e425eb5b843bf797b95319 - "Reland ↵Simon Pilgrim1-1/+2
[AArch64][DebugInfo] Do not recompute CalleeSavedStackSize (Take 2)" This fails on EXPENSIVE_CHECKS builds
2019-10-28Reland [AArch64][DebugInfo] Do not recompute CalleeSavedStackSize (Take 2)Sander de Smalen1-2/+1
Fixed up test/DebugInfo/MIR/Mips/live-debug-values-reg-copy.mir that broke r375425.
2019-10-25Fix a variable typo in LiveDebugValues [NFC]David Stenberg1-2/+2
2019-10-25[LiveDebugValues] Small code clean up; NFCDjordje Todorovic1-18/+11