summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [MS] Warn when shadowing template parameters under -fms-compatibilityReid Kleckner2019-09-124-22/+25
| | | | | | | | | | | | | | | | | | | | Summary: C++ does not allow shadowing template parameters, but previously we allowed it under -fms-extensions. Now this behavior is controlled by -fms-compatibility, and we emit a -Wmicrosoft-template warning when it happens. Fixes PR43265 Reviewers: thakis, hans Subscribers: amccarth, rsmith, STL_MSFT, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67463 llvm-svn: 371753
* [LICM/AST] Check if the AliasAny set is removed from the tracker.Alina Sbirlea2019-09-122-2/+37
| | | | | | | | | | | | | | | | Summary: Resolves PR38513. Credit to @bjope for debugging this. Reviewers: hfinkel, uabelho, bjope Subscribers: sanjoy.google, bjope, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67417 llvm-svn: 371752
* [clang-scan-deps] remove dots and dots dots from the reported file ↵Alex Lorenz2019-09-122-3/+7
| | | | | | | | | | dependency paths This resolves differences observed on LLVM + Clang when running the comparison between canonical dependencies (full preprocessing, no file manager reused), and dependencies obtained when the file manager was reused between the full preprocessing invocations. llvm-svn: 371751
* [InstCombine] add tests for fptrunc; NFCSanjay Patel2019-09-121-0/+50
| | | | llvm-svn: 371750
* Don't warn about selectany on implicitly inline variablesReid Kleckner2019-09-122-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This avoids a -Wignored-attribute warning on the code pattern Microsoft recommends for integral const static data members defined in headers here: https://docs.microsoft.com/en-us/cpp/build/reference/microsoft-extensions-to-c-and-cpp?view=vs-2019 The attribute is redundant, but it is necessary when compiling in C++14 modes with /Za, which disables MSVC's extension that treats such variables as implicitly inline. Fixes PR43270 Reviewers: epastor, thakis, hans Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67426 llvm-svn: 371749
* [MemorySSA] Pass (for update) MSSAU when hoisting instructions.Alina Sbirlea2019-09-122-19/+54
| | | | | | | | | | | | | | Summary: Pass MSSAU to makeLoopInvariant in order to properly update MSSA. Reviewers: george.burgess.iv Subscribers: Prazek, sanjoy.google, uabelho, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67470 llvm-svn: 371748
* Precommit tests for generalization of load dereferenceability in loopPhilip Reames2019-09-121-10/+717
| | | | llvm-svn: 371747
* [InstCombine] reduce test noise and regenerate CHECK lines; NFCSanjay Patel2019-09-121-169/+133
| | | | llvm-svn: 371746
* [LV] Support invariant addresses in speculation logicPhilip Reames2019-09-122-163/+75
| | | | | | | | | | Implement a TODO from rL371452, and handle loop invariant addresses in predicated blocks. If we can prove that the load is safe to speculate into the header, then we can avoid using a masked.load in favour of a normal load. This is mostly about vectorization robustness. In the common case, it's generally expected that LICM/LoadStorePromotion would have eliminated such loads entirely. Differential Revision: https://reviews.llvm.org/D67372 llvm-svn: 371745
* [ELF] ICF: change a dyn_cast<InputSection> to castFangrui Song2019-09-121-4/+5
| | | | | | | | ICF is performed after EhInputSections and MergeInputSections were eliminated from inputSections. Every element of inputSections is an InputSection. llvm-svn: 371744
* [CGP] Ensure sinking multiple instructions does not invalidate dominance checksDavid Green2019-09-123-11/+135
| | | | | | | | | | | | | | | | | | In MVE, as of rL371218, we are attempting to sink chains of instructions such as: %l1 = insertelement <8 x i8> undef, i8 %l0, i32 0 %broadcast.splat26 = shufflevector <8 x i8> %l1, <8 x i8> undef, <8 x i32> zeroinitializer In certain situations though, we can end up breaking the dominance relations of instructions. This happens when we sink the instruction into a loop, but cannot remove the originals. The Use is updated, which might in fact be a Use from the second instruction to the first. This attempts to fix that by reversing the order of instruction that are sunk, and ensuring that we update the uses on new instructions if they have already been sunk, not the old ones. Differential Revision: https://reviews.llvm.org/D67366 llvm-svn: 371743
* [Alignment] Move OffsetToAlignment to Alignment.hGuillaume Chatelet2019-09-1220-53/+69
| | | | | | | | | | | | | | | | | Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet, JDevlieghere, alexshap, rupprecht, jhenderson Subscribers: sdardis, nemanjai, hiraditya, kbarton, jakehehrlich, jrtc27, MaskRay, atanasyan, jsji, seiya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D67499 llvm-svn: 371742
* test-release.sh: Don't use chrpath on SolarisRainer Orth2019-09-121-2/+5
| | | | | | | | | | | | When trying to run test-release.sh on Solaris 11.4 for 9.0.0 rc4, I failed initially because Solaris lacks chrpath. This patch accounts for that and allowed the run to continue. Tested on amd64-pc-solaris2.11 and sparcv9-sun-solaris2.11. Differential Revision: https://reviews.llvm.org/D67484 llvm-svn: 371741
* [docs][llvm-strip] Remove unnecessary whitespace for consistencyJames Henderson2019-09-121-2/+1
| | | | llvm-svn: 371739
* [lldb][NFC] Simplify makefiles also for breakpoint testsRaphael Isemann2019-09-1230-90/+30
| | | | | | | | These tests were temporarily missing when the big Makefile simplification patch landed, so this just applies the same change to these tests. llvm-svn: 371738
* [InstCombine][InstSimplify] Move constant-folding tests in ↵Roman Lebedev2019-09-122-149/+149
| | | | | | result-of-usub-is-non-zero-and-no-overflow.ll llvm-svn: 371737
* [NFC][InstCombine][InstSimplify] Add test for "add-of-negative is non-zero ↵Roman Lebedev2019-09-122-0/+336
| | | | | | | | | | | and no overflow" (PR43259) https://rise4fun.com/Alive/ska https://rise4fun.com/Alive/9iX https://bugs.llvm.org/show_bug.cgi?id=43259 llvm-svn: 371736
* [ConstProp] allow folding for fma that produces NaNSanjay Patel2019-09-123-32/+20
| | | | | | | | | | | | | | | | | | | | Folding for fma/fmuladd was added here: rL202914 ...and as seen in existing/unchanged tests, that works to propagate NaN if it's already an input, but we should fold an fma() that creates NaN too. From IEEE-754-2008 7.2 "Invalid Operation", there are 2 clauses that apply to fma, so I added tests for those patterns: c) fusedMultiplyAdd: fusedMultiplyAdd(0, ∞, c) or fusedMultiplyAdd(∞, 0, c) unless c is a quiet NaN; if c is a quiet NaN then it is implementation defined whether the invalid operation exception is signaled d) addition or subtraction or fusedMultiplyAdd: magnitude subtraction of infinities, such as: addition(+∞, −∞) Differential Revision: https://reviews.llvm.org/D67446 llvm-svn: 371735
* [lldb] Remove duplicated breakpoint testsRaphael Isemann2019-09-129-502/+0
| | | | | | | | | | | | | | | | | After reverting the deletion of the functionalities/breakpoint tests, we now have some tests twice in the test/ folder which breaks dotest: * commands/breakpoint/basic * functionalities/breakpoint/breakpoint_command After looking over these tests, I think it makes sense to only keep the original functionalities/ folder. The commands/breakpoint/basic test are not exclusively testing the breakpoint command itself, so they shouldn't be in commands/ in the first place. Note that these folders have identical contents (beside small adjustments regarding the Makefile which landed after the restructuring). llvm-svn: 371734
* [clang] [unittest] Import LLVMTestingSupport if necessaryMichal Gorny2019-09-121-0/+9
| | | | | | | | | | Add LLVMTestingSupport directory from LLVM_MAIN_SRC_DIR when building clang stand-alone and LLVMTestingSupport library is not present. This is needed to fix stand-alone builds without clang-tools-extra. Differential Revision: https://reviews.llvm.org/D67452 llvm-svn: 371733
* lld-link: Fix tests that do not run on macOS after r371729.Nico Weber2019-09-122-3/+3
| | | | llvm-svn: 371732
* Removed some questionable default arguments from settersDmitri Gribenko2019-09-124-13/+11
| | | | | | | | | | | | | | | | | Summary: They can be confusing -- what does it mean to call a setter without a value? Also, some setters, like `setPrintTemplateTree` had `false` as the default value! The callers are largely not using these default arguments anyway. Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67491 llvm-svn: 371731
* [MIPS GlobalISel] Select indirect branchPetar Avramovic2019-09-127-0/+205
| | | | | | | | Select G_BRINDIRECT for MIPS32. Differential Revision: https://reviews.llvm.org/D67441 llvm-svn: 371730
* lld-link: Make /linkrepro: take a filename, not a directory.Nico Weber2019-09-124-11/+12
| | | | | | | | | | | | This makes lld-link behave like ld.lld. I don't see a reason for the two drivers to have different behavior here. While here, also make lld-link add a version.txt to the tar, like ld.lld does. Differential Revision: https://reviews.llvm.org/D67461 llvm-svn: 371729
* [MIPS GlobalISel] Lower G_DYN_STACKALLOCPetar Avramovic2019-09-123-0/+154
| | | | | | | | | | IRTranslator creates G_DYN_STACKALLOC instruction during expansion of alloca when argument that tells number of elements to allocate on stack is a virtual register. Use default lowering for MIPS32. Differential Revision: https://reviews.llvm.org/D67440 llvm-svn: 371728
* [MIPS GlobalISel] Select G_IMPLICIT_DEFPetar Avramovic2019-09-127-1/+451
| | | | | | | | | | G_IMPLICIT_DEF is used for both integer and floating point implicit-def. Handle G_IMPLICIT_DEF as ambiguous opcode in MipsRegisterBankInfo. Select G_IMPLICIT_DEF for MIPS32. Differential Revision: https://reviews.llvm.org/D67439 llvm-svn: 371727
* Switch "windows" to "system-windows" in some XFAILsJeremy Morse2019-09-1219-19/+19
| | | | | | | | | | The test failure mode appears to be due to the host machine rather than the target. The PS4 buildbots are windows-hosted targeting x86_64-scei-ps4, and are currently reporting these as unexpected failures: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/28114 llvm-svn: 371726
* [DAGCombine] visitFDIV - Use isCheaperToUseNegatedFPOps helper for (fdiv ↵Simon Pilgrim2019-09-121-15/+5
| | | | | | | | (fneg X), (fneg Y)) -> (fdiv X, Y). NFCI. Minor cleanup to use equivalent helper code. llvm-svn: 371724
* Removed dead code from DiagnosticBuilderDmitri Gribenko2019-09-121-5/+0
| | | | llvm-svn: 371723
* AArch64: support arm64_32, an ILP32 slice for watchOS.Tim Northover2019-09-1263-242/+2224
| | | | | | | | This is the main CodeGen patch to support the arm64_32 watchOS ABI in LLVM. FastISel is mostly disabled for now since it would generate incorrect code for ILP32. llvm-svn: 371722
* CodeGenPrep: add separate hook say when GEPs should be used for sinking. NFCI.Tim Northover2019-09-122-2/+8
| | | | | | | | | Up to now, we've decided whether to sink address calculations using GEPs or normal arithmetic based on the useAA hook, but there are other reasons GEPs might be preferred. So this patch splits the two questions, with a default implementation falling back to useAA. llvm-svn: 371721
* [clang-format] [PR43100] clang-format C# support does not add a space ↵Paul Hoad2019-09-122-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | between "using" and paren Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=43100 Formatting using statement in C# with clang-format removes the space between using and paren even when SpaceBeforeParens is ! ``` using(FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, bufferSize : 1)) ``` this change simply overcomes this for when using C# settings in the .clang-format file ``` using (FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, bufferSize : 1)) ``` All FormatTests pass.. ``` [==========] 688 tests from 21 test cases ran. (88508 ms total) [ PASSED ] 688 tests. ``` Reviewers: djasper, klimek, owenpan Reviewed By: owenpan Subscribers: llvm-commits, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66662 llvm-svn: 371720
* [clang-format] Add new style option IndentGotoLabelsPaul Hoad2019-09-126-3/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This option determines whether goto labels are indented according to scope. Setting this option to false causes goto labels to be flushed to the left. This is mostly copied from [[ http://lists.llvm.org/pipermail/cfe-dev/2015-September/045014.html | this patch ]] submitted by Christian Neukirchen that didn't make its way into trunk. ``` true: false: int f() { vs. int f() { if (foo()) { if (foo()) { label1: label1: bar(); bar(); } } label2: label2: return 1; return 1; } } ``` Reviewers: klimek, MyDeveloperDay Reviewed By: MyDeveloperDay Subscribers: cfe-commits Tags: #clang, #clang-tools-extra Patch by: tetsuo-cpp Differential Revision: https://reviews.llvm.org/D67037 llvm-svn: 371719
* [InstSimplify] simplifyUnsignedRangeCheck(): handle more cases (PR43251)Roman Lebedev2019-09-122-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: I don't have a direct motivational case for this, but it would be good to have this for completeness/symmetry. This pattern is basically the motivational pattern from https://bugs.llvm.org/show_bug.cgi?id=43251 but with different predicate that requires that the offset is non-zero. The completeness bit comes from the fact that a similar pattern (offset != zero) will be needed for https://bugs.llvm.org/show_bug.cgi?id=43259, so it'd seem to be good to not overlook very similar patterns.. Proofs: https://rise4fun.com/Alive/21b Also, there is something odd with `isKnownNonZero()`, if the non-zero knowledge was specified as an assumption, it didn't pick it up (PR43267) Reviewers: spatel, nikic, xbolva00 Reviewed By: spatel Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67411 llvm-svn: 371718
* [PowerPC][MCP][NFC] Pre-commit test cases for https://reviews.llvm.org/D65267Kai Luo2019-09-121-0/+281
| | | | llvm-svn: 371717
* [ELF] Fix a common-page-size typoFangrui Song2019-09-121-1/+1
| | | | llvm-svn: 371716
* [ELF] Support -z undefsFangrui Song2019-09-122-1/+9
| | | | | | | | | | | -z undefs is the inverse of -z defs. It allows unresolved references from object files. This can be used to cancel --no-undefined or -z defs. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D67479 llvm-svn: 371715
* [DAGCombiner] Improve division estimation of floating points.Qiu Chaofan2019-09-127-689/+737
| | | | | | | | | | | | | Current implementation of estimating divisions loses precision since it estimates reciprocal first and does multiplication. This patch is to re-order arithmetic operations in the last iteration in DAGCombiner to improve the accuracy. Reviewed By: Sanjay Patel, Jinsong Ji Differential Revision: https://reviews.llvm.org/D66050 llvm-svn: 371713
* [WebAssembly] Delete duplicate REQUIRES lineHeejin Ahn2019-09-121-1/+0
| | | | | | | r371710 and r371711 committed the same line, so this deletes one of them. llvm-svn: 371712
* [WebAssembly] Make wasm-eh.cpp requires WebAssemblyHeejin Ahn2019-09-121-0/+1
| | | | | | | | | D67208 added a new test line to wasm-eh.cpp that invokes the LLVM backend and this test fails on bots that don't have WebAssembly target. This makes wasm-eh.cpp explicitly require WebAssembly so this will be skipped on those targets. llvm-svn: 371711
* [WebAssembly] Add REQUIRES to testDavid Zarzycki2019-09-121-0/+1
| | | | llvm-svn: 371710
* [LegalizeTypes] Remove code for softening a float type to itself.Craig Topper2019-09-126-269/+59
| | | | | | | | | This was previously used to turn fp128 operations into libcalls on X86. This is now done through op legalization after r371672. This restores much of this code to before r254653. llvm-svn: 371709
* [WebAssembly] Add -fwasm-exceptions for wasm EHHeejin Ahn2019-09-129-12/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This adds `-fwasm-exceptions` (in similar fashion with `-fdwarf-exceptions` or `-fsjlj-exceptions`) that turns on everything with wasm exception handling from the frontend to the backend. We currently have `-mexception-handling` in clang frontend, but this is only about the architecture capability and does not turn on other necessary options such as the exception model in the backend. (This can be turned on with `llc -exception-model=wasm`, but llc is not invoked separately as a command line tool, so this option has to be transferred from clang.) Turning on `-fwasm-exceptions` in clang also turns on `-mexception-handling` if not specified, and will error out if `-mno-exception-handling` is specified. Reviewers: dschuff, tlively, sbc100 Subscribers: aprantl, jgravelle-google, sunfish, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67208 llvm-svn: 371708
* Make SwitchInstProfUpdateWrapper strict permanentlyYevgeny Rouban2019-09-122-40/+14
| | | | | | | | | | | | | | | | | | | We have been using -switch-inst-prof-update-wrapper-strict set to true by default for some time. It is time to remove the safety stuff and make SwitchInstProfUpdateWrapper intolerant to inconsistencies in !prof branch_weights metadata of SwitchInst. This patch gets rid of the Invalid state of SwitchInstProfUpdateWrapper and the option -switch-inst-prof-update-wrapper-strict. So there is only two states: changed and unchanged. Reviewers: davidx, nikic, eraman, reames, chandlerc Reviewed By: davidx Differential Revision: https://reviews.llvm.org/D67435 llvm-svn: 371707
* [clang-tidy] Fix build with -DBUILD_SHARED_LIB=ONHeejin Ahn2019-09-121-0/+1
| | | | | | | | | | | | | | Summary: This fixes build failures with `-DBUILD_SHARED_LIB=ON` after D67419. Reviewers: NoQ Subscribers: mgorny, xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67473 llvm-svn: 371706
* [compiler-rt] cpplint of inc files in backgroundVitaly Buka2019-09-121-0/+2
| | | | llvm-svn: 371705
* [compiler-rt] Remove some cpplint filtersVitaly Buka2019-09-1222-63/+77
| | | | llvm-svn: 371704
* [compiler-rt] Run cpplint only for check-sanitizerVitaly Buka2019-09-122-3/+5
| | | | llvm-svn: 371703
* [compiler-rt] Better lint output for .inc filesVitaly Buka2019-09-123-19/+12
| | | | llvm-svn: 371702
* gn build: Merge r371700Nico Weber2019-09-121-0/+1
| | | | llvm-svn: 371701
OpenPOWER on IntegriCloud