summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [COFF, ARM64] Fix encoding of debugtrap for WindowsTom Tan2019-06-215-0/+30
| | | | | | | | | | | | On Windows ARM64, intrinsic __debugbreak is compiled into brk #0xF000 which is mapped to llvm.debugtrap in Clang. Instruction brk #F000 is the defined break point instruction on ARM64 which is recognized by Windows debugger and exception handling code, so llvm.debugtrap should map to it instead of redirecting to llvm.trap (brk #1) as the default implementation. Differential Revision: https://reviews.llvm.org/D63635 llvm-svn: 364115
* Add new style meta-programming primatives.Eric Fiselier2019-06-213-28/+245
| | | | | | | | | | | | | Using class templates instead of alias templates causes a lot of instantiations. As part of the move away from C++03, we want to improve the efficiency of our meta-programming. This patch lays the groundwork by introducing new _If, _EnableIf, _And, _Or, and _IsValidExpansion (detect member). Future patches will replace the existing implementations after verifying there compile time differences. llvm-svn: 364114
* [lit] Deduplicate logic in toolchain.pyJonas Devlieghere2019-06-211-6/+4
| | | | | | No need to compute the path of lit-lldb-init twice. llvm-svn: 364113
* [lit] Make lit-lldb-init configurable by CMakeJonas Devlieghere2019-06-213-2/+6
| | | | | | | | | | This makes the `lit-lldb-init` file configurable by CMake. This matters to us downstream in Swift, where we want to set environment variables with the `env` command for every test. Differential revision: https://reviews.llvm.org/D63679 llvm-svn: 364112
* Revert [SLP] Look-ahead operand reordering heuristic.Reid Kleckner2019-06-212-276/+93
| | | | | | | | | This reverts r364084 (git commit 5698921be2d567f6abf925479ac9f5a376d6d74f) It caused crashes while compiling a file in Chrome. Reduction forthcoming. llvm-svn: 364111
* Remove binary finally accidentially committed in r364109Erich Keane2019-06-211-0/+0
| | | | llvm-svn: 364110
* Ensure Target Features always_inline error happens in C++ cases.Erich Keane2019-06-216-13/+37
| | | | | | | | A handful of C++ cases as reported in PR42352 didn't actually give an error when always_inlining with a different target feature list. This resulted in broken IR. llvm-svn: 364109
* Fix has_attribute.cpp test on Windows after r364102Reid Kleckner2019-06-211-2/+2
| | | | llvm-svn: 364108
* [llvm-lipo] Implement -thinShoaib Meenai2019-06-218-5/+489
| | | | | | | | | | Creates thin output file of specified arch_type from the fat input file. Patch by Anusha Basana <anushabasana@fb.com> Differential Revision: https://reviews.llvm.org/D63341 llvm-svn: 364107
* [clang-tidy] misc-unused-parameters: don't comment out parameter name for C codeMatthias Gehre2019-06-212-5/+10
| | | | | | | | | | | | | | Summary: The fixit `int square(int /*num*/)` yields `error: parameter name omitted` for C code. Enable it only for C++ code. Reviewers: klimek, ilya-biryukov, lebedev.ri, aaron.ballman Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63088 llvm-svn: 364106
* [ASan] Use dynamic shadow on 32-bit iOS and simulatorsJulian Lettner2019-06-214-41/+53
| | | | | | | | | | | | | | | | | | | | The VM layout on iOS is not stable between releases. On 64-bit iOS and its derivatives we use a dynamic shadow offset that enables ASan to search for a valid location for the shadow heap on process launch rather than hardcode it. This commit extends that approach for 32-bit iOS plus derivatives and their simulators. rdar://50645192 rdar://51200372 rdar://51767702 Reviewed By: delcypher Differential Revision: https://reviews.llvm.org/D63586 llvm-svn: 364105
* clang-format a block; NFCGeorge Burgess IV2019-06-211-6/+7
| | | | | | | The indentation of the return here was off, and confusing as a result. Cleaned up a bit extra while I was in the area. llvm-svn: 364104
* PR42301: Abort cleanly if we encounter a huge source file rather thanRichard Smith2019-06-212-0/+27
| | | | | | | | | | crashing. Ideally we wouldn't care about the size of a file so long as it fits in memory, but in practice we have lots of hardocded assumptions that unsigned can be used to index files, string literals, and so on. llvm-svn: 364103
* Fix __has_cpp_attribute expansion to produce trailing L and (whereRichard Smith2019-06-212-87/+77
| | | | | | | | necessary) leading whitespace. Simplify unit test and extend to cover no_unique_address attribute. llvm-svn: 364102
* [X86] Add test cases for incorrect shrinking of volatile vector loads from ↵Craig Topper2019-06-211-0/+34
| | | | | | | | | 128-bits to 32 or 64 bits. NFC This is caused by isel patterns that look for vzmovl+load and treat it the same as vzload. llvm-svn: 364101
* Devirtualize destructor of final class.Hiroshi Yamauchi2019-06-212-3/+50
| | | | | | | | | | | | | | | | | | | Summary: Take advantage of the final keyword to devirtualize destructor calls. Fix https://bugs.llvm.org/show_bug.cgi?id=21368 Reviewers: rsmith Reviewed By: rsmith Subscribers: davidxl, Prazek, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63161 llvm-svn: 364100
* AMDGPU: Fix not using s33 for scratch wave offset in kernelsMatt Arsenault2019-06-214-16/+22
| | | | | | Fixes missing piece from r363990. llvm-svn: 364099
* [Target] Decouple ObjCLanguageRuntime from LanguageRuntimeAlex Langford2019-06-2116-65/+135
| | | | | | | | | | | | Summary: ObjCLanguageRuntime was being pulled into LanguageRuntime because of Breakpoint Preconditions. If we move BreakpointPrecondition out of Breakpoint, we can extend the LanguageRuntime plugin interface so that LanguageRuntimes can give us a BreakpointPrecondition for exceptions. Differential Revision: https://reviews.llvm.org/D63181 llvm-svn: 364098
* [X86] Add DAG combine to turn (vzmovl (insert_subvector undef, X, 0)) into ↵Craig Topper2019-06-216-70/+25
| | | | | | | | | | | | | | | | (insert_subvector allzeros, (vzmovl X), 0) 128/256 bit scalar_to_vectors are canonicalized to (insert_subvector undef, (scalar_to_vector), 0). We have isel patterns that try to match this pattern being used by a vzmovl to use a 128-bit instruction and a subreg_to_reg. This patch detects the insert_subvector undef portion of this and pulls it through the vzmovl, creating a narrower vzmovl and an insert_subvector allzeroes. We can then match the insertsubvector into a subreg_to_reg operation by itself. Then we can fall back on existing (vzmovl (scalar_to_vector)) patterns. Note, while the scalar_to_vector case is the motivating case I didn't restrict to just that case. I'm also wondering about shrinking any 256/512 vzmovl to an extract_subvector+vzmovl+insert_subvector(allzeros) but I fear that would have bad implications to shuffle combining. I also think there is more canonicalization we can do with vzmovl with loads or scalar_to_vector with loads to create vzload. Differential Revision: https://reviews.llvm.org/D63512 llvm-svn: 364095
* Implement P0340R3: Make 'underlying_type' SFINAE-friendly. Reviewed as ↵Marshall Clow2019-06-213-21/+115
| | | | | | https://reviews.llvm.org/D63574 llvm-svn: 364094
* [X86] Don't mark v64i8/v32i16 ISD::SELECT as custom unless they are legal types.Craig Topper2019-06-212-7/+108
| | | | | | | | | We don't have any Custom handling during type legalization. Only operation legalization. Fixes PR42355 llvm-svn: 364093
* [X86] Add avx512bw command lines to avx512-select.llCraig Topper2019-06-211-89/+192
| | | | | | | Prep for fixing PR42355 and ensuring we have coverage of ISD::SELECT for v64i8/v32i16 on KNL and SKX configs. llvm-svn: 364092
* [X86] Add a debug print of the node in the default case for unhandled ↵Craig Topper2019-06-211-0/+4
| | | | | | | | | | opcodes in ReplaceNodeResults. This should be unreachable, but bugs can make it reachable. This adds a debug print so we can see the bad node in the output when the llvm_unreachable triggers. llvm-svn: 364091
* [X86][AVX] Combine INSERT_SUBVECTOR(SRC0, EXTRACT_SUBVECTOR(SRC1)) as shuffleSimon Pilgrim2019-06-216-86/+148
| | | | | | Subvector shuffling often ends up as insert/extract subvector. llvm-svn: 364090
* Revert [test][Driver] Fix Clang :: Driver/cl-response-file.cReid Kleckner2019-06-211-1/+1
| | | | | | | | | This reverts r363985 (git commit d5f16d6cfccc4b0b13b6c01d16c673886d53e695) This test can't use printf on Windows because the path contains backslashes which must not be interpreted as escapes by printf. llvm-svn: 364089
* [clang-scan-deps] print the dependencies to stdoutAlex Lorenz2019-06-215-21/+88
| | | | | | | | and remove the need to use -MD options in the CDB Differential Revision: https://reviews.llvm.org/D63579 llvm-svn: 364088
* Quote path to Python executable in case it has spacesReid Kleckner2019-06-211-3/+13
| | | | | | | | | These days Python 3 is typically installed into C:/Program Files, so cope with that. Similar to r364077 in compiler-rt. llvm-svn: 364087
* [AArch64][GlobalISel] Implement selection support for the new G_JUMP_TABLE ↵Amara Emerson2019-06-214-1/+178
| | | | | | | | | | and G_BRJT ops. With this we can now fully code generate jump tables, which is important for code size. Differential Revision: https://reviews.llvm.org/D63223 llvm-svn: 364086
* [GlobalISel][IRTranslator] Change switch table translation to generate jump ↵Amara Emerson2019-06-216-181/+816
| | | | | | | | | | | | | | | | | | | | | | | | | | tables and range checks. This change makes use of the newly refactored SwitchLoweringUtils code from SelectionDAG to in order to generate jump tables and range checks where appropriate. Much of this code is ported from SDAG with some modifications. We generate G_JUMP_TABLE and G_BRJT instructions when JT opportunities are found. This means that targets which previously relied on the naive one MBB per case stmt translation will now start falling back until they add support for the new opcodes. For range checks, we don't generate any previously unused operations. This just recognizes contiguous ranges of case values and generates a single block per range. Single case value blocks are just a special case of ranges so we get that support almost for free. There are still some optimizations missing that I haven't ported over, and bit-tests are also unimplemented. This patch series is already complex enough. Actual arm64 support for selection of jump tables is coming in a later patch. Differential Revision: https://reviews.llvm.org/D63169 llvm-svn: 364085
* [SLP] Look-ahead operand reordering heuristic.Simon Pilgrim2019-06-212-93/+276
| | | | | | | | | | This patch introduces a new heuristic for guiding operand reordering. The new "look-ahead" heuristic can look beyond the immediate predecessors. This helps break ties when the immediate predecessors have identical opcodes (see lit test for an example). Committed on behalf of @vporpo (Vasileios Porpodas) Differential Revision: https://reviews.llvm.org/D60897 llvm-svn: 364084
* [NFC] Update shl-sub testsDavid Bolvansky2019-06-211-15/+14
| | | | llvm-svn: 364083
* [InstCombine] add tests for ctpop folds; NFCSanjay Patel2019-06-211-0/+117
| | | | llvm-svn: 364082
* Fix ARM buildbot.Richard Smith2019-06-211-4/+4
| | | | llvm-svn: 364081
* [OPENMP]Fix PR42068: Vla type is not captured.Alexey Bataev2019-06-212-9/+40
| | | | | | | | If the variably modified type is declared outside of the captured region and then used in the cast expression along with array subscript expression, the type is not captured and it leads to the compiler crash. llvm-svn: 364080
* [X86] Use vmovq for v4i64/v4f64/v8i64/v8f64 vzmovl.Craig Topper2019-06-217-90/+60
| | | | | | | | | | | | | | We already use vmovq for v2i64/v2f64 vzmovl. But we were using a blendpd+xorpd for v4i64/v4f64/v8i64/v8f64 under opt speed. Or movsd+xorpd under optsize. I think the blend with 0 or movss/d is only needed for vXi32 where we don't have an instruction that can move 32 bits from one xmm to another while zeroing upper bits. movq is no worse than blendpd on any known CPUs. llvm-svn: 364079
* Ensure that top-level QualType objects also have a "kind" field when dumping ↵Aaron Ballman2019-06-212-0/+73
| | | | | | the AST to JSON. llvm-svn: 364078
* [asan] Quote the path to the Python exe in case it has spacesReid Kleckner2019-06-211-2/+10
| | | | | | | | | | | | | These days, Python 3 installs itself into Program Files, so it often has spaces. At first, I resisted this, and I reinstalled it globally into C:/Python37, similar to the location used for Python 2.7. But then I updated VS 2019, and it uninstalled my copy of Python and installed a new one inside "C:/Program Files (x86)/Microsoft Visual Studio/". At this point, I gave up and switched to using its built-in version of Python. However, now these tests fail, and have to be made aware of the possibility of spaces in paths. :( llvm-svn: 364077
* [DAGCombine] narrowExtractedVectorBinOp - pull out repeated getOpcode(). NFCI.Simon Pilgrim2019-06-211-2/+2
| | | | llvm-svn: 364076
* [AArch64][GlobalISel] Make s8 and s16 G_CONSTANTs legal.Amara Emerson2019-06-2116-158/+192
| | | | | | | | | | | | | | | | | | | | | We sometimes get poor code size because constants of types < 32b are legalized as 32 bit G_CONSTANTs with a truncate to fit. This works but means that the localizer can no longer sink them (although it's possible to extend it to do so). On AArch64 however s8 and s16 constants can be selected in the same way as s32 constants, with a mov pseudo into a W register. If we make s8 and s16 constants legal then we can avoid unnecessary truncates, they can be CSE'd, and the localizer can sink them as normal. There is a caveat: if the user of a smaller constant has to widen the sources, we end up with an anyext of the smaller typed G_CONSTANT. This can cause regressions because of the additional extend and missed pattern matching. To remedy this, there's a new artifact combiner to generate the wider G_CONSTANT if it's legal for the target. Differential Revision: https://reviews.llvm.org/D63587 llvm-svn: 364075
* [AMDGPU] hazard recognizer for fp atomic to s_denorm_modeStanislav Mekhanoshin2019-06-2110-28/+559
| | | | | | | | | This requires 3 wait states unless there is a wait or VALU in between. Differential Revision: https://reviews.llvm.org/D63619 llvm-svn: 364074
* [InstCombine] (1 << (C - x)) -> ((1 << C) >> x) if C is bitwidth - 1David Bolvansky2019-06-212-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: ``` %a = sub i32 31, %x %r = shl i32 1, %a => %d = shl i32 1, 31 %r = lshr i32 %d, %x Done: 1 Optimization is correct! ``` https://rise4fun.com/Alive/btZm Reviewers: spatel, lebedev.ri, nikic Reviewed By: lebedev.ri Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63652 llvm-svn: 364073
* [X86] isBinOp - move commutative ops to isCommutativeBinOp. NFCI.Simon Pilgrim2019-06-211-6/+6
| | | | | | TargetLoweringBase::isBinOp checks isCommutativeBinOp as a fallback, so don't duplicate. llvm-svn: 364072
* [OpenCL][PR41963] Add generic addr space to old atomics in C++ modeAnastasia Stulova2019-06-212-0/+53
| | | | | | | | | Add overloads with generic address space pointer to old atomics. This is currently only added for C++ compilation mode. Differential Revision: https://reviews.llvm.org/D62335 llvm-svn: 364071
* [asan] Avoid two compiler-synthesized calls to memset & memcpyReid Kleckner2019-06-212-5/+5
| | | | | | | | | | Otherwise the tests hang on Windows attempting to report nested errors. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D63627 llvm-svn: 364070
* [NFC] Added more tests for D63652David Bolvansky2019-06-211-0/+33
| | | | llvm-svn: 364069
* Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.Simon Pilgrim2019-06-211-1/+1
| | | | llvm-svn: 364068
* Print more type node information when dumping the AST to JSON.Aaron Ballman2019-06-213-0/+381
| | | | llvm-svn: 364067
* [clang][NewPM] Add -fno-experimental-new-pass-manager to testsLeonard Chan2019-06-2113-91/+135
| | | | | | | | | | | | | | | | As per the discussion on D58375, we disable test that have optimizations under the new PM. This patch adds -fno-experimental-new-pass-manager to RUNS that: - Already run with optimizations (-O1 or higher) that were missed in D58375. - Explicitly test new PM behavior along side some new PM RUNS, but are missing this flag if new PM is enabled by default. - Specify -O without the number. Based on getOptimizationLevel(), it seems the default is 2, and the IR appears to be the same when changed to -O2, so update the test to explicitly say -O2 and provide -fno-experimental-new-pass-manager`. Differential Revision: https://reviews.llvm.org/D63156 llvm-svn: 364066
* Use rvalue references throughout the is_constructible traits.Eric Fiselier2019-06-214-153/+6
| | | | llvm-svn: 364065
* [InstCombine] cttz(abs(x)) -> cttz(x)David Bolvansky2019-06-212-36/+25
| | | | | | | | | | | | Summary: Signedness does not change number of trailing zeros. Reviewers: spatel, lebedev.ri, nikic Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D63546 llvm-svn: 364064
OpenPOWER on IntegriCloud