summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [CUDA][HIP] Check calling convention based on function targetYaxun Liu2019-02-262-1/+33
| | | | | | | | | | | | MSVC header files using vectorcall to differentiate overloaded functions, which causes failure for AMDGPU target. This is because clang does not check function calling convention based on function target. This patch checks calling convention using the proper target info. Differential Revision: https://reviews.llvm.org/D57716 llvm-svn: 354929
* [OPENMP][CUDA]Do not emit warnings for variables in late-reported asmAlexey Bataev2019-02-264-51/+69
| | | | | | | | | | | | statements. If the assembler instruction is not generated and the delayed diagnostic is emitted, we may end up with extra warning message for variables used in the asm statement. Since the asm statement is not built, the variables may be left non-referenced and it may produce a warning about a use of the non-initialized variables. llvm-svn: 354928
* [X86] Add 'znver2' and 'cascadelake' support to __cpu_indicator_init.Craig Topper2019-02-261-6/+20
| | | | | | | | For 'cascadelake' this is adding a 'avx512vnni' feature check to the 0x55 skylake-avx512 model check. These CPUs use the same model number and only differ in the stepping number. But the feature flag is simpler than collecting all the stepping numbers. For 'znver2' this is just syncing with LLVM's Host.cpp. llvm-svn: 354927
* [AMDGPU] Fixed hang during DAG combineStanislav Mekhanoshin2019-02-262-1/+18
| | | | | | | | | | | | | SITargetLowering::reassociateScalarOps() does not touch constants so that DAGCombiner::ReassociateOps() does not revert the combine. However a global address is not a ConstantSDNode. Switched to the method used by DAGCombiner::ReassociateOps() itself to detect constants. Differential Revision: https://reviews.llvm.org/D58695 llvm-svn: 354926
* [OPENMP]Delay emission for unsupported va_arg expression.Alexey Bataev2019-02-262-0/+45
| | | | | | | If the OpenMP device is NVPTX and va_arg is used, delay emission of the error for va_arg unless it is used in the device code. llvm-svn: 354925
* [MS] Don't emit coverage for deleting dtorsReid Kleckner2019-02-262-3/+86
| | | | | | | | | | | | | | | | | | | Summary: The MS C++ ABI has no constructor variants, but it has destructor variants, so we should move the deleting destructor variant check outside the check for "does the ABI have constructor variants". Fixes PR37561, so basic code coverage works on Windows with C++. Reviewers: vsk Subscribers: jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58691 llvm-svn: 354924
* Fix a small comment typo.Eric Christopher2019-02-261-1/+1
| | | | llvm-svn: 354923
* [lldb] [unittests] Use non-empty format string for Timer()Michal Gorny2019-02-261-5/+5
| | | | | | | | | | | Pass dummy '.' as format string for Timer() rather than an empty string, in order to silence gcc warnings about empty format string (-Wformat-zero-length). The actual format string is irrelevant to the test in question. Differential Revision: https://reviews.llvm.org/D58680 llvm-svn: 354922
* [X86] Fix bug in vectorcall calling conventionReid Kleckner2019-02-262-1/+31
| | | | | | | | | | | Original implementation can't correctly handle __m256 and __m512 types passed by reference through stack. This patch fixes it. Patch by Wei Xiao! Differential Revision: https://reviews.llvm.org/D57643 llvm-svn: 354921
* [lldb] [lit] Set LD_LIBRARY_PATH or alike for Suite testsMichal Gorny2019-02-262-0/+24
| | | | | | | | | | | | | | | | Set LD_LIBRARY_PATH or local platform's equivalent of it when running the 'Suite' tests. This is necessary when running tests inside build tree with BUILD_SHARED_LIBS enabled, in order to make the LLDB modules load freshly built LLVM libraries. The code is copied from clang (test/Unit/lit.cfg). SHLIBDIR substitution is added to site-config (already present in top-level LLDB site-config) to future-proof this into supporting stand-alone builds with shared LLDB libraries. Differential Revision: https://reviews.llvm.org/D58610 llvm-svn: 354920
* [MemorySSA & SimpleLoopUnswitch] Update MemorySSA in ReplaceUsesOfWith.Alina Sbirlea2019-02-262-5/+162
| | | | | | | SimpleLoopUnswitch must update MemorySSA when removing instructions. Resolves PR39197. llvm-svn: 354919
* [libFuzzer] fix missing close on opened fileVitaly Buka2019-02-261-0/+1
| | | | | | | | | | | | | | | | | | | | Summary: When running the standalone main on a large corpus, I eventually get a EMFILE error ("Too many open files"). Patch by Paul Chaignon Reviewers: kcc, vitalybuka Reviewed By: vitalybuka Subscribers: lebedev.ri, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D58622 llvm-svn: 354918
* Output ELF files after ThinLTO is run.Bill Wendling2019-02-263-12/+57
| | | | | | | | | | | | | | | | | | Summary: The gold linker allowed you to output the ELF files after LTO was run. It did it by using the 'obj-path' option. This replicates that behavior. Reviewers: espindola, ruiu, MaskRay, pcc Reviewed By: MaskRay, pcc Subscribers: grimar, emaste, inglorion, arichardson, steven_wu, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D56046 llvm-svn: 354917
* [ASTImporter] Add support for importing ChooseExpr AST nodes.Tom Roeder2019-02-269-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This allows ASTs to be merged when they contain ChooseExpr (the GNU __builtin_choose_expr construction). This is needed, for example, for cross-CTU analysis of C code that makes use of __builtin_choose_expr. The node is already supported in the AST, but it didn't have a matcher in ASTMatchers. So, this change adds the matcher and adds support to ASTImporter. This was originally reviewed and approved in https://reviews.llvm.org/D58292 and submitted as r354832. It was reverted in r354839 due to failures on the Windows CI builds. This version fixes the test failures on Windows, which were caused by differences in template expansion between versions of clang on different OSes. The version of clang built with MSVC and running on Windows never expands the template in the C++ test in ImportExpr.ImportChooseExpr in clang/unittests/AST/ASTImporter.cpp, but the version on Linux does for the empty arguments and -fms-compatibility. So, this version of the patch drops the C++ test for __builtin_choose_expr, since that version was written to catch regressions of the logic for isConditionTrue() in the AST import code for ChooseExpr, and those regressions are also caught by ASTImporterOptionSpecificTestBase.ImportChooseExpr, which does work on Windows. Reviewers: shafik, a_sidorin, martong, aaron.ballman, rnk, a.sidorin Subscribers: cfe-commits, jdoerfert, rnkovacs, aaron.ballman Tags: #clang Differential Revision: https://reviews.llvm.org/D58663 llvm-svn: 354916
* [X86] Add 'znver2' and 'cascadelake' to the __builtin_cpu_is test.Craig Topper2019-02-261-0/+1
| | | | | | These are supported by at least libgcc trunk so we can include them now. llvm-svn: 354915
* Mention predicting exception catch at throw siteJim Ingham2019-02-262-0/+47
| | | | llvm-svn: 354914
* [X86] Use X86_CPU_SUBTYPE_COMPAT for 'cascadelake' cpu.Craig Topper2019-02-261-1/+5
| | | | | | This CPU is supported by at least libgcc trunk now so we should make it available to __builtin_cpu_is. llvm-svn: 354913
* [lit] Allow setting parallelism groups to NoneJulian Lettner2019-02-266-6/+45
| | | | | | | | | | | | | | | | | | | Check that we do not crash if a parallelism group is explicitly set to None. Permits usage of the following pattern. [lit.common.cfg] lit_config.parallelism_groups['my_group'] = None if <condition>: lit_config.parallelism_groups['my_group'] = 3 [project/lit.cfg] config.parallelism_group = 'my_group' Reviewers: rnk Differential Revision: https://reviews.llvm.org/D58305 llvm-svn: 354912
* Update docs of memcpy/move/set wrt. align and lenKristina Brooks2019-02-261-7/+19
| | | | | | | | | | | | | | | Fix https://bugs.llvm.org/show_bug.cgi?id=38583: Describe how memcpy/memmove/memset behave when len=0. Also fix some fallout from when the alignment parameter was replaced by an attribute. This closes PR38583. Patch by RalfJung (Ralf) Differential Revision: https://reviews.llvm.org/D57600 llvm-svn: 354911
* [TableGen] Make OpcodeMappings sort comparator deterministic NFCIAndrew Ng2019-02-261-18/+16
| | | | | | | | | | The previous sort comparator was not deterministic, i.e. in some situations it would be possible for lhs < rhs && rhs < lhs. This was discovered by an STL assertion in a Windows debug build of llvm-tblgen. Differential Revision: https://reviews.llvm.org/D58687 llvm-svn: 354910
* [AMDGPU] Allow using integral non-type template parametersMichael Liao2019-02-267-47/+300
| | | | | | | | | | | | | | | | | | | Summary: - Allow using integral non-type template parameters in the following attributes __attribute__((amdgpu_flat_work_group_size(<min>, <max>))) __attribute__((amdgpu_waves_per_eu(<min>[, <max>]))) Reviewers: kzhuravl, yaxunl Subscribers: jvesely, wdng, nhaehnle, dstuttard, tpr, t-tye, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58623 llvm-svn: 354909
* Fixed a minor merge error with this patch.Mitch Phillips2019-02-261-1/+1
| | | | llvm-svn: 354908
* [compiler-rt] Provide better llvm-lit failure when llvm-config fails.Mitch Phillips2019-02-261-1/+2
| | | | | | | | | | | | | | | | | | | Summary: The current error message can cause confusion if llvm-config can't be executed for reasons other than "not found". In my example, cross compiling generated an llvm-config binary for aarch64 which couldn't be executed natively. Instead of telling me that the error was with the file architecture, it reports the file as not being present. Reviewers: pcc Subscribers: dberris, javed.absar, kristof.beyls, jdoerfert, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D58647 llvm-svn: 354907
* Revert "[compiler-rt] Intercept the bcmp() function."Vlad Tsyrklevich2019-02-268-91/+28
| | | | | | | This reverts commits r354851, 354852, 354853 and r354888. They were causing build failures on the android sanitizer bot. llvm-svn: 354906
* [InstSimplify] remove zero-shift-guard fold for general funnel shiftSanjay Patel2019-02-262-29/+54
| | | | | | | | | | | | | | | | | | | | | | As discussed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2019-February/130491.html We can't remove the compare+select in the general case because we are treating funnel shift like a standard instruction (as opposed to a special instruction like select/phi). That means that if one of the operands of the funnel shift is poison, the result is poison regardless of whether we know that the operand is actually unused based on the instruction's particular semantics. The motivating case for this transform is the more specific rotate op (rather than funnel shift), and we are preserving the fold for that case because there is no chance of introducing extra poison when there is no anonymous extra operand to the funnel shift. llvm-svn: 354905
* Remove P1272R1, it was not moved in KonaMarshall Clow2019-02-261-1/+0
| | | | llvm-svn: 354904
* [clang-tidy] undo bitfields in ExceptionAnalyzerJonas Toth2019-02-261-4/+2
| | | | | | | Scoped enums do induce some problems with some MSVC and GCC versions if used as bitfields. Therefor this is deactivated for now. llvm-svn: 354903
* [libFuzzer] Remove extra semicolonsJonathan Metzman2019-02-263-5/+5
| | | | | | | | | | | | | | | | | | Summary: Remove extra semicolons so that libFuzzer can compile with -Werror -Wextra-semi Reviewers: Dor1s, morehouse, thakis Reviewed By: Dor1s, morehouse Subscribers: jdoerfert, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D58674 llvm-svn: 354902
* Put a 'first implemented' version into the entry for P1357Marshall Clow2019-02-261-1/+1
| | | | llvm-svn: 354901
* [MIPS GlobalISel] Select G_UADDOPetar Avramovic2019-02-264-1/+67
| | | | | | | | | Lower G_UADDO. Legalize G_UADDO for MIPS32 Differential Revision: https://reviews.llvm.org/D58671 llvm-svn: 354900
* [X86] AMD znver2 enablementGanesh Gopalasubramanian2019-02-267-2/+111
| | | | | | | | | | | | | | | | | This patch enables the following 1) AMD family 17h "znver2" tune flag (-march, -mcpu). 2) ISAs that are enabled for "znver2" architecture. 3) For the time being, it uses the znver1 scheduler model. 4) Tests are updated. 5) This patch is the clang counterpart to D58343 Reviewers: craig.topper Tags: #clang Differential Revision: https://reviews.llvm.org/D58344 llvm-svn: 354899
* Mark several issues (and one paper) as complete. Reviewed as D58099; but I ↵Marshall Clow2019-02-262-8/+8
| | | | | | added LWG3101 and LWG3144 and P1357R1 as well. llvm-svn: 354898
* [X86] AMD znver2 enablementGanesh Gopalasubramanian2019-02-267-5/+31
| | | | | | | | | | | | | | | | This patch enables the following 1) AMD family 17h "znver2" tune flag (-march, -mcpu). 2) ISAs that are enabled for "znver2" architecture. 3) For the time being, it uses the znver1 scheduler model. 4) Tests are updated. 5) Scheduler descriptions are yet to be put in place. Reviewers: craig.topper Differential Revision: https://reviews.llvm.org/D58343 llvm-svn: 354897
* [SystemZ] Wait with selection of legal vector/FP constants until Select().Jonas Paulsson2019-02-269-182/+299
| | | | | | | | | | | | | | | | | | | | | This patch aims to make sure that any such constant that can be generated with a vector instruction (for example VGBM) is recognized as such during legalization and kept as a target independent node through post-legalize DAGCombining. Two new functions named isVectorConstantLegal() and loadVectorConstant() replace old ways of handling vector/FP constants. A new struct named SystemZVectorConstantInfo is used to cache the results of isVectorConstantLegal() and pass them onto loadVectorConstant(). Support for fp128 constants in the presence of FeatureVectorEnhancements1 (z14) has been added. Review: Ulrich Weigand https://reviews.llvm.org/D58270 llvm-svn: 354896
* [scudo][standalone] Introduce platform specific code & mutexesKostya Kortchinsky2019-02-2615-52/+986
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This CL adds the platform specific code for Fuchsia, Linux & Android, as well as some tests related to those (more tests to come later). While some of it is pretty much a straight port of the existing scudo & sanitizer_common code, the memory mapping functions have been reworked a bit to fit the limited usage scenario that Scudo has for them. For Fuchsia, I can now track the Vmar/Vmo pair for memory mappings if there is an intent to grow or decommit some mapping (that will be useful for the Primary). Reviewers: eugenis, vitalybuka, mcgrathr, phosek, flowerhack, morehouse, dmmoore415 Reviewed By: vitalybuka, morehouse Subscribers: kcc, dvyukov, srhines, mgorny, delcypher, jfb, jdoerfert, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D58184 llvm-svn: 354895
* [InstSimplify] add tests for rotate; NFCSanjay Patel2019-02-261-0/+100
| | | | | | | | Rotate is a special-case of funnel shift that has different poison constraints than the general case. That's not visible yet in the existing tests, but it needs to be corrected. llvm-svn: 354894
* [OpenCL] Fix assertion due to blocksYaxun Liu2019-02-262-0/+8
| | | | | | | | | | | | | | | | A recent change caused assertion in CodeGenFunction::EmitBlockCallExpr when a block is called. There is code Func = CGM.getOpenCLRuntime().getInvokeFunction(E->getCallee()); getCalleeDecl calls Expr::getReferencedDeclOfCallee, which does not handle BlockExpr and returns nullptr, which causes isa to assert. This patch fixes that. Differential Revision: https://reviews.llvm.org/D58658 llvm-svn: 354893
* Implement P1357: Traits for [Un]bounded Arrays; adopted in KonaMarshall Clow2019-02-263-0/+171
| | | | llvm-svn: 354891
* Fix short options syntax in Minidump testTatyana Krasnukha2019-02-261-20/+20
| | | | llvm-svn: 354890
* [InstCombine] remove duplicate (but not updated) tests; NFCSanjay Patel2019-02-261-134/+0
| | | | | | | Not sure how it happened, but rL354886 was a duplicate of rL354881, but not updated with rL354887. llvm-svn: 354889
* [compiler-rt] Disable failing test on darwin during investigation.Clement Courbet2019-02-261-0/+1
| | | | | | | | | | | | | | /Users/buildslave/jenkins/workspace/clang-stage1-configure-RA/llvm/projects/compiler-rt/test/asan/TestCases/Posix/bcmp_test.cc:14:12: error: CHECK: expected string not found in input // CHECK: {{#1.*bcmp}} ^ <stdin>:2:57: note: scanning from here ==34677==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffee93777c4 at pc 0x0001068a7285 bp 0x7ffee9377770 sp 0x7ffee9376ef8 ^ <stdin>:6:20: note: possible intended match here #2 0x106888e77 in main bcmp_test.cc:12 ^ llvm-svn: 354888
* [InstCombine] canonicalize more unsigned saturated add with 'not'Sanjay Patel2019-02-262-24/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Yet another pattern variation suggested by: https://bugs.llvm.org/show_bug.cgi?id=14613 There are 8 more potential commuted patterns here on top of the 8 that were already handled (rL354221, rL354276, rL354393). We have the obvious commute of the 'add' + commute of the cmp predicate/operands (ugt/ult) + commute of the select operands: Name: base %notx = xor i32 %x, -1 %a = add i32 %notx, %y %c = icmp ult i32 %x, %y %r = select i1 %c, i32 -1, i32 %a => %c2 = icmp ult i32 %a, %y %r = select i1 %c2, i32 -1, i32 %a Name: ugt %notx = xor i32 %x, -1 %a = add i32 %notx, %y %c = icmp ugt i32 %y, %x %r = select i1 %c, i32 -1, i32 %a => %c2 = icmp ult i32 %a, %y %r = select i1 %c2, i32 -1, i32 %a Name: commute select %notx = xor i32 %x, -1 %a = add i32 %notx, %y %c = icmp ult i32 %y, %x %r = select i1 %c, i32 %a, i32 -1 => %c2 = icmp ult i32 %a, %y %r = select i1 %c2, i32 -1, i32 %a Name: ugt + commute select %notx = xor i32 %x, -1 %a = add i32 %notx, %y %c = icmp ugt i32 %x, %y %r = select i1 %c, i32 %a, i32 -1 => %c2 = icmp ult i32 %a, %y %r = select i1 %c2, i32 -1, i32 %a https://rise4fun.com/Alive/den llvm-svn: 354887
* [InstCombine] add more tests for saturated add; NFCSanjay Patel2019-02-261-0/+134
| | | | llvm-svn: 354886
* [libclang] Avoid crashing when getting layout info of an undeduced type.Emilio Cobos Alvarez2019-02-264-13/+46
| | | | | | | | | | When the type is not deducible, return an error instead of crashing. This fixes https://bugs.llvm.org/show_bug.cgi?id=40813. Differential Revision: https://reviews.llvm.org/D58569 llvm-svn: 354885
* [DAG] Fix constant store folding to handle non-byte sizes.Nirav Dave2019-02-264-19/+34
| | | | | | | | | | | | | | | | Avoid crashes from zero-byte values due to sub-byte store sizes. Reviewers: uabelho, courbet, rnk Reviewed By: courbet Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58626 llvm-svn: 354884
* Fix error handling in Options::ParseTatyana Krasnukha2019-02-261-2/+3
| | | | | | | Moved `if (error.Fail())` to correct place to catch all faulty cases such as "unknown or ambiguous option" which was ignored before. llvm-svn: 354883
* [mips] Emit `.module softfloat` directiveSimon Atanasyan2019-02-263-3/+15
| | | | | | | This change fixes crash on an assertion in case of using `soft float` ABI for mips32r6 target. llvm-svn: 354882
* [InstCombine] add more tests for saturated add; NFCSanjay Patel2019-02-261-0/+134
| | | | llvm-svn: 354881
* [clang-format] SpaceBeforeParens for lambda expressionsAndrew Ng2019-02-262-1/+5
| | | | | | | | | Add support for lambda expressions to the SpaceBeforeParens formatting option. Differential Revision: https://reviews.llvm.org/D58241 llvm-svn: 354880
* [clangd] Index UsingDeclsKadir Cetinkaya2019-02-264-8/+35
| | | | | | | | | | | | | | | | Summary: D58340 enables indexing of USRs, this makes sure test in clangd are aligned with the change Reviewers: hokein Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58341 llvm-svn: 354879
OpenPOWER on IntegriCloud