summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
* [CplusPlus] ISVTableName is unused. NFCI.Davide Italiano2019-07-055-16/+0
| | | | | | | | | | | | Reviewers: teemperor, JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64265 llvm-svn: 365243
* [SystemZ] Fix addcarry of usubo (PR42512)Nikita Popov2019-07-052-0/+29
| | | | | | | | | | | | | Only custom lower uaddo+addcarry or usubo+subcarry chains and leave mixtures like usubo+addcarry or uaddo+subcarry to the generic legalizer. Otherwise we run into issues because SystemZ uses different CC values for carries and borrows. Fixes https://bugs.llvm.org/show_bug.cgi?id=42512. Differential Revision: https://reviews.llvm.org/D64213 llvm-svn: 365242
* AMDGPU: Make AMDGPUPerfHintAnalysis an SCC passMatt Arsenault2019-07-055-41/+53
| | | | | | | | | | | | Add a string attribute instead of directly setting MachineFunctionInfo. This avoids trying to get the analysis in the MachineFunctionInfo in a way that doesn't work with the new pass manager. This will also avoid re-visiting the call graph for every single function. llvm-svn: 365241
* [CodeGen] Enhance `MachineInstrSpan` to allow the end of MBB to be used.Michael Liao2019-07-054-9/+42
| | | | | | | | | | | | | | | | Summary: - Explicitly specify the parent MBB to allow the end iterator to be used. Reviewers: aprantl, MatzeB, craig.topper, qcolombet Subscribers: arsenm, jvesely, nhaehnle, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64261 llvm-svn: 365240
* Bitstream reader: Fix undefined behavior seen after rL364464Bjorn Pettersson2019-07-052-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: After rL364464 the following tests started to fail when running the clang-doc tests with an ubsan instrumented build of clang-doc: Clang Tools :: clang-doc/single-file-public.cpp Extra Tools Unit Tests :: clang-doc/./ClangDocTests/BitcodeTest.emitEnumInfoBitcode Extra Tools Unit Tests :: clang-doc/./ClangDocTests/BitcodeTest.emitMethodInfoBitcode Extra Tools Unit Tests :: clang-doc/./ClangDocTests/BitcodeTest.emitRecordInfoBitcode Extra Tools Unit Tests :: clang-doc/./ClangDocTests/SerializeTest.emitInfoWithCommentBitcode We need to check that the read value is in range for being casted to the llvm::bitc::FixedAbbrevIDs enum, before the cast in ClangDocBitcodeReader::skipUntilRecordOrBlock. SerializedDiagnosticReader::skipUntilRecordOrBlock was updated in the same way. Reviewers: jfb Reviewed By: jfb Subscribers: Bigcheese, vsapsai, bruno, ilya-biryukov, dexonsmith, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64262 llvm-svn: 365239
* This patch makes swap functions constexpr. Both swap overloads, swap_ranges ↵Zoe Carver2019-07-056-4/+70
| | | | | | and iter_swap are updated (with tests). llvm-svn: 365238
* [PowerPC] Fold another unused variable into assertion. NFC.Benjamin Kramer2019-07-051-2/+2
| | | | llvm-svn: 365237
* [PowerPC] Fold variable into assert. NFC.Benjamin Kramer2019-07-051-2/+1
| | | | | | Avoids a warning in Release builds. llvm-svn: 365236
* [PowerPC] Remove unused variable. NFC.Benjamin Kramer2019-07-051-1/+0
| | | | llvm-svn: 365235
* [X86] Correct the size check in foldMemoryOperandCustom.Craig Topper2019-07-051-2/+2
| | | | | | | | | | | | | | | The Size either needs to be 0 meaning we aren't folding a stack reload. Or the stack slot needs to be at least 16 bytes. I've also added a paranoia check ensure the RCSize is at leat 16 bytes as well. This avoids any FR32/FR64 surprises, but I think we already filtered those earlier. All of our test case have Size as either 0 or 16 and RCSize == 16. So the Size <= 16 check worked for those cases. llvm-svn: 365234
* Revert "[libc++] Do not cleverly link against libc++abi just because it ↵Louis Dionne2019-07-052-1/+14
| | | | | | | | happens to be there" This reverts r365222, which broke the libc++ build bots. llvm-svn: 365233
* [PowerPC] Move TOC save to prologue when profitableNemanja Ivanovic2019-07-056-11/+94
| | | | | | | | | | | | | | | | | | | | | The indirect call sequence on PPC requires that the TOC base register be saved prior to the indirect call and restored after the call since the indirect call may branch to a global entry point in another DSO which will update the TOC base. Over the last couple of years, we have improved this to: - be able to hoist TOC saves from loops (with changes to MachineLICM) - avoid multiple saves when one dominates the other[s] However, it is still possible to have multiple TOC saves dynamically in the execution path if there is no dominance relationship between them. This patch moves the TOC save to the prologue when one of the TOC saves is in a block that post-dominates entry (i.e. it cannot be avoided) or if it is in a block that is hotter than entry. Differential revision: https://reviews.llvm.org/D63803 llvm-svn: 365232
* Add lldb-mi deprecation to the release notesJonas Devlieghere2019-07-051-0/+4
| | | | | | Differential revision: https://reviews.llvm.org/D64254 llvm-svn: 365231
* [TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.5Julian Lettner2019-07-051-39/+4
| | | | | | | | | | Remove unnecessary computation of mangled SP for ARM64 architecture. Reviewed By: dvyukov Differential Revision: https://reviews.llvm.org/D64022 llvm-svn: 365230
* [TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.4Julian Lettner2019-07-051-32/+4
| | | | | | | | | | | For x86_64, since we don't clobber %rsi (2nd argument) anymore, we don't have to save/restore it. Reviewed By: dvyukov Differential Revision: https://reviews.llvm.org/D63946 llvm-svn: 365229
* Add LLDB section to the release notesJonas Devlieghere2019-07-051-0/+5
| | | | llvm-svn: 365228
* [InferFunctionAttrs] add tests for 'dereferenceable' argument attribute; NFCSanjay Patel2019-07-051-0/+201
| | | | llvm-svn: 365227
OpenPOWER on IntegriCloud