summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [Debug] Add a utility to propagate dbg.value to new PHIs, NFCVedant Kumar2018-01-253-33/+43
| | | | | | | | | | This simply moves an existing utility to Utils for reuse. Split out of: https://reviews.llvm.org/D42551 Patch by Matt Davis! llvm-svn: 323471
* [asan] Fix kernel callback naming in instrumentation module.Evgeniy Stepanov2018-01-251-3/+1
| | | | | | | | | | Right now clang uses "_n" suffix for some user space callbacks and "N" for the matching kernel ones. There's no need for this and it actually breaks kernel build with inline instrumentation. Use the same callback names for user space and the kernel (and also make them consistent with the names GCC uses). Patch by Andrey Konovalov. Differential Revision: https://reviews.llvm.org/D42423 llvm-svn: 323470
* [X86] Teach Intel syntax InstPrinter to print lock prefixes that have been ↵Craig Topper2018-01-252-2/+8
| | | | | | | | parsed from the asm parser. The asm parser puts the lock prefix in the MCInst flags so we need to check that in addition to TSFlags. This matches what the ATT printer does. llvm-svn: 323469
* [X86] Combine two unnecessarily complicated ifs that had the same body. NFCCraig Topper2018-01-251-3/+1
| | | | llvm-svn: 323468
* [test] Fix a test that never compiled under -fmodulesVedant Kumar2018-01-251-5/+0
| | | | | | | | | | This test #include's stdio.h, which, on at least two bots results in a module import of MacTypes.h (due to weird SDK layering issues), which causes the test to fail to compile. Just don't #include stdio.h, as it's not needed for the test. llvm-svn: 323467
* Revert r322132; it appears to be an accidental commit, based on the commit ↵Aaron Ballman2018-01-254-104/+0
| | | | | | message. The original author of the commit has not commented on whether this was accidental or purposeful, so if this revert is in error, the author can re-commit with an actual commit message. llvm-svn: 323466
* Reverting r323463 as it appears to be an accidental commit. Regardless, it ↵Aaron Ballman2018-01-257-630/+438
| | | | | | | | | | broke a lot of build bots, so reverting back to green. http://lab.llvm.org:8011/builders/lldb-amd64-ninja-netbsd8/builds/9294 http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/24084 http://lab.llvm.org:8011/builders/clang-ppc64le-linux-lnt/builds/9567 llvm-svn: 323465
* [scudo] Overhaul malloc related interceptorsKostya Kortchinsky2018-01-253-72/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a follow-up to D42506. There are a few of things that bothered me about `scudo_interceptors.cpp`: - the filename is a misnomer: it intercepts some functions, but the rest (C++) is actually in `scudo_new_delete.cpp`. I feel like `scudo_malloc.cpp` is more appropriate (ASan uses the same naming scheme); - we do not need "full" interceptors, since we are never accessing the unsanitized version of the functions, we just need the `extern "C" INTERCEPTOR_ATTRIBUTE` part of it to just call our functions; - a couple of functions where duplicated while they could just be `ALIAS`'d; - use the `SANITIZER_INTERCEPT_*` defines to hide the unneeded interceptors; - use `SIZE_T` instead of `uptr`: while it's the same behind the curtain, the former is meant for this use case. In the end there is no functional change on the currently supported platforms (Linux, Android). Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: mgorny, hintonda, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D42546 llvm-svn: 323464
* tmpJake Ehrlich2018-01-257-438/+630
| | | | llvm-svn: 323463
* [sanitizer] Implement GetNumberOfCPUs for WindowsKostya Kortchinsky2018-01-251-2/+3
| | | | | | | | | | | | | | | | | Summary: Implement `GetNumberOfCPUs` using `GetNativeSystemInfo`. The only consummer of this function is Scudo which is not functional on Windows yet. Reviewers: rnk, zturner Reviewed By: zturner Subscribers: zturner, kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D42547 llvm-svn: 323462
* AST: inline a single-use variable (NFC)Saleem Abdulrasool2018-01-251-2/+1
| | | | | | Inline the single use variable into the only use. NFC. llvm-svn: 323461
* Re-land "[ThinLTO] Add call edges' relative block frequency to per-module ↵Easwaran Raman2018-01-257-25/+87
| | | | | | | | | | | | | | summary." It was reverted after buildbot regressions. Original commit message: This allows relative block frequency of call edges to be passed to the thinlink stage where it will be used to compute synthetic entry counts of functions. llvm-svn: 323460
* Revert [libcxx] r323453 - [cmake] [libcxx] Call llvm_setup_rpath() when ↵Don Hinton2018-01-251-1/+0
| | | | | | | | | | adding shared libraries. Shoaib Meenai pointed out this will break standalone builds when built without llvm. Differential Revision: https://reviews.llvm.org/D42459 llvm-svn: 323459
* Revert [libcxxabi] r323455 - [cmake] [libcxxabi] Call llvm_setup_rpath() ↵Don Hinton2018-01-251-1/+0
| | | | | | | | | | when adding shared libraries. Shoaib Meenai pointed out this will break standalone builds can be built without llvm. Differential Revision: https://reviews.llvm.org/D42460 llvm-svn: 323458
* [CMake] Fix Bug Report URLShoaib Meenai2018-01-251-1/+1
| | | | | | | | | | It looks like this hasn't been updated since bugzilla moved. Patch by Colden Cullen. Differential Revision: https://reviews.llvm.org/D42496 llvm-svn: 323457
* Move LMAOffset from the OutputSection to the PhdrEntry. NFC.Rafael Espindola2018-01-253-4/+4
| | | | | | | | | | | | | | | | | | | | | | If two sections are in the same PT_LOAD, their relatives offsets, virtual address and physical addresses are all the same. I initially wanted to have a single global LMAOffset, on the assumption that every ELF file was in practiced loaded contiguously in both physical and virtual memory. Unfortunately that is not the case. The linux kernel has: LOAD 0x200000 0xffffffff81000000 0x0000000001000000 0xced000 0xced000 R E 0x200000 LOAD 0x1000000 0xffffffff81e00000 0x0000000001e00000 0x15f000 0x15f000 RW 0x200000 LOAD 0x1200000 0x0000000000000000 0x0000000001f5f000 0x01b198 0x01b198 RW 0x200000 LOAD 0x137b000 0xffffffff81f7b000 0x0000000001f7b000 0x116000 0x1ec000 RWE 0x200000 The delta for all but the third PT_LOAD is the same: 0xffffffff80000000. I think the 3rd one is a hack for implementing per cpu data, but we can't break that. llvm-svn: 323456
* [cmake] [libcxxabi] Call llvm_setup_rpath() when adding shared libraries.Don Hinton2018-01-251-0/+1
| | | | | | | | | Clang and llvm already use llvm_setup_rpath(), so this change will help standarize rpath usage across all projects. Differential Revision: https://reviews.llvm.org/D42460 llvm-svn: 323455
* Revert "asan: add kernel inline instrumentation test"Vedant Kumar2018-01-251-27/+0
| | | | | | | | This reverts commit r323451. It breaks this bot: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/24077 llvm-svn: 323454
* [cmake] [libcxx] Call llvm_setup_rpath() when adding shared libraries.Don Hinton2018-01-251-0/+1
| | | | | | | | | Clang and llvm already use llvm_setup_rpath(), so this change will help standarize rpath usage across all projects. Differential Revision: https://reviews.llvm.org/D42459 llvm-svn: 323453
* [Hexagon] SETEQ and SETNE are valid integer condition codesKrzysztof Parzyszek2018-01-252-1/+23
| | | | llvm-svn: 323452
* asan: add kernel inline instrumentation testVedant Kumar2018-01-251-0/+27
| | | | | | | | Patch by Andrey Konovalov! Differential Revision: https://reviews.llvm.org/D42473 llvm-svn: 323451
* Use test-specific module caches to avoid stale header conflictsVedant Kumar2018-01-2511-11/+22
| | | | | | | | | | | | | | | | | | | Stale global module caches cause problems for the bots. The modules become invalid when clang headers are updated by version control, and tests which use these modules fail to compile, e.g: fatal error: file '.../__stddef_max_align_t.h' has been modified since the module file '/var/.../Darwin.pcm' was built note: please rebuild precompiled header '/var/.../Darwin.pcm' Eventually we should transition to having just a single module cache to speed tests up. This patch should be just enough to fix the spurious bot failures due to stale caches. rdar://36479805, also related to llvm.org/PR36048 Differential Revision: https://reviews.llvm.org/D42277 llvm-svn: 323450
* Improve LMARegion handling.Rafael Espindola2018-01-254-2/+49
| | | | | | | | | | | | This fixes the crash reported at PR36083. The issue is that we were trying to put all the sections in the same PT_LOAD and crashing trying to write past the end of the file. This also adds accounting for used space in LMARegion, without it all 3 PT_LOADs would have the same physical address. llvm-svn: 323449
* [clangd] Add ClangdUnit diagnostics tests using annotated code.Sam McCall2018-01-255-22/+161
| | | | | | | | | | | | | | | | | | | Summary: This adds checks that our diagnostics emit correct ranges in a bunch of cases, as promised in D41118. The diagnostics-preamble test is also converted and extended to be a little more precise. diagnostics.test stays around as the smoke test for this feature. Reviewers: ilya-biryukov Subscribers: klimek, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D41454 llvm-svn: 323448
* Revert "[SLP] Fix for PR32086: Count InsertElementInstr of the same elements ↵Alexey Bataev2018-01-254-374/+153
| | | | | | | | as shuffle." This reverts commit r323441 to fix buildbots. llvm-svn: 323447
* [ADT] Make moving Optional not reset the Optional it moves from.Benjamin Kramer2018-01-252-8/+6
| | | | | | | | | This brings it in line with std::optional. My recent changes to make Optional of trivial types trivially copyable introduced diverging behavior depending on the type, which is bad. Now all types have the same moving behavior. llvm-svn: 323445
* [LTO] - Introduce GlobalResolution::Prevailing flag.George Rimar2018-01-252-15/+12
| | | | | | | | | It is NFC refactoring change that will make D42107 a bit smaller. Differential revision: https://reviews.llvm.org/D42528 llvm-svn: 323444
* [clangd] Replace homegrown make_scope_exit with one from ADTSam McCall2018-01-252-35/+3
| | | | llvm-svn: 323443
* Give scope_exit helper correct move semanticsSam McCall2018-01-252-2/+31
| | | | llvm-svn: 323442
* [SLP] Fix for PR32086: Count InsertElementInstr of the same elements as shuffle.Alexey Bataev2018-01-254-153/+374
| | | | | | | | | | | | | | | | | Summary: If the same value is going to be vectorized several times in the same tree entry, this entry is considered to be a gather entry and cost of this gather is counter as cost of InsertElementInstrs for each gathered value. But we can consider these elements as ShuffleInstr with SK_PermuteSingle shuffle kind. Reviewers: spatel, RKSimon, mkuper, hfinkel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38697 llvm-svn: 323441
* Simplify. NFC.Rafael Espindola2018-01-252-10/+6
| | | | llvm-svn: 323440
* [X86] Apply clang-format to detectUSatPattern. NFCI.Simon Pilgrim2018-01-251-5/+4
| | | | | | Cleanup from D42544 llvm-svn: 323439
* Revert "[Hexagon] Replace EmitFunctionEntryCode with a DAG preprocessing code"Krzysztof Parzyszek2018-01-252-22/+16
| | | | | | This reverts r323374. The fix needs a different approach. llvm-svn: 323438
* [InstCombine] narrow masked zexted binops (PR35792)Sanjay Patel2018-01-253-48/+155
| | | | | | | | | | | | | | | | | This is guarded by shouldChangeType(), so the tests show that we don't do the fold if the narrower type is not legal. Note that there is a proposal (D42424) that would change the results for the specific cases shown in these tests. That difference is also discussed in PR35792: https://bugs.llvm.org/show_bug.cgi?id=35792 Alive proofs for the cases handled here as well as the bitwise logic binops that we should already do better on: https://rise4fun.com/Alive/c97 https://rise4fun.com/Alive/Lc5E https://rise4fun.com/Alive/kdf llvm-svn: 323437
* [InstCombine] add tests for PR35792; NFCSanjay Patel2018-01-251-0/+192
| | | | llvm-svn: 323436
* Unused diagnostics can occur in tblgen.Benjamin Kramer2018-01-251-1/+1
| | | | llvm-svn: 323435
* [clang-cl] Add support for /arch:AVX512F and /arch:AVX512Nico Weber2018-01-252-5/+46
| | | | | | | | | | | | | | | | | | | | | For /arch:AVX512F: clang-cl and cl.exe both defines __AVX512F__ __AVX512CD__. clang-cl also defines __AVX512ER__ __AVX512PF__. 64-bit cl.exe also defines (according to /Bz) _NO_PREFETCHW. For /arch:AVX512: clang-cl and cl.exe both define __AVX512F__ __AVX512CD__ __AVX512BW__ __AVX512DQ__ __AVX512VL__. 64-bit cl.exe also defines _NO_PREFETCHW. So not 100% identical, but pretty close. Also refactor the existing AVX / AVX2 code to not repeat itself in both the 32-bit and 64-bit cases. https://reviews.llvm.org/D42538 llvm-svn: 323433
* Revert "[SLP] Fix for PR32086: Count InsertElementInstr of the same elements ↵Alexey Bataev2018-01-254-376/+154
| | | | | | | | as shuffle." This reverts commit r323430 to fix buildbots. llvm-svn: 323432
* Removed Unicode BOM.Alexander Kornienko2018-01-251-1/+1
| | | | llvm-svn: 323431
* [SLP] Fix for PR32086: Count InsertElementInstr of the same elements as shuffle.Alexey Bataev2018-01-254-154/+376
| | | | | | | | | | | | | | | | | Summary: If the same value is going to be vectorized several times in the same tree entry, this entry is considered to be a gather entry and cost of this gather is counter as cost of InsertElementInstrs for each gathered value. But we can consider these elements as ShuffleInstr with SK_PermuteSingle shuffle kind. Reviewers: spatel, RKSimon, mkuper, hfinkel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38697 llvm-svn: 323430
* [X86][SSE] Add tests for vector truncation with signed saturationSimon Pilgrim2018-01-251-0/+3520
| | | | | | AVX512 isn't using X86ISD::VTRUNCS and SSE/AVX isn't using PACKSS/PACKUS llvm-svn: 323428
* Update build_llvm_package.batHans Wennborg2018-01-251-5/+9
| | | | | | | | | | | | | | I moved to a new machine and had to adjust a few things: - Use %USERNAME% instead of %USER% (not sure why %USER% didn't work anymore) - Update paths for using Python 3.6 instead of 3.5 - Skip building OpenMP which seems broken on Windows - Work around new vsdevcmd.bat changing paths: https://developercommunity.visualstudio.com/content/problem/26780/vsdevcmdbat-changes-the-current-working-directory.html - Build stage-0 compiler with MinSizeRel to work around VS 2017 bug: https://developercommunity.visualstudio.com/content/problem/139043/miscompile-in-trivial-c-program-with-155-preview-2.html llvm-svn: 323427
* clang-cl: Simplify handling of /arch: flag.Nico Weber2018-01-252-78/+60
| | | | | | | | | | | | | | | | | | | r213083 initially implemented /arch: support by mapping it to CPU features. Then r241077 additionally mapped it to CPU, which made the feature flags redundant (if harmless). This change here removes the redundant mapping to feature flags, and rewrites test/Driver/cl-x86-flags.c to be a bit more of an integration test that checks for preprocessor defines like AVX (like documented on MSDN) instead of for driver flags. To keep emitting warn_drv_unused_argument, use getLastArgNoClaim() followed by an explicit claim() if needed. This is in preparation for adding support for /arch:AVX512(F). No intended behavior change. https://reviews.llvm.org/D42497 llvm-svn: 323426
* [clangd] Provide a helper to report estimated memory usage per-fileIlya Biryukov2018-01-257-3/+114
| | | | | | | | | | | | Reviewers: sammccall, ioeric, hokein Reviewed By: ioeric Subscribers: klimek, cfe-commits, jkorous-apple Differential Revision: https://reviews.llvm.org/D42480 llvm-svn: 323425
* [clangd] Fixed the file comment of new file. NFCIlya Biryukov2018-01-251-1/+1
| | | | llvm-svn: 323424
* [clangd] Added forgotten filesIlya Biryukov2018-01-252-0/+87
| | | | llvm-svn: 323423
* [X86][SSE] Add tests for vector truncation with unsigned saturationSimon Pilgrim2018-01-251-0/+2352
| | | | | | AVX512 tends to do a good job, but there are some missed opportunities with SSE/AVX llvm-svn: 323422
* [CodeGen] Decorate aggregate accesses with TBAA tagsIvan A. Kosarev2018-01-2516-97/+219
| | | | | | Differential Revision: https://reviews.llvm.org/D41539 llvm-svn: 323421
* [clangd] Moved caching of compile commands to ClangdServerIlya Biryukov2018-01-256-62/+25
| | | | | | | | | | | | | | | | Summary: It allows to get rid of CppFile::getLastCommand and simplify the code in the upcoming threading patch. Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D42429 llvm-svn: 323420
* [clang-format] Fixes indentation of inner text proto messagesKrasimir Georgiev2018-01-252-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Consider the text proto: ``` message { sub { key: value } } ``` Previously the first `{` was TT_Unknown, which caused the inner message to be indented by the continuation width. This didn't happen for: ``` message { sub: { key: value } } ``` This is because the code to mark the first `{` as a TT_DictLiteral was only considering the case where it marches forward and reaches a `:`. This patch updates this by looking not only for `:`, but also for `<` and `{`. Reviewers: djasper Reviewed By: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D42500 llvm-svn: 323419
OpenPOWER on IntegriCloud