summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [AMDGPU] Use a named predicate instead of a magic number.Jay Foad2019-07-081-4/+3
| | | | | | | | | | | | | | Reviewers: arsenm Reviewed By: arsenm Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64201 llvm-svn: 365294
* [X86] Allow execution domain fixing to turn SHUFPD into SHUFPS.Craig Topper2019-07-0819-120/+134
| | | | | | | This can help with code size on SSE targets where SHUFPD requires a 0x66 prefix and SHUFPS doesn't. llvm-svn: 365293
* [X86] Make movsd commutable to shufpd with a 0x02 immediate on pre-SSE4.1 ↵Craig Topper2019-07-0818-229/+206
| | | | | | | | | | | | | targets. This can help avoid a copy or enable load folding. On SSE4.1 targets we can commute it to blendi instead. I had to make shufpd with a 0x02 immediate commutable as well since we expect commuting to be reversible. llvm-svn: 365292
* [RISCV] Support z and i operand modifiersAlex Bradbury2019-07-082-9/+72
| | | | | | | Differential Revision: https://reviews.llvm.org/D57792 Patch by James Clarke. llvm-svn: 365291
* Make forward_list::remove/remove_if/unique all return void before C++20; ↵Marshall Clow2019-07-086-82/+152
| | | | | | undoes that bit of D58332. Thanks to Mikhail Maltsev for pointing this out llvm-svn: 365290
* [clangd] Avoid slow ostreams in URI conversion.Sam McCall2019-07-081-16/+15
| | | | | | | This speeds up some hot paths significantly (e.g. dex::generateProximityURIs by a third or so) llvm-svn: 365289
* [clangd] Encapsulate fields in dex token. NFCSam McCall2019-07-082-6/+7
| | | | llvm-svn: 365288
* [X86] Add MOVSDrr->MOVLPDrm entry to load folding table. Add custom handling ↵Craig Topper2019-07-083-9/+23
| | | | | | | | to turn UNPCKLPDrr->MOVHPDrm when load is under aligned. If the load is aligned we can turn UNPCKLPDrr into UNPCKLPDrm. llvm-svn: 365287
* [llvm-bcanalyzer] Refactor and move to libLLVMBitReaderFrancis Visoiu Mistrih2019-07-084-991/+1125
| | | | | | | | | | | | | This allows us to use the analyzer from unit tests. * Refactor the interface to use proper error handling for most functions after JF's work. * Move everything into a BitstreamAnalyzer class. * Move that to Bitcode/BitcodeAnalyzer.h. Differential Revision: https://reviews.llvm.org/D64116 llvm-svn: 365286
* [NFC][PowerPC] Add the test add_cmp.llKang Zhang2019-07-081-0/+76
| | | | llvm-svn: 365285
* Revert "[IRBuilder] Fold consistently for or/and whether constant is LHS or RHS"Petr Hosek2019-07-0710-70/+88
| | | | | | | | | | This reverts commit r365260 which broke the following tests: Clang :: CodeGenCXX/cfi-mfcall.cpp Clang :: CodeGenObjC/ubsan-nullability.m LLVM :: Transforms/LoopVectorize/AArch64/pr36032.ll llvm-svn: 365284
* [ARM] Add support for MSVC stack cookie checkingMartin Storsjo2019-07-073-0/+54
| | | | | | | | Heavily based on the same for AArch64, from SVN r346469. Differential Revision: https://reviews.llvm.org/D64292 llvm-svn: 365283
* Process: generalise Windows thread setupSaleem Abdulrasool2019-07-071-10/+20
| | | | | | | | The Windows build currently cannot support debugging foreign targets or debugging Windows ARM NT and Windows ARM64 targets. Do not assume a x64/x86 host. This enables building lldb for Windows ARM64. llvm-svn: 365282
* Make ~mutex and ~condition_variable trivial on Windows.Eric Fiselier2019-07-075-19/+66
| | | | | | | | | The implementations of __libcpp_mutex_destroy and __libcpp_condvar_destroy are already NOPs, so this optimization is safe to perform. See r365273 and PR27658 for more information. llvm-svn: 365281
* gn build: Merge r355546Nico Weber2019-07-071-0/+2
| | | | | | Found by inspection; the sync script doesn't sync .ipp files. llvm-svn: 365280
* gn build: Merge r365273Nico Weber2019-07-071-0/+1
| | | | llvm-svn: 365279
* gn build: Sort sync script outputNico Weber2019-07-071-2/+2
| | | | llvm-svn: 365278
* gn build: Sort cxx_sources in libcxx build fileNico Weber2019-07-071-33/+33
| | | | | | | | | | | Since these are in a custom list, `gn format` doesn't automatically sort them. Now their order matches the CMake build. No additions or deletions, this just sorts the files that are there. llvm-svn: 365277
* gn build: Merge r365258 and follow-ups r365263, r365264Nico Weber2019-07-071-0/+4
| | | | llvm-svn: 365276
* [X86] Make sure load isn't volatile before shrinking it in MOVDDUP isel ↵Craig Topper2019-07-072-5/+5
| | | | | | patterns. llvm-svn: 365275
* [CodeGen] Add larger vector types for i32 and f32David Majnemer2019-07-075-196/+304
| | | | | | | | | | Some out of tree backend require larger vector type. Since maintaining the changes out of tree is difficult due to the many manual changes needed when adding a new type we are adding it even if no backend currently use it. Differential Revision: https://reviews.llvm.org/D64141 Patch by Thomas Raoux! llvm-svn: 365274
* Fix PR27658 - Make ~mutex trivial when possible.Eric Fiselier2019-07-076-20/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently std::mutex has a constexpr constructor, but a non-trivial destruction. The constexpr constructor is required to ensure the construction of a mutex with static storage duration happens at compile time, during constant initialization, and not during dynamic initialization. This means that static mutex's are always initialized and can be used safely during dynamic initialization without the "static initialization order fiasco". A trivial destructor is important for similar reasons. If a mutex is used during dynamic initialization it might also be used during program termination. If a static mutex has a non-trivial destructor it will be invoked during termination. This can introduce the "static deinitialization order fiasco". Additionally, function-local statics emit a guard variable around non-trivially destructible types. This results in horrible codegen and adds a runtime cost to every call to that function. non-local static's also result in slightly worse codegen but it's not as big of a problem. Example codegen can be found here: https://goo.gl/3CSzbM Note: This optimization is not safe with every pthread implementation. Some implementations allocate on the first call to pthread_mutex_lock and free the allocation in pthread_mutex_destroy. Also, changing the triviality of the destructor is not an ABI break. At least to the best of my knowledge :-) llvm-svn: 365273
* Treat the range of representable values of floating-point types as [-inf, ↵Richard Smith2019-07-068-189/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +inf] not as [-max, +max]. Summary: Prior to r329065, we used [-max, max] as the range of representable values because LLVM's `fptrunc` did not guarantee defined behavior when truncating from a larger floating-point type to a smaller one. Now that has been fixed, we can make clang follow normal IEEE 754 semantics in this regard and take the larger range [-inf, +inf] as the range of representable values. In practice, this affects two parts of the frontend: * the constant evaluator no longer treats floating-point evaluations that result in +-inf as being undefined (because they no longer leave the range of representable values of the type) * UBSan no longer treats conversions to floating-point type that are outside the [-max, +max] range as being undefined In passing, also remove the float-divide-by-zero sanitizer from -fsanitize=undefined, on the basis that while it's undefined per C++ rules (and we disallow it in constant expressions for that reason), it is defined by Clang / LLVM / IEEE 754. Reviewers: rnk, BillyONeal Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63793 llvm-svn: 365272
* [X86] SimplifyDemandedVectorEltsForTargetNode - fix shadow variable warning. ↵Simon Pilgrim2019-07-061-3/+3
| | | | | | | | NFCI. Fixes cppcheck warning. llvm-svn: 365271
* [X86] LowerBuildVectorv16i8 - pull out repeated getOperand() call. NFCI.Simon Pilgrim2019-07-061-3/+3
| | | | llvm-svn: 365270
* [DAGCombine] convertBuildVecZextToZext - remove duplicate getOpcode() call. ↵Simon Pilgrim2019-07-061-1/+1
| | | | | | NFCI. llvm-svn: 365269
* [X86] Add PS<->PD domain changing support for MOVH/MOVL load instructions ↵Craig Topper2019-07-0619-143/+127
| | | | | | | | | | | | and MOVH store instructions. These instructions don't have an integer domain equivalent, but we can at least change between the two floating point domains. This allows a smaller encoding on SSE targets if we can turn PD into PS. llvm-svn: 365268
* [X86] Remove patterns from MOVLPSmr and MOVHPSmr instructions.Craig Topper2019-07-0619-514/+526
| | | | | | | | These patterns are the same as the MOVLPDmr and MOVHPDmr patterns, but with a bitcast at the end. We can just select the PD instruction and let execution domain fixing switch to PS. llvm-svn: 365267
* [X86] Add patterns to select MOVLPDrm from MOVSD+load and MOVHPD from ↵Craig Topper2019-07-062-8/+18
| | | | | | | | | | | | | UNPCKL+load. These narrow the load so we can only do it if the load isn't volatile. There also tests in vector-shuffle-128-v4.ll that this should support, but we don't seem to fold bitcast+load on pre-sse4.2 targets due to the slow unaligned mem 16 flag. llvm-svn: 365266
* [X86] Copy some test cases from vector-shuffle-sse1.ll to ↵Craig Topper2019-07-062-0/+100
| | | | | | vector-shuffle-128-v4.ll and v8 where sse1 did better load folding. NFC llvm-svn: 365265
* [Rewrite] Try to fix buildbot link fail left by r365263Joel E. Denny2019-07-061-0/+1
| | | | | | http://lab.llvm.org:8011/builders/clang-ppc64le-linux-multistage/builds/10272 llvm-svn: 365264
* [Rewrite] Try to fix buildbot link fail caused by r365258Joel E. Denny2019-07-061-0/+1
| | | | | | http://lab.llvm.org:8011/builders/clang-ppc64le-linux-multistage/builds/10270 llvm-svn: 365263
* [LFTR] Regenerate test checks; NFCNikita Popov2019-07-061-10/+140
| | | | llvm-svn: 365262
* Make list::remove/remove_if/unique all return void before C++20; undoes that ↵Marshall Clow2019-07-065-33/+103
| | | | | | bit of D58332. Thanks to Mikhail Maltsev for pointing this out llvm-svn: 365261
* [IRBuilder] Fold consistently for or/and whether constant is LHS or RHSPhilip Reames2019-07-0610-88/+70
| | | | | | Without this, we have the unfortunate property that tests are dependent on the order of operads passed the CreateOr and CreateAnd functions. In actual usage, we'd promptly optimize them away, but it made tests slightly more verbose than they should have been. llvm-svn: 365260
* [IRBuilder] Introduce helpers for and/or of multiple values at oncePhilip Reames2019-07-064-25/+26
| | | | | | | | We had versions of this code scattered around, so consolidate into one location. Not strictly NFC since the order of intermediate results may change in some places, but since these operations are associatives, should not change results. llvm-svn: 365259
* [Rewrite] Extend to further accept CharSourceRangeJoel E. Denny2019-07-064-4/+105
| | | | | | | | | | | | | Some Rewrite functions are already overloaded to accept CharSourceRange, and this extends others in the same manner. I'm calling these in code that's not ready to upstream, but I figure they might be useful to others in the meantime. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D61467 llvm-svn: 365258
* [TSan] Attempt to fix iOS on-device testJulian Lettner2019-07-061-4/+4
| | | | llvm-svn: 365257
* [RegisterCoalescer] Fix an overzealous assertQuentin Colombet2019-07-062-1/+139
| | | | | | | | | | Although removeCopyByCommutingDef deals with full copies, it is still possible to copy undef lanes and thus, we wouldn't have any a value number for these lanes. This fixes PR40215. llvm-svn: 365256
* RegUsageInfoCollector: Skip AMDGPU entry point functionsMatt Arsenault2019-07-054-6/+50
| | | | | | | | | | | | | | I'm not sure if it's worth it or not to add a hook to disable the pass for an arbitrary function. This pass is taking up to 5% of compile time in tiny programs by iterating through all of the physical registers in every register class. This pass should be rewritten in terms of regunits. For now, skip doing anything for entry point functions. The vast majority of functions in the real world aren't callable, so just not running this will give the majority of the benefit. llvm-svn: 365255
* XFAIL a few failing TSan-fiber tests for iOSJulian Lettner2019-07-055-0/+5
| | | | llvm-svn: 365254
* Remove `XFAIL: ios` from test that passes in CIJulian Lettner2019-07-051-1/+0
| | | | llvm-svn: 365253
* Revert "[FileCheck] Simplify numeric variable interface"Michael Liao2019-07-053-17/+26
| | | | | | This reverts commit 096600a4b073dd94a366cc8e57bff93c34ff6966. llvm-svn: 365251
* [LLDBAssert] Use unreachable instead of assert(0)Jonas Devlieghere2019-07-051-2/+2
| | | | | | As per Davide's suggestion offline. llvm-svn: 365250
* [FileCheck] Simplify numeric variable interfaceThomas Preud'homme2019-07-053-26/+17
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch simplifies 2 aspects in the FileCheckNumericVariable code. First, setValue() method is turned into a void function since being called only on undefined variable is an invariant and is now asserted rather than returned. This remove the assert from the callers. Second, clearValue() method is also turned into a void function since the only caller does not check its return value since it may be trying to clear the value of variable that is already cleared without this being noteworthy. Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D64231 llvm-svn: 365249
* Improve MSVC visualization of annot_template_id tokensMike Spertus2019-07-051-9/+62
| | | | | | | | | Now shows the actual annotated template. E.g., {annot_template_id (A<int, double>)} Also a few miscellaneous fixes to visualizers of other types llvm-svn: 365248
* [lldb] Added assert to VerifyDeclRaphael Isemann2019-07-051-1/+4
| | | | | | | We could VerifyDecl sometimes with a nullptr. It would be nice if we could get an actual assert here instead of triggering UB. llvm-svn: 365247
* lldb_assert: abort when assertions are enabled.Jonas Devlieghere2019-07-051-0/+6
| | | | | | | | | | | | | | | | | | | | We had a long discussion in D59911 about lldb_assert and what it means. The result was the assert manifesto on lldb.llvm.org. > LLDB provides lldb_assert() as a soft alternative to cover the middle > ground of situations that indicate a recoverable bug in LLDB. In a > Debug configuration lldb_assert() behaves like assert(). In a Release > configuration it will print a warning and encourage the user to file a > bug report, similar to LLVM’s crash handler, and then return > execution. However, currently lldb_assert doesn't behave they way it's being described there: it doesn't abort in a debug/assert build. This patch fixes that by adding a call to assert() in lldb_assert(). Differential revision: https://reviews.llvm.org/D64267#1571962 llvm-svn: 365246
* AMDGPU: Fix assert in clang testMatt Arsenault2019-07-051-1/+2
| | | | llvm-svn: 365245
* Revert "[TSan] Improve handling of stack pointer mangling in {set,long}jmp, ↵Julian Lettner2019-07-051-4/+32
| | | | | | | | pt.4" This reverts commit 6bb13da7c16f2a677cc285bb6ffeb79dfb0cfe64. llvm-svn: 365244
OpenPOWER on IntegriCloud