forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 341
Merge 2020-11-10 into swift/tensorflow #2123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for generating the mangled name of an Objective-C method. This has no intended functionality change. https://reviews.llvm.org/D88329
- Fix a memory leak accidentally introduced yesterday by using CodeGen's existing mangling context instead of creating a new context afresh. - Move GNU-runtime ObjC method mangling into the AST mangler; this will eventually be necessary to support direct methods there, but is also just the right architecture. - Make the Apple-runtime method mangling work properly when given an interface declaration, fixing a bug (which had solidified into a test) where mangling a category method from the interface could cause it to be mangled as if the category name was a class name. (Category names are namespaced within their class and have no global meaning.) - Fix a code cross-reference in dsymutil. Based on a patch by Ellis Hoag.
Cherrypick ObjC method mangling commits for Swift
This patch copies @vSK's fix to instcombine from D85555 over to mem2reg. The motivation and rationale are exactly the same: When mem2reg removes an alloca, it erases the dbg.{addr,declare} instructions which refer to the alloca. It would be better to instead remove all debug intrinsics which describe the contents of the dead alloca, namely all dbg.value(<dead alloca>, ..., DW_OP_deref)'s. As far as I can tell, prior to D80264 these `dbg.value+deref`s would have been silently dropped instead of being made `undef`, so we're just returning to previous behaviour with these patches. Testing: `llvm-lit llvm/test` and `ninja check-clang` gave no unexpected failures. Added 3 tests, each of which covers a dbg.value deletion path in mem2reg: mem2reg-promote-alloca-1.ll mem2reg-promote-alloca-2.ll mem2reg-promote-alloca-3.ll The first is based on the dexter test inlining.c from D89543. This patch also improves the debugging experience for loop.c from D89543, which suffers similarly after arg promotion instead of inlining. (cherry picked from commit fea067b)
For the reproducers in LLDB we want to switch to an "immediate mode" FileCollector that writes every file encountered straight to disk so we can generate the actual mapping out-of-process. This patch moves the interface into a separate base class. Differential revision: https://reviews.llvm.org/D89742 (cherry picked from commit f44fb13)
For performance reasons the reproducers don't copy the files captured by the file collector eagerly, but wait until the reproducer needs to be generated. This is a problematic when LLDB crashes and we have to do all this signal-unsafe work in the signal handler. This patch uses a similar trick to clang, which has the driver invoke a new cc1 instance to do all this work out-of-process. This patch moves the writing of the mapping file as well as copying over the reproducers into a separate process spawned when lldb crashes. Differential revision: https://reviews.llvm.org/D89600 (cherry picked from commit 73811d3)
[lldb] Move copying of files into reproducer out of process
[mem2reg] Remove dbg.values describing contents of dead allocas
temporaries created by conditional and assignment operators rdar://problem/64989559 Differential Revision: https://reviews.llvm.org/D83448 (cherry picked from commit 71e1a56)
[CodeGen] Emit destructor calls to destruct non-trivial C struct temporaries created by conditional and assignment operators
…nstants" This patch was reverted in 7c18266 due to some failures observed on PCC based machines. Failures were due to Endianness issue and long double representation issues. Patch is revised to address Endianness issue. Furthermore, support for emission of `DW_OP_implicit_value` for `long double` has been removed (since it was unclean at the moment). Planning to handle this in a clean way soon! For more context, please refer to following review link. Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D83560
This patch enables emitting DWARF `DW_OP_implicit_value` opcode when tuning debug information for LLDB (`-debugger-tune=lldb`). This will also propagate to Darwin platforms, since they use LLDB tuning as a default. rdar://67406059 Differential Revision: https://reviews.llvm.org/D90001 Signed-off-by: Med Ismail Bennani <[email protected]>
…ents Differential Revision: https://reviews.llvm.org/D86230
Follow-up to e787022 Differential Revision: https://reviews.llvm.org/D86230
[llvm/DebugInfo] Emit DW_OP_implicit_value when tuning for LLDB
Some of the predicates can't always be decided - for example when a type definition isn't available. At the same time it's necessary to let client code decide what to do about such cases - specifically we can't just use true or false values as there are callees with conflicting strategies how to handle this. This is a speculative fix for PR47276. Differential Revision: https://reviews.llvm.org/D88133
[Analyzer][WebKit] Use tri-state types for relevant predicates
Revert "[lldb] Move copying of files into reproducer out of process"
For the reproducers in LLDB we want to switch to an "immediate mode" FileCollector that writes every file encountered straight to disk so we can generate the actual mapping out-of-process. This patch moves the interface into a separate base class. Differential revision: https://reviews.llvm.org/D89742 (cherry picked from commit f44fb13)
…86380604101ce50a62a8d668b [FileCollector] Move interface into FileCollectorBase (NFC)
For performance reasons the reproducers don't copy the files captured by the file collector eagerly, but wait until the reproducer needs to be generated. This is a problematic when LLDB crashes and we have to do all this signal-unsafe work in the signal handler. This patch uses a similar trick to clang, which has the driver invoke a new cc1 instance to do all this work out-of-process. This patch moves the writing of the mapping file as well as copying over the reproducers into a separate process spawned when lldb crashes. Differential revision: https://reviews.llvm.org/D89600 (cherry picked from commit 73811d3)
In %c (continuous sync) mode, avoid attempting to unlock an already-unlocked profile. The profile is only locked when profile merging is enabled. (cherry picked from commit a77a739)
[profile] Suppress spurious 'expected profile to require unlock' warning
On macOS, the read and pread syscalls return EINVAL when the number of bytes to read exceeds INT32_MAX: https://github.com/apple/darwin-xnu/blob/a449c6a3b8014d9406c2ddbdc81795da24aa7443/bsd/kern/sys_generic.c#L355 rdar://68751407 Differential revision: https://reviews.llvm.org/D90201 (cherry picked from commit c4ef311)
Move crash log parsing out of the CrashLog class and into its own class and add more tests. Differential revision: https://reviews.llvm.org/D90664 (cherry picked from commit 4b84682)
Instead of parsing the crashlog in one big loop, use methods that correspond to the different parsing modes. Differential revision: https://reviews.llvm.org/D90665 (cherry picked from commit 16dd693)
Before: error: python exception <class 'AttributeError'> After: error: python exception: 'DarwinImage' object has no attribute 'debugger' (cherry picked from commit f0fd434)
The lldb.debugger et al convenience variables are only available from the interactive script interpreter. In all other scenarios, they are None (since fc1fd6b) before that they were default initialized. The crashlog script was hacking around that by setting the lldb.debugger to a newly created debugger instance when running outside of the script interpreter, which works fine until lldb creates a script interpreter instance under the hood and clears the variables. This was resulting in an AttributeError when invoking the script directly (from outside of lldb): AttributeError: 'NoneType' object has no attribute 'GetSourceManager' This patch fixes that by passing around the debugger instance. rdar://64775776 Differential revision: https://reviews.llvm.org/D90706 (cherry picked from commit c29c24b)
This test requires running under the Python we built against (which is easy) and setting up the PYTHONPATH (which is not worth it for this simple test). (cherry picked from commit 99a99c2)
…/tensorflow-stage * 'swift/main' of github.com:apple/llvm-project: llvm.coro.id.async lowering: Parameterize how-to restore the current's continutation context and restart the pipeline after splitting Start of an llvm.coro.async implementation
🍒/bastille/crashlog
…/tensorflow-stage * 'swift/main' of github.com:apple/llvm-project: [SLP] Pass VecPred argument to getCmpSelInstrCost. Reland "[TTI] Add VecPred argument to getCmpSelInstrCost." [SLP] Add tests with selects that can be turned into min/max. [SLP] Add AArch64 tests with vectorizable compare/select patterns. [AArch64] Add vector compare/select cost-model tests. [ScheduleDAGRRList] Pacify overload mismatch in std::min.
…rchiveTwoSwiftmodules [lldb] Re-enable TestSwiftStaticArchiveTwoSwiftmodules
…/tensorflow-stage * 'swift/main' of github.com:apple/llvm-project: [lldb] Re-enable TestSwiftStaticArchiveTwoSwiftmodules
…/tensorflow-stage * 'swift/main' of github.com:apple/llvm-project: [lldb] Remove Crashlog/interactive.test [crashlog] Pass the debugger around instead of relying on lldb.debugger [crashlog] Print the actual exception in the CommandReturnObject [crashlog] Modularize parser [crashlog] Move crash log parsing into its own class [crashlog] Remove commented out code (NFC) [crashlog] Turn crash log parsing modes into a Python 'enum' (NFC) [crashlog] Fix and simplify the way we import lldb
…Deps [lldb] Re-enable TestTargetCreateDeps on Linux
…/tensorflow-stage * 'swift/main' of github.com:apple/llvm-project: [lldb] Re-enable TestTargetCreateDeps on Linux
Use a better workaround for rdar://problem/25587546
Use a better workaround for rdar://problem/25587546
…/tensorflow-stage * 'swift/main' of github.com:apple/llvm-project: Use a better workaround for rdar://problem/25587546
(cherry picked from commit 6ac12b5)
This fixes a reproducer test failure that was caused by the undefined order in which global destructors run. More concretely, the static instance of the RealFileSystem had been destroyed before we finalized the reproducer, which uses it to copy files into the reproducer. By exiting normally, we call SBDebugger::Terminate and finalize the reproducer before any static dtors are run. (cherry picked from commit 0ca90eb)
…38cf6f5d50118abe92+0ca90eb3350b9e8c606fdf1ca0496e0bf3e330ec 🍒/bastille/6ac12b5b6c5dc2c705f6e638cf6f5d50118abe92+0ca90eb3350b9e8c606fdf1ca0496e0bf3e330ec
…/tensorflow-stage * 'swift/main' of github.com:apple/llvm-project: Use a better workaround for rdar://problem/25587546
…/tensorflow-stage * 'swift/main' of github.com:apple/llvm-project: [lldb] Don't use ::exit but instead return from the driver loop (NFC) [lldb] Destory the debugger in the Driver dtor (NFC)
…e-in-type-lookup [lldb] Update Swift mangling example in `type lookup`
…/tensorflow-stage * 'swift/main' of github.com:apple/llvm-project: [lldb] Update Swift mangling example in `type lookup`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.