summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [x86] add CGP uaddo test with weird type; NFCSanjay Patel2019-02-031-0/+19
| | | | | | | There's probably no reason to try this transform for an obviously unsupported op. llvm-svn: 352993
* [CGP] move test file to prevent bot failuresSanjay Patel2019-02-031-0/+0
| | | | | | | | The test specifiies the triple, so it needs to be in the x86 directory in case a bot has been configured without the x86 target. llvm-svn: 352992
* Remove trailing semicolon. NFCI.Simon Pilgrim2019-02-031-1/+1
| | | | llvm-svn: 352991
* Remove trailing semicolon. NFCI.Simon Pilgrim2019-02-031-1/+1
| | | | llvm-svn: 352990
* [AST] Extract ASTNodeTraverser class from ASTDumperStephen Kelly2019-02-032-558/+650
| | | | | | | | | | | | | | | | | | Summary: This new traverser class allows clients to re-use the traversal logic which was previously part of ASTDumper. This means that alternative visit logic may be implemented, such as * Dump to alternative data formats such as JSON * Implement AST Matcher parent/child visitation matching AST dumps Reviewers: aaron.ballman Subscribers: jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D57472 llvm-svn: 352989
* [CGP] refactor optimizeCmpExpression (NFCI)Sanjay Patel2019-02-031-36/+38
| | | | | | | | | | | | | | | | This is not truly NFC because we are bailing out without a TLI now. That should not be a real concern though because there should be a TLI in any real-world scenario. That seems better than passing around a pointer and then checking it for null-ness all over the place. The motivation is to fix what appears to be an unintended restriction on the uaddo transform - hasMultipleConditionRegisters() shouldn't be reason to limit the transform. llvm-svn: 352988
* [PowerPC] add tests for saturating add; NFCSanjay Patel2019-02-031-0/+787
| | | | | | This is copied from the existing test files for x86/AArch. llvm-svn: 352987
* [DA][NewPM] Handle transitive dependencies in the new-pm version of DAPhilip Pfaffe2019-02-033-0/+33
| | | | | | | | | | | | | | | | Summary: The analysis result of DA caches pointers to AA, SCEV, and LI, but it never checks for their invalidation. Fix that. Reviewers: chandlerc, dmgreen, bogner Reviewed By: dmgreen Subscribers: hiraditya, bollu, javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D56381 llvm-svn: 352986
* [X86] Print %st(0) as %st to match what gcc inline asm uses as the clobber ↵Craig Topper2019-02-0342-1266/+1255
| | | | | | | | | | | | | | | | | | | name to make MS inline asm work correctly Summary: When calculating clobbers for MS style inline assembly we fail if the asm clobbers stack top because we print st(0) and try to pass it through the gcc register name check. This was found with when I attempted to make a emms/femms clobber all ST registers. If you use emms/femms in MS inline asm we would try to use st(0) as the clobber name but clang would think that wasn't a valid clobber name. This also matches what objdump disassembly prints. It's also what is printed by gcc -S. Reviewers: RKSimon, rnk, efriedma, spatel, andreadb, lebedev.ri Reviewed By: rnk Subscribers: eraman, gbedwell, lebedev.ri, llvm-commits Differential Revision: https://reviews.llvm.org/D57621 llvm-svn: 352985
* [X86] Lower ISD::UADDO to use the Z flag instead of C flag when the RHS is a ↵Craig Topper2019-02-036-46/+74
| | | | | | | | | | | | | | | | | | | | | constant 1 to encourage INC formation. Summary: Add an additional combine to combineCarryThroughADD to reverse it back to the C flag to avoid regressions. I believe this catches the cases that D57547 got. Reviewers: RKSimon, spatel Reviewed By: spatel Subscribers: javed.absar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57637 llvm-svn: 352984
* Correct test my *really really* overaligning a type.Eric Fiselier2019-02-031-2/+2
| | | | llvm-svn: 352983
* [AMDGPU] Fix -Wunused-variable after rL352978Fangrui Song2019-02-031-1/+0
| | | | llvm-svn: 352982
* [InstSimplify] Missed optimization in math expression: log10(pow(10.0,x)) == ↵Dmitry Venikov2019-02-033-13/+13
| | | | | | | | | | | | | | | | x, log2(pow(2.0,x)) == x Summary: This patch enables folding following instructions under -ffast-math flag: log10(pow(10.0,x)) -> x, log2(pow(2.0,x)) -> x Reviewers: hfinkel, spatel, efriedma, craig.topper, zvi, majnemer, lebedev.ri Reviewed By: spatel, lebedev.ri Subscribers: lebedev.ri, llvm-commits Differential Revision: https://reviews.llvm.org/D41940 llvm-svn: 352981
* Fix handling of usual deallocation functions in various configuratios.Eric Fiselier2019-02-033-7/+84
| | | | | | | | | | | | | Clang allows users to enable or disable various types of allocation and deallocation regardless of the C++ dialect. When extended new/delete overloads are enabled in older dialects, we need to treat them as if they're usual. Also, disabling one usual deallocation form shouldn't disable any others. For example, disabling aligned allocation in C++2a should have no effect on destroying delete. llvm-svn: 352980
* GlobalISel: Implement widenScalar for G_UNMERGE_VALUESMatt Arsenault2019-02-035-63/+349
| | | | | | | | | For the scalar case only. Also move the similar G_MERGE_VALUES handling to a separate function and cleanup to make them look more similar. llvm-svn: 352979
* GlobalISel: Implement widenScalar for G_EXTRACT vector sourcesMatt Arsenault2019-02-023-0/+176
| | | | | | Handle the basic element extract case. llvm-svn: 352978
* AMDGPU/GlobalISel: Avoid reporting illegal extloads as legalMatt Arsenault2019-02-021-1/+1
| | | | | | This avoids breaking a test in a future commit. llvm-svn: 352977
* AMDGPU/GlobalISel: Legalize icmp for pointer typesMatt Arsenault2019-02-022-1/+185
| | | | llvm-svn: 352976
* AMDGPU/GlobalISel: Legalize constant for pointer typesMatt Arsenault2019-02-022-3/+88
| | | | llvm-svn: 352975
* AMDGPU/GlobalISel: Legalize select for pointer typesMatt Arsenault2019-02-022-80/+526
| | | | llvm-svn: 352974
* GlobalISel: Legalization for inttoptr/ptrtointMatt Arsenault2019-02-026-38/+415
| | | | llvm-svn: 352973
* [NewPM] Add support for new-PM plugins to clangPhilip Pfaffe2019-02-025-0/+27
| | | | | | | | | | | | | | | Summary: This adds support for new-PM plugin loading to clang. The option `-fpass-plugin=` may be used to specify a dynamic shared object file that adheres to the PassPlugin API. Tested: created simple plugin that registers an EP callback; with optimization level > 0, the pass is run as expected. Committed on behalf of Marco Elver Differential Revision: https://reviews.llvm.org/D56935 llvm-svn: 352972
* Replace uses of %T with %t in from previous frontend test differentialNico Weber2019-02-022-2/+2
| | | | | | | | | | | | | | | After committing a change I had made to a few frontend tests, it was pointed out to me that %T is being deprecated in LLVM in favor of %t. This change simply converts usages of %T to %t while maintaining the integrity of the test. Previous revision where this discussion took place: https://reviews.llvm.org/D50563 Differential Revision: https://reviews.llvm.org/D57592 Patch from Justice Adams <justice.adams@sony.com>! llvm-svn: 352971
* Move the feature test macros script to the utils directory.Eric Fiselier2019-02-022-13/+15
| | | | | | | It doesn't make a lot of sense to keep it with the tests, deep into the test suite directonies. llvm-svn: 352970
* Revert rCTE352968 due to compilation failures 💥Stephane Moore2019-02-022-15/+3
| | | | llvm-svn: 352969
* [clang-tidy] Make google-objc-function-naming ignore implicit functions 🙈Stephane Moore2019-02-022-3/+15
| | | | | | | | | | | | | | | | | | Summary: Implicit functions are outside the control of source authors and should be exempt from style restrictions. Tested via running clang tools tests. Reviewers: aaron.ballman Reviewed By: aaron.ballman Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D57207 llvm-svn: 352968
* [X86] Add another test case for PR40539. NFCCraig Topper2019-02-021-0/+37
| | | | llvm-svn: 352967
* [libunwind] Provide placement new definitionPetr Hosek2019-02-023-16/+16
| | | | | | | | | While Clang automatically generates the code for placement new, g++ doesn't do that so we need to provide our own definition. Differential Revision: https://reviews.llvm.org/D57455 llvm-svn: 352966
* [libunwind] Remove the remote unwinding supportPetr Hosek2019-02-023-245/+0
| | | | | | | | | | This is unfinished, unused and incomplete. This could be brought back in the future if there's a desire to build a more complete implementation, but at the moment it's just bitrotting. Differential Revision: https://reviews.llvm.org/D57252 llvm-svn: 352965
* [clang-tidy] Rename time lookup functions; NFCHyrum Wright2019-02-023-7/+7
| | | | llvm-svn: 352964
* [X86][AVX] Enable INSERT_SUBVECTOR(SRC0, SHUFFLE(SRC1)) shuffle combiningSimon Pilgrim2019-02-0211-255/+425
| | | | | | | | | | Push the insert_subvector up through the shuffle operands to help find more cross-lane shuffles. The is exposes a couple of minor issues that will be fixed shortly: Missed broadcast folds - we have a mixture of vzext_load lengths that need cleaning up combine-sdiv.ll - AVX1 SimplifyDemandedVectorElts failure (hits max depth due to a couple of extra bitcasts). llvm-svn: 352963
* [SDAG] Add SDNode/SDValue getConstantOperandAPInt helper. NFCI.Simon Pilgrim2019-02-023-16/+24
| | | | | | | | We already have the getConstantOperandVal helper which returns a uint64_t, but along comes the fuzzer and inserts a i128 -1 constant or something and the whole thing asserts....... I've updated a few obvious cases, and tried to make use of the const reference where possible, but there's more to do. A number of existing oss-fuzz tickets should be fixed if we start using APInt and perform value clamping where necessary. llvm-svn: 352961
* [LCSSA] Handle case with single new PHI faster.Florian Hahn2019-02-022-35/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there is only a single available value, all uses must be dominated by the single value and there is no need to search for a reaching definition. This drastically speeds up LCSSA in some cases. For the test case from PR37202, it speeds up LCSSA construction by 4 times. Time-passes without this patch for test case from PR37202: Total Execution Time: 29.9285 seconds (29.9276 wall clock) ---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name --- 5.2786 ( 17.7%) 0.0021 ( 1.2%) 5.2806 ( 17.6%) 5.2808 ( 17.6%) Unswitch loops 4.3739 ( 14.7%) 0.0303 ( 18.1%) 4.4042 ( 14.7%) 4.4042 ( 14.7%) Loop-Closed SSA Form Pass 4.2658 ( 14.3%) 0.0192 ( 11.5%) 4.2850 ( 14.3%) 4.2851 ( 14.3%) Loop-Closed SSA Form Pass #2 2.2307 ( 7.5%) 0.0013 ( 0.8%) 2.2320 ( 7.5%) 2.2318 ( 7.5%) Loop Invariant Code Motion 2.0888 ( 7.0%) 0.0012 ( 0.7%) 2.0900 ( 7.0%) 2.0897 ( 7.0%) Unroll loops 1.6761 ( 5.6%) 0.0013 ( 0.8%) 1.6774 ( 5.6%) 1.6774 ( 5.6%) Value Propagation 1.3686 ( 4.6%) 0.0029 ( 1.8%) 1.3716 ( 4.6%) 1.3714 ( 4.6%) Induction Variable Simplification 1.1457 ( 3.8%) 0.0010 ( 0.6%) 1.1468 ( 3.8%) 1.1468 ( 3.8%) Loop-Closed SSA Form Pass #4 1.1384 ( 3.8%) 0.0005 ( 0.3%) 1.1389 ( 3.8%) 1.1389 ( 3.8%) Loop-Closed SSA Form Pass #6 1.1360 ( 3.8%) 0.0027 ( 1.6%) 1.1387 ( 3.8%) 1.1387 ( 3.8%) Loop-Closed SSA Form Pass #5 1.1331 ( 3.8%) 0.0010 ( 0.6%) 1.1341 ( 3.8%) 1.1340 ( 3.8%) Loop-Closed SSA Form Pass #3 Time passes with this patch Total Execution Time: 19.2802 seconds (19.2813 wall clock) ---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name --- 4.4234 ( 23.2%) 0.0038 ( 2.0%) 4.4272 ( 23.0%) 4.4273 ( 23.0%) Unswitch loops 2.3828 ( 12.5%) 0.0020 ( 1.1%) 2.3848 ( 12.4%) 2.3847 ( 12.4%) Unroll loops 1.8714 ( 9.8%) 0.0020 ( 1.1%) 1.8734 ( 9.7%) 1.8735 ( 9.7%) Loop Invariant Code Motion 1.7973 ( 9.4%) 0.0022 ( 1.2%) 1.7995 ( 9.3%) 1.8003 ( 9.3%) Value Propagation 1.4010 ( 7.3%) 0.0033 ( 1.8%) 1.4043 ( 7.3%) 1.4044 ( 7.3%) Induction Variable Simplification 0.9978 ( 5.2%) 0.0244 ( 13.1%) 1.0222 ( 5.3%) 1.0224 ( 5.3%) Loop-Closed SSA Form Pass #2 0.9611 ( 5.0%) 0.0257 ( 13.8%) 0.9868 ( 5.1%) 0.9868 ( 5.1%) Loop-Closed SSA Form Pass 0.5856 ( 3.1%) 0.0015 ( 0.8%) 0.5871 ( 3.0%) 0.5869 ( 3.0%) Unroll loops #2 0.4132 ( 2.2%) 0.0012 ( 0.7%) 0.4145 ( 2.1%) 0.4143 ( 2.1%) Loop Invariant Code Motion #3 Reviewers: efriedma, davide, mzolotukhin Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D57033 llvm-svn: 352960
* [analyzer][UninitializedObjectChecker] New flag to ignore guarded ↵Kristof Umann2019-02-023-13/+550
| | | | | | | | | | | | | | | | | | | uninitialized fields This patch is an implementation of the ideas discussed on the mailing list[1]. The idea is to somewhat heuristically guess whether the field that was confirmed to be uninitialized is actually guarded with ifs, asserts, switch/cases and so on. Since this is a syntactic check, it is very much prone to drastically reduce the amount of reports the checker emits. The reports however that do not get filtered out though have greater likelihood of them manifesting into actual runtime errors. [1] http://lists.llvm.org/pipermail/cfe-dev/2018-September/059255.html Differential Revision: https://reviews.llvm.org/D51866 llvm-svn: 352959
* [LCSSA] Add expensive verification of LCSSA form for sub-loops.Florian Hahn2019-02-021-0/+6
| | | | | | | | | | | | | | This assertion makes sure all sub-loops are in LCSSA form before bringing their parent in LCSSA form. This precondition was added to formLCSSA in D56848. Reviewers: davide, efriedma, mzolotukhin Reviewed By: davide Differential Revision: https://reviews.llvm.org/D56921 llvm-svn: 352958
* [clangd] Fix heap-use-after-free after r352868Eric Liu2019-02-021-5/+8
| | | | llvm-svn: 352957
* [ASTImporter] Fix up test that only works on X86.David Green2019-02-021-3/+7
| | | | | | | | The test will fail if the default target triple is not X86, even if the host platform is. So move the check into the test at runtime. llvm-svn: 352956
* [X86][SSE]: Adding full coverage of MC encoding tests for the SSE isa sets.<NFC>Craig Topper2019-02-0220-170/+15824
| | | | | | | | | | | | | | | | | | | | | | Summary: NFC. Adding MC regressions tests to cover all the SSE ISA sets as follows: SSE, SSE2, SSE3, SSE4, SSE42, SSEMXCSR, SSE_PREFETCH, SSSE3 This patch is part of a larger task to cover MC encoding of all X86 ISA Sets. See revision: https://reviews.llvm.org/D39952 Patch by Gadi Haber and Wang Tianqing Reviewers: RKSimon, zvi, craig.topper, AndreiGrischenko, gadi.haber, LuoYuanke Reviewed By: craig.topper Subscribers: jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D40387 llvm-svn: 352955
* Revert "Bump minimum toolchain version"JF Bastien2019-02-024-87/+40
| | | | | | | | | | | Reverting D57264 again, it looks like we're down to two bots that need fixing: polly-amd64-linux polly-arm-linux They both have old versions of libstdc++ and recent clang. llvm-svn: 352954
* [Clangd] textDocument/definition and textDocument/declaration "bounce" ↵Sam McCall2019-02-022-15/+74
| | | | | | | | | | | | | | | | | | between definition and declaration location when they are distinct. Summary: This helps minimize the disruption of not returning declarations as part of a find-definition response (r352864). Reviewers: hokein Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, ilya-biryukov Tags: #clang Differential Revision: https://reviews.llvm.org/D57580 llvm-svn: 352953
* [BPF] [BTF] Process FileName with absolute path correctlyYonghong Song2019-02-022-1/+82
| | | | | | | | | | | | | | | | | In IR, sometimes the following attributes for DIFile may be generated: filename: /home/yhs/test.c directory: /tmp The /tmp may represent the working directory of the compilation process. In such cases, since filename is with absolute path, the directory should be ignored by BTF. The filename alone is enough to get the source. Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Yonghong Song <yhs@fb.com> llvm-svn: 352952
* Bump minimum toolchain versionJF Bastien2019-02-024-40/+87
| | | | | | | | | | | | | | | Summary: The RFC on moving past C++11 got good traction: http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html This patch therefore bumps the toolchain versions according to our policy: llvm.org/docs/DeveloperPolicy.html#toolchain Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, mehdi_amini, jyknight, rsmith, chandlerc, smeenai, hans, reames, lattner, lhames, erichkeane Differential Revision: https://reviews.llvm.org/D57264 llvm-svn: 352951
* [llvm-objcopy] Temporarily limit one test to darwinAlexander Shaposhnikov2019-02-021-0/+1
| | | | | | | | | Some triples in llvm-mc appear to be unavailable on some buildbots. To please those buildbots we temporarily limit the test to darwin (where the required triple is guranteed to be available) until we find the right solution. llvm-svn: 352950
* [Sema][ObjC] Allow declaring ObjC pointer members with non-trivialAkira Hatanaka2019-02-026-8/+213
| | | | | | | | | | | | | | | ownership qualifications in C++ unions under ARC. An ObjC pointer member with non-trivial ownership qualifications causes all of the defaulted special functions of the enclosing union to be defined as deleted, except when the member has an in-class initializer, the default constructor isn't defined as deleted. rdar://problem/34213306 Differential Revision: https://reviews.llvm.org/D57438 llvm-svn: 352949
* [ASan] Do not instrument other runtime functions with `__asan_handle_no_return`Julian Lettner2019-02-024-27/+35
| | | | | | | | | | | | | | Summary: Currently, ASan inserts a call to `__asan_handle_no_return` before every `noreturn` function call/invoke. This is unnecessary for calls to other runtime funtions. This patch changes ASan to skip instrumentation for functions calls marked with `!nosanitize` metadata. Reviewers: TODO Differential Revision: https://reviews.llvm.org/D57489 llvm-svn: 352948
* [llvm-objcopy] Fix triples in macho tests.Alexander Shaposhnikov2019-02-021-2/+2
| | | | | | Update triples used by the macho tests to fix some buildbots. llvm-svn: 352947
* Remove redundant FunctionDecl argument from a couple functions.James Y Knight2019-02-0210-61/+44
| | | | | | | | | | | | | | | | | | This argument was added in r254554 in order to support the pass_object_size attribute. However, in r296076, the attribute's presence is now also represented in FunctionProtoType's ExtParameterInfo, and thus it's unnecessary to pass along a separate FunctionDecl. The functions modified are: RequiredArgs::forPrototype{,Plus}, and CodeGenTypes::ConvertFunctionType. After this, it's also (again) unnecessary to have a separate ConvertFunctionType function ConvertType, so convert callers back to the latter, leaving the former as an internal helper function. llvm-svn: 352946
* [AutoUpgrade] Fix AutoUpgrade for x86.seh.recoverfpMandeep Singh Grang2019-02-022-4/+16
| | | | | | | | | | | | | | | | Summary: This fixes the bug in https://reviews.llvm.org/D56747#inline-502711. Reviewers: efriedma Reviewed By: efriedma Subscribers: javed.absar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57614 llvm-svn: 352945
* [llvm-objcopy] Add ability to copy MachO object filesAlexander Shaposhnikov2019-02-0216-0/+1542
| | | | | | | | | | This diff implements first bits for copying (without modification) MachO object files. Test plan: make check-all Differential revision: https://reviews.llvm.org/D54674 llvm-svn: 352944
* [ELF] Default to --no-allow-shlib-undefined for executablesFangrui Song2019-02-026-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This follows the ld.bfd/gold behavior. The error check is useful as it captures a common type of ld.so undefined symbol errors as link-time errors: // a.cc => a.so (not linked with -z defs) void f(); // f is undefined void g() { f(); } // b.cc => executable with a DT_NEEDED entry on a.so void g(); int main() { g(); } // ld.so errors when g() is executed (lazy binding) or when the program is started (-z now) // symbol lookup error: ... undefined symbol: f Reviewers: ruiu, grimar, pcc, espindola Reviewed By: ruiu Subscribers: llvm-commits, emaste, arichardson Tags: #llvm Differential Revision: https://reviews.llvm.org/D57569 llvm-svn: 352943
OpenPOWER on IntegriCloud