summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [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
* [SymbolFilePDB] Minor cleanupAaron Smith2018-03-071-22/+23
| | | | | | | | | | | | | | | | | | | Summary: - Remove unused code - Adding `break` statement conditionally - Ignore empty strings in FindTypeByName Reviewers: zturner, rnk, lldb-commits Reviewed By: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44165 llvm-svn: 326870
* Revert 326766 too, after r326862 the test fails and I don't know how to fix.Nico Weber2018-03-072-17/+1
| | | | llvm-svn: 326869
* [analyzer] Fix the checker for the performance anti-pattern to accept messagesGeorge Karpenkov2018-03-072-11/+45
| | | | | | | | send to ObjC objects. Differential Revision: https://reviews.llvm.org/D44170 llvm-svn: 326868
* [Driver] Enable SafeStack by default on FuchsiaPetr Hosek2018-03-073-5/+16
| | | | | | | | This is already used throughout the entire system, so make it a default. Differential Revision: https://reviews.llvm.org/D44065 llvm-svn: 326867
* [XRay][compiler-rt] Add APIs for processing logs in memoryDean Michael Berris2018-03-073-5/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change adds APIs to allow logging implementations to provide a function for iterating through in-memory buffers (if they hold in-memory buffers) and a way for users to generically deal with these buffers in-process. These APIs are: - __xray_log_set_buffer_iterator(...) and __xray_log_remove_buffer_iterator(): installs and removes an iterator function that takes an XRayBuffer and yields the next one. - __xray_log_process_buffers(...): takes a function pointer that can take a mode identifier (string) and an XRayBuffer to process this data as they see fit. The intent is to have the FDR mode implementation's buffers be available through this `__xray_log_process_buffers(...)` API, so that they can be streamed from memory instead of flushed to disk (useful for getting the data to a network, or doing in-process analysis). Basic mode logging will not support this mechanism as it's designed to write the data mostly to disk. Future implementations will may depend on this API as well, to allow for programmatically working through the XRay buffers exposed to the users in some fashion. Reviewers: eizan, kpw, pelikan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D43495 llvm-svn: 326866
* [ASTMatcher] Extend hasAnyArgument to ObjCMessageExprGeorge Karpenkov2018-03-073-7/+54
| | | | | | | | | | | | | | | Currently hasArgument works with both ObjC messages and function calls, but not hasAnyArgument. This patch fixes that discrepancy, as it's often more convenient to use hasAnyArgument. On a more general note, it would be great to have a common superclass for objc-call and function call, and a matcher matching that, but that's probably a job for another commit. Differential Revision: https://reviews.llvm.org/D44169 llvm-svn: 326865
OpenPOWER on IntegriCloud