summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP] Fix lifetime of the loop counters.Alexey Bataev2018-03-073-77/+115
| | | | | | | | We may emit incorrect lifetime info during codegen for loop counters in OpenMP constructs because of automatic scope cleanup when we needed temporarily locations for private loop counters. llvm-svn: 326922
* [Fuzzer] Avoid the unnecessary rebuild of the custom libc++Petr Hosek2018-03-077-31/+70
| | | | | | | | | | | | This changes the add_custom_libcxx macro to resemble the llvm_ExternalProject_Add. The primary motivation is to avoid unnecessary libFuzzer rebuilds that are being done on every Ninja/Make invocation. The libc++ should be only rebuilt whenever the libc++ source itself changes. Differential Revision: https://reviews.llvm.org/D43213 llvm-svn: 326921
* Write a hash of the executable into the PE timestamp fields.Zachary Turner2018-03-071-14/+50
| | | | | | | | | | | | | | | | Windows tools treats the timestamp fields as sort of a build id, using it to archive executables on a symbol server, as well as for matching executables to PDBs. We were writing 0 for these fields, which would cause symbol servers to break as they are indexed in the symbol server based on this value. Although the field is called timestamp, it can really be any value that is unique per build, so to support reproducible builds we use a hash of the executable here. Differential Revision: https://reviews.llvm.org/D43978 llvm-svn: 326920
* [lldbtestsuite] llvm-objcopy is now required to run the lit tests.Davide Italiano2018-03-071-0/+1
| | | | | | | | | | | There's now a test using llvm-objcopy in lit/. This doesn't fail on the bot(s) because `llvm-objcopy` is probably already available there, but if you get a fresh checkout and run `ninja check-lldb` you'll observe the failure as it's not tracking the dependency correctly. This fixes the problem on my machine, and probably everywhere else. llvm-svn: 326919
* [ELF] - Adjust rangeToString to report ranges in a different format.George Rimar2018-03-072-11/+11
| | | | | | | | | | | | | It was raised during the review of D43819. LLD usually use [X, Y] for reporting ranges, like below: "relocation R_386_16 out of range: 65536 is not in [0, 65535]" Patch changes rangeToString() to do the same. Differential revision: https://reviews.llvm.org/D44207 llvm-svn: 326918
* [X86] Make the MUL->VPMADDWD work before op legalization on AVX1 targets. ↵Craig Topper2018-03-072-111/+100
| | | | | | | | | | | | Simplify feature checks by using isTypeLegal. The v8i32 conversion on AVX1 targets was only working after LowerMUL splits 256-bit vectors. While I was there I've also made it so we don't have to check for AVX2 and BWI directly and instead just ask if the type is legal. Differential Revision: https://reviews.llvm.org/D44190 llvm-svn: 326917
* [Support] Stop passing StringRefs by const reference in some of the ↵Craig Topper2018-03-072-12/+9
| | | | | | getHostCPUname implementations. NFC llvm-svn: 326916
* [Hexagon] Rewrite non-HVX unaligned loads as pairs of aligned onesKrzysztof Parzyszek2018-03-0714-127/+294
| | | | | | | | | This is a follow-up to r325169, this time for all types, not just HVX vector types. Disable this by default, since it's not always safe. llvm-svn: 326915
* Revert r326911: Improve --warn-symbol-ordering.Rui Ueyama2018-03-073-30/+24
| | | | | | This reverts commit r326911 because it was committed by accident. llvm-svn: 326914
* [LangRef] fix formatting in FP descriptions; NFCSanjay Patel2018-03-071-21/+22
| | | | | | | | This is a clean-up step to reduce diffs ahead of real changes to the FP semantics as discussed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2018-February/121444.html llvm-svn: 326913
* Rename Indent{1,2} -> Indent{8,16}.Rui Ueyama2018-03-072-8/+8
| | | | llvm-svn: 326912
* Improve --warn-symbol-ordering.Rui Ueyama2018-03-073-24/+30
| | | | | | | | | | | | | | | | Summary: I originally tried to simplify code and then noticed that lld doesn't do what it tells to the user by warn(). It says "unable to order discarded symbol" but it actually can for sections eliminated by ICF. With this patch, lld doesn't sort such sections. Reviewers: jhenderson, rafael Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D44180 llvm-svn: 326911
* [AMDGPU] Increased vector length for global/constant loads.Farhana Aleen2018-03-077-9/+125
| | | | | | | | | | | | | | | Summary: GCN ISA supports instructions that can read 16 consecutive dwords from memory through the scalar data cache; loadstoreVectorizer should take advantage of the wider vector length and pack 16/8 elements of dwords/quadwords. Author: FarhanaAleen Reviewed By: rampitec Subscribers: llvm-commits, AMDGPU Differential Revision: https://reviews.llvm.org/D44179 llvm-svn: 326910
* [clang-tidy] Add "portability" module and rename readability-simd-intrinsics ↵Fangrui Song2018-03-0716-35/+116
| | | | | | | | | | | | to portability-simd-intrinsics Reviewers: alexfh Subscribers: klimek, nemanjai, mgorny, xazax.hun, kbarton, cfe-commits Differential Revision: https://reviews.llvm.org/D44173 llvm-svn: 326909
* Re-land: Teach CorrelatedValuePropagation to reduce the width of udiv/urem ↵Justin Lebar2018-03-073-0/+250
| | | | | | | | | | | | | | | instructions. Summary: If the operands of a udiv/urem can be proved to fit within a smaller power-of-two-sized type, reduce the width of the udiv/urem. Backed out for failing an assert in clang bootstrap builds. Re-landing with a fix for handling non-power-of-two inputs (e.g. udiv i24). Original Differential Revision: https://reviews.llvm.org/D44102 llvm-svn: 326908
* Revert "[AMDGPU] Widened vector length for global/constant address space."Farhana Aleen2018-03-077-125/+9
| | | | | | This reverts commit ce988cc100dc65e7c6c727aff31ceb99231cab03. llvm-svn: 326907
* [PowerPC] LSR tunings for PowerPCStefan Pintilie2018-03-073-0/+73
| | | | | | | | | The purpose of this patch is to have LSR generate better code on Power. This is done by overriding isLSRCostLess. Differential Revision: https://reviews.llvm.org/D40855 llvm-svn: 326906
* [SampleFDO] Extend SampleProfReader to handle demangled names.Wei Mi2018-03-072-9/+50
| | | | | | | | | | | | | SampleProfReader assumes function names in the profile are all mangled names. However, there are cases that few demangled names are somehow contained in the profile (usually because of debug info problems), which may trigger parsing error in SampleProfReader and cause the whole profile to be unusable. The patch extends SampleProfReader to handle profiles with demangled names, so that those profiles can still be useful. Differential revision: https://reviews.llvm.org/D44161 llvm-svn: 326905
* [AMDGPU] Widened vector length for global/constant address space.Farhana Aleen2018-03-077-9/+125
| | | | llvm-svn: 326904
* [dwarfdump] Only print CU relative offset in verbose modeJonas Devlieghere2018-03-078-68/+75
| | | | | | | | | | | | Instead of only printing the CU-relative offset in non-verbose mode, it makes more sense to only printed the resolved address. In verbose mode we still print both. Differential revision: https://reviews.llvm.org/D44148 rdar://33525475 llvm-svn: 326903
* Revert "Reapply "[DWARFv5] Emit file 0 to the line table.""Alexander Kornienko2018-03-0720-249/+128
| | | | | | | | | | | | | | | | This reverts commit r326839. r326839 breaks assembly file parsing: $ cat q.c void g() {} $ clang -S q.c -g $ clang -g -c q.s q.s:9:2: error: file number already allocated .file 1 "/tmp/test" "q.c" ^ llvm-svn: 326902
* [scudo] Make logging more consistentKostya Kortchinsky2018-03-075-65/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: A few changes related to logging: - prepend `Scudo` to the error messages so that users can identify that we reported an error; - replace a couple of `Report` calls in the RSS check code with `dieWithMessage`/`Print`, mark a condition as `UNLIKELY` in the process; - change some messages so that they all look more or less the same. This includes the `CHECK` message; - adapt a couple of tests with the new strings. A couple of side notes: this results in a few 1-line-blocks, for which I left brackets. There doesn't seem to be any style guide for that, I can remove them if need be. I didn't use `SanitizerToolName` in the strings, but directly `Scudo` because we are the only users, I could change that too. Reviewers: alekseyshl, flowerhack Reviewed By: alekseyshl Subscribers: mgorny, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D44171 llvm-svn: 326901
* Revert rL326898: "Teach CorrelatedValuePropagation to reduce the width of ↵Justin Lebar2018-03-073-242/+0
| | | | | | | | | | udiv/urem instructions." Breaks bootstrap builds: clang built with this patch asserts while building MCDwarf.cpp: Assertion `castIsValid(op, S, Ty) && "Invalid cast!"' failed. llvm-svn: 326900
* [ELF] Prevent crash when reporting errors if debug line cannot be parsedJames Henderson2018-03-073-2/+52
| | | | | | | | | | | | | LLD uses the debug info and debug line sections to determine the location of e.g. references to undefined symbols, when producing error messages. In the event that debug info was present, but debug line parsing failed for some reason, then a nullptr would end up being dereferenced by the location-lookup code. Differential Revision: https://reviews.llvm.org/D44205 Reviewers: grimar llvm-svn: 326899
* Teach CorrelatedValuePropagation to reduce the width of udiv/urem instructions.Justin Lebar2018-03-073-0/+242
| | | | | | | | | | | | | | Summary: If the operands of a udiv/urem can be proved to fit within a smaller power-of-two-sized type, reduce the width of the udiv/urem. Reviewers: spatel, sanjoy Subscribers: llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D44102 llvm-svn: 326898
* [X86][X87] Add X87 fp80 conversion testsSimon Pilgrim2018-03-071-0/+1123
| | | | llvm-svn: 326897
* [WebAssembly] Run clang-format. NFCNicholas Wilson2018-03-079-23/+25
| | | | llvm-svn: 326896
* [ELF] - Recommit r326892,r326893 "[ELF] - Report LMA region overflows."George Rimar2018-03-072-2/+18
| | | | | | | | | | | | With fix: add missing "RUN:" prefix to test case. Original commit message: We do not report LMA region overflows currently. Both GNU linkers do that. The patch implements it. Differential revision: https://reviews.llvm.org/D44094 llvm-svn: 326895
* [ELF] - Revert r326892, r326893.George Rimar2018-03-072-18/+2
| | | | | | | Bots are still unhappy: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/26259 llvm-svn: 326894
* [ELF] - Fix build bot after r326892 "[ELF] - Report LMA region overflows."George Rimar2018-03-071-1/+0
| | | | | | Removed excessive line from testcase. llvm-svn: 326893
* [ELF] - Report LMA region overflows.George Rimar2018-03-072-2/+19
| | | | | | | | | We do not report LMA region overflows currently. Both GNU linkers do that. The patch implements it. Differential revision: https://reviews.llvm.org/D44094 llvm-svn: 326892
* [ELF] - Allow discarding .hash and .gnu.hash from linker script.George Rimar2018-03-072-0/+31
| | | | | | | | | Currently, LLD segfaults when linker script attempts to discard one of the hash sections. This patch fixes that. Differential revision: https://reviews.llvm.org/D44012 llvm-svn: 326891
* [mips] Correct the definition of m(f|t)c(0|2)Simon Dardis2018-03-0712-16/+50
| | | | | | | | | | | | | | | | | | | | | | | | | These instructions are defined as taking a GPR register and a coprocessor register for ISAs up to MIPS32. MIPS32 extended the definition to allow a selector--a value from 0 to 32--to access another register. These instructions are now internally defined as being MIPS-I instructions, but are rejected for pre-MIPS32 ISA's if they have an explicit selector which is non-zero. This deviates slightly from GAS's behaviour which rejects assembly instructions with an explicit selector for pre-MIPS32 ISAs. E.g: mfc0 $4, $5, 0 is rejected by GAS for MIPS-I to MIPS-V but will be accepted with this patch for MIPS-I to MIPS-V. Reviewers: atanasyan Differential Revision: https://reviews.llvm.org/D41662 llvm-svn: 326890
* Add Clang ReleaseNotes that --autocomplete breaks backward compatibilyYuka Takahashi2018-03-071-0/+9
| | | | | | | | | | | | | | Summary: --autocomplete flag now handles all the flags passed to shell, and this implementation breaks backward compatibily before Clang 6.0. Reviewers: teemperor, v.g.vassilev Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D44191 llvm-svn: 326889
* [WebAssembly] Remove duplicated line of code and unreachable check. NFCNicholas Wilson2018-03-071-3/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D44146 llvm-svn: 326888
* [WebAssembly] Use StringSaver to retain ownership of ctor function body. NFCNicholas Wilson2018-03-072-6/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D44149 llvm-svn: 326885
* [LoadStoreVectorizer] Differentiate between <1 x T> and TSven van Haastregt2018-03-072-0/+15
| | | | | | | | | | | The LoadStoreVectorizer thought that <1 x T> and T were the same types when merging stores, leading to a crash later. Patch by Erik Hogeman. Differential Revision: https://reviews.llvm.org/D44014 llvm-svn: 326884
* Don't intercept mmap64() on NetBSDKamil Rytarowski2018-03-071-1/+1
| | | | | | | | | Disable SANITIZER_INTERCEPT_MMAP64 for SI_NETBSD. NetBSD switched to 64-bit offsets almost 30 years ago on 32-bit platforms and never needed mmap64() concept. llvm-svn: 326883
* [ARM] Fix for PR36577Sjoerd Meijer2018-03-072-8/+45
| | | | | | | | | | | | | Don't PerformSHLSimplify if the given node is used by a node that also uses a constant because we may get stuck in an infinite combine loop. bugzilla: https://bugs.llvm.org/show_bug.cgi?id=36577 Patch by Sam Parker. Differential Revision: https://reviews.llvm.org/D44097 llvm-svn: 326882
* [SystemZ] NFC refactoring in SystemZHazardRecognizer.Jonas Paulsson2018-03-071-5/+2
| | | | | | | Use Reset() after emitting a call. Review: Ulrich Weigand llvm-svn: 326881
* [SystemZ] Improve getCurrCycleIdx() in SystemZHazardRecognizer.Jonas Paulsson2018-03-072-9/+20
| | | | | | | | | | | getCurrCycleIdx() returns the decoder cycle index which the next candidate SU will be placed on. This patch improves this method by passing the candidate SU to it so that if SU will begin a new group, the index of that group is returned instead. Review: Ulrich Weigand llvm-svn: 326880
* [SystemZ] NFC refactoring in SystemZHazardRecognizer.Jonas Paulsson2018-03-071-4/+8
| | | | | | | | Handle the not-taken branch in emitInstruction() where the TakenBranch argument is available. This is cleaner than relying on EmitInstruction(). Review: Ulrich Weigand llvm-svn: 326879
* [SystemZ] Improved debug dumping during post-RA scheduling.Jonas Paulsson2018-03-074-70/+102
| | | | | Review: Ulrich Weigand llvm-svn: 326878
* [X86] Add IMUL scheduling info on sandybridge, fix it on >=haswell.Clement Courbet2018-03-075-29/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Only IMUL16rri uses an extra P0156. IMUL32* and IMUL16rr only use P1. This was computed using https://github.com/google/EXEgesis/blob/master/exegesis/tools/compute_itineraries.cc This can easily be validated by running perf on the following code: ``` int main(int argc, char**argv) { int a = argc; int b = argc; int c = argc; int d = argc; for (int i = 0; i < LOOP_ITERATIONS; ++i) { asm volatile( R"( .rept 10000 imull $0x2, %%edx, %%eax imull $0x2, %%ecx, %%ebx imull $0x2, %%eax, %%edx imull $0x2, %%ebx, %%ecx .endr )" : "+a"(a), "+b"(b), "+c"(c), "+d"(d) : :); } return a+b+c+d; } ``` -> test.cc perf stat -x, -e cycles --pfm-events=uops_executed_port:port_0:u,uops_executed_port:port_1:u,uops_executed_port:port_2:u,uops_executed_port:port_3:u,uops_executed_port:port_4:u,uops_executed_port:port_5:u,uops_executed_port:port_6:u,uops_executed_port:port_7:u test Reviewers: craig.topper, RKSimon, gadi.haber Subscribers: llvm-commits, gchatelet, chandlerc Differential Revision: https://reviews.llvm.org/D43460 llvm-svn: 326877
* Attempt to appease buildbotsGeorge Burgess IV2018-03-071-1/+1
| | | | | | | | | | | I can't reproduce this build error locally, but it appears straightforward enough to fix. r326851 renamed two of the params of this interceptor, but apparently to update their use here. Failure: http://lab.llvm.org:8011/builders/clang-cmake-aarch64-full/builds/4569 llvm-svn: 326876
* [SymbolFilePDB] Add missing Char16 and Char32 types in a few placesAaron Smith2018-03-073-0/+18
| | | | | | | | | | Reviewers: zturner, rnk, lldb-commits Subscribers: clayborg, llvm-commits Differential Revision: https://reviews.llvm.org/D44166 llvm-svn: 326875
* Disable tests from r326852 on DarwinAdam Nemet2018-03-072-0/+2
| | | | | | | | | | Darwin needs xlocale.h but I see no precedence in the code how non-Posix headers like this are handled and I am not experienced with this code. Just disable the tests for now to recover the bots. rdar://38208146 llvm-svn: 326874
* Remove a placeholderGeorge Burgess IV2018-03-071-1/+1
| | | | | | | ...Running tests in the wrong directory will often make them seem to pass. Oops. :) llvm-svn: 326873
* Reland r326766 (with a slightly modified test)George Burgess IV2018-03-072-1/+21
| | | | | | | | | The original revert was done in r326869, since reverting r326602 broke the test added by this. The new test should be less dependent on r326602. llvm-svn: 326872
* [demangler] Fix a mistake in r326797.Erik Pilkington2018-03-072-2/+4
| | | | | | Thanks to Nico Weber for pointing this out! llvm-svn: 326871
OpenPOWER on IntegriCloud