summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gn build: Windows: use a more standard format for PDB filenamesDavid Major2019-02-041-7/+13
| | | | | | | | The current build was producing names like llvm-undname.exe.pdb, which looks unusual to me at least. This switches them to the more common llvm-undname.pdb style. Differential Revision: https://reviews.llvm.org/D57613 llvm-svn: 353099
* gn build: Revert r353094 (bad merge)David Major2019-02-041-14/+8
| | | | llvm-svn: 353098
* [InstCombine] Cleanup the TFE/LWE check in AMDGPU SimplifyDemandedNicolai Haehnle2019-02-043-18/+29
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The fix added in r352904 is not quite correct, or rather misleading: 1. When the texfailctrl (TFC) argument was non-constant, the fix assumed non-TFE/LWE, which is incorrect. 2. Regardless, this code path cannot even be hit for correct TFE/LWE-enabled calls, because those return a struct. Added a test case for those for completeness. Change-Id: I92d314dbc67a2670f6d7adaab765ef45f56a49cf Reviewers: hliao, dstuttard, arsenm Subscribers: kzhuravl, jvesely, wdng, yaxunl, tpr, t-tye, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57681 llvm-svn: 353097
* [X86] Add test case for report_fatal_error added in r352699.Craig Topper2019-02-041-0/+11
| | | | | | r352699 replaced an llvm_unreachable with a report_fatal_error. This patch adds a test case for it. llvm-svn: 353096
* [CodeGen][ARC][SystemZ][WebAssembly] Use MachineInstr::isInlineAsm in more ↵Craig Topper2019-02-045-8/+8
| | | | | | | | | | places instead of just comparing opcode. NFCI I'm looking at adding a second INLINEASM opcode for better modeling asm-goto as a terminator. Using the existing predicate will reduce teh number of places that will need to use the new opcode. llvm-svn: 353095
* gn build: Windows: use a more standard format for PDB filenamesDavid Major2019-02-041-8/+14
| | | | | | | | The current build was producing names like llvm-undname.exe.pdb, which looks unusual to me at least. This switches them to the more common llvm-undname.pdb style. Differential Revision: https://reviews.llvm.org/D57613 llvm-svn: 353094
* gn build: Windows: write PDBs when is_debugDavid Major2019-02-041-2/+6
| | | | | | | | | | Without /DEBUG, the /Zi doesn't on its own create PDB files. And since ninja runs multiple compilations in parallel, we need /FS to prevent contention on PDBs. Differential Revision: https://reviews.llvm.org/D57612 llvm-svn: 353093
* [clang-tidy] Handle unions with existing default-member-initMalcolm Parsons2019-02-042-1/+11
| | | | | | | | | | | | | | | | | | | | Summary: clang-tidy's modernize-use-default-member-init was crashing for unions with an existing default member initializer. Fixes PR40492 Reviewers: aaron.ballman, alexfh, JonasToth Reviewed By: JonasToth Subscribers: JonasToth, riccibruno, xazax.hun, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D57665 llvm-svn: 353092
* [Tablegen][DAG]: Fix build breakage when LLVM_ENABLE_DAGISEL_COV=1Aditya Nandakumar2019-02-041-2/+2
| | | | | | | | | | LLVM_ENABLE_DAGISEL_COV can be used to instrument DAGISel tablegen selection code to show which patterns along with Complex patterns were used when selecting instructions. Unfortunately this is turned off by default and was broken but never tested. This required a simple fix (missing new line) to get it to build again. llvm-svn: 353091
* [NewPM][MSan] Add Options HandlingPhilip Pfaffe2019-02-047-33/+70
| | | | | | | | | | | | | | Summary: This patch enables passing options to msan via the passes pipeline, e.e., -passes=msan<recover;kernel;track-origins=4>. Reviewers: chandlerc, fedor.sergeev, leonardchan Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57640 llvm-svn: 353090
* [DEBUGINFO] Reposting r352642: Handle restore instructions in LiveDebugValuesWolfgang Pieb2019-02-045-92/+418
| | | | | | | | | | | | | | | | | The LiveDebugValues pass recognizes spills but not restores, which can cause large gaps in location information for some variables, depending on control flow. This patch make LiveDebugValues recognize restores and generate appropriate DBG_VALUE instructions. This patch was posted previously with r352642 and reverted in r352666 due to buildbot errors. A missing return statement was the cause for the failures. Reviewers: aprantl, NicolaPrica Differential Revision: https://reviews.llvm.org/D57271 llvm-svn: 353089
* Generalize pthread callback test caseJohannes Doerfert2019-02-041-8/+16
| | | | | | Changes suggested by Eli Friedman <efriedma@quicinc.com> llvm-svn: 353088
* Update stale comment in lang/c/struct_types/main.cJonas Devlieghere2019-02-041-2/+2
| | | | | | rdar://47322760 llvm-svn: 353087
* Support tests in freestandingJF Bastien2019-02-046123-6227/+18208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Freestanding is *weird*. The standard allows it to differ in a bunch of odd manners from regular C++, and the committee would like to improve that situation. I'd like to make libc++ behave better with what freestanding should be, so that it can be a tool we use in improving the standard. To do that we need to try stuff out, both with "freestanding the language mode" and "freestanding the library subset". Let's start with the super basic: run the libc++ tests in freestanding, using clang as the compiler, and see what works. The easiest hack to do this: In utils/libcxx/test/config.py add: self.cxx.compile_flags += ['-ffreestanding'] Run the tests and they all fail. Why? Because in freestanding `main` isn't special. This "not special" property has two effects: main doesn't get mangled, and main isn't allowed to omit its `return` statement. The first means main gets mangled and the linker can't create a valid executable for us to test. The second means we spew out warnings (ew) and the compiler doesn't insert the `return` we omitted, and main just falls of the end and does whatever undefined behavior (if you're luck, ud2 leading to non-zero return code). Let's start my work with the basics. This patch changes all libc++ tests to declare `main` as `int main(int, char**` so it mangles consistently (enabling us to declare another `extern "C"` main for freestanding which calls the mangled one), and adds `return 0;` to all places where it was missing. This touches 6124 files, and I apologize. The former was done with The Magic Of Sed. The later was done with a (not quite correct but decent) clang tool: https://gist.github.com/jfbastien/793819ff360baa845483dde81170feed This works for most tests, though I did have to adjust a few places when e.g. the test runs with `-x c`, macros are used for main (such as for the filesystem tests), etc. Once this is in we can create a freestanding bot which will prevent further regressions. After that, we can start the real work of supporting C++ freestanding fairly well in libc++. <rdar://problem/47754795> Reviewers: ldionne, mclow.lists, EricWF Subscribers: christof, jkorous, dexonsmith, arphaman, miyuki, libcxx-commits Differential Revision: https://reviews.llvm.org/D57624 llvm-svn: 353086
* [CMake] Support CMake variables for setting target, sysroot and toolchainPetr Hosek2019-02-046-19/+54
| | | | | | | | | | | | | | | | | | | | | | CMake has a standard way of setting target triple, sysroot and external toolchain through CMAKE_<LANG>_COMPILER_TARGET, CMAKE_SYSROOT and CMAKE_<LANG>_COMPILER_EXTERNAL_TOOLCHAIN. These are turned into corresponding --target=, --sysroot= and --gcc-toolchain= variables add included appended to CMAKE_<LANG>_FLAGS. libunwind, libc++abi, libc++ provides their own mechanism through <PROJECT>_TARGET_TRIPLE, <PROJECT>_SYSROOT and <PROJECT>_GCC_TOOLCHAIN variables. These are also passed to lit via lit.site.cfg, and lit config uses these to set the corresponding compiler flags when building tessts. This means that there are two different ways of setting target, sysroot and toolchain, but only one is properly supported in lit. This change extends CMake build for libunwind, libc++abi and libc++ to also support the CMake variables in addition to project specific ones in lit. Differential Revision: https://reviews.llvm.org/D57670 llvm-svn: 353084
* [AMDGPU] Support emitting GOT relocations for function callsScott Linder2019-02-044-41/+71
| | | | | | Differential Revision: https://reviews.llvm.org/D57416 llvm-svn: 353083
* [WarnMissedTransforms] Do not warn about already vectorized loops.Michael Kruse2019-02-042-7/+40
| | | | | | | | | | | | | LoopVectorize adds llvm.loop.isvectorized, but leaves llvm.loop.vectorize.enable. Do not consider such a loop for user-forced vectorization since vectorization already happened -- by prioritizing llvm.loop.isvectorized except for TM_SuppressedByUser. Fixes http://llvm.org/PR40546 Differential Revision: https://reviews.llvm.org/D57542 llvm-svn: 353082
* GlobalISel: Fix CheckMachineFunction passing if ReadCheckFile filesMatt Arsenault2019-02-041-1/+3
| | | | | | | This could be tested, but the FileCheck library spams the error message to the console. llvm-svn: 353081
* GlobalISel: Allow constructing SrcOp/DstOp from MachineOperandMatt Arsenault2019-02-042-0/+27
| | | | llvm-svn: 353080
* [clang-tidy] Add the abseil-duration-unnecessary-conversion checkHyrum Wright2019-02-049-0/+206
| | | | | | Differential Revision: https://reviews.llvm.org/D57353 llvm-svn: 353079
* GlobalISel: Fix parameter name in documentationMatt Arsenault2019-02-041-1/+1
| | | | llvm-svn: 353078
* GlobalISel: Fix CSE handling of buildConstantMatt Arsenault2019-02-045-44/+106
| | | | | | | | | | | | | | | | This fixes two problems with CSE done in buildConstant. First, this would hit an assert when used with a vector result type. Solve this by allowing CSE on the vector elements, but not on the result vector for now. Second, this was also performing the CSE based on the input ConstantInt pointer. The underlying buildConstant could potentially convert the constant depending on the result type, giving in a different ConstantInt*. Stop allowing the APInt and ConstantInt forms from automatically casting to the result type to avoid any similar problems in the future. llvm-svn: 353077
* [WebAssembly] clang-tidy (NFC)Heejin Ahn2019-02-046-18/+18
| | | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes clang-tidy warnings on wasm-only files. The list of checks used is: `-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,readability-identifier-naming,modernize-*` (LLVM's default .clang-tidy list is the same except it does not have `modernize-*`.) The list of fixes are: - Variable names start with an uppercase letter - Function names start with a lowercase letter - Use `auto` when you use casts so the type is evident Reviewers: sbc100 Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D57499 llvm-svn: 353076
* [WebAssembly] clang-tidy (NFC)Heejin Ahn2019-02-0446-543/+526
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes clang-tidy warnings on wasm-only files. The list of checks used is: `-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,readability-identifier-naming,modernize-*` (LLVM's default .clang-tidy list is the same except it does not have `modernize-*`. But I've seen in multiple CLs in LLVM the modernize style was recommended and code was fixed based on the style, so I added it as well.) The common fixes are: - Variable names start with an uppercase letter - Function names start with a lowercase letter - Use `auto` when you use casts so the type is evident - Use inline initialization for class member variables - Use `= default` for empty constructors / destructors - Use `using` in place of `typedef` Reviewers: sbc100, tlively, aardappel Subscribers: dschuff, sunfish, jgravelle-google, yurydelendik, kripken, MatzeB, mgorny, rupprecht, llvm-commits Differential Revision: https://reviews.llvm.org/D57500 llvm-svn: 353075
* [llvm-objcopy][NFC] simplify an error returnJordan Rupprecht2019-02-041-3/+1
| | | | llvm-svn: 353074
* [X86] X86DAGToDAGISel::matchBitExtract(): prepare 'control' in 32 bitsRoman Lebedev2019-02-043-95/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Noticed while looking at D56052. ``` // The 'control' of BEXTR has the pattern of: // [15...8 bit][ 7...0 bit] location // [ bit count][ shift] name // I.e. 0b000000011'00000001 means (x >> 0b1) & 0b11 ``` I.e. we do not care about any of the bits aside from the low 16 bits. So there is no point in doing the `slh`,`or` in 64 bits, let's just do everything in 32 bits, and anyext if needed. We could do that in 16 even, but we intentionally don't zext to i16 (longer encoding IIRC), so i'm guessing the same applies here. Reviewers: craig.topper, andreadb, RKSimon Reviewed By: craig.topper Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D56715 llvm-svn: 353073
* GlobalISel: Improve gtest usageMatt Arsenault2019-02-049-169/+188
| | | | | | | Don't unnecessarily use ASSERT_*, and print the MachineFunction on failure. llvm-svn: 353072
* Adjust cardinality of internal inliner thresholdsDavid Callahan2019-02-041-4/+4
| | | | | | | | | | | | | | | | | | | Summary: While compiling openJDK11 (also other workloads), some make files would pass both CFLAGS and LDFLAGS at link step ; resulting in duplicate options on the command line when one is using LTO and trying to influence the inliner. Most of the internal flags are ZeroOrMore, this diff changes the remaining ones. Reviewers: david2050, twoh, modocache Reviewed By: twoh Subscribers: mehdi_amini, dexonsmith, eraman, haicheng, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57537 Patch by: Abdoul-Kader Keita llvm-svn: 353071
* [X86] Add ST0 as an implicit def/use of x87 load/store instructions during ↵Craig Topper2019-02-042-8/+9
| | | | | | | | | | | | | | | | | | | | | | FP stackifying. These instructions implicitly operate on ST0, but we don't currently add that information to the MachineInstr. We also don't add it the tablegen definitions either. For the most part this doesn't cause any problems because the stackifying occurs after register allocation. All the instructions are marked as having side effects so the postRA scheduler won't reorder them amongst themselves. But nothing stops inline assembly using X87 instructions from being reordered around other x87 instructions if that inline assembly wasn't marked volatile. The two test cases I've identified so far in PR40539 involve loads and stores used to set up the inline assembly or capture the results of the inline assembly ending up in the wrong order. This patch adds implicit ST0 uses/defs to the load/store instructions to prevent this from happening. I plan to fix all of the FP instructions, but the binops are bit trickier to get right. So I've chosen fixing the known test cases as a good first step. I think we also need to update the tablegen descriptions so MS inline assembly infers the right clobbers, but I haven't checked that yet. Differential Revision: https://reviews.llvm.org/D57644 llvm-svn: 353070
* GlobalISel: Fix moreElementsToNextPow2Matt Arsenault2019-02-043-8/+47
| | | | | | | | | This was completely broken. The condition was inverted, and changed the element type for vectors of pointers. Fixes bug 40592. llvm-svn: 353069
* [llvm-objcopy][NFC] Use StringSaver for --keep-global-symbolsJordan Rupprecht2019-02-042-7/+11
| | | | | | | | | | | | | | Summary: Use StringSaver/BumpPtrAlloc when parsing lines from --keep-global-symbols files. This allows us to consistently use StringRef for driver options, which avoids copying the full strings for each object copied, as well as simplifies part of D57517. Reviewers: jhenderson, evgeny777, alexshap Subscribers: jakehehrlich Tags: #llvm Differential Revision: https://reviews.llvm.org/D57617 llvm-svn: 353068
* [WebAssembly] Make segment/size/type directives optional in asmWouter van Oortmerssen2019-02-046-25/+44
| | | | | | | | | | | | | | | | | | | | Summary: These were "boilerplate" that repeated information already present in .functype and end_function, that needed to be repeated to Please the particular way our object writing works, and missing them would generate errors. Instead, we generate the information for these automatically so the user can concern itself with writing more canonical wasm functions that always work as expected. Reviewers: dschuff, sbc100 Subscribers: jgravelle-google, aheejin, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D57546 llvm-svn: 353067
* [WebAssembly] Update relocation naming to match llvm change. NFC.Sam Clegg2019-02-0413-245/+245
| | | | | | Differential Revision: https://reviews.llvm.org/D57698 llvm-svn: 353066
* Revert "[GlobalISel] Introduce a generic floating point floor opcode, G_FFLOOR"Jessica Paquette2019-02-044-15/+1
| | | | | | | | | This reverts commit b05ecba6d687fcb3078509220c67458bf1d77a2e. Apparently adding floor breaks AMDGPU somehow, so I have to back this out while I look into it. llvm-svn: 353065
* Revert "[GlobalISel] Add IRTranslator support for G_FFLOOR"Jessica Paquette2019-02-042-13/+0
| | | | | | | | | This reverts commit 8bbd570fd5205a04d88d2e5513a6e4adbd028039. Apparently adding ffloor breaks AMDGPU somehow, so I need to back this out while I look into it. llvm-svn: 353064
* gn build: Merge r352944Nico Weber2019-02-041-0/+3
| | | | llvm-svn: 353063
* [WebAssembly] Rename relocations from R_WEBASSEMBLY_ to R_WASM_Sam Clegg2019-02-0427-172/+172
| | | | | | | | | | | | | | | | See https://github.com/WebAssembly/tool-conventions/pull/95. This is less typing and IMHO more readable, and it also fits with our naming around the binary format which tends to use the short name. e.g. include/llvm/BinaryFormat/Wasm.h tools/llvm-objdump/WasmDump.cpp etc.. Differential Revision: https://reviews.llvm.org/D57611 llvm-svn: 353062
* [X86] Print all register forms of x87 fadd/fsub/fdiv/fmul as having two ↵Craig Topper2019-02-0428-754/+756
| | | | | | | | | | arguments where on is %st. All of these instructions consume one encoded register and the other register is %st. They either write the result to %st or the encoded register. Previously we printed both arguments when the encoded register was written. And we printed one argument when the result was written to %st. For the stack popping forms the encoded register is always the destination and we didn't print both operands. This was inconsistent with gcc and objdump and just makes the output assembly code harder to read. This patch changes things to always print both operands making us consistent with gcc and objdump. The parser should still be able to handle the single register forms just as it did before. This also matches the GNU assembler behavior. llvm-svn: 353061
* [WebAssembly] Remove redundant namespaces qualifiers. NFC.Sam Clegg2019-02-041-5/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D57610 llvm-svn: 353060
* [Intrinsic] Unsigned Fixed Point Multiplication IntrinsicLeonard Chan2019-02-0416-49/+571
| | | | | | | | | | | | | Add an intrinsic that takes 2 unsigned integers with the scale of them provided as the third argument and performs fixed point multiplication on them. This is a part of implementing fixed point arithmetic in clang where some of the more complex operations will be implemented as intrinsics. Differential Revision: https://reviews.llvm.org/D55625 llvm-svn: 353059
* [GlobalISel] Add IRTranslator support for G_FFLOORJessica Paquette2019-02-042-0/+13
| | | | | | | | | | Follow-up to https://reviews.llvm.org/D57484 Adds G_FFLOOR to translateKnownIntrinsic and update arm64-irtranslator.ll. Differential Revision: https://reviews.llvm.org/D57485 llvm-svn: 353058
* [GlobalISel] Introduce a generic floating point floor opcode, G_FFLOORJessica Paquette2019-02-044-1/+15
| | | | | | | | | This introduces a generic opcode for floating point floor, working towards selecting @llvm.floor. Differential Revision: https://reviews.llvm.org/D57484 llvm-svn: 353057
* [CGP] use IRBuilder to simplify codeSanjay Patel2019-02-042-62/+61
| | | | | | | | | | | | | | | | This is no-functional-change-intended although there could be intermediate variations caused by a difference in the debug info produced by setting that from the builder's insertion point. I'm updating the IR test file associated with this code just to show that the naming differences from using the builder are visible. The motivation for adding a helper function is that we are likely to extend this code to deal with other overflow ops. llvm-svn: 353056
* [scudo] Initial standalone skeleton check-inKostya Kortchinsky2019-02-0415-0/+961
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is the initial check-in for the Standalone version of Scudo. The project is initially going to live in scudo/standalone then will replace scudo. See http://lists.llvm.org/pipermail/llvm-dev/2019-January/129113.html for details. This initial CL is meant to lay out the project structure, of both code & tests, providing a minimal amount of functionalities, namely various definitions, some atomic helpers and an intrusive list. (empty.cc is just here to have a compilation unit, but will go away in the upcoming CLs). Initial support is restricted to Linux i386 & x86_64 in make files and will be extended once things land & work. We will grow organically from here, adding functionalities in limited amounts. Reviewers: morehouse, eugenis, vitalybuka, kcc, mcgrathr, flowerhack Reviewed By: morehouse, vitalybuka Subscribers: srhines, mgorny, krytarowski, delcypher, jfb, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D57412 llvm-svn: 353055
* [clangd] Enable include insertion for static indexKadir Cetinkaya2019-02-0410-42/+125
| | | | | | | | | | | | | | Summary: This enables include insertion by adding canonical includes into preambledata. Reviewers: ioeric, ilya-biryukov Subscribers: javed.absar, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D57508 llvm-svn: 353054
* [CommandLine] Don't print empty sentinel values from EnumValN lists in help textJames Henderson2019-02-043-17/+279
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to make an option value truly optional, both the ValueOptional attribute and an empty-named value are required. Prior to this change, this empty-named value appears in the command-line help text: -some-option - some help text =v1 - description 1 =v2 - description 2 = - This change improves the help text for these sort of options in a number of ways: 1) ValueOptional options with an empty-named value now print their help text twice: both without and then with '=<value>' after the name. The latter version then lists the allowed values after it. 2) Empty-named values with no help text in ValueOptional options are not listed in the permitted values. -some-option - some help text -some-option=<value> - some help text =v1 - description 1 =v2 - description 2 3) Otherwise empty-named options are printed as =<empty> rather than simply '='. 4) Option values without help text do not have the '-' separator printed. -some-option=<value> - some help text =v1 - description 1 =v2 =<empty> - description It also tweaks the llvm-symbolizer -functions help text to not print a trailing ':' as that looks bad combined with 1) above. This is mostly a reland of r353048 which in turn was a reland of r352750. Reviewed by: ruiu, thopre, mstorsjo Differential Revision: https://reviews.llvm.org/D57030 llvm-svn: 353053
* [OMPT] Make sure that OMPT is enabled when accessing internals of the runtimeJoachim Protze2019-02-044-0/+17
| | | | | | | | | | | | | | | | | The three switch fallthrough generate a warning with -Wimplicit-fallthrough. Two are documented as fallthrough, one is not, but I think the intention is to also fallthrough in kmp_tasking.cpp. Not sure whether kmp.h is the best place to define the macro. Reviewers: jlpeyton, AndreyChurbanov, Hahnfeld Reviewed By: jlpeyton Tags: #openmp Differential Revision: https://reviews.llvm.org/D56397 llvm-svn: 353052
* [X86][SSE] SimplifyDemandedBitsForTargetNode - PCMPGT(0,X) sign maskSimon Pilgrim2019-02-047-48/+17
| | | | | | | | For PCMPGT(0, X) patterns where we only demand the sign bit (e.g. BLENDV or MOVMSK) then we can use X directly. Differential Revision: https://reviews.llvm.org/D57667 llvm-svn: 353051
* Revert r353048.James Henderson2019-02-043-279/+17
| | | | | | It was causing unexpected unit test failures on build bots. llvm-svn: 353050
* Fixes for the ProcessLaunchInfo movePavel Labath2019-02-042-2/+2
| | | | llvm-svn: 353049
OpenPOWER on IntegriCloud