summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [clang-format] [PR43372] - clang-format shows replacements in DOS files when ↵Paul Hoad2019-10-013-3/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | no replacement is needed Summary: This is a patch to fix PR43372 (https://bugs.llvm.org/show_bug.cgi?id=43372) - clang-format can't format file with includes, ( which really keep providing replacements for already sorted headers.) A similar issue was addressed by @krasimir in {D60199}, however, this seemingly only prevented the issue when the files being formatted did not contain windows line endings (\r\n) It's possible this is related to https://twitter.com/StephanTLavavej/status/1176722938243895296 given who @STL_MSFT works for! As people often used the existence of replacements to determine if a file needs clang-formatting, this is probably pretty important for windows users There may be a better way of comparing 2 strings and ignoring \r (which appear in both Results and Code), I couldn't choose between this idiom or the copy_if approach, but I'm happy to change it to whatever people consider more performant. Reviewers: krasimir, klimek, owenpan, ioeric Reviewed By: krasimir Subscribers: cfe-commits, STL_MSFT, krasimir Tags: #clang-format, #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D68227 llvm-svn: 373388
* [OPENMP50]Initial codegen for declare variant implementation vendor.Alexey Bataev2019-10-014-0/+241
| | | | | | | Initial implementation of global aliases emission for the declare variant pragma with implementation vendor context selector set. llvm-svn: 373387
* [DDG] Data Dependence Graph - Root NodeBardia Mahjour2019-10-015-6/+177
| | | | | | | | | | | | | | | | | | | Summary: This patch adds Root Node to the DDG. The purpose of the root node is to create a single entry node that allows graph walk iterators to iterate through all nodes of the graph, making sure that no node is left unvisited during a graph walk (eg. SCC or DFS). Once the DDG is fully constructed it will have exactly one root node. Every node in the graph is reachable from the root. The algorithm for connecting the root node is based on depth-first-search that keeps track of visited nodes to try to avoid creating unnecessary edges. Authored By: bmahjour Reviewer: Meinersbur, fhahn, myhsu, xtian, dmgreen, kbarton, jdoerfert Reviewed By: Meinersbur Subscribers: ychen, arphaman, simoll, a.elovikov, mgorny, hiraditya, jfb, wuzish, llvm-commits, jsji, Whitney, etiotto, ppc-slack Tag: #llvm Differential Revision: https://reviews.llvm.org/D67970 llvm-svn: 373386
* [libc++] Re-apply workaround for D63883Louis Dionne2019-10-011-0/+10
| | | | | | | | | In reality, this workaround is for the fact that LIBCXX_CXX_ABI=libcxxabi can't be specified on Linux, since libc++abi isn't shipped with the system. Since the build bots explicitly specify LIBCXX_CXX_ABI=libcxxabi, they fail unless we apply the workaround. llvm-svn: 373385
* [libc++] Remove workaround for D63883Louis Dionne2019-10-011-10/+0
| | | | | | | | | | I tried applying D63883 three times and could never get around to making it work. I'm giving up on that for now, but soon this should be irrelevant anyway since all builds will move to the monorepo (where we're always using the in-tree libc++abi unless explicitly specified otherwise). llvm-svn: 373384
* [MemorySSA] Check for unreachable blocks when getting last definition.Alina Sbirlea2019-10-012-0/+30
| | | | | | | | If a single predecessor is found, still check if the block is unreachable. The test that found this had a self loop unreachable block. Resolves PR43493. llvm-svn: 373383
* Add a missing pass in ARM O3 pipelineJakub Kuderski2019-10-011-0/+1
| | | | llvm-svn: 373382
* [libc++abi] Remove uses of C++ headers when possibleLouis Dionne2019-10-017-24/+21
| | | | | | | | | | This reduces the (circular) dependency of libc++abi on a C++ standard library. Outside of the demangler which uses fancier C++ features, the only C++ headers now required by libc++abi are pretty much <new> and <exception>, and that's because libc++abi defines some types that are declared in those headers. llvm-svn: 373381
* [MemorySSA] Update last_access_in_block check.Alina Sbirlea2019-10-012-2/+61
| | | | | | | | | | The check for "was there an access in this block" should be: is the last access in this block and is it not a newly inserted phi. Resolves new test in PR43438. Also fix a typo when simplifying trivial Phis to match the comment. llvm-svn: 373380
* [NFC][libc++abi] Remove trailing whitespace from sourcesLouis Dionne2019-10-016-86/+86
| | | | llvm-svn: 373379
* [Dominators][CodeGen] Don't mark MachineDominatorTree as preserved in ↵Jakub Kuderski2019-10-014-1/+4
| | | | | | MachineLICM llvm-svn: 373378
* [Dominators][CodeGen] Fix MachineDominatorTree preservation in PHIEliminationJakub Kuderski2019-10-012-2/+8
| | | | | | | | | | | | | | | | | | | Summary: PHIElimination modifies CFG and marks MachineDominatorTree as preserved. Therefore, it the CFG changes it should also update the MDT, when available. This patch teaches PHIElimination to recalculate MDT when necessary. This fixes the `tailmerging_in_mbp.ll` test failure discovered after switching to generic DomTree verification algorithm in MachineDominators in D67976. Reviewers: arsenm, hliao, alex-t, rampitec, vpykhtin, grosser Reviewed By: rampitec Subscribers: MatzeB, wdng, hiraditya, javed.absar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68154 llvm-svn: 373377
* Reapply [Dominators][CodeGen] Clean up MachineDominatorsJakub Kuderski2019-10-012-47/+32
| | | | | | | | This reverts r373117 (git commit 159ef37735f21ae373282e0c53cbd9b6af1e0dfd) Phabricator review: https://reviews.llvm.org/D67976. llvm-svn: 373376
* [NFC] Updated tests after rL373371David Bolvansky2019-10-011-4/+0
| | | | | | Forgot to run check-clang-semacxx. llvm-svn: 373375
* [OPENMP]Fix PR43330: OpenMP target: Mapping of partial arrays fails.Alexey Bataev2019-10-012-59/+102
| | | | | | Fixed calculation the size of the array sections. llvm-svn: 373374
* Make another attempt at fixing SymbolFilePDBTests.Adrian Prantl2019-10-011-0/+1
| | | | llvm-svn: 373373
* [libc++] Update link to Itanium C++ ABI documentationLouis Dionne2019-10-011-1/+1
| | | | llvm-svn: 373372
* [Diagnostics] Make -Wenum-compare-conditional off by defaultDavid Bolvansky2019-10-013-6/+2
| | | | | | Too many false positives, eg. in Chromium. llvm-svn: 373371
* [ThinLTO] Enable index-only WPD from clangTeresa Johnson2019-10-012-7/+6
| | | | | | | | | | | | | | | | | | Summary: To trigger the index-only Whole Program Devirt support added to LLVM, we need to be able to specify -fno-split-lto-unit in conjunction with -fwhole-program-vtables. Keep the default for -fwhole-program-vtables as -fsplit-lto-unit, but don't error on that option combination. Reviewers: pcc Subscribers: mehdi_amini, inglorion, steven_wu, dexonsmith, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68029 llvm-svn: 373370
* [PGO] Fix typos from r359612. NFC.Rong Xu2019-10-016-14/+14
| | | | llvm-svn: 373369
* [ARM] Some MVE shuffle plus extend tests. NFCDavid Green2019-10-011-0/+142
| | | | llvm-svn: 373368
* Revert "compiler-rt: use __GLIBC_PREREQ for SANITIZER_INTERCEPT_GETRANDOM"Vitaly Buka2019-10-016-37/+21
| | | | | | | | | | | Revert "compiler-rt: move all __GLIBC_PREREQ into own header file" "move all __GLIBC_PREREQ" breaks build on some bots This reverts commit 2d75ee937397c209dbd95aefc88da6301fed07da. This reverts commit 7a6461fcc2ed8e28c43993c561721af0bbe97f3a. llvm-svn: 373367
* AMDGPU/SILoadStoreOptimizer: Add helper functions for working with CombineInfoTom Stellard2019-10-011-205/+244
| | | | | | | | | | | | | | | | | | Summary: This is a refactoring that will make future improvements to this pass easier. This change should not change the behavior of the pass. Reviewers: arsenm, pendingchaos, rampitec, nhaehnle, vpykhtin Reviewed By: nhaehnle, vpykhtin Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65496 llvm-svn: 373366
* [libc++abi] Remove redundant #include of <string.h>Louis Dionne2019-10-011-20/+14
| | | | | | | <string.h> is always included, so we don't need the additional #include only in the _WIN32 case. llvm-svn: 373365
* [InstCombine] Deal with -(trunc(X >>u 63)) -> trunc(X >>s 63)Roman Lebedev2019-10-012-29/+37
| | | | | | | | Identical to it's trunc-less variant, just pretent-to hoist trunc, and everything else still holds: https://rise4fun.com/Alive/JRU llvm-svn: 373364
* [InstCombine] Preserve 'exact' in -(X >>u 31) -> (X >>s 31) foldRoman Lebedev2019-10-012-4/+8
| | | | | | https://rise4fun.com/Alive/yR4 llvm-svn: 373363
* [NFC][InstCombine] (Better) tests for sign-bit-smearing patternRoman Lebedev2019-10-012-0/+279
| | | | | | | https://rise4fun.com/Alive/JRU https://rise4fun.com/Alive/yR4 <- we can preserve 'exact' llvm-svn: 373362
* [JSON] Use LLVM's library for argdumperJonas Devlieghere2019-10-012-19/+7
| | | | | | | | | This patch replaces the LLDB's JSON implementation with the one from LLVM in argdumper. Differential revision: https://reviews.llvm.org/D68279 llvm-svn: 373361
* [JSON] Use LLVM's library for decoding JSON in StructuredDataJonas Devlieghere2019-10-012-101/+48
| | | | | | | | | This patch replaces the hand-rolled JSON decoding in StructuredData with LLVM's JSON library. Differential revision: https://reviews.llvm.org/D68282 llvm-svn: 373360
* [JSON] Use LLVM's library for encoding JSON in StructuredDataJonas Devlieghere2019-10-017-102/+57
| | | | | | | | | This patch replaces the hand-rolled JSON emission in StructuredData with LLVM's JSON library. Differential revision: https://reviews.llvm.org/D68248 llvm-svn: 373359
* [llvm-mca] Add a -mattr flagDavid Green2019-10-012-1/+35
| | | | | | | | | This adds a -mattr flag to llvm-mca, for cases where the -mcpu option does not contain all optional features. Differential Revision: https://reviews.llvm.org/D68190 llvm-svn: 373358
* Add missing REQUIRES: arm.Peter Collingbourne2019-10-011-0/+1
| | | | llvm-svn: 373357
* [ReleaseProcess] Document requirement to set MACOSX_DEPLOYMENT_TARGETVedant Kumar2019-10-011-0/+3
| | | | llvm-svn: 373356
* Fix a syntax error.Adrian Prantl2019-10-011-1/+1
| | | | llvm-svn: 373355
* Fix a condition-flip regression introduced in r373344.Adrian Prantl2019-10-011-1/+1
| | | | llvm-svn: 373354
* Typo (NFC)Adrian Prantl2019-10-011-3/+3
| | | | llvm-svn: 373353
* Simplify condition (NFC)Adrian Prantl2019-10-011-1/+1
| | | | llvm-svn: 373352
* [IndVars] An implementation of loop predication without a need for speculationPhilip Reames2019-10-012-12/+928
| | | | | | | | | | | | | | | | This patch implements a variation of a well known techniques for JIT compilers - we have an implementation in tree as LoopPredication - but with an interesting twist. This version does not assume the ability to execute a path which wasn't taken in the original program (such as a guard or widenable.condition intrinsic). The benefit is that this works for arbitrary IR from any frontend (including C/C++/Fortran). The tradeoff is that it's restricted to read only loops without implicit exits. This builds on SCEV, and can thus eliminate the loop varying portion of the any early exit where all exits are understandable by SCEV. A key advantage is that fixing deficiency exposed in SCEV - already found one while writing test cases - will also benefit all of full redundancy elimination (and most other loop transforms). I haven't seen anything in the literature which quite matches this. Given that, I'm not entirely sure that keeping the name "loop predication" is helpful. Anyone have suggestions for a better name? This is analogous to partial redundancy elimination - since we remove the condition flowing around the backedge - and has some parallels to our existing transforms which try to make conditions invariant in loops. Factoring wise, I chose to put this in IndVarSimplify since it's a generally applicable to all workloads. I could split this off into it's own pass, but we'd then probably want to add that new pass every place we use IndVars. One solid argument for splitting it off into it's own pass is that this transform is "too good". It breaks a huge number of existing IndVars test cases as they tend to be simple read only loops. At the moment, I've opted it off by default, but if we add this to IndVars and enable, we'll have to update around 20 test files to add side effects or disable this transform. Near term plan is to fuzz this extensively while off by default, reflect and discuss on the factoring issue mentioned just above, and then enable by default. I also need to give some though to supporting widenable conditions in this framing. Differential Revision: https://reviews.llvm.org/D67408 llvm-svn: 373351
* AMDGPU/GlobalISel: Increase max legal size to 1024Matt Arsenault2019-10-0111-94/+453
| | | | | | | | There are 1024 bit register classes defined for AGPRs. Additionally OpenCL defines vectors up to 16 x i64, and this helps those tests legalize. llvm-svn: 373350
* [X86] Add a VBROADCAST_LOAD ISD opcode representing a scalar load ↵Craig Topper2019-10-0111-238/+382
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | broadcasted to a vector. Summary: This adds the ISD opcode and a DAG combine to create it. There are probably some places where we can directly create it, but I'll leave that for future work. This updates all of the isel patterns to look for this new node. I had to add a few additional isel patterns for aligned extloads which we should probably fix with a DAG combine or something. This does mean that the broadcast load folding for avx512 can no longer match a broadcasted aligned extload. There's still some work to do here for combining a broadcast of a broadcast_load. We also need to improve extractelement or demanded vector elements of a broadcast_load. I'll try to get those done before I submit this patch. Reviewers: RKSimon, spatel Reviewed By: RKSimon Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68198 llvm-svn: 373349
* [OPENMP]Fix PR43516: Compiler crash with collapse(2) on non-rectangularAlexey Bataev2019-10-012-22/+29
| | | | | | | | | loop. Missed check if the condition is also dependent when building final expressions for the collapsed loop directives. llvm-svn: 373348
* ELF: Add .interp synthetic sections first in createSyntheticSections().Peter Collingbourne2019-10-015-13/+43
| | | | | | | | | | | | | | | | | | | | | | Our .interp section is not a SyntheticSection. As a result, it terminates the loop in removeUnusedSyntheticSections(). This has at least two consequences: - The synthetic .bss and .bss.rel.ro sections are always present in dynamically linked executables, even when they are not needed. - The synthetic .ARM.exidx (and possibly other) sections are always present in partitions other than the last one, even when not needed. .ARM.exidx in particular is problematic because it assumes that its list of code sections is non-empty in getLinkOrderDep(), which can lead to a crash if the partition does not have any code sections. Fix these problems by moving the creation of the .interp sections to the top of createSyntheticSections(). While here, make the code a little less error-prone by changing the add() lambdas to take a SyntheticSection instead of an InputSectionBase. Differential Revision: https://reviews.llvm.org/D68256 llvm-svn: 373347
* [AMDGPU] Add VerifyScheduling support.Jay Foad2019-10-013-3/+23
| | | | | | | | | | | | | | | | Summary: This is cut and pasted from the corresponding GenericScheduler functions. Reviewers: arsenm, atrick, tstellar, vpykhtin Subscribers: MatzeB, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, javed.absar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68264 llvm-svn: 373346
* [Diagnostics] Move warning into the subgroup (-Wenum-compare-conditional)David Bolvansky2019-10-013-2/+5
| | | | llvm-svn: 373345
* Remove size_t return parameter from FindTypesAdrian Prantl2019-10-0124-344/+261
| | | | | | | | | | | | | | | In r368345 I accidentally introduced a regression that would over-report the number of matches found by FindTypes if the DeclContext Filter was hit. This patch simply removes the size_t return parameter altogether — it's not that useful. rdar://problem/55500457 Differential Revision: https://reviews.llvm.org/D68169 llvm-svn: 373344
* [DAG][X86] Convert isNegatibleForFree/GetNegatedExpression to a target hook ↵Simon Pilgrim2019-10-013-276/+284
| | | | | | | | | | | | | | | | (PR42863) This patch converts the DAGCombine isNegatibleForFree/GetNegatedExpression into overridable TLI hooks. The intention is to let us extend existing FNEG combines to work more generally with negatible float ops, allowing it work with target specific combines and opcodes (e.g. X86's FMA variants). Unlike the SimplifyDemandedBits, we can't just handle target nodes through a Target callback, we need to do this as an override to allow targets to handle generic opcodes as well. This does mean that the target implementations has to duplicate some checks (recursion depth etc.). Partial reversion of rL372756 - I've identified the infinite loop issue inside the X86 override but haven't fixed it yet so I've only (re)committed the common TargetLowering refactoring part of the patch. Differential Revision: https://reviews.llvm.org/D67557 llvm-svn: 373343
* Update SymbolFilePDB for FindTypes API change.Adrian Prantl2019-10-012-22/+17
| | | | | | This is untested, I don't have access to a Windows machine. llvm-svn: 373342
* [Dominators][CodeGen] Add MachinePostDominatorTree verificationJakub Kuderski2019-10-015-8/+19
| | | | | | | | | | | | | | | | | | | | | Summary: This patch implements Machine PostDominator Tree verification and ensures that the verification doesn't fail the in-tree tests. MPDT verification can be enabled using `verify-machine-dom-info` -- the same flag used by Machine Dominator Tree verification. Flipping the flag revealed that MachineSink falsely claimed to preserve CFG and MDT/MPDT. This patch fixes that. Reviewers: arsenm, hliao, rampitec, vpykhtin, grosser Reviewed By: hliao Subscribers: wdng, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68235 llvm-svn: 373341
* [clang] Make handling of unnamed template params similar to function paramsKadir Cetinkaya2019-10-019-51/+32
| | | | | | | | | | | | | | | | | | | | | Summary: Clang uses the location identifier should be inserted for declarator decls when a decl is unnamed. But for type template and template template paramaters it uses the location of "typename/class" keyword, which makes it hard for tooling to insert/change parameter names. This change tries to unify these two cases by making template parameter parsing and sourcerange operations similar to function params/declarator decls. Reviewers: ilya-biryukov Subscribers: arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68143 llvm-svn: 373340
* [lldb][NFC] Mark ClangASTContext constructor as explicitRaphael Isemann2019-10-011-1/+1
| | | | | | | Given that we can implicitly construct a ClangASTContext from any string, we should really mark this as explicit. llvm-svn: 373339
OpenPOWER on IntegriCloud