summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-10-01Remove a path-length limitation for the xray logfile.Douglas Yung
Reviewers: MaskRay Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D52728 Patch by Jeremy Morse!
2018-10-01Switch syscall(2)/__syscall(2) calls to libc calls on NetBSDKamil Rytarowski
Summary: When possible, switch syscall(2)/__syscall(2) calls to direct calls of internal libc symbols. Add a new function to detect address of a libc symbol of a function that could be intercepted. With the address detector in GetRealLibcAddress(), an optional interceptor of libc call will be bypassed. The original approach with syscall(2)/__syscall(2) wasn't portable across supported ABIs and CPU architectures. The indirect syscall interface is also a candidate for removal in future revisions of NetBSD, as the C language ABI is not a good domain for serialization of arbitrary functions arguments. Switch the following functions to libc calls: - internal_mmap() - internal_munmap() - internal_mprotect() - internal_close() - internal_open() - internal_read() - internal_write() - internal_ftruncate() - internal_stat() - internal_lstat() - internal_fstat() - internal_dup2() - internal_readlink() - internal_unlink() - internal_rename() - internal_sched_yield() - internal__exit() - internal_sleep() - internal_execve() - NanoTime() - internal_clock_gettime() - internal_waitpid() - internal_getpid() - internal_getppid() - internal_getdents() - internal_lseek() - internal_sigaltstack() - internal_fork() - internal_sigprocmask() - internal_sysctl() - internal_sigemptyset() - internal_sigfillset() - GetTid() - TgKill() This revision leaves room for refactoring in subsequent commits. Reviewers: vitalybuka, kcc, joerg Reviewed By: vitalybuka Subscribers: mgorny, fedor.sergeev, jfb, loverszhaokai, devnexen, kubamracek, llvm-commits, ro, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D51419
2018-10-01Temporarily revert "[GVNHoist] Re-enable GVNHoist by default"Eric Christopher
This reverts commit r342387 as it's showing significant performance regressions in a number of benchmarks. Followed up with the committer and original thread with an example and will get performance numbers before recommitting.
2018-10-01[globalisel] Add a combiner helpers for extending loads and use them in a ↵Daniel Sanders
pre-legalize combiner for AArch64 Summary: Depends on D45541 Reviewers: ab, aditya_nandakumar, bogner, rtereshin, volkan, rovka, javed.absar, aemerson Subscribers: aemerson, rengolin, mgorny, javed.absar, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D45543
2018-10-01X86, AArch64, ARM: Do not attach debug location to spill/reload instructionsMatthias Braun
Spill/reload instructions are artificially generated by the compiler and have no relation to the original source code. So the best thing to do is not attach any debug location to them (instead of just taking the next debug location we find on following instructions). Differential Revision: https://reviews.llvm.org/D52125
2018-10-01[X86] Add more test shrinking with truncate and sign bit usage tests. NFCCraig Topper
2018-10-01Distinguish `__block` variables that are captured by escaping blocksAkira Hatanaka
from those that aren't. This patch changes the way __block variables that aren't captured by escaping blocks are handled: - Since non-escaping blocks on the stack never get copied to the heap (see https://reviews.llvm.org/D49303), Sema shouldn't error out when the type of a non-escaping __block variable doesn't have an accessible copy constructor. - IRGen doesn't have to use the specialized byref structure (see https://clang.llvm.org/docs/Block-ABI-Apple.html#id8) for a non-escaping __block variable anymore. Instead IRGen can emit the variable as a normal variable and copy the reference to the block literal. Byref copy/dispose helpers aren't needed either. This reapplies r341754, which was reverted in r341757 because it broke a couple of bots. r341754 was calling markEscapingByrefs after the call to PopFunctionScopeInfo, which caused the popped function scope to be cleared out when the following code was compiled, for example: $ cat test.m struct A { id data[10]; }; void foo() { __block A v; ^{ (void)v; }; } This commit calls markEscapingByrefs before calling PopFunctionScopeInfo to prevent that from happening. rdar://problem/39352313 Differential Revision: https://reviews.llvm.org/D51564
2018-10-01[clang-format] Update comment, NFCIKrasimir Georgiev
The initializer of `ParameterCount` was updated from 1 to 0 in r175165, but the comment was never touched: https://github.com/llvm-mirror/clang/commit/9fc56f2636137fcde8acb38865555ed6c7b84dfd
2018-10-01Revert r343499 and r343498. X86 test improvementsCraig Topper
There's a subtle bug in the handling of truncate from i32/i64 to i32 without minsize. I'll be adding more test cases and trying to find a fix.
2018-10-01[ELF] [HEXAGON] Add support for PLT_B22_PCREL and HEX_32_PCRELSid Manning
Update testcase. Differential Revision: https://reviews.llvm.org/D52734
2018-10-01[Hexagon] Remove incorrect pattern for swizKrzysztof Parzyszek
The pattern had a couple of problems: - It was checking for loads of bytes in the reverse order to what it should have been looking for. - It would replace loads of bytes with a load of a word without making sure that the alignment was correct. Thanks to Eli Friedman for pointing it out.
2018-10-01[clang-format] Fix typo in comment, NFCIKrasimir Georgiev
2018-10-01Unbreak linux cfi buildDavid Carlier
2018-10-01[analyzer][NFC] Refactor functions in PlistDiagnostics to take Preproc as ↵Kristof Umann
parameter This is patch is a preparation for the proposed inclusion of macro expansions in the plist output. Differential Revision: https://reviews.llvm.org/D52735
2018-10-01[Cfi] Compiling cfi library on FreeBSD and NetBSDDavid Carlier
Making the library slighty more portable. Reviewers: vitalybuka, krytarowski Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D51682
2018-10-01[AMDGPU] Fixed SIInstrInfo::getOpSize to handle subregsStanislav Mekhanoshin
Currently it returns incorrect operand size for a target independet node such as COPY if operand is a register with subreg. Instead of correct subreg size it returns a size of the whole superreg. Differential Revision: https://reviews.llvm.org/D52736
2018-10-01[PDB] Add support for dumping Typedef records.Zachary Turner
These work a little differently because they are actually in the globals stream and are treated as symbol records, even though DIA presents them as types. So this also adds the necessary infrastructure to cache records that live somewhere other than the TPI stream as well.
2018-10-01[PDB] Add support for parsing VFTable Shape records.Zachary Turner
This allows them to be returned from the native API.
2018-10-01MIRParser: Check that instructions only reference DILocation metadataMatthias Braun
2018-10-01Remove redundant null pointer check in operator deleteFangrui Song
Summary: C89 4.10.3.2 The free function C99 7.20.3.2 The free function C11 7.22.3.3 The free function If ptr is a null pointer, no action shall occur. _aligned_free on MSDN: If memblock is a NULL pointer, this function simply performs no actions. Reviewers: EricWF, mclow.lists, khng300, hotpxl Reviewed By: mclow.lists, khng300, hotpxl Subscribers: lichray, llvm-commits, hotpxl, khng300, christof, ldionne, cfe-commits, libcxx-commits Differential Revision: https://reviews.llvm.org/D52401
2018-10-01Fix tests affected by printing change.Jonas Devlieghere
I forgot to update some tests that were affected by the escaping of backticks in the format string, landed in r343471.
2018-10-01[WebAssembly] Fixed AsmParser not allowing instructions with /Wouter van Oortmerssen
Summary: The AsmParser Lexer regards these as a seperate token. Here we expand the instruction name with them if they are adjacent (no whitespace). Tested: the basic-assembly.s test case has one case with a / in it. The currently are also instructions with : in them, which we intend to rename rather than fix them here. Reviewers: tlively, dschuff Subscribers: sbc100, jgravelle-google, aheejin, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D52442
2018-10-01Fix build with GCC < 5.0 (PR39131)Tatyana Krasnukha
2018-10-01[X86] Enable load folding in the test shrinking codeCraig Topper
This patch adds load folding support to the test shrinking code. This was noticed missing in the review for D52669 Differential Revision: https://reviews.llvm.org/D52699
2018-10-01[X86] Improve test instruction shrinking when the sign flag is used and the ↵Craig Topper
output of the and is truncated Currently we skip looking through truncates if the sign flag is used. But that's overly restrictive. It's safe to look through the truncate as long as we ensure one of the 3 things when we shrink. Either the MSB of the mask at the shrunken size isn't set. If the mask bit is set then either the shrunk size needs to be equal to the compare size or the sign flag needs to be unused. There are still missed opportunities to shrink a load and fold it in here. This will be fixed in a future patch. Differential Revision: https://reviews.llvm.org/D52669
2018-10-01[lldb] Start a new line for the next output if there are no symbols in the ↵Aaron Smith
current symtab Summary: If there is no newline the "lldb" prompt could be on the wrong line. To reproduce the missing newline you can do 'image dump smytab' on any binary. Previously Symtab, file = D:\upstream\build\Debug\bin\clang-diff.exe, num_symbols = 0(lldb) Now Symtab, file = D:\upstream\build\Debug\bin\clang-diff.exe, num_symbols = 0 (lldb) Reviewers: zturner, aleksandr.urakov, lldb-commits Subscribers: abidh Differential Revision: https://reviews.llvm.org/D52627
2018-10-01[NFC] Fix `-Wcast-qual` warnings in Darwin `internal_sysctl(...)` ↵Dan Liew
implementation. Summary: The warnings were introduced in r341187 and r341192. Reviewers: kubamracek, george.karpenkov, krytarowski Subscribers: #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D52717
2018-10-01Add an explanation about cross linking.Rui Ueyama
Differential Revision: https://reviews.llvm.org/D52567
2018-10-01[X86][Btver2] Fix BT(C|R|S)mr & BT(C|R|S)mi schedule latency + uop countsSimon Pilgrim
Match AMD Fam16h SOG + llvm-exegesis tests
2018-10-01DAGCombiner: StoreMerging: Fix bad index calculating when adjusting ↵Matthias Braun
mismatching vector types This fixes a case of bad index calculation when merging mismatching vector types. This changes the existing code to just use the existing extract_{subvector|element} and a bitcast (instead of bitcast first and then newly created extract_xxx) so we don't need to adjust any indices in the first place. rdar://44584718 Differential Revision: https://reviews.llvm.org/D52681
2018-10-01[OPENMP][NVPTX] Handle `requires datasharing` flag correctly withAlexey Bataev
lightweight runtime. The datasharing flag must be set to `1` when executing SPMD-mode compatible directive with reduction|lastprivate clauses.
2018-10-01[x86] add tests for 256- and 512-bit vector types for scalar-to-vector ↵Sanjay Patel
transform; NFC
2018-10-01[X86] Create schedule classes for BT(C|R|S)mi and BT(C|R|S)mr instructionsSimon Pilgrim
2018-10-01[AArch64] Refactor cheap cost modelEvandro Menezes
Refactor the order in `TII::isAsCheapAsAMove()` to ease future development and maintenance. Practically NFC.
2018-10-01[Basic] Update clang tests (really testing sys::fs) that broke with r343460Sam McCall
2018-10-01[X86] Remove unnecessary BTmi/BTmr scheduler overridesSimon Pilgrim
2018-10-01[InstCombine] Handle vector compares in foldGEPIcmp(), take 2Jesper Antonsson
Summary: This is a continuation of the fix for PR34627 "InstCombine assertion at vector gep/icmp folding". (I just realized bugpoint had fuzzed the original test for me, so I had fixed another trigger of the same assert in adjacent code in InstCombine.) This patch avoids optimizing an icmp (to look only at the base pointers) when the resulting icmp would have a different type. The patch adds a testcase and also cleans up and shrinks the pre-existing test for the adjacent assert trigger. Reviewers: lebedev.ri, majnemer, spatel Reviewed By: lebedev.ri Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D52494
2018-10-01[mips] Generate tests expectations using update_llc_test_checks. NFCSimon Atanasyan
Generate tests expectations using update_llc_test_checks and reduce number of "check prefixes" used in the tests.
2018-10-01[X86][Btver2] Fix BTmr schedule uop countsSimon Pilgrim
Match AMD Fam16h SOG + llvm-exegesis tests
2018-10-01[OPENMP] Simplify code, NFC.Alexey Bataev
2018-10-01[InstCombine] try to convert vector insert+extract to trunc; 2nd trySanjay Patel
This was originally committed at rL343407, but reverted at rL343458 because it crashed trying to handle a case where the destination type is FP. This version of the patch adds a check for that possibility. Tests added at rL343480. Original commit message: This transform is requested for the backend in: https://bugs.llvm.org/show_bug.cgi?id=39016 ...but I figured it was worth doing in IR too, and it's probably easier to implement here, so that's this patch. In the simplest case, we are just truncating a scalar value. If the extract index doesn't correspond to the LSBs of the scalar, then we have to shift-right before the truncate. Endian-ness makes this tricky, but hopefully the ASCII-art helps visualize the transform. Differential Revision: https://reviews.llvm.org/D52439
2018-10-01[Preprocessor] Fix a crash when handling non-alpha include header.Haojian Wu
Summary: the crash is casued by an assertion in StringRef. (llvm::StringRef::front() const: Assertion `!empty()' failed.) Reviewers: sammccall Subscribers: jsji, cfe-commits Differential Revision: https://reviews.llvm.org/D52721
2018-10-01[InstCombine] add more insert-extract tests for D52439; NFCSanjay Patel
The first attempt at this transform: rL343407 ...was reverted: rL343458 ...because it did not handle the case where we bitcast to FP. The patch was already limited to avoid the case where we bitcast from FP, but we might want to transform that too.
2018-10-01[OPENMP] Fix enum identifier, NFC.Alexey Bataev
2018-10-01[X86] Create schedule classes for BTmi and BTmr instructionsSimon Pilgrim
2018-10-01[libomptarget-nvptx] Enable asserts in bclibJonas Hahnfeld
If the user requested LIBOMPTARGET_NVPTX_DEBUG, include asserts in the bitcode library. Everything else will have very unpleasent effects because asserts will appear when falling back to the static library libomptarget-nvptx.a. Differential Revision: https://reviews.llvm.org/D52701
2018-10-01[libomptarget-nvptx] reduction: Determine if runtime uninitializedJonas Hahnfeld
Pass in the correct value of isRuntimeUninitialized() which solves parallel reductions as reported on the mailing list. For reference: r333285 did the same for loop scheduling. Differential Revision: https://reviews.llvm.org/D52725
2018-10-01Fixed workaround made in https://reviews.llvm.org/D51694.Andrey Churbanov
Patch suggested by Kelvin Li: removed optional "kind=" part of kind-selector for variables with long names and kind names. Differential Revision: https://reviews.llvm.org/D52712
2018-10-01[clangd] Add "check-clangd" targetHaojian Wu
Summary: So we don't have to run "check-clang-tools" (which builds and tests all clang tools) to verify our clangd-related change. It'd save waiting time for clangd developers. check-clangd (build ~1000 files, run ~340 tests) vs check-clang-tools (build ~3000 files, run ~1000 tests). In the future, we probably want to add similar target for other clang-tools (e.g. clang-tidy). Reviewers: sammccall Subscribers: mgorny, ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D52710
2018-10-01Move llvm util dependencies from clang-tools-extra to add_lit_target.Haojian Wu
Summary: Address fixme in r301762. And would simplify the cmake file in clang-tools-extra. Reviewers: sammccall Subscribers: mgorny, llvm-commits, cfe-commits Differential Revision: https://reviews.llvm.org/D52713