summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add NetBSD LSan supportKamil Rytarowski2019-07-1111-19/+394
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Combine few relatively small changes into one: - implement internal_ptrace() and internal_clone() for NetBSD - add support for stoptheworld based on the ptrace(2) API - define COMPILER_RT_HAS_LSAN for NetBSD - enable tests for NetBSD/amd64 Inspired by the original implementation by Christos Zoulas in netbsd/src for GCC. The implementation is in theory CPU independent through well defined macros across all NetBSD ports, however only the x86_64 version was tested. Reviewers: mgorny, dvyukov, vitalybuka, joerg, jfb Reviewed By: vitalybuka Subscribers: dexonsmith, jfb, srhines, kubamracek, llvm-commits, christos Tags: #llvm Differential Revision: https://reviews.llvm.org/D64057 llvm-svn: 365735
* Fix build breakage on Darwin.Rui Ueyama2019-07-111-1/+1
| | | | llvm-svn: 365734
* Update comments for r365730. NFC.Rui Ueyama2019-07-112-14/+14
| | | | llvm-svn: 365733
* Fix build breakage on Win32.Rui Ueyama2019-07-111-1/+1
| | | | llvm-svn: 365732
* [WebAssembly] Print error message for llvm.clear_cache intrinsicHeejin Ahn2019-07-112-0/+17
| | | | | | | | | | | | | | | | Summary: Wasm does not currently support `llvm.clear_cache` intrinsic, and this prints a proper error message instead of segfault. Reviewers: dschuff, sbc100, sunfish Subscribers: jgravelle-google, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64322 llvm-svn: 365731
* [Coding style change][lld] Rename variables for non-ELF portsRui Ueyama2019-07-1188-9454/+9454
| | | | | | | | | | | This patch does the same thing as r365595 to other subdirectories, which completes the naming style change for the entire lld directory. With this, the naming style conversion is complete for lld. Differential Revision: https://reviews.llvm.org/D64473 llvm-svn: 365730
* [InstCombine][NFCI] Add test coverage to onehot_merge.llHuihui Zhang2019-07-111-0/+145
| | | | | | Prep work for upcoming patch D64275. llvm-svn: 365729
* Increase the number of parser diagnostics.Richard Trieu2019-07-111-1/+1
| | | | | | | The reserved range for parser diagnostics is getting close to being filled, so increase the space for them. llvm-svn: 365727
* [SCEV] teach SCEV symbolical execution about overflow intrinsics folding.Chen Zheng2019-07-113-1/+132
| | | | | | Differential Revision: https://reviews.llvm.org/D64422 llvm-svn: 365726
* Change another test I missed in r365724Nico Weber2019-07-111-1/+1
| | | | llvm-svn: 365725
* clang-cl: Remove -O0 optionNico Weber2019-07-1190-123/+121
| | | | | | | | | | | | cl.exe doesn't understand it; there's /Od instead. See also the review thread for r229575. Update lots of compiler-rt tests to use -Od instead of -O0. Ran `rg -l 'clang_cl.*O0' compiler-rt/test/ | xargs sed -i -c 's/-O0/-Od/'` Differential Revision: https://reviews.llvm.org/D64506 llvm-svn: 365724
* Replace three "strip & accumulate" implementations with a single oneJohannes Doerfert2019-07-116-113/+86
| | | | | | | | | | | This patch replaces the three almost identical "strip & accumulate" implementations for constant pointer offsets with a single one, combining the respective functionalities. The old interfaces are kept for now. Differential Revision: https://reviews.llvm.org/D64468 llvm-svn: 365723
* [NFC] Adjust "invalid.ll.bc" tests to check for AttrKind #255 not #63Johannes Doerfert2019-07-116-4/+4
| | | | | | | | | | | We are about to add enum attributes with AttrKind numbers >= 63. This means we cannot use AttrKind #63 to test for an invalid attribute number in the RAW format anymore. This patch changes the number of an invalid attribute to #255. There is no change to the character of the tests. Differential Revision: https://reviews.llvm.org/D64531 llvm-svn: 365722
* Various minor tweaks to CLCompatOptions.tdNico Weber2019-07-111-43/+47
| | | | | | | | | | | | | | | | | | | - Add back indentation I accidentally removed in r364901 - Wrap two lines to 80 cols - Slightly tighten up help text for several flags - Consistently use "Do not" instead of "Don't" - Make every option description start with a verb - Use "Set" instead of "Specify" - Mark default values of options more consistently - Remove text about "/Zi" not producing PDBs since it's confusing for people not intimately familiar with the implementation of the normal PDB pipeline. /Zi lets the linker produce PDBs, which is what most users want. - Consistently use "file" over "filename" in meta var names, consistently use "file name" over "filename" in text - Make all output setting options have consistent language llvm-svn: 365721
* [X86] Don't convert 8 or 16 bit ADDs to LEAs on Atom in FixupLEAPass.Craig Topper2019-07-112-12/+52
| | | | | | | | | | | | | | | | | We use the functions that convert to three address to do the conversion, but changing an 8 or 16 bit will cause it to create a virtual register. This can't be done after register allocation where this pass runs. I've switched the pass completely to a white list of instructions that can be converted to LEA instead of a blacklist that was incorrect. This will avoid surprises if we enhance the three address conversion function to include additional instructions in the future. Fixes PR42565. llvm-svn: 365720
* [lldb] Disable TestDollarInVariable.py on WindowsRaphael Isemann2019-07-111-1/+2
| | | | | | | | | | | | It seems on Windows we don't handle the lldb_expr_result variable correctly: ``` AssertionError: False is not True : 'expr $__lldb_expr_result' returns expected result, got '(int &) $0 = 0x0000000000000000' ``` I'll disable the test until I can find a way to debug this on Windows. llvm-svn: 365719
* [swig] Add workaround for old swigJonas Devlieghere2019-07-111-0/+5
| | | | | | | | | Apparently, when using swig 1.3.40, properties to set values do not work without the `__swig_setmethods__` workaround. I conditionally added this back for SBTypeCategory, as it's causing a test failure on GreenDragon, while I investigate this further. llvm-svn: 365718
* [AMDGPU] gfx908 atomic fadd and atomic pk_faddStanislav Mekhanoshin2019-07-1111-4/+503
| | | | | | Differential Revision: https://reviews.llvm.org/D64435 llvm-svn: 365717
* [CGDebugInfo] Fix -femit-debug-entry-values crash on os_log_helpersVedant Kumar2019-07-112-5/+17
| | | | | | | | | | | | An os_log_helper FunctionDecl may not have a body. Ignore these for the purposes of debug entry value emission. Fixes an assertion failure seen in a stage2 build of clang: Assertion failed: (FD->hasBody() && "Functions must have body here"), function analyzeParametersModification llvm-svn: 365716
* [AMDGPU] gfx908 dot instruction supportStanislav Mekhanoshin2019-07-117-170/+968
| | | | | | Differential Revision: https://reviews.llvm.org/D64431 llvm-svn: 365715
* Attempt to fix bots after r365703Nico Weber2019-07-101-3/+15
| | | | llvm-svn: 365714
* rL365634 adds a unique_ptr<CompilationDatabase> in ↵Sterling Augustine2019-07-101-5/+1
| | | | | | | | | | | | GobalCompilationDatabase.h:108 but CompilationDatabase is only forward declared. This makes the header not compile standalone, because unique_ptrs expect to have the full-definition of the... Summary: ...template argument. Remove the forward declaration and include the appropriate header instead. Remove CompileCommand too, which is also in the header. llvm-svn: 365713
* Revert [llvm-objcopy] Allow strip symtab from executables and DSOsJordan Rupprecht2019-07-109-50/+89
| | | | | | | | | | | | | This reverts r365193 (git commit 194f16b3548bcb23a7f0fd638778ed72edd18d37) This patch doesn't work with binaries built w/ `--emit-relocs`, e.g. ``` $ echo 'int main() { return 0; }' | clang -Wl,--emit-relocs -x c - -o foo && llvm-objcopy --strip-unneeded foo llvm-objcopy: error: 'foo': not stripping symbol '__gmon_start__' because it is named in a relocation ``` llvm-svn: 365712
* [SDAG] commute setcc operands to match a subtractSanjay Patel2019-07-106-80/+80
| | | | | | | | | | | | | | | | | | | If we have: R = sub X, Y P = cmp Y, X ...then flipping the operands in the compare instruction can allow using a subtract that sets compare flags. Motivated by diffs in D58875 - not sure if this changes anything there, but this seems like a good thing independent of that. There's a more involved version of this transform already in IR (in instcombine although that seems misplaced to me) - see "swapMayExposeCSEOpportunities()". Differential Revision: https://reviews.llvm.org/D63958 llvm-svn: 365711
* Add IsBytewiseValue unit testVitaly Buka2019-07-101-11/+268
| | | | | | | | | | Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63966 llvm-svn: 365710
* NFC: Pass DataLayout into isBytewiseValueVitaly Buka2019-07-105-16/+20
| | | | | | | | | | | | | | | | | | Summary: We will need to handle IntToPtr which I will submit in a separate patch as it's not going to be NFC. Reviewers: eugenis, pcc Reviewed By: eugenis Subscribers: hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D63940 llvm-svn: 365709
* NFC: Convert large lambda into methodVitaly Buka2019-07-102-79/+87
| | | | | | | | | | | | | | Reviewers: pcc, eugenis Reviewed By: eugenis Subscribers: cfe-commits, lldb-commits Tags: #clang, #lldb Differential Revision: https://reviews.llvm.org/D63854 llvm-svn: 365708
* [TSan] Fix linker error on Linux/AArch64Julian Lettner2019-07-101-4/+4
| | | | llvm-svn: 365707
* GodeGen, NFC: Add test to track emitStoresForConstant behaviorVitaly Buka2019-07-101-0/+66
| | | | | | | | | | | | | | Reviewers: eugenis, pcc Reviewed By: eugenis Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64385 llvm-svn: 365706
* [X86] Add patterns with and_flag_nocf for BLSI and TBM instructions.Craig Topper2019-07-103-36/+26
| | | | | | Fixes similar issues to r352306. llvm-svn: 365705
* [X86] Add a few more TBM and BLSI test cases that show the same issue that ↵Craig Topper2019-07-102-16/+226
| | | | | | r352306 fixed for BLSR. llvm-svn: 365704
* driver: Don't warn about assembler flags being unused when not assemblingNico Weber2019-07-102-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang currently warns when passing flags for the assembler (e.g. -Wa,-mbig-obj) to an invocation that doesn't run the assembler (e.g. -E). At first sight, that makes sense -- the flag really is unused. But many other flags don't have an effect if no assembler runs (e.g. -fno-integrated-as, -ffunction-sections, and many others), and those currently don't warn. So this seems more like a side effect of how CollectArgsForIntegratedAssembler() is implemented than like an intentional feature. Since it's a bit inconvenient when debugging builds and adding -E, always call CollectArgsForIntegratedAssembler() to make sure assembler args always get claimed. Currently, this affects only these flags: -mincremental-linker-compatible, -mimplicit-it= (on ARM), -Wa, -Xassembler It does have the side effect that assembler options now need to be valid even if -E is passed. Previously, `-Wa,-mbig-obj` would error for non-coff output only if the assembler ran, now it always errors. This too makes assembler flags more consistent with all the other flags and seems like a progression. Fixes PR42066. Differential Revision: https://reviews.llvm.org/D64527 llvm-svn: 365703
* [X86] Add BLSR and BLSMSK to isUseDefConvertible.Craig Topper2019-07-101-1/+6
| | | | | | | | | | | | Unfortunately subo formation in CGP prevents obvious ways of testing this. But we already have BLSI in here and the flag behavior is well understood. Might become more useful if we improve PR42571. llvm-svn: 365702
* [NFC]Fix IR/MC depency issue for function descriptor SDAG implementationDavid Tenty2019-07-102-54/+35
| | | | | | | | | | | | | | | | | | Summary: llvm/IR/GlobalValue.h can't be included in MC, that creates a circular dependency between MC and IR libraries. This circular dependency is causing an issue for build system that enforce layering. Author: Xiangling_L Reviewers: sfertile, jasonliu, hubert.reinterpretcast, gribozavr Reviewed By: gribozavr Subscribers: wuzish, nemanjai, hiraditya, kbarton, MaskRay, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64445 llvm-svn: 365701
* [clang-scan-deps] Dependency directives source minimizer:Alex Lorenz2019-07-102-1/+45
| | | | | | | | | | | | single quotes are not digit separators after a valid character literal prefix The single quote character can act as a c++ digit separator. However, the minimizer shouldn't treat it as such when it's actually following a valid character literal prefix, like L, U, u, or u8. Differential Revision: https://reviews.llvm.org/D64525 llvm-svn: 365700
* [Concepts] Concept definitions (D40381)Saar Raz2019-07-1032-47/+450
| | | | | | | First in a series of patches to land C++2a Concepts support. This patch adds AST and parsing support for concept-declarations. llvm-svn: 365699
* [lldb] Fix handling of dollar characters in expr commandRaphael Isemann2019-07-107-31/+132
| | | | llvm-svn: 365698
* [X86] Remove unused variable. NFCCraig Topper2019-07-101-1/+0
| | | | llvm-svn: 365697
* [Expression] IR Instrumenters should have a UtilityFunctionAlex Langford2019-07-102-18/+18
| | | | | | | | | Right now, IR Instrumenters take a DynamicCheckerFunctions object which has all the UtilityFunctions used to instrument IR for expressions. However, each Instrumenter (in practice) uses exactly one UtilityFunction, so let's change the abstraction. llvm-svn: 365696
* My first test commit.Saar Raz2019-07-101-0/+1
| | | | llvm-svn: 365695
* [NFC][InstCombine] Comb through just-added "omit mask before left-shift" ↵Roman Lebedev2019-07-106-104/+159
| | | | | | tests once more llvm-svn: 365694
* [TSan] Fix compiler error on Linux/AArch64Julian Lettner2019-07-101-1/+1
| | | | llvm-svn: 365693
* Add support for building with Python 3Nico Weber2019-07-101-4/+2
| | | | | | | | | | LLDB supports Python 3 now. Differential Revision: https://reviews.llvm.org/D64443 Patch from Christian Biesinger <cbiesinger@google.com>! llvm-svn: 365692
* [OPENMP]Remove not used check line from the test, NFC.Alexey Bataev2019-07-101-1/+0
| | | | llvm-svn: 365691
* [AArch64][GlobalISel] Optimize compare and branch cases with G_INTTOPTR and ↵Amara Emerson2019-07-105-43/+131
| | | | | | | | | | | | | | | | | | | | unknown values. Since we have distinct types for pointers and scalars, G_INTTOPTRs can sometimes obstruct attempts to find constant source values. These usually come about when try to do some kind of null pointer check. Teaching getConstantVRegValWithLookThrough about this operation allows the CBZ/CBNZ optimization to catch more cases. This change also improves the case where we can't find a constant source at all. Previously we would emit a cmp, cset and tbnz for that. Now we try to just emit a cmp and conditional branch, saving an instruction. The cumulative code size improvement of this change plus D64354 is 5.5% geomean on arm64 CTMark -O0. Differential Revision: https://reviews.llvm.org/D64377 llvm-svn: 365690
* gn build: Merge r365687Nico Weber2019-07-102-0/+2
| | | | llvm-svn: 365689
* Add Python 3.6 and 3.7 to the version listNico Weber2019-07-101-1/+1
| | | | | | | | | | Python 3.6 and 3.7 have been released. Differential Revision: https://reviews.llvm.org/D64444 Patch from Christian Biesinger <cbiesinger@google.com>! llvm-svn: 365688
* [clang-doc] Add a structured HTML generatorJulie Hockett2019-07-108-59/+870
| | | | | | | | | | | | | | | Implements an HTML generator. Nodes are used to represent each part of the HTML file. There are TagNodes that represent every HTML tag (p, h1, div, ...) and they have children nodes, which can be TagNodes or TextNodes (these nodes only have text). Proper indentation is rendered within the files generated by tool. No styling (CSS) is included. Committed on behalf of Diego Astiazarán (diegoaat97@gmail.com) Differential Revision: https://reviews.llvm.org/D63857 llvm-svn: 365687
* Revert "[ELF] Update test case due to llvm r365618"Nikola Prica2019-07-101-7/+13
| | | | | | | | Reverting du to reverting r365618 This reverts commit b1e76d1d41c2303f70b53e352bdefbff2a2a9d37. llvm-svn: 365686
* Revert "[ELF] Loose a condition for relocation with a symbol"Nikola Prica2019-07-106-9/+20
| | | | | | | | This reverts commit 8507eca1647118e73435b0ce1de8a1952a021d01. Reveting due to some suspicious failurse in santizer-x86_64-linux. llvm-svn: 365685
OpenPOWER on IntegriCloud