summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [X86] Remove isel patterns with X86VBroadcast+scalar_to_vector+load.Craig Topper2019-08-292-47/+1
| | | | | | The DAG should have these as X86VBroadcast+load. llvm-svn: 370299
* Removed dead code from clang/AST/NSAPI.hDmitri Gribenko2019-08-292-14/+0
| | | | | | | | | | Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66884 llvm-svn: 370298
* [x86] Adding support for some missing intrinsics: _mm512_cvtsi512_si32Pengfei Wang2019-08-292-0/+23
| | | | | | | | | | | | | | | | | | Summary: Adding support for some missing intrinsics: _mm512_cvtsi512_si32 Reviewers: craig.topper, pengfei, LuoYuanke, spatel, RKSimon Reviewed By: craig.topper Subscribers: llvm-commits Patch by Bing Yu (yubing) Differential Revision: https://reviews.llvm.org/D66785 llvm-svn: 370297
* [X86] Remove some unneeded X86VBroadcast isel patterns that have larger than ↵Craig Topper2019-08-292-43/+0
| | | | | | | | | 128 bit input types. We should always be shrinking the input to 128 bits or smaller when the node is created. llvm-svn: 370296
* [Attributor] Deduce "noalias" attributeHideto Ueno2019-08-293-8/+109
| | | | | | | | | | | | | | | Summary: This patch adds very basic deduction for noalias. Reviewers: jdoerfert, sstefan1 Reviewed By: jdoerfert Tags: LLVM Differential Revision: https://reviews.llvm.org/D66207 llvm-svn: 370295
* [X86] Add a DAG combine to combine INSERTPS and VBROADCAST of a scalar load. ↵Craig Topper2019-08-293-59/+53
| | | | | | | | | | Remove corresponding isel patterns. We had an isel pattern to perform this, but its better to do it in DAG combine as a simplification. This also fixes the lack of patterns for AVX512 targets. llvm-svn: 370294
* [X86] Make inline assembly 'x' and 'v' constraints work for f128.Craig Topper2019-08-293-4/+29
| | | | | | | | | Including a type legalizer fix to make bitcast operand promotion work correctly when getSoftenedFloat returns f128 instead of i128. Fixes PR43157 llvm-svn: 370293
* [LoopUnroll] Use Lazy strategy for DTU used for MergeBlockIntoPredecessor.Florian Hahn2019-08-291-1/+3
| | | | | | | | | | | | | | | | | | | | We do not access the DT in the loop, so we do not have to apply updates eagerly. We can apply them lazyly and flush them after we are done merging blocks. As follow-up work, we might be able to use the DTU above as well, instead of manually updating the DT. This brings the example from PR43134 from ~100s to ~4s for a relase + assertions build on my machine. Reviewers: efriedma, kuhar, asbirlea, brzycki Reviewed By: kuhar, brzycki Differential Revision: https://reviews.llvm.org/D66911 llvm-svn: 370292
* [ObjectYAML] Fix lifetime issue in dumpDebugLinesVitaly Buka2019-08-292-7/+7
| | | | | | | | | | Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66901 llvm-svn: 370289
* [sanitizer] Support monorepo layout in symbolizer build scriptVitaly Buka2019-08-291-6/+21
| | | | llvm-svn: 370288
* [python] remove testsuite vestiges.Davide Italiano2019-08-292-193/+0
| | | | llvm-svn: 370287
* [TSanRuntime] Upstream thread swift race detector.Davide Italiano2019-08-292-6/+35
| | | | | | | | | | | | | | | | | | | Summary: This is self-contained, and doesn't need anything in the compiler to work. Mainly to reduce the diff between upstream and downstream. Patch by Kuba Mracek! Reviewers: kubamracek Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66915 llvm-svn: 370286
* [Attributor] Improve messages in iteration verify modeJohannes Doerfert2019-08-291-11/+12
| | | | | | | When we now verify the iteration count we will see the actual count and the expected count before the assertion is triggered. llvm-svn: 370285
* [Attributor][NFC] Add const to map keyJohannes Doerfert2019-08-291-3/+2
| | | | llvm-svn: 370284
* [Attributor][Fix] Indicate change correctlyJohannes Doerfert2019-08-291-0/+1
| | | | llvm-svn: 370283
* [Attributor] Fix typoJohannes Doerfert2019-08-291-1/+1
| | | | llvm-svn: 370282
* AMDGPU: Don't use frame virtual registersMatt Arsenault2019-08-296-63/+128
| | | | | | | | | | | | | | SGPR spills aren't really handled after SILowerSGPRSpills. In order to directly control what happens if the scavenger needs to spill, the scavenger needs to be used directly. There is an alternative to spilling in these contexts anyway since the frame register can be increment and restored. This does present another possible issue if spilling is needed for the unused carry out if an add is needed. I think this can be avoided by using a scalar add (although that clobbers SCC, which happens anyway). llvm-svn: 370281
* GlobalISel/TableGen: Handle setcc patternsMatt Arsenault2019-08-2915-35/+1399
| | | | | | | | | | | This is a special case because one node maps to two different G_ instructions, and the operand order is changed. This mostly enables G_FCMP for AMDPGPU. G_ICMP is still manually selected for now since it has the SALU and VALU complication to deal with. llvm-svn: 370280
* Add requirement to test.Richard Trieu2019-08-291-0/+1
| | | | | | | -debug-only option for llc is only available in debug builds so "REQUIRES: asserts" is needed in the tes. llvm-svn: 370279
* [dotest] Make dotest.py invocation repeatableJonas Devlieghere2019-08-282-29/+7
| | | | | | | | | | | This removes support for reading the LLDB_TEST_ARGUMENTS environment variable and instead requires all arguments to be specified as part of the invocation. This ensures that dotest.py invocations are easily repeatable. Differential revision: https://reviews.llvm.org/D66912 llvm-svn: 370278
* [sanitizer] Simplify COMPILER_RT setup in lint scriptVitaly Buka2019-08-281-8/+2
| | | | llvm-svn: 370277
* [X86] Fix a couple isel patterns to not shrink a volatile load.Craig Topper2019-08-281-2/+4
| | | | | | | | Also add a FIXME because I'm not sure why these patterns exist. Looks like a missing combine. And another FIXME because the AVX512 equivalent one of the patterns is missing. llvm-svn: 370276
* [RISCV] Avoid generating AssertZext for LP64 ABI when lowering floating LibCallShiva Chen2019-08-2811-23/+868
| | | | | | | | | | | | | | | | | | | | | | | | | The patch fixed the issue that RV64 didn't clear the upper bits when return complex floating value with lp64 ABI. float _Complex complex_add(float _Complex a, float _Complex b) { return a + b; } RealResult = zero_extend(RealA + RealB) ImageResult = ImageA + ImageB Return (RealResult | (ImageResult << 32)) The patch introduces shouldExtendTypeInLibCall target hook to suppress the AssertZext generation when lowering floating LibCall. Thanks to Eli's comments from the Bugzilla https://bugs.llvm.org/show_bug.cgi?id=42820 Differential Revision: https://reviews.llvm.org/D65497 llvm-svn: 370275
* [Modules] Fix rebuilding an updated module for each of its consumers.Volodymyr Sapsai2019-08-286-6/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Marking a module for a rebuild when its signature differs from the expected one causes redundant module rebuilds for incremental builds. When a module is updated, its signature changes. But its consumers still have the old signature and loading them will result in signature mismatches. It will correctly cause the rebuilds for the consumers but we don't need to rebuild the common module for each of them as it is already up to date. In practice this bug causes longer build times. We are doing more work than required and only a single process can build a module, so parallel builds degrade to a single-process mode where extra processes are just waiting on a file lock. Fix by not marking a module dependency for a rebuild on signature mismatch. We'll check if it is up to date when we load it. rdar://problem/50212358 Reviewers: dexonsmith, bruno, rsmith Reviewed By: dexonsmith, bruno Subscribers: jkorous, ributzka, cfe-commits, aprantl Differential Revision: https://reviews.llvm.org/D66907 llvm-svn: 370274
* [clangd] Fix ExtractFunction dependenciesHeejin Ahn2019-08-283-0/+3
| | | | | | | | | | | | | | Summary: Without these dependencies, builds with `-DBUILD_SHARED_LIBS=ON` fail. Reviewers: SureYeaah Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66910 llvm-svn: 370273
* [WebAssembly] Add atomic.fence instructionHeejin Ahn2019-08-285-100/+115
| | | | | | | | | | | | | | | | | | | Summary: This adds `atomic.fence` instruction: https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md#fence-operator And we now emit the new `atomic.fence` instruction for multithread fences, rather than the prevous `atomic.rmw` hack. Reviewers: dschuff Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, jfb, tlively, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66794 llvm-svn: 370272
* [LLVM-C] Fix omission of INSTALL_WITH_TOOLCHAIN to llvm_add_library()Tom Stellard2019-08-281-1/+1
| | | | | | | | | Due to a misstake with r365902 that tried to simplify the install with toolchain logic LLVM-C.dll was no longer being installed. Patch By: Jakob Bornecrantz llvm-svn: 370271
* Fix a passing XFAIL testErik Pilkington2019-08-281-3/+3
| | | | | | | Now that we can gracefully handle stack exhaustion, this test was passing in darwin && asan. Instead, just unsupport it when threading is unavailable. llvm-svn: 370270
* [mips] Add an empty line to separate different patterns. NFCSimon Atanasyan2019-08-281-0/+1
| | | | llvm-svn: 370269
* [mips] Fix 64-bit address loading in case of applying 32-bit mask to the resultSimon Atanasyan2019-08-286-12/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If result of 64-bit address loading combines with 32-bit mask, LLVM tries to optimize the code and remove "redundant" loading of upper 32-bits of the address. It leads to incorrect code on MIPS64 targets. MIPS backend creates the following chain of commands to load 64-bit address in the `MipsTargetLowering::getAddrNonPICSym64` method: ``` (add (shl (add (shl (add %highest(sym), %higher(sym)), 16), %hi(sym)), 16), %lo(%sym)) ``` If the mask presents, LLVM decides to optimize the chain of commands. It really does not make sense to load upper 32-bits because the 0x0fffffff mask anyway clears them. After removing redundant commands we get this chain: ``` (add (shl (%hi(sym), 16), %lo(%sym)) ``` There is no patterns matched `(MipsHi (i64 symbol))`. Due a bug in `SYM_32` predicate definition, backend incorrectly selects a pattern for a 32-bit symbols and uses the `lui` instruction for loading `%hi(sym)`. As a result we get incorrect set of instructions with unnecessary 16-bit left shifting: ``` lui at,0x0 R_MIPS_HI16 foo dsll at,at,0x10 daddiu at,at,0 R_MIPS_LO16 foo ``` This patch resolves two problems: - Fix `SYM_32/SYM_64` predicates to prevent selection of patterns dedicated to 32-bit symbols in case of using N64 ABI. - Add missed patterns for 64-bit symbols for `%hi/%lo`. Fix PR42736. Differential Revision: https://reviews.llvm.org/D66228 llvm-svn: 370268
* Add tie-breaker for register class sorting in getSuperRegForSubRegJessica Paquette2019-08-281-1/+8
| | | | | | | | | | | | llvm::stable_sort is apparently not sufficient. Use the same tie-breaker/sorting style as TopoOrderRC fix bot failures. E.g. http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/19401/steps/test-check-all/logs/stdio llvm-svn: 370267
* [dotest] Remove --event-add-entriesJonas Devlieghere2019-08-282-25/+0
| | | | | | | | This argument was used by dosep.py to pass information around from the workers. With dosep.py gone, I'm fairly sure we don't need this any longer. llvm-svn: 370266
* Fix for "DICompileUnit not listed in llvm.dbg.cu" verification error after ...Artur Pilipenko2019-08-283-2/+85
| | | | | | | | | | | | | | | | | | | ...cloning a function from a different module Currently when a function with debug info is cloned from a different module, the cloned function may have hanging DICompileUnits, so that the module with the cloned function fails debug info verification. The proposed fix inserts all DICompileUnits reachable from the cloned function to "llvm.dbg.cu" metadata operands of the cloned function module. Reviewed By: aprantl, efriedma Differential Revision: https://reviews.llvm.org/D66510 Patch by Oleg Pliss (Oleg.Pliss@azul.com) llvm-svn: 370265
* [dotest] Remove --rerun-max-file-thresholdJonas Devlieghere2019-08-283-11/+0
| | | | | | This variable corresponding to this argument is set but never read. llvm-svn: 370264
* [analyzer] Fix more analyzer warnings on analyzer and libAnalysis.Artem Dergachev2019-08-284-18/+14
| | | | llvm-svn: 370263
* Revert "[clangd] Migrate last tweak tests to TweakTesting.h and remove old ↵Sam McCall2019-08-281-31/+130
| | | | | | | | | helpers. NFC" This reverts commit 8f85685b5cf57eddea11fa444503ade220c724e4, which breaks on old gcc that have the macro + raw strings bug. llvm-svn: 370262
* Fix always_inline 'target' compatibility check code for LambdasErich Keane2019-08-282-2/+46
| | | | | | | | | The previous version of this used CurFuncDecl in CodeGenFunction, however this doesn't include lambdas. However, CurCodeDecl DOES. Switch the check to use CurCodeDecl so that the actual function being emitted gets checked, preventing an error in ISEL. llvm-svn: 370261
* [llvm-readobj][XCOFF][NFC] Add return statement to avoid ↵Jason Liu2019-08-281-0/+1
| | | | | | | | -Wimplicit-fallthrough warning This is to fix the commit in r370097. llvm-svn: 370260
* [dotest] Centralize and simplify session dir logic (NFC)Jonas Devlieghere2019-08-281-24/+11
| | | | | | | | I was looking at the session directory logic for unrelated reasons and noticed that the logic spread out across dotest. This simplifies things a bit by moving the logic together. llvm-svn: 370259
* [ASan] Make insertion of version mismatch guard configurableJulian Lettner2019-08-282-1/+19
| | | | | | | | | | | | | | | | | | | By default ASan calls a versioned function `__asan_version_mismatch_check_vXXX` from the ASan module constructor to check that the compiler ABI version and runtime ABI version are compatible. This ensures that we get a predictable linker error instead of hard-to-debug runtime errors. Sometimes, however, we want to skip this safety guard. This new command line option allows us to do just that. rdar://47891956 Reviewed By: kubamracek Differential Revision: https://reviews.llvm.org/D66826 llvm-svn: 370258
* Ignore object files that lack coverage information.James Y Knight2019-08-289-2/+40
| | | | | | | | | | Before this change, if multiple binary files were presented, all of them must have been instrumented or the load would fail with coverage_map_error::no_data_found. Patch by Dean Sturtevant. Differential Revision: https://reviews.llvm.org/D66763 llvm-svn: 370257
* Use the handle --check-prefixes mechanism to de-verbosify a couple atomics ↵Philip Reames2019-08-282-530/+244
| | | | | | tests [NFC] llvm-svn: 370256
* [Core] Use GetAPInt instead of constructing APInts in placeAlex Langford2019-08-281-9/+14
| | | | | | | GetAPInt should be able to handle all cases. I have plans to generalize the float dumping logic and this makes it easier to do later. llvm-svn: 370255
* [GlobalISel] Import patterns containing SUBREG_TO_REGJessica Paquette2019-08-2815-153/+258
| | | | | | | | | | | | | | | | | | | | | | | Reuse the logic for INSERT_SUBREG to also import SUBREG_TO_REG patterns. - Split `inferSuperRegisterClass` into two functions, one which tries to use an existing TreePatternNode (`inferSuperRegisterClassForNode`), and one that doesn't. SUBREG_TO_REG doesn't have a node to leverage, which is the cause for the split. - Rename GlobalISelEmitterInsertSubreg.td to GlobalISelEmitterSubreg.td and update it. - Update impacted tests in the AArch64 and X86 backends. This is kind of a hit/miss for code size improvements/regressions. E.g. in add-ext.ll, we now get some identity copies. This isn't really anything the importer can handle, since it's caused by a later pass introducing the copy for the sake of correctness. Differential Revision: https://reviews.llvm.org/D66769 llvm-svn: 370254
* gn build: Merge r370249Nico Weber2019-08-281-0/+1
| | | | llvm-svn: 370251
* [AMDGPU] Fix bug when calculating user_spgr_count for Code Object V3 assemblerScott Linder2019-08-282-8/+42
| | | | | | | | Stop counting explicitly disabled user_spgr's in the user_sgpr_count field of the kernel descriptor. Differential Revision: https://reviews.llvm.org/D66900 llvm-svn: 370250
* [Clangd] Initial version of ExtractFunctionShaurya Gupta2019-08-283-0/+712
| | | | | | | | | | | | | | | | | | | Summary: - Only works for extraction from free functions - Basic analysis of the code being extracted. - Extract to void function - Bail out if extracting a return, continue or break. - Doesn't hoist decls yet Reviewers: kadircet, sammccall Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65526 llvm-svn: 370249
* [InstCombine] clean up wrap propagation for reassociated ops; NFCISanjay Patel2019-08-281-11/+15
| | | | | | | | | | Always true/false checks were flagged by static analysis; https://bugs.llvm.org/show_bug.cgi?id=43143 I have not confirmed the logic difference in propagating nsw vs. nuw, but presumably we would have noticed a bug by now if that was wrong. llvm-svn: 370248
* [CFG] Make representation of destructor calls more accurate.Artem Dergachev2019-08-289-90/+423
| | | | | | | | | | | | | | | | | Respect C++17 copy elision; previously it would generate destructor calls for elided temporaries, including in initialization and return statements. Don't generate duplicate destructor calls for statement expressions. Fix destructors in initialization lists and comma operators. Improve printing of implicit destructors. Patch by Nicholas Allegra! Differential Revision: https://reviews.llvm.org/D66404 llvm-svn: 370247
* [analyzer] Fix analyzer warnings on analyzer.Artem Dergachev2019-08-2821-65/+134
| | | | | | | | | Write tests for the actual crash that was found. Write comments and refactor code around 17 style bugs and suppress 3 false positives. Differential Revision: https://reviews.llvm.org/D66847 llvm-svn: 370246
OpenPOWER on IntegriCloud