summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [Driver] Add .hasAnySanitizer() to SanitizerArgsMichal Gorny2018-12-191-0/+1
| | | | | | | | | | Add a simple method to query whether any sanitizer was enabled, via SanitizerArgs. This will be used in the NetBSD driver to pass additional definitions that are required by all sanitizers. Differential Revision: https://reviews.llvm.org/D55832 llvm-svn: 349649
* [Basic] Correct description of SanitizerSet.empty()Michal Gorny2018-12-191-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D55830 llvm-svn: 349648
* [Driver] Disable -faddrsig by default on NetBSDMichal Gorny2018-12-191-1/+2
| | | | | | | | | | Avoid passing -faddrsig by default on NetBSD. This platform is still using old GNU binutils that crashes on executables containing those sections. Differential Revision: https://reviews.llvm.org/D55828 llvm-svn: 349647
* Regenerate testSimon Pilgrim2018-12-191-48/+96
| | | | llvm-svn: 349646
* [sanitizer_common] Fix sha2 interceptors not to use vars in array lenMichal Gorny2018-12-191-1/+2
| | | | | | | | | | | | Fix the sha2 interceptor macros to use a constant for array parameter length rather than referencing the extern variable. Since the digest length is provided in hash name, reuse the macro parameter for it. Verify that the calculated value matches the one provided by system headers. Differential Revision: https://reviews.llvm.org/D55811 llvm-svn: 349645
* Test commitAnton Afanasyev2018-12-191-4/+4
| | | | | | Fix typos. llvm-svn: 349644
* [X86] Remove already upgraded llvm.x86.avx512.mask.padds/psubs testsSimon Pilgrim2018-12-191-198/+0
| | | | | | Duplicate tests have already been moved to avx512bw-intrinsics-upgrade.ll llvm-svn: 349643
* [lit] Make TestConvenienceVariables a cpp fileJonas Devlieghere2018-12-194-9/+14
| | | | | | | | | | | The build.py script always runs the compiler in C++ mode, regardless of the file extension. This results in mangled names presented to the linker which in turn cannot find the printf symbol. While we figure out how to solve this issue I've turned the source file into a cpp file and added extern c. This should unbreak the bots. llvm-svn: 349642
* [ValueTracking] remove unused parameters from helper functions; NFCSanjay Patel2018-12-191-23/+16
| | | | llvm-svn: 349641
* [BPF] Generate BTF DebugInfo under BPF targetYonghong Song2018-12-1943-0/+3916
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements BTF (BPF Type Format). The BTF is the debug info format for BPF, introduced in the below linux patch: https://github.com/torvalds/linux/commit/69b693f0aefa0ed521e8bd02260523b5ae446ad7#diff-06fb1c8825f653d7e539058b72c83332 and further extended several times, e.g., https://www.spinics.net/lists/netdev/msg534640.html https://www.spinics.net/lists/netdev/msg538464.html https://www.spinics.net/lists/netdev/msg540246.html The main advantage of implementing in LLVM is: . better integration/deployment as no extra tools are needed. . bpf JIT based compilation (like bcc, bpftrace, etc.) can get BTF without much extra effort. . BTF line_info needs selective source codes, which can be easily retrieved when inside the compiler. This patch implemented BTF generation by registering a BPF specific DebugHandler in BPFAsmPrinter. Signed-off-by: Yonghong Song <yhs@fb.com> Differential Revision: https://reviews.llvm.org/D55752 llvm-svn: 349640
* Add missing include to test. NFCMarshall Clow2018-12-191-0/+1
| | | | llvm-svn: 349639
* [gn build] Merge r349605Nico Weber2018-12-191-0/+3
| | | | llvm-svn: 349638
* [Object] Deduplicate long archive member namesPeter Wu2018-12-192-7/+24
| | | | | | | | | | | | | Summary: Import libraries as created by llvm-dlltool always use the same archive member name for every object file (namely, the DLL library name). Ensure that long names are not repeatedly stored in the string table. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D55860 llvm-svn: 349637
* [clang-tidy] Diagnose abseil-duration-comparison on macro argumentsHyrum Wright2018-12-195-20/+58
| | | | | | | | | | | | Summary: This change relaxes the requirements on the utility `rewriteExprFromNumberToDuration` function, and introduces new checking inside of the `abseil-duration-comparison` check to allow macro argument expression transformation. Differential Revision: https://reviews.llvm.org/D55784 llvm-svn: 349636
* [OpenMP] Fix data sharing analysis in nested clauseJoel E. Denny2018-12-192-7/+13
| | | | | | | | | | | | | | | | | | | | | | Without this patch, clang doesn't complain that X needs explicit data sharing attributes in the following: ``` #pragma omp target teams default(none) { #pragma omp parallel num_threads(X) ; } ``` However, clang does produce that complaint after the braces are removed. With this patch, clang complains in both cases. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D55861 llvm-svn: 349635
* [compiler-rt][builtins][PowerPC] Enable builtins tests on PowerPC 64 bit LEAmy Kwan2018-12-197-15/+17
| | | | | | | | | | | | This patch aims to enable the tests for the compiler-rt builtin functions (that currently already exist within compiler-rt) for PowerPC 64bit LE (ppc64le). Previously when unit tests are run, these tests would be reported as UNSUPPORTED. This patch updates the REQUIRES line for each test (to enable for ppc64le), and each test is linked against compiler-rt when running. Differential Revision: https://reviews.llvm.org/D54449 llvm-svn: 349634
* Test commitAmy Kwan2018-12-191-0/+1
| | | | llvm-svn: 349633
* [clangd] Fix a syntax error on the test.Haojian Wu2018-12-191-1/+1
| | | | llvm-svn: 349632
* [X86][SSE] Auto upgrade PADDUS/PSUBUS intrinsics to UADD_SAT/USUB_SAT ↵Simon Pilgrim2018-12-195-133/+44
| | | | | | | | | | generic intrinsics (clang) Sibling patch to D55855, this emits UADD_SAT/USUB_SAT generic intrinsics for the SSE saturated math intrinsics instead of expanding to a IR code sequence that could be difficult to reassemble. Differential Revision: https://reviews.llvm.org/D55879 llvm-svn: 349631
* [X86][SSE] Auto upgrade PADDUS/PSUBUS intrinsics to UADD_SAT/USUB_SAT ↵Simon Pilgrim2018-12-195-348/+184
| | | | | | | | | | | | | | generic intrinsics (llvm) Now that we use the generic ISD opcodes, we can use the generic intrinsics directly as well. This fixes the poor fast-isel codegen by not expanding to an easily broken IR code sequence. I'm intending to deal with the signed saturation equivalents as well. Clang counterpart: https://reviews.llvm.org/D55879 Differential Revision: https://reviews.llvm.org/D55855 llvm-svn: 349630
* [SelectionDAG] Optional handling of UNDEF elements in matchBinaryPredicate ↵Simon Pilgrim2018-12-192-12/+6
| | | | | | | | | | | | | | (part 2 of 2) Now that SimplifyDemandedBits/SimplifyDemandedVectorElts is simplifying vector elements, we're seeing more constant BUILD_VECTOR containing undefs. This patch provides opt-in support for UNDEF elements in matchBinaryPredicate, passing NULL instead of the result ConstantSDNode* argument. I've updated the (or (and X, c1), c2) -> (and (or X, c2), c1|c2) fold to demonstrate its use, which I believe is safe for undef cases. Differential Revision: https://reviews.llvm.org/D55822 llvm-svn: 349629
* [SelectionDAG] Optional handling of UNDEF elements in matchBinaryPredicate ↵Simon Pilgrim2018-12-192-9/+17
| | | | | | | | | | | | (part 1 of 2) Now that SimplifyDemandedBits/SimplifyDemandedVectorElts is simplifying vector elements, we're seeing more constant BUILD_VECTOR containing undefs. This patch provides opt-in support for UNDEF elements in matchBinaryPredicate, passing NULL instead of the result ConstantSDNode* argument. Differential Revision: https://reviews.llvm.org/D55822 llvm-svn: 349628
* Portable Python script across Python versionSerge Guelton2018-12-194-11/+20
| | | | | | | | | urllib2 as been renamed into urllib and the library layout has changed. Workaround that in a consistent manner. Differential Revision: https://reviews.llvm.org/D55199 llvm-svn: 349627
* [Index] Index paremeters in lambda expressions.Haojian Wu2018-12-192-0/+14
| | | | | | | | | | | | Summary: This fixes clangd couldn't find references for lambda parameters. Reviewers: ilya-biryukov Subscribers: ioeric, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D55437 llvm-svn: 349626
* [TargetLowering] Fix propagation of undefs in zero extension ops (PR40091)Simon Pilgrim2018-12-194-15/+34
| | | | | | | | | | | | As described on PR40091, we have several places where zext (and zext_vector_inreg) fold an undef input into an undef output. For zero extensions this is incorrect as the output should guarantee to least have the new upper bits set to zero. SimplifyDemandedVectorElts is the worst offender (and its the most likely to cause new undefs to appear) but DAGCombiner's tryToFoldExtendOfConstant has a similar issue. Thanks to @dmgreen for catching this. Differential Revision: https://reviews.llvm.org/D55883 llvm-svn: 349625
* Let TableGen write output only if it changed, instead of doing so in cmake, ↵Nico Weber2018-12-193-29/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | attempt 2 This relands r330742: """ Let TableGen write output only if it changed, instead of doing so in cmake. Removes one subprocess and one temp file from the build for each tablegen invocation. No intended behavior change. """ In particular, if you see rebuilds after this change that you didn't see before this change, that's unintended and it's fine to revert this change again (but let me know). r330742 got reverted because some people reported that llvm-tblgen ran on every build after it. This could happen if the depfile output got deleted without deleting the main .inc output. To fix, make TableGen always write the depfile, but keep writing the main .inc output only if it has changed. This matches what we did in cmake before. Differential Revision: https://reviews.llvm.org/D55842 llvm-svn: 349624
* [clang-tidy] use "const SourceManager&" parameter, NFC.Haojian Wu2018-12-191-3/+3
| | | | llvm-svn: 349623
* Fix test MC/AMDGPU/reloc.sNicolai Haehnle2018-12-191-2/+2
| | | | | | | Missed this change in r349620 Change-Id: I5123e31ed4bb99ad6903b9ede4de4dbe2cc6d453 llvm-svn: 349622
* [X86][SSE] Remove use of SSE ADDS/SUBS saturation intrinsics from ↵Simon Pilgrim2018-12-196-64/+64
| | | | | | | | | | schedule/stack tests These are due to be upgraded soon, but good to replace them with generic llvm sadd_sat/ssub_sat intrinsics now. The avx512 masked cases need doing as well but require a bit of tidyup first. llvm-svn: 349621
* AMDGPU: Use an ABS32_LO relocation for SCRATCH_RSRC_DWORD1Nicolai Haehnle2018-12-192-4/+6
| | | | | | | | | | | | | | | | | | | Summary: Using HI here makes no logical sense, since the dword is only 32 bits to begin with. Current Mesa master does not look at the relocation type at all, so this change is fine. Future Mesa will rely on this, however. Change-Id: I91085707834c4ac0370926602b93c94b90e44cb1 Reviewers: arsenm, rampitec, mareko Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D55369 llvm-svn: 349620
* Reimplement Thread Static Data ASan routines with TLSKamil Rytarowski2018-12-191-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Thread Static Data cannot be used in early init on NetBSD and FreeBSD. Reuse the ASan TSD API for compatibility with existing code with an alternative implementation using Thread Local Storage. New version uses Thread Local Storage to store a pointer with thread specific data. The destructor from TSD has been replaced with a TLS destrucutor that is called upon thread exit. Reviewers: joerg, vitalybuka, jfb Reviewed By: vitalybuka Subscribers: dim, emaste, ro, jfb, devnexen, kubamracek, mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D55596 llvm-svn: 349619
* [clangd] Unify path canonicalizations in the codebaseKadir Cetinkaya2018-12-195-76/+64
| | | | | | | | | | | | | | Summary: There were a few different places where we canonicalized paths, each one had its own flavor. This patch tries to unify them all under one place. Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D55818 llvm-svn: 349618
* [llvm-objdump] - Fix one more BB.George Rimar2018-12-191-1/+4
| | | | | | | | | Should fix the http://lab.llvm.org:8011/builders/polly-amd64-linux/builds/25876/steps/build/logs/stdio: /home/grosser/buildslave/polly-amd64-linux/llvm.src/tools/llvm-objdump/llvm-objdump.cpp:539:25: error: conditional expression is ambiguous; 'std::string' (aka 'basic_string<char>') can be converted to 'typename std::remove_reference<StringRef>::type' (aka 'llvm::StringRef') and vice versa Target = Demangle ? demangle(*SymName) : *SymName; llvm-svn: 349617
* [SelectionDAG] Optional handling of UNDEF elements in matchUnaryPredicateSimon Pilgrim2018-12-195-30/+25
| | | | | | | | | | | | Now that SimplifyDemandedBits/SimplifyDemandedVectorElts are simplifying vector elements, we're seeing more constant BUILD_VECTOR containing UNDEFs. This patch provides opt-in handling of UNDEF elements in matchUnaryPredicate, passing NULL instead of the ConstantSDNode* argument. I've updated SelectionDAG::simplifyShift to demonstrate its use. Differential Revision: https://reviews.llvm.org/D55819 llvm-svn: 349616
* [X86][SSE] Remove SSE ADDUS/SUBUS saturation intrinsics from schedule/stack ↵Simon Pilgrim2018-12-196-64/+64
| | | | | | | | | | tests These are already being autoupgraded, currently to an IR sequence, but best to replace them with generic llvm uadd_sat/usub_sat intrinsics (which D55855 will be doing shortly anyhow). The avx512 masked cases need doing as well but require a bit of tidyup first. llvm-svn: 349615
* [llvm-objdump] - Fix BB.George Rimar2018-12-191-16/+15
| | | | | | Move the helper method before the first incocation in the file. llvm-svn: 349614
* [llvm-objdump] - Demangle the symbols when printing symbol table and ↵George Rimar2018-12-192-27/+51
| | | | | | | | | | | | | | | relocations. This is https://bugs.llvm.org/show_bug.cgi?id=40009, llvm-objdump does not demangle the symbols when prints symbol table and/or relocations. Patch teaches it to do that. Differential revision: https://reviews.llvm.org/D55821 llvm-svn: 349613
* [LLD][ELF] - Report a location for symbols from the linker script when ↵George Rimar2018-12-192-2/+30
| | | | | | | | | | | | | | | | | | | reporting an error. When we report an error for symbols defined in the linker script, we do not report the location properly. For example: ld.lld: error: relocation R_AARCH64_CALL26 cannot refer to absolute symbol: aliasto__text >>> defined in <internal> >>> referenced by rtoabs.o:(.text+0x4) This patch fixes that. Differential revision: https://reviews.llvm.org/D55360 llvm-svn: 349612
* AMDGPU/InsertWaitcnts: Update VGPR/SGPR bounds when brackets are mergedCarl Ritson2018-12-192-8/+67
| | | | | | | | | | | | | | | | | | Summary: Fix an issue where VGPR/SGPR bounds are not properly extended when brackets are merged. This manifests as missing waitcnt insertions when multiple brackets are forwarded to a successor block and the first forward has lower VGPR/SGPR bounds. Irreducible loop test has been extended based on a CTS failure detected for GFX9. Reviewers: nhaehnle Reviewed By: nhaehnle Subscribers: arsenm, kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D55602 llvm-svn: 349611
* [ARM GlobalISel] Support G_CONSTANT for Thumb2Diana Picus2018-12-197-183/+607
| | | | | | | | | | | All we have to do is mark it as legal. This allows us to select a lot of new patterns handled by TableGen. This patch adds tests for them and splits up the existing test file for binary operators into 2 files, one for arithmetic ops and one for logical ones. llvm-svn: 349610
* tsan: align default value of detect_deadlocks flag with actual behaviorDmitry Vyukov2018-12-194-9/+8
| | | | | | | | | | | | | | I tricked myself into thinking that deadlock detection is off by default in TSan by looking at the default value of the detect_deadlocks flag and outdated docs. (Created a pull request to update docs.) I even managed to confuse others: https://groups.google.com/forum/#!topic/thread-sanitizer/xYvnAYwtoDk However, the default value is overwritten in code (TSan_flags.cc:InitializeFlags). The TSan/deadlock tests also rely on this This changes aligns the default value of the flag with the actual default behavior. Author: yln (Julian Lettner) Reviewed in: https://reviews.llvm.org/D55846 llvm-svn: 349609
* AMDGPU/GlobalISel: Regbankselect for fsubMatt Arsenault2018-12-192-0/+70
| | | | llvm-svn: 349608
* refactor testsuite spawnLldbMi args->exe+argsJan Kratochvil2018-12-194-12/+15
| | | | | | | | | | | | | | | | | Currently spawnLldbMi accepts both lldb-mi options and executable to debug as a single parameter. Split them. As in D55859 we will need to execute one lldb-mi command before loading the exe. Therefore we can no longer use the exe as lldb-mi command-line parameter as then there is no way to execute a command before loading exe specified as lldb-mi command-line parameter. LocateExecutableSymbolFileDsym should be static, that is also a little refactorization. Differential Revision: https://reviews.llvm.org/D55858 llvm-svn: 349607
* [llvm-objcopy] [COFF] Fix the Object forward declarationMartin Storsjo2018-12-192-2/+2
| | | | | | This fixes build warnings with clang, and linker errors with MSVC. llvm-svn: 349606
* [llvm-objcopy] Initial COFF supportMartin Storsjo2018-12-1916-0/+1531
| | | | | | | | | This is an initial implementation of no-op passthrough copying of COFF with objcopy. Differential Revision: https://reviews.llvm.org/D54939 llvm-svn: 349605
* Use "EvaluateAsRValue" instead of as a known int, because if it's not a knownBill Wendling2018-12-191-6/+6
| | | | | | integer we want to emit a diagnostic instead of asserting. llvm-svn: 349604
* Revert accidentally included code.Bill Wendling2018-12-191-8/+8
| | | | llvm-svn: 349603
* [DebugInfo] Make AsmPrinter struct HandlerInfo and Handlers protectedYonghong Song2018-12-191-0/+3
| | | | | | | | | | | | In AsmPrinter, make struct HandlerInfo and SmallVector Handlers protected, so target extended AsmPrinter will be able to add their own handlers. Signed-off-by: Yonghong Song <yhs@fb.com> Differential Revision: https://reviews.llvm.org/D55756 llvm-svn: 349602
* [bugpoint][PR29027] Reduce function attributesBrian Gesiak2018-12-194-0/+139
| | | | | | | | | | | | | | | | | | | | | Summary: In addition to reducing the functions in an LLVM module, bugpoint now reduces the function attributes associated with each of the remaining functions. To test this, add a -bugpoint-crashfuncattr test pass, which crashes if a function in the module has a "bugpoint-crash" attribute. A test case demonstrates that the IR is reduced to just that one attribute. Reviewers: MatzeB, silvas, davide, reames Reviewed By: reames Subscribers: reames, llvm-commits Differential Revision: https://reviews.llvm.org/D55216 llvm-svn: 349601
* Fix use-after-free with profile remapping.Richard Smith2018-12-192-0/+8
| | | | | | | | We need to keep the underlying profile reader alive as long as the profile data, because the profile data may contain StringRefs referring to strings in the reader's name table. llvm-svn: 349600
OpenPOWER on IntegriCloud