summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* fix formatting; NFCHiroshi Inoue2017-07-101-2/+2
| | | | llvm-svn: 307523
* [X86] Fix typo in comment. NFCCraig Topper2017-07-101-1/+1
| | | | llvm-svn: 307522
* [ArgumentPromotion] Change use of removed argument in llvm.dbg.value to undefMikael Holmen2017-07-102-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This solves PR33641. When removing a dead argument we must also handle possibly existing calls to llvm.dbg.value that use the removed argument. Now we change the use of the otherwise dead argument to an undef for some other pass to cleanup later. If the calls are left untouched, they will later on cause errors: "function-local metadata used in wrong function" since the ArgumentPromotion rewrites the code by creating a new function with the wanted signature, but the metadata is not recreated so the new function may then erroneously use metadata from the old function. Reviewers: mstorsjo, rnk, arsenm Reviewed By: rnk Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D34874 llvm-svn: 307521
* [X86] Remove asserts from getX86CpuIDAndInfo/getX86CpuIDAndInfoEx. Restore ↵Craig Topper2017-07-101-7/+10
| | | | | | | | | | past behavior of returning an unsupported indication to the caller instead. These asserts could only occur if we fail to properly detect the compiler, but an assert is not a good way to do that because it doesn't work in release builds. I wonder if we could use #error? llvm-svn: 307520
* [ADT] Fix another "oops" spotted by eddyb and reported in IRC.Chandler Carruth2017-07-101-1/+1
| | | | | | This test pretty clearly should be calling 'maxnum' here. =] llvm-svn: 307519
* Fix issues with UBSAN test configuration.Eric Fiselier2017-07-102-5/+1
| | | | | | | | On Apple the test feature 'sanitizer-new-delete' was incorrectly getting added to the LIT feature set, which mistakenly caused tests to be disabled when using UBSAN (the feature is only needed with ASAN/MSAN/TSAN). llvm-svn: 307518
* Work around PR31864 - ATOMIC_LLONG_LOCK_FREE is incorrect in 32 bit buildsEric Fiselier2017-07-101-2/+35
| | | | llvm-svn: 307517
* llvm-profdata: Reduce memory usage by using Error callback rather than memberDavid Blaikie2017-07-107-149/+164
| | | | | | | | | | | | | | | | Reduces llvm-profdata memory usage on a large profile from 7.8GB to 5.1GB. The ProfData API now supports reporting all the errors/warnings rather than only the first, though llvm-profdata ignores everything after the first for now to preserve existing behavior. (if there's a desire for other behavior, happy to implement that - but might be as well left for a separate patch) Reviewers: davidxl Differential Revision: https://reviews.llvm.org/D35149 llvm-svn: 307516
* Remove incorrect FIXME comment; the FIXME was addressed before the changes ↵Eric Fiselier2017-07-101-2/+0
| | | | | | were committed llvm-svn: 307515
* Remove non-ascii characters introduced in r307513Eric Fiselier2017-07-101-4/+4
| | | | llvm-svn: 307514
* [coroutines] Include the implicit object parameter type when looking up ↵Eric Fiselier2017-07-102-19/+300
| | | | | | | | | coroutine_traits for member functions. This patch was originally from Toby Allsopp, but I hijacked it and fixed it up with his permission. llvm-svn: 307513
* Don't access Python objects while not holding the GIL.Zachary Turner2017-07-091-8/+6
| | | | | | | Patch by Tatyana Krasnukha Differential Revision: https://reviews.llvm.org/D34942 llvm-svn: 307512
* CGSCCPassManagerTest.cpp: Fix warnings. [-Wunused-variable]NAKAMURA Takumi2017-07-091-0/+2
| | | | llvm-svn: 307511
* Fix test failure to to new/delete ellisionsEric Fiselier2017-07-091-2/+3
| | | | llvm-svn: 307510
* [analyzer] Faster hashing of subsequences in CompoundStmts.Raphael Isemann2017-07-091-9/+20
| | | | | | | | | | | | | | Summary: This patches improves the hashing subsequences in CompoundStmts by incrementally hashing all subsequences with the same starting position. This results in a reduction of the time for this constraint while running over SQLite from 1.10 seconds to 0.55 seconds (-50%). Reviewers: NoQ Reviewed By: NoQ Subscribers: cfe-commits, xazax.hun, v.g.vassilev Differential Revision: https://reviews.llvm.org/D34364 llvm-svn: 307509
* [X86] Relax an assertion when legalizing vector types.Davide Italiano2017-07-092-0/+20
| | | | | | | | | | | | | | WidenVSELECTAndMask can fold (and it folds in this case) so we get a BUILD_VECTOR of constants as mask. convertMask() seems to work fine when the input is a vector of constants, and we still need to call it to extend/add elements at the end. but the current code just asserts on anything but a SETCC or AND/OR/XOR of 2xSETCC. This change was discussed briefly with Simon Pilgrim, who also suggests we might consider dropping this assertion in the future. Fixes PR33715. llvm-svn: 307508
* [X86] Add more feature flag bit defines to cpuid.h for gcc compatibility.Craig Topper2017-07-091-3/+61
| | | | llvm-svn: 307507
* [X86] Add __get_cpuid_count to cpuid.h. Update __get_cpuid to check the ↵Craig Topper2017-07-091-17/+37
| | | | | | | | maximum level support before accessing the leaf. Rename level to leaf everywhere. This matches gcc behavior. llvm-svn: 307506
* optional: Implement LWG 2900 and P0602Casey Carter2017-07-096-107/+145
| | | | | | Differential Revision: https://reviews.llvm.org/D32385 llvm-svn: 307505
* [X86] Allow GHC calling convention to use YMM and ZMM registersSimon Pilgrim2017-07-091-1/+9
| | | | | | | | | | GHC 8.4 will know how to use YMM and ZMM registers for calls. Submitted on behalf of @bgamari (Ben Gamari) Differential Revision: https://reviews.llvm.org/D34854 llvm-svn: 307504
* [AVR] Fix test errors due to tied operands not matchingDylan McKay2017-07-095-7/+7
| | | | | | Broken due to r307259. llvm-svn: 307503
* Handle ConstantExpr correctly in SelectionDAGBuilderSimon Pilgrim2017-07-093-8/+36
| | | | | | | | | | | | This change fixes a bug in SelectionDAGBuilder::visitInsertValue and SelectionDAGBuilder::visitExtractValue where constant expressions (InsertValueConstantExpr and ExtractValueConstantExpr) would be treated as non-constant instructions (InsertValueInst and ExtractValueInst). This bug resulted in an incorrect memory access, which manifested as an assertion failure in SDValue::SDValue. Fixes PR#33094. Submitted on behalf of @Praetonus (Benoit Vey) Differential Revision: https://reviews.llvm.org/D34538 llvm-svn: 307502
* [analyzer] Make StmtDataCollector part of the CloneDetection APIRaphael Isemann2017-07-092-185/+191
| | | | | | | | | | | | | | Summary: We probably want to use this useful templates in other pieces of code (e.g. the one from D34329), so we should make this public. Reviewers: NoQ Reviewed By: NoQ Subscribers: cfe-commits, xazax.hun, v.g.vassilev, johannes Differential Revision: https://reviews.llvm.org/D34880 llvm-svn: 307501
* [X86][AVX512] Regenerate AVX512VL comparison tests. Simon Pilgrim2017-07-092-4686/+47145
| | | | | | Show poor codegen on KNL targets as mentioned on D35179 llvm-svn: 307500
* Remove freed InvalidDomains from InvalidDomainMap.Tobias Grosser2017-07-091-0/+1
| | | | | | | | | | | | | | | | | | | | | Summary: Since r306667, propagateInvalidStmtDomains gets a reference to an InvalidDomainMap. As part of the branch leading to return false, the respective domain is freed. It is, however, not removed from the InvalidDomainMap, leaking a pointer to a freed object which results in a use-after-free. Fix this be removing the domain from the map before returning. We tried to derive a test case that reliably failes, but did not succeed in producing one. Hence, for now the failures in our LNT bots must be sufficient to keep this issue tested. Reviewers: grosser, Meinersbur, bollu Subscribers: bollu, nandini12396, pollydev, llvm-commits Differential Revision: https://reviews.llvm.org/D34971 llvm-svn: 307499
* [PM] Fix a nasty bug in the new PM where we failed to properlyChandler Carruth2017-07-095-43/+156
| | | | | | | | | | | | | | | | | | | | | | | | invalidation of analyses when merging SCCs. While I've added a bunch of testing of this, it takes something much more like the inliner to really trigger this as you need to have partially-analyzed SCCs with updates at just the right time. So I've added a direct test for this using the inliner and verifying the domtree. Without the changes here, this test ends up finding a stale dominator tree. However, to handle this properly, we need to invalidate analyses *before* merging the SCCs. After talking to Philip and Sanjoy about this they convinced me this was the right approach. To do this, we need a callback mechanism when merging SCCs so we can observe the cycle that will be merged before the merge happens. This API update ended up being surprisingly easy. With this commit, the new PM passes the test-suite again. It hadn't since MemorySSA was enabled for EarlyCSE as that also will find this bug very quickly. llvm-svn: 307498
* [PM] Add unittesting of the call graph update logic with complexChandler Carruth2017-07-094-15/+248
| | | | | | | | | | | dependencies between analyses. This uncovers even more issues with the proxies and the splitting apart of SCCs which are fixed in this patch. I discovered this while trying to add more rigorous testing for a change I'm making to the call graph update invalidation logic. llvm-svn: 307497
* [ADT] Fix a test case to use a correct escape for a null byte followedChandler Carruth2017-07-091-7/+7
| | | | | | | | | | by a valid octal digit. The length argument shows that this was in fact the intent. This was pointed out in IRC, thanks to eddyb! llvm-svn: 307496
* [X86] Remove check for AVX512 support from skylake-avx512 detection in ↵Craig Topper2017-07-091-6/+1
| | | | | | | | getHostCPUName. Users of getHostCPUName should also use getHostCPUFeatures which will take care of making sure avx512 is disabled if the CPU doesn't support it. This is consistent with what we do for other CPUs. llvm-svn: 307495
* [GlobalISel][X86] Add legalizer tests for G_LOAD/G_STORE operations. NFC.Igor Breger2017-07-091-0/+100
| | | | llvm-svn: 307494
* [PM] Teach PreservedAnalyses to have an `allInSet` static factoryChandler Carruth2017-07-092-0/+15
| | | | | | | function template to simplify building a quick object with a set marked as preserved. llvm-svn: 307493
* [IR] Add Type::isIntOrIntVectorTy(unsigned) similar to the existing ↵Craig Topper2017-07-0912-35/+36
| | | | | | isIntegerTy(unsigned), but also works for vectors. llvm-svn: 307492
* [IR] Make use of ↵Craig Topper2017-07-0915-64/+49
| | | | | | Type::isPtrOrPtrVectorTy/isIntOrIntVectorTy/isFPOrFPVectorTy to shorten code. NFC llvm-svn: 307491
* [ADT] Add a default constructor and a bool conversion to function_ref.Chandler Carruth2017-07-092-0/+18
| | | | | | | | | | The internal representation has a natural way to handle this and it seems nicer than having to wrap this in an optional (with its own separate flag). This also matches how std::function works. llvm-svn: 307490
* [FastISel] fix a fallback diagnostic.Igor Breger2017-07-092-2/+20
| | | | | | | | | | | | | | Summary: FastISel was marked as failed in case instruction selection succeeded. Reviewers: qcolombet, zvi, rovka, ab Reviewed By: zvi Subscribers: javed.absar, ab, qcolombet, bogner, llvm-commits Differential Revision: https://reviews.llvm.org/D34438 llvm-svn: 307489
* fix trivial typos; NFCHiroshi Inoue2017-07-096-10/+10
| | | | | | sucessor -> successor llvm-svn: 307488
* [PM] Finish implementing and fix a chain of bugs uncovered by testingChandler Carruth2017-07-094-34/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the invalidation propagation logic from an SCC to a Function. I wrote the infrastructure to test this but didn't actually use it in the unit test where it was designed to be used. =[ My bad. Once I actually added it to the test case I discovered that it also hadn't been properly implemented, so I've implemented it. The logic in the FAM proxy for an SCC pass to propagate invalidation follows the same ideas as the FAM proxy for a Module pass, but the implementation is a bit different to reflect the fact that it is forwarding just for an SCC. However, implementing this correctly uncovered a surprising "bug" (it was conservatively correct but relatively very expensive) in how we handle invalidation when splitting one SCC into multiple SCCs. We did an eager invalidation when in reality we should be deferring invaliadtion for the *current* SCC to the CGSCC pass manager and just invaliating the newly constructed SCCs. Otherwise we end up invalidating too much too soon. This was exposed by the inliner test case that I've updated. Now, we invalidate *just* the split off '(test1_f)' SCC when doing the CG update, and then the inliner finishes and invalidates the '(test1_g, test1_h)' SCC's analyses. The first few attempts at fixing this hit still more bugs, but all of those are covered by existing tests. For example, the inliner should also preserve the FAM proxy to avoid unnecesasry invalidation, and this is safe because the CG update routines it uses handle any necessary adjustments to the FAM proxy. Finally, the unittests for the CGSCC pass manager needed a bunch of updates where we weren't correctly preserving the FAM proxy because it hadn't been fully implemented and failing to preserve it didn't matter. Note that this doesn't yet fix the current crasher due to MemSSA finding a stale dominator tree, but without this the fix to that crasher doesn't really make any sense when testing because it relies on the proxy behavior. llvm-svn: 307487
* [InstCombine] Speculatively implement a fix for what might be the root cause ↵Craig Topper2017-07-091-1/+2
| | | | | | | | | | of PR33721 by making sure that we have integer types before doing select C, -1, 0 -> sext C to int I recently changed m_One and m_AllOnes to use Constant::isOneValue/isAllOnesValue which work on floating point values too. The original implementation looked specifically for ConstantInt scalars and splats. So I'm guessing we are accidentally trying to issue sext/zexts on floating point types now. Hopefully I figure out how to reproduce the failure from the PR soon. llvm-svn: 307486
* [AMDGPU] Fix -Wimplicit-fallthrough warning. NFCI.Simon Pilgrim2017-07-081-6/+2
| | | | llvm-svn: 307485
* [AArch64] Fix -Wimplicit-fallthrough warnings. NFCI.Simon Pilgrim2017-07-081-2/+6
| | | | | | Add breaks - doesn't affect results as both GPR/FPU both check for 32/64 bit sizes. So will still default to GenericOps in the same way. llvm-svn: 307484
* Fix build failure with gcc about mixing enum and non-enumYaxun Liu2017-07-082-3/+6
| | | | llvm-svn: 307483
* [Demangler] NFC: Don't make the parse_* functions templatesErik Pilkington2017-07-081-180/+117
| | | | | | Differential revision: https://reviews.llvm.org/D35158 llvm-svn: 307482
* [Demangler] NFC: Move Db struct to beginning of fileErik Pilkington2017-07-081-207/+206
| | | | | | Differential revision: https://reviews.llvm.org/D35158 llvm-svn: 307481
* [ARM] Fix -Wimplicit-fallthrough warning. NFCI.Simon Pilgrim2017-07-081-0/+1
| | | | llvm-svn: 307480
* [Bash-autocompletion] Auto complete cc1 options if -cc1 is specifiedYuka Takahashi2017-07-085-9/+31
| | | | | | | | | | | | | | Summary: We don't want to autocomplete flags whose Flags class has `NoDriverOption` when argv[1] is not `-cc1`. Another idea for this implementation is to make --autocomplete a cc1 option and handle it in clang Frontend, by porting --autocomplete handler from Driver to Frontend, so that we can handle Driver options and CC1 options in unified manner. Differential Revision: https://reviews.llvm.org/D34770 llvm-svn: 307479
* [Bash-autocompletion] Fix a bug that -foo=bar doesn't handled properlyYuka Takahashi2017-07-081-0/+6
| | | | | | | | Summary: Fixed a bug that -foo=bar wasn't handled properly on old version of bash. Differential Revision: https://reviews.llvm.org/D34927 llvm-svn: 307478
* Re-enable "[IndVars] Canonicalize comparisons between non-negative values ↵Max Kazantsev2017-07-085-6/+115
| | | | | | | | | | | | | | and indvars" The patch was reverted due to a bug. The bug was that if the IV is the 2nd operand of the icmp instruction, then the "Pred" variable gets swapped and differs from the instruction's predicate. In this patch we use the original predicate to do the transformation. Also added a test case that exercises this situation. Differentian Revision: https://reviews.llvm.org/D35107 llvm-svn: 307477
* [LoopVectorize] partly revert r307475Sanjay Patel2017-07-081-194/+19
| | | | | | Bots are failing because of the additional checks. llvm-svn: 307476
* [LoopVectorize] auto-generate complete checks; NFCSanjay Patel2017-07-082-29/+279
| | | | | | | | | I'm looking at a cmp transform in InstCombine that would affect these tests, but it's hard to know if it makes things better or worse without seeing the full IR. OTOH, maybe these tests shouldn't be running a bunch of transform passes in the first place? llvm-svn: 307475
* Add a .arcconfig file for openmp.Dimitry Andric2017-07-081-0/+4
| | | | llvm-svn: 307474
OpenPOWER on IntegriCloud