summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [clang-tidy] New checker for exceptions that are created but not thrownGabor Horvath2018-02-158-0/+285
| | | | | | | | Patch by: Kristof Umann Differential Revision: https://reviews.llvm.org/D43120 llvm-svn: 325222
* [clang-format] Improve ObjC headers detectionJacek Olesiak2018-02-152-10/+24
| | | | | | | | | | | | | | Summary: Detect ObjC characteristic types when they start a line and add additional keywords. Reviewers: benhamilton Reviewed By: benhamilton Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D43124 llvm-svn: 325221
* [clangd] Fix tracing now that spans lifetimes can overlap on a thread.Sam McCall2018-02-154-36/+133
| | | | | | | | | | | | | | | | | | | | | | | Summary: The chrome trace viewer requires events within a thread to strictly nest. So we need to record the lifetime of the Span objects, not the contexts. But we still want to show the relationship between spans where a context crosses threads, so do this with flow events (i.e. arrows). Before: https://photos.app.goo.gl/q4Dd9u9xtelaXk1v1 After: https://photos.app.goo.gl/5RNLmAMLZR3unvY83 (This could stand some further improvement, in particular I think we want a container span whenever we schedule work on a thread. But that's another patch) Reviewers: ioeric Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D43272 llvm-svn: 325220
* [CMake] Add -fno-experimental-isel for testingJonas Hahnfeld2018-02-152-2/+23
| | | | | | | | | | | | | GlobalISel doesn't yet implement blockaddress and falls back to SelectionDAG. This results in additional branch instruction to the next basic block which breaks the OMPT tests. Disable GlobalISel for now when compiling the tests because fixing them is not easily possible. See http://llvm.org/PR36313 for full discussion history. Differential Revision: https://reviews.llvm.org/D43195 llvm-svn: 325218
* (NFC)[MachineCombiner] Improve debug output.Andrew V. Tischenko2018-02-151-28/+53
| | | | llvm-svn: 325217
* [NFC] Rename isKnownViaSimpleReasoning to isKnownViaNonRecursiveReasoningMax Kazantsev2018-02-152-17/+17
| | | | llvm-svn: 325216
* [NFC] Fix metadata placement in testMax Kazantsev2018-02-151-3/+1
| | | | llvm-svn: 325215
* [SCEV] Favor isKnownViaSimpleReasoning over constant ranges checkMax Kazantsev2018-02-152-6/+38
| | | | | | | | | | | | | | | | | | | | | There is a more powerful but still simple function `isKnownViaSimpleReasoning ` that does constant range check and few more additional checks. We use it some places (e.g. when proving implications) and in some other places we only check constant ranges. Currently, indvar simplifier fails to remove the check in following loop: int inc = ...; for (int i = inc, j = inc - 1; i < 200; ++i, ++j) if (i > j) { ... } This patch replaces all usages of `isKnownPredicateViaConstantRanges` with `isKnownViaSimpleReasoning` to have smarter proofs. In particular, it fixes the case above. Reviewed-By: sanjoy Differential Revision: https://reviews.llvm.org/D43175 llvm-svn: 325214
* [ELF] Simplify handling of AT section attribute.Igor Kudrin2018-02-153-9/+40
| | | | | | | | This also makes the behavior close to GNU ld's. Differential Revision: https://reviews.llvm.org/D43284 llvm-svn: 325213
* Teach sanitizer about NetBSD specific ioctl(2) callsKamil Rytarowski2018-02-157-205/+5926
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Introduce handling of 1200 NetBSD specific ioctl(2) calls. Over 100 operations are disabled as unavailable or conflicting with the existing ones (the same operation number). Add a script that generates the rules to detect ioctls on NetBSD. The generate_netbsd_ioctls.awk script has been written in NetBSD awk(1) (patched nawk) and is compatible with gawk. Generate lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc with the awk(1) script. Update sanitizer_platform_limits_netbsd accordingly to add the needed definitions. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, eugenis, dvyukov Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny, fedor.sergeev, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D41636 llvm-svn: 325212
* [analyzer] Inline constructors for destroyable temporaries.Artem Dergachev2018-02-152-16/+108
| | | | | | | | | | | | | | | | | | | | | Since r325210, in cfg-temporary-dtors mode, we can rely on the CFG to tell us that we're indeed constructing a temporary, so we can trivially construct a temporary region and inline the constructor. Much like r325202, this is only done under the off-by-default cfg-temporary-dtors flag because the temporary destructor, even if available, will not be inlined and won't have the correct object value (target region). Unless this is fixed, it is quite unsafe to inline the constructor. If the temporary is lifetime-extended, the destructor would be an automatic destructor, which would be evaluated with a "correct" target region - modulo the series of incorrect relocations performed during the lifetime extension. It means that at least, values within the object are guaranteed to be properly escaped or invalidated. Differential Revision: https://reviews.llvm.org/D43062 llvm-svn: 325211
* [CFG] Provide construction contexts for temproary objects.Artem Dergachev2018-02-154-66/+267
| | | | | | | | | | | | | | | Constructors of C++ temporary objects that have destructors now can be queried to discover that they're indeed constructing temporary objects. The respective CXXBindTemporaryExpr, which is also repsonsible for destroying the temporary at the end of full-expression, is now available at the construction site in the CFG. This is all the context we need to provide for temporary objects that are not lifetime extended. For lifetime-extended temporaries, more context is necessary. Differential Revision: https://reviews.llvm.org/D43056 llvm-svn: 325210
* [analyzer] Decide on inlining destructors via EvalCallOptions.Artem Dergachev2018-02-155-65/+88
| | | | | | | | | | | | | | | | | | | | EvalCallOptions were introduced in r324018 for allowing various parts of ExprEngine to notify the inlining mechanism, while preparing for evaluating a function call, of possible difficulties with evaluating the call that they foresee. Then mayInlineCall() would still be a single place for making the decision. Use that mechanism for destructors as well - pass the necessary flags from the CFG-element-specific destructor handlers. Part of this patch accidentally leaked into r324018, which led into a change in tests; this change is reverted now, because even though the change looked correct, the underlying behavior wasn't. Both of these commits were not intended to introduce any function changes otherwise. Differential Revision: https://reviews.llvm.org/D42991 llvm-svn: 325209
* Prevent recursive MSan interceptors in strftime(3) like functionsKamil Rytarowski2018-02-151-0/+1
| | | | | | | | | | | | | | | | | | | Summary: This corrects intercepting this call on NetBSD without false positives. Sponsored by <The NetBSD Foundation> Reviewers: joerg, eugenis, vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D42883 llvm-svn: 325208
* Prevent recursive MSan interceptors in fgets(3)Kamil Rytarowski2018-02-151-0/+1
| | | | | | | | | | | | | | | | | | | Summary: This corrects intercepting this call on NetBSD without false positives. Sponsored by <The NetBSD Foundation> Reviewers: joerg, eugenis, vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D42884 llvm-svn: 325207
* Add NetBSD syscall hooks skeleton in sanitizersKamil Rytarowski2018-02-1510-0/+575
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Implement the skeleton of NetBSD syscall hooks for use with sanitizers. Add a script that generates the rules to handle syscalls on NetBSD: generate_netbsd_syscalls.awk. It has been written in NetBSD awk(1) (patched nawk) and is compatible with gawk. Generate lib/sanitizer_common/sanitizer_platform_limits_netbsd.h that is a public header for applications, and included as: <sanitizer_common/sanitizer_platform_limits_netbsd.h>. Generate sanitizer_syscalls_netbsd.inc that defines all the syscall rules for NetBSD. This file is modeled after the Linux specific file: sanitizer_common_syscalls.inc. Start recognizing NetBSD syscalls with existing sanitizers: ASan, ESan, HWASan, TSan, MSan. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, kcc, dvyukov, eugenis Reviewed By: vitalybuka Subscribers: hintonda, kubamracek, mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D42048 llvm-svn: 325206
* Fix test failure on compilers w/o deduction guidesEric Fiselier2018-02-152-3/+3
| | | | llvm-svn: 325205
* Fix an issue that lld drops symbol versions for -r.Rui Ueyama2018-02-152-1/+15
| | | | | | | | | | When we are emitting a relocatable output, we should keep the original symbol name including "@" part. Previously, we drop that part unconditionally which resulted in dropping versions from symbols. Differential Revision: https://reviews.llvm.org/D43307 llvm-svn: 325204
* Reapply r325193Konstantin Zhuravlyov2018-02-153-91/+208
| | | | llvm-svn: 325203
* [analyzer] Allow inlining constructors into return values.Artem Dergachev2018-02-154-6/+186
| | | | | | | | | | | | | | | | | This only affects the cfg-temporary-dtors mode - in this mode we begin inlining constructors that are constructing function return values. These constructors have a correct construction context since r324952. Because temporary destructors are not only never inlined, but also don't have the correct target region yet, this change is not entirely safe. But this will be fixed in the subsequent commits, while this stays off behind the cfg-temporary-dtors flag. Lifetime extension for return values is still not modeled correctly. Differential Revision: https://reviews.llvm.org/D42875 llvm-svn: 325202
* [analyzer] NFC: Remove dead checks when computing DeclStmt construction region.Artem Dergachev2018-02-151-9/+6
| | | | | | | | | In CFG, every DeclStmt has exactly one decl, which is always a variable. It is also pointless to check that the initializer is the constructor because that's how construction contexts work now. llvm-svn: 325201
* Revert r325193 as it breaks buildbotsKonstantin Zhuravlyov2018-02-153-208/+91
| | | | llvm-svn: 325200
* Add new interceptor: lstat(2)Kamil Rytarowski2018-02-153-0/+35
| | | | | | | | | | | | | | | | | | | | | Summary: lstat - get file status Use it on NetBSD. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, eugenis Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D42909 llvm-svn: 325199
* [X86] Regnerate test to show scheduling comments. NFCCraig Topper2018-02-151-26/+26
| | | | | | These must have not been printing the last time the test was re-generated. llvm-svn: 325198
* [X86] Change 32 and 64 bit versions of LSL instruction have a 16-bit memory ↵Craig Topper2018-02-152-4/+14
| | | | | | | | operand. This matches the Intel and AMD documentation and is consistent with the LAR instruction. llvm-svn: 325197
* AMDGPU: Enable PIC by default for amdgcnKonstantin Zhuravlyov2018-02-152-0/+11
| | | | | | Differential Revision: https://reviews.llvm.org/D43094 llvm-svn: 325196
* Add missing definition for class static after r325193.Richard Smith2018-02-151-1/+1
| | | | llvm-svn: 325195
* [sanitizer] Fix flakiness in the testsVitaly Buka2018-02-152-7/+2
| | | | | | | Seems tests fails if link already exists. Also removed duplicated part of tests. llvm-svn: 325194
* AMDGPU: Cleanup most of the macrosKonstantin Zhuravlyov2018-02-153-91/+208
| | | | | | | | | | | - Insert __AMD__ macro - Insert __AMDGPU__ macro - Insert __devicename__ macro - Add missing tests for arch macros Differential Revision: https://reviews.llvm.org/D36802 llvm-svn: 325193
* [X86] Dont' allow 'outs' and 'ins' in at&t syntax without suffixes.Craig Topper2018-02-143-15/+6
| | | | | | The match would be ambiguous, but at&t asm parsing doesn't support ambiguous matches and will just return the first. llvm-svn: 325192
* [X86] Don't use 64 bit hex constants in a 32 bit assembler test.Craig Topper2018-02-141-51/+0
| | | | llvm-svn: 325191
* [X86] Reverse the operand order of invlpga in at&t syntax to match gas.Craig Topper2018-02-146-21/+21
| | | | llvm-svn: 325190
* [llvm-objcopy] Fix handling of zero-size segments in llvm-objcopyJake Ehrlich2018-02-143-28/+181
| | | | | | | | | | | | | | | | | Some ELF files produced by lld may have zero-size segment placeholders as shown below. Since GNU_STACK Offset is 0, the current code makes it the lowest used offset, and relocates all the segments over the ELF header. The resulting binary is total garbage. This change fixes how llvm-objcopy handles PT_PHDR properlly by treating ELF headers and the program header table as segments to allow the layout algorithm decide where those should go. Author: vit9696 Differential Revision: https://reviews.llvm.org/D42872 llvm-svn: 325189
* Supply missing break in case statement.Adrian McCarthy2018-02-141-3/+1
| | | | | | | | | | | | Summary: All the tests pass without hitting the situation mentioned in the FIXME, so, per Aaron Smith's suggestion, this case will now return unconditionally. Subscribers: sanjoy, mgorny, JDevlieghere Differential Revision: https://reviews.llvm.org/D43215 llvm-svn: 325188
* [InstCombine] clean up fold for X / C -> X * (1.0/C); NFCISanjay Patel2018-02-141-34/+27
| | | | | | This should work with vector constants too, but it's currently limited to scalar. llvm-svn: 325187
* Improve documentation for attribute artificialErich Keane2018-02-141-4/+4
| | | | | | | | | | | | This patch is related to https://reviews.llvm.org/rC325081 The patch improves documentation for the attribute and removes reference to GCC documentation. Patch By: Elizabeth Andrews (eandrews) Differential Revision: https://reviews.llvm.org/D43321 llvm-svn: 325186
* [WebAssebmly] Remove use of Optional to fix assertion in gccSam Clegg2018-02-142-8/+14
| | | | | | | | | | | | | | This was causing GCC builds with fail with: Symbols.h:240:3: error: static assertion failed: Symbol types must be trivially destructible static_assert(std::is_trivially_destructible<T>( The reason this is a gcc-only failure is that OptionalStorage has as specialization for POD types that isn't built under GCC. Differential Revision: https://reviews.llvm.org/D43317 llvm-svn: 325185
* Moved CHECK in test closer to source codeVitaly Buka2018-02-141-2/+3
| | | | llvm-svn: 325184
* Revert r325158: Convert an assert to a static_assert. NFC.Rui Ueyama2018-02-143-6/+6
| | | | | | This reverts commit r325158 because it broke GCC builds. llvm-svn: 325183
* [ThinLTO/CFI] Include TYPE_ID summaries into GLOBALVAL_SUMMARY_BLOCKVitaly Buka2018-02-1410-2/+306
| | | | | | | | | | | | | | Summary: TypeID summaries are used by CFI and need to be serialized by ThinLTO indexing for later use by LTO Backend. Reviewers: tejohnson, pcc Subscribers: mehdi_amini, inglorion, eraman, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D42611 llvm-svn: 325182
* Remove a failing static_assert.Rui Ueyama2018-02-141-2/+0
| | | | | | | This static_assert is legitimate, but it is failing on some build environments. I'm removing it until it's fixed to unbreak the bots. llvm-svn: 325181
* [ORC] Consolidate RTDyldObjectLinkingLayer GetMemMgr and GetResolver into aLang Hames2018-02-1412-79/+82
| | | | | | | | | unified GetResources callback. Having a single 'GetResources' callback will simplify adding new resources in the future. llvm-svn: 325180
* [ORC] Switch to shared_ptr ownership for AsynchronousSymbolQueries.Lang Hames2018-02-1413-92/+81
| | | | | | | Queries need to stay alive until each owner has set the values they are responsible for. llvm-svn: 325179
* [X86] Don't swap argument on BOUND instruction in at&t syntax.Craig Topper2018-02-146-45/+46
| | | | | | | | | | | | The bound instruction does not have reversed operands in gas. Fixes PR27653. Patch by Maya Madhavan. Differential Revision: https://reviews.llvm.org/D43243 llvm-svn: 325178
* Change the BugDriver to store the current module with std::unique_ptr.Rafael Espindola2018-02-148-207/+185
| | | | | | | | | While there, change a bunch of helper functions to take references to avoid adding calls to get(). This should conclude the bugpoint yak shaving. llvm-svn: 325177
* Use std::uniue_ptr. NFC.Rafael Espindola2018-02-141-4/+4
| | | | llvm-svn: 325176
* [Debug] Annotate compiler generated range-for loop variables.Matt Davis2018-02-145-10/+53
| | | | | | | | | | | | | | | | | | Summary: This change aims to simplify debugging by annotating the range-for loop artificial variables (range, begin, end) with the scope depth. Reviewers: rsmith, dblaikie Reviewed By: dblaikie Subscribers: dblaikie, cfe-commits Tags: #debug-info Differential Revision: https://reviews.llvm.org/D42813 llvm-svn: 325175
* Use std::unique_ptr. NFC.Rafael Espindola2018-02-141-12/+6
| | | | llvm-svn: 325174
* Use std::unique_ptr. NFC.Rafael Espindola2018-02-141-6/+5
| | | | llvm-svn: 325173
* Use std::unique_ptr. NFC.Rafael Espindola2018-02-141-4/+4
| | | | llvm-svn: 325172
OpenPOWER on IntegriCloud