-
Notifications
You must be signed in to change notification settings - Fork 12k
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
57168357 cherry pick #60
Closed
Closed
Conversation
This file contains 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
…ualCalls, NFC Split out a helper function for the individual call optimizations and skip useless calls to it (where the instruction is not an ARC intrinsic). Besides reducing indentation (and possibly speeding up compile time in some small way), an upcoming patch will add additional calls and expand out the `switch`. (cherry picked from commit 783cb86)
Pair up inlined AutoreleaseRV calls with their matching RetainRV or ClaimRV. - RetainRV cancels out AutoreleaseRV. Delete both instructions. - ClaimRV is a peephole for RetainRV+Release. Delete AutoreleaseRV and replace ClaimRV with Release. This avoids problems where more aggressive inlining triggers memory regressions. This patch is happy to skip over non-callable instructions and non-ARC intrinsics looking for the pair. It is likely sound to also skip over opaque function calls, but that's harder to reason about, and it's not relevant to the goal here: if there's an opaque function call splitting up a pair, it's very unlikely that a handshake would have happened dynamically without inlining. Note that this patch also subsumes the previous logic that looked backwards from ReleaseRV. https://reviews.llvm.org/D70370 rdar://problem/46509586 (cherry picked from commit 3279724)
…aserv-after-inlining/20191104 20191104: llvm/ObjCARC: Eliminate inlined AutoreleaseRV calls
…values with subregisters DwarfExpression::addMachineReg() knows how to build a larger register that isn't expressible in DWARF by combining multiple subregisters. However, if the entire value fits into just one subregister, it would still emit the other subregisters, leading to all sorts of inconsistencies down the line. This patch fixes that by moving an already existing(!) check whether the subregister's offset is before the end of the value to the right place. rdar://problem/57294211 Differential Revision: https://reviews.llvm.org/D70508 (cherry picked from commit 5da385f)
(cherry picked from commit 1b9ef3b)
Cherry-pick DwarfExpression bugfix.
…lass even in DWARF 4 and earlier. This allows the debugger to recognize them as direct functions as opposed to Objective-C methods. <rdar://problem/57327663> Differential Revision: https://reviews.llvm.org/D70544 (cherry picked from commit e0cabe2)
(cherry picked from commit 23391df)
[apple/stable/20191106] fix indexstore.h header for gcc
Darwin lazily saves the AVX512 context on first use [1]: instead of checking that it already does to figure out if the OS supports AVX512, trust that the kernel will do the right thing and always assume the context save support is available. [1] https://github.com/apple/darwin-xnu/blob/xnu-4903.221.2/osfmk/i386/fpu.c#L174 Reviewers: ab, RKSimon, craig.topper Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D70453 (cherry-picked from 82921bf)
Darwin lazily saves the AVX512 context on first use [1]: instead of checking that it already does to figure out if the OS supports AVX512, trust that the kernel will do the right thing and always assume the context save support is available. [1] https://github.com/apple/darwin-xnu/blob/xnu-4903.221.2/osfmk/i386/fpu.c#L174 Reviewers: ab, RKSimon, craig.topper Reviewed By: craig.topper Subscribers: dberris, JDevlieghere, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D70454 (cherry-picked from a70c3f9)
Cherry-pick objc_direct support
(cherry picked from commit b192e95)
For Swift, we turn on `ignore_noninstrumented_modules` and `ignore_interceptors_accesses` even on Linux (where they are usually disabled). We have to account for that when running LLVM-Swift on Linux. rdar://57436887 (cherry picked from commit 71fbf9f)
The old suffix was preventing it from being executed by default. (cherry picked from commit 96c8024)
Summary: The sanitizer symbolizers support printing the function offset (difference between pc and function start) of a stackframe using the `%q` format specifier. Unfortunately this didn't actually work because neither the atos or dladdr symbolizer set the `AddressInfo::function_offset` field. This patch teaches both symbolizers to try to compute the function offset. In the case of the atos symbolizer, atos might not report the function offset (e.g. it reports a source location instead) so in this case it fallsback to using `dladdr()` to compute the function offset. Two test cases are included. rdar://problem/56695185 Reviewers: kubamracek, yln Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D69549 (cherry picked from commit b9a9220)
My initial implementation of `ignore_noninstrumented_modules` for Linux (landed in 6159242) did not consider that the GNU symbol table could be present but empty. "Empty" means: void of real symbol entries, but potential "terminator/placeholder" symbols that are skipped via `header->symoffset`. In this case `last_symbol` is zero and we should avoid computing `chains[last_symbol - header->symoffset]`. This bug seems to only manifest in combination with `LD_PRELOAD` (counterpart of `DYLD_INSERT_LIBRARIES` for Linux) and for small binaries, (e.g., the "not" utility from the llvm test suite) that have segments without any real symbols. This should fix the remaining failing ASan tests on the Swift Linux CI. rdar://57566645 (cherry picked from commit 988adcc)
always_inline. The assertion in SetLLVMFunctionAttributesForDefinition used to fail when there was attribute OptimizeNone on the AST function and attribute always_inline on the IR function. This happens because base destructors are annotated with always_inline when the code is compiled with -fapple-kext (see r124757). rdar://problem/57169694 (cherry picked from commit 4516dc1)
…been setup This commit sets the Self and Imp declarations for ObjC method declarations, in addition to the definitions. It also fixes a bunch of code in clang that had wrong assumptions about when getSelfDecl() would be set: - CGDebugInfo::getObjCMethodName and AnalysisConsumer::getFunctionName would assume that it was set for method declarations part of a protocol, which they never were, and that self would be a Class type, which it isn't as it is id for a protocol. Also use the Canonical Decl to index the set of Direct methods so that when calls and implementations interleave, the same llvm::Function is used and the same symbol name emitted. Radar-Id: rdar://problem/57661767 Patch by: Pierre Habouzit Differential Revision: https://reviews.llvm.org/D71091
[ObjC] Make sure that the implicit arguments for direct methods have …
Atomic compound expressions try to use atomicrmw if possible, but this path doesn't set the Result variable, leaving it to crash in later code if anything ever tries to use the result of the expression. This fixes that issue by recalculating the new value based on the old one atomically loaded. (cherry picked from commit 10e0d64)
Patch by: Pierre Habouzit Differential Revision: https://reviews.llvm.org/D71226 Radar-Id: rdar://problem/57764169
…h-20191106 Also synthesize _cmd and self for properties
rdar://57844626 (cherry picked from commit f5327fd)
[TSan] Disable flaky test to unblock Swift PR testing
classification. We were accidentally treating invalid scope specs as being empty, resulting in our trying to form an ADL-only call with a qualified callee, which tripped up an assert later on.
This repository does not accept pull requests. Please follow http://llvm.org/docs/Contributing.html#how-to-submit-a-patch for contribution to LLVM. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.