summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Add explicit alignment to __m128/__m128i/__m128d/etc. to allow ↵Craig Topper2019-02-089-51/+291
| | | | | | | | | | | | | | | | | | | | | | | matching of MSVC behavior with #pragma pack. Summary: With MSVC, #pragma pack is ignored when there is explicit alignment. This differs from gcc. Clang emulates this difference when compiling for Windows. It appears that MSVC and its headers consider the __m128/__m128i/__m128d/etc. types to be explicitly aligned and ignores #pragma pack for them. Since we don't have explicit alignment on them in our headers, we don't match the MSVC behavior here. This patch adds explicit alignment to match this behavior. I'm hoping this won't cause any problems when we're not emulating MSVC. But if someone knows of something that would be different we can swith to conditionally adding the alignment based on _MSC_VER. I had to add explicitly unaligned types as well so we could use them in the loadu/storeu intrinsics which use __attribute__(__packed__). Using the now explicitly aligned types wouldn't produce align 1 accesses when targeting Windows. Reviewers: rnk, erichkeane, spatel, RKSimon Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57961 llvm-svn: 353555
* [clang-tidy] Don't use assignment for value-initialized enumsMalcolm Parsons2019-02-083-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The modernize-use-default-member-init check crashes when trying to create an assignment value for a value-initialized enum because it isn't a BuiltinType. An enum cannot be initialized by assigning 0 to it unless a cast is added. It could be initialized with an enumerator with the value 0, but there might not be one. Avoid these issues by ignoring the UseAssignment setting for value-initialized enums. Fixes PR35050. Reviewers: aaron.ballman, alexfh, JonasToth Reviewed By: JonasToth Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57852 llvm-svn: 353554
* [GISel][NFC]: Add missing call to record CSE hits in the CSEMIRBuilderAditya Nandakumar2019-02-083-9/+45
| | | | | | | | | | https://reviews.llvm.org/D57932 Add some logging + tests to make sure CSEInfo prints debug output. reviewed by: arsenm llvm-svn: 353553
* [tsan] Remove SCOPED_TSAN_INTERCEPTOR to try to fix ppc botVitaly Buka2019-02-081-1/+0
| | | | llvm-svn: 353552
* Document libFuzzer on Windows.Jonathan Metzman2019-02-081-2/+12
| | | | | | | | | | | | | | | | Summary: Document that libFuzzer supports Windows, how to get it, and its limitations. Reviewers: kcc, morehouse, rnk, metzman Reviewed By: kcc, rnk, metzman Subscribers: hans, rnk Differential Revision: https://reviews.llvm.org/D57597 llvm-svn: 353551
* [Cmake] Add an option to build LLVM using the experimental new pass managerRong Xu2019-02-082-0/+13
| | | | | | | | Add LLVM_USE_NEWPM to build LLVM using the experimental new pass manager. Differential Revision: http://reviews.llvm.org/D57068 llvm-svn: 353550
* [opaque pointer types] Update calls to CreateCall to pass the functionJames Y Knight2019-02-085-31/+32
| | | | | | type in lldb and polly. llvm-svn: 353549
* AMDGPU: Remove GCN features and predicatesMatt Arsenault2019-02-0816-63/+18
| | | | | | | These are no longer necessary since the R600 tablegen files are split out now. llvm-svn: 353548
* [InstrProf] Implement static profdata registrationReid Kleckner2019-02-0815-157/+297
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The motivating use case is eliminating duplicate profile data registered for the same inline function in two object files. Before this change, users would observe multiple symbol definition errors with VC link, but links with LLD would succeed. Users (Mozilla) have reported that PGO works well with clang-cl and LLD, but when using LLD without this static registration, we would get into a "relocation against a discarded section" situation. I'm not sure what happens in that situation, but I suspect that duplicate, unused profile information was retained. If so, this change will reduce the size of such binaries with LLD. Now, Windows uses static registration and is in line with all the other platforms. Reviewers: davidxl, wmi, inglorion, void, calixte Subscribers: mgorny, krytarowski, eraman, fedor.sergeev, hiraditya, #sanitizers, dmajor, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D57929 llvm-svn: 353547
* [TargetLowering] Use ISD::FSHR in expandFixedPointMulSimon Pilgrim2019-02-082-11/+8
| | | | | | Replace OR(SHL,SRL) pattern with ISD::FSHR (legalization expands this later if necessary) - this helps with the scale == 0 'undefined' drop-through case that was discussed on D55720. llvm-svn: 353546
* [lldb] [unittests] Disable MainLoopTest::DetectsEOF on NetBSDMichal Gorny2019-02-081-0/+5
| | | | | | | | | | The NetBSD kernel currently does not support detecting closed slave pty via kevent on master pty. This causes the test to hang forever. To avoid that, disable the test until the kernel is fixed. Differential Revision: https://reviews.llvm.org/D57912 llvm-svn: 353545
* [test] Run the verifier for dsymutil module testsJonas Devlieghere2019-02-084-4/+6
| | | | | | | Dsymutil has an option "verify" that runs the dwarf verifier on the generated dSYM. This patch enables this for the module tests. llvm-svn: 353544
* [OPENMP]Delay emission of the error messages for the exceptions.Alexey Bataev2019-02-088-14/+100
| | | | | | | | | | Fixed diagnostic emission for the exceptions support in case of the compilation of OpenMP code for the devices. From now on, it uses delayed diagnostics mechanism, previously used for CUDA only. It allow to diagnose not allowed used of exceptions only in functions that are going to be codegen'ed. llvm-svn: 353542
* Revert "[OPENMP]Initial support for the delayed diagnostics."Alexey Bataev2019-02-088-100/+14
| | | | | | | This reverts commit r353540. Erroneously committed, need to fix the message and description. llvm-svn: 353541
* [OPENMP]Initial support for the delayed diagnostics.Alexey Bataev2019-02-088-14/+100
| | | | | | | | | It is important to delay the emission of the diagnostic messages for the functions unless it is proved that the function is going to be used on the device side. It is required to support compilation with some of the target-specific system headers. llvm-svn: 353540
* [TargetLowering] Add SimplifyDemandedBits funnel shift support Simon Pilgrim2019-02-083-15/+50
| | | | llvm-svn: 353539
* Guard a feature that unsupported by old GCCTaewook Oh2019-02-081-1/+9
| | | | | | | | | | | | | | | | Summary: As @david2050 commented, changes introduced by https://reviews.llvm.org/D56397 break builds for older compilers which don't support `__has(_cpp)_attribute`. This is a fix for the break. Reviewers: protze.joachim, jlpeyton, AndreyChurbanov, Hahnfeld, david2050 Subscribers: openmp-commits, david2050 Tags: #openmp Differential Revision: https://reviews.llvm.org/D57851 llvm-svn: 353538
* ArgumentPromotion should copy all metadata to new FunctionTeresa Johnson2019-02-082-9/+24
| | | | | | | | | | | | | | | | | | | Summary: ArgumentPromotion had code to specifically move the dbg metadata over to the new function, but other metadata such as the function_entry_count !prof metadata was not. Replace code that moved dbg metadata with a call to copyMetadata. The old metadata is automatically removed when the old Function is removed. Reviewers: davidxl Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57846 llvm-svn: 353537
* [X86] Remove isReMaterializable from X87 floating point constant loads and ↵Craig Topper2019-02-082-4/+2
| | | | | | | | | | | | | | | | | | constant pool loads. Summary: These instructions update FPSW so they aren't generically safe to rematerialize into any location if FPSW is live for a comparison result. They also use FPCW for exception masking control. Though the only exception they can generate is stack overflow and we manage the stack ourselves so that's not really going to occur. Reviewers: RKSimon, spatel Reviewed By: RKSimon Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57934 llvm-svn: 353536
* [clang-tidy] Add options to bugprone-argument-comment to add missing ↵Paul Hoad2019-02-085-12/+354
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | argument comments to literals bugprone-argument-comment only supports identifying those comments which do not match the function parameter name This revision add 3 options to adding missing argument comments to literals (granularity on type is added to control verbosity of fixit) ``` CheckOptions: - key: bugprone-argument-comment.CommentBoolLiterals value: '1' - key: bugprone-argument-comment.CommentFloatLiterals value: '1' - key: bugprone-argument-comment.CommentIntegerLiterals value: '1' - key: bugprone-argument-comment.CommentStringLiterals value: '1' - key: bugprone-argument-comment.CommentCharacterLiterals value: '1' - key: bugprone-argument-comment.CommentUserDefinedLiterals value: '1' - key: bugprone-argument-comment.CommentNullPtrs value: '1' ``` After applying these options, literal arguments will be preceded with /*ParameterName=*/ Reviewers: JonasToth, Eugene.Zelenko, alexfh, hokein, aaron.ballman Reviewed By: aaron.ballman, Eugene.Zelenko Differential Revision: https://reviews.llvm.org/D57674 llvm-svn: 353535
* [X86] Add basic funnel shift demanded bits testsSimon Pilgrim2019-02-081-0/+48
| | | | llvm-svn: 353534
* [x86] fix formatting; NFCSanjay Patel2019-02-081-1/+1
| | | | | | (test commit #2 migrating to git) llvm-svn: 353533
* [ASTMatchers][NFC] Update comments on assorted `CXXMemberCallExpr` matchers.Yitzhak Mandelbaum2019-02-082-47/+137
| | | | | | | | | | | | | | | | Specifically: * fixes the comments on `hasObjectExpression`, * clarifies comments on `thisPointerType` and `on`, * adds comments to `onImplicitObjectArgument`. It also updates associated reference docs (using the doc tool). Reviewers: alexfh, steveire, aaron.ballman Differential Revision: https://reviews.llvm.org/D56849 llvm-svn: 353532
* [Format/ObjC] Fix [foo bar]->baz formatting as lambda arrowBen Hamilton2019-02-083-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently, `UnwrappedLineParser` thinks an arrow token after an ObjC method expression is a C++ lambda arrow, so it formats: ``` [foo bar]->baz ``` as: ``` [foo bar] -> baz ``` Because `UnwrappedLineParser` runs before `TokenAnnotator`, it can't know if the arrow token is after an ObjC method expression or not. This diff makes `TokenAnnotator` remove the TT_LambdaArrow on the arrow token if it follows an ObjC method expression. Test Plan: New test added. Ran test with: % ninja FormatTests && ./tools/clang/unittests/Format/FormatTests Confirmed test failed before diff and passed after diff. Reviewers: krasimir, djasper, sammccall Reviewed By: sammccall Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57923 llvm-svn: 353531
* [AMDGPU] Fix CS scratch setup on pre-GCN3 ASICsCarl Ritson2019-02-082-3/+8
| | | | | | | | | | | | | | | | Summary: Prior to GCN3 s_load_dword offsets are in dwords rather than bytes. Thus the scratch buffer descriptor offset must be adjusted for pre-GCN3 ASICs. Reviewers: nhaehnle, tpr Reviewed By: nhaehnle Subscribers: sheredom, arsenm, kzhuravl, jvesely, wdng, yaxunl, dstuttard, t-tye, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D56496 llvm-svn: 353530
* [opaque pointer types] Cleanup CGBuilder's Create*GEP.James Y Knight2019-02-0839-353/+400
| | | | | | | | | | | | | | | | | | | | | | | Some of these functions take some extraneous arguments, e.g. EltSize, Offset, which are computable from the Type and DataLayout. Add some asserts to ensure that the computed values are consistent with the passed-in values, in preparation for eliminating the extraneous arguments. This also asserts that the Type is an Array for the calls named "Array" and a Struct for the calls named "Struct". Then, correct a couple of errors: 1. Using CreateStructGEP on an array type. (this causes the majority of the test differences, as struct GEPs are created with i32 indices, while array GEPs are created with i64 indices) 2. Passing the wrong Offset to CreateStructGEP in TargetInfo.cpp on x86-64 NACL (which uses 32-bit pointers). Differential Revision: https://reviews.llvm.org/D57766 llvm-svn: 353529
* [scudo][standalone] Correct cmake copy/paste errorKostya Kortchinsky2019-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: I mistakenly used a SCUDO variable instead of SCUDO_STANDALONE one. The net result was that there were more architecture supported than I intended. Correct that, I'll add more architectures once the bots are enabled and green for x86. Reviewers: eugenis, vitalybuka Reviewed By: vitalybuka Subscribers: mgorny, delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D57897 llvm-svn: 353528
* Revert r353416 "[DAG] Cleanup unused nodes on failed store-to-load forward ↵Nirav Dave2019-02-081-21/+9
| | | | | | | | combine." This cleanup causes out-of-tree crashes. llvm-svn: 353527
* AMDGPU/GlobalISel: Fix shift legalization for non-power-of-2Matt Arsenault2019-02-082-0/+87
| | | | | | | | clampScalar doesn't do anything for non-power-of-2 in range. There should probably be a combination rule to reduce the number of matching rules. llvm-svn: 353526
* [clang-tidy][NFC] Fix typo.Yitzhak Mandelbaum2019-02-081-1/+1
| | | | | | Fix placement of comma from previous (test) commit. llvm-svn: 353525
* [AMDGPU][MC] Added support of lds_direct operandDmitry Preobrazhensky2019-02-089-1/+301
| | | | | | | | | | See bug 39293: https://bugs.llvm.org/show_bug.cgi?id=39293 Reviewers: artem.tamazov, rampitec Differential Revision: https://reviews.llvm.org/D57889 llvm-svn: 353524
* [clang-tidy][NFC] Test commit. Add missing comma.Yitzhak Mandelbaum2019-02-081-2/+2
| | | | llvm-svn: 353523
* AMDGPU/GlobalISel: Fix non-power-of-2 implicit_defMatt Arsenault2019-02-082-1/+30
| | | | llvm-svn: 353522
* [llvm-objcopy] Add few file processing directivesEugene Leviant2019-02-086-5/+78
| | | | | | Differential revision: https://reviews.llvm.org/D57877 llvm-svn: 353521
* [MIPS GlobalISel] Select any extending load and truncating storePetar Avramovic2019-02-089-76/+552
| | | | | | | | | | | | | | | | | | Make behavior of G_LOAD in widenScalar same as for G_ZEXTLOAD and G_SEXTLOAD. That is perform widenScalarDst to size given by the target and avoid additional checks in common code. Targets can reorder or add additional rules in LegalizeRuleSet for the opcode to achieve desired behavior. Select extending load that does not have specified type of extension into zero extending load. Select truncating store that stores number of bytes indicated by size in MachineMemoperand. Differential Revision: https://reviews.llvm.org/D57454 llvm-svn: 353520
* gn build: Merge r353471, r353373.Nico Weber2019-02-086-6/+8
| | | | llvm-svn: 353518
* AMDGPU/GlobalISel: Don't use a copy in addrspacecast loweringMatt Arsenault2019-02-082-37/+37
| | | | llvm-svn: 353516
* [AMDGPU][MC][CODEOBJECT] Added predefined symbols to access GPU minor and ↵Dmitry Preobrazhensky2019-02-083-6/+32
| | | | | | | | | | | | | | stepping numbers Added the following Code Object v3 symbols: .amdgcn.gfx_generation_minor .amdgcn.gfx_generation_stepping Reviewers: artem.tamazov, kzhuravl Differential Revision: https://reviews.llvm.org/D57826 llvm-svn: 353515
* [clangd] Fix an assertion in TypoCorrection.Eric Liu2019-02-082-6/+22
| | | | | | | | | | | | | | Summary: https://github.com/clangd/clangd/issues/7 Reviewers: sammccall, hokein Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57944 llvm-svn: 353514
* [AMDGPU] Fix DPP combinerValery Pykhtin2019-02-087-424/+654
| | | | | | | | | | | | | Differential revision: https://reviews.llvm.org/D55444 dpp move with uses and old reg initializer should be in the same BB. bound_ctrl:0 is only considered when bank_mask and row_mask are fully enabled (0xF). Otherwise the old register value is checked for identity. Added add, subrev, and, or instructions to the old folding function. Kill flag is cleared for the src0 (DPP register) as it may be copied into more than one user. The pass is still disabled by default. llvm-svn: 353513
* [DWARF] LLVM ERROR: Broken function found, while removing Debug Intrinsics.Carlos Alberto Enciso2019-02-083-5/+54
| | | | | | | | Check that when SimplifyCFG is flattening a 'br', all their debug intrinsic instructions are removed, including any dbg.label referencing a label associated with the basic blocks being removed. Differential Revision: https://reviews.llvm.org/D57444 llvm-svn: 353511
* Attempt to fix build bot after r353509Eugene Leviant2019-02-081-1/+0
| | | | llvm-svn: 353510
* [llvm-objcopy] Add --redefine-symsEugene Leviant2019-02-085-4/+69
| | | | | | Differential revision: https://reviews.llvm.org/D57738 llvm-svn: 353509
* [LLD][ELF]Add test for missing thin archive memberJames Henderson2019-02-081-0/+24
| | | | | | | | | | | | The code producing error messages relating to missing thin archive members was missing any testing as far as I could see, so this patch adds a test for it. Reviewed by: ruiu Differential Revision: https://reviews.llvm.org/D57899 llvm-svn: 353508
* Revert r353424 "[llvm-ar][libObject] Fix relative paths when nesting thin ↵Hans Wennborg2019-02-085-79/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | archives." This broke the Chromium build on Windows, see https://crbug.com/930058 > Summary: > When adding one thin archive to another, we currently chop off the relative path to the flattened members. For instance, when adding `foo/child.a` (which contains `x.txt`) to `parent.a`, whe > lattening it we should add it as `foo/x.txt` (which exists) instead of `x.txt` (which does not exist). > > As a note, this also undoes the `IsNew` parameter of handling relative paths in r288280. The unit test there still passes. > > This was reported as part of testing the kernel build with llvm-ar: https://patchwork.kernel.org/patch/10767545/ (see the second point). > > Reviewers: mstorsjo, pcc, ruiu, davide, david2050 > > Subscribers: hiraditya, llvm-commits > > Tags: #llvm > > Differential Revision: https://reviews.llvm.org/D57842 This reverts commit bf990ab5aab03aa0aac53c9ef47ef264307804ed. llvm-svn: 353507
* [MIPS GlobalISel] Select mulPetar Avramovic2019-02-086-0/+367
| | | | | | | | Legalize and select G_MUL for s32 and smaller types for MIPS32. Differential Revision: https://reviews.llvm.org/D57816 llvm-svn: 353506
* [ASTImporter][ASTImporterSpecificLookup] Add test for different operatorsGabor Marton2019-02-081-0/+60
| | | | | | | | | | | | | | | | | Summary: This is to check that operators are handled properly in `ASTImporterSpecificLookup`. Note, this lookup table is not used in LLDB, only in CTU. Reviewers: a_sidorin, shafik, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57905 llvm-svn: 353505
* [AST] Fix structural inequivalence of operatorsGabor Marton2019-02-082-0/+33
| | | | | | | | | | | | | | Summary: Operators kind was not checked, so we reported e.g. op- to be equal with op+ Reviewers: shafik, a_sidorin, aaron.ballman Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57902 llvm-svn: 353504
* [NFC] Fix license headers after r352845Aleksandr Urakov2019-02-085-20/+15
| | | | llvm-svn: 353503
* [LoopSimplifyCFG] Use DTU.applyUpdates instead of insert/deleteEdgeMax Kazantsev2019-02-082-32/+120
| | | | | | | | | | | `insert/deleteEdge` methods in DTU can make updates incorrectly in some cases (see https://bugs.llvm.org/show_bug.cgi?id=40528), and it is recommended to use `applyUpdates` methods instead when it is needed to make a mass update in CFG. Differential Revision: https://reviews.llvm.org/D57316 Reviewed By: kuhar llvm-svn: 353502
OpenPOWER on IntegriCloud