summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Stop passing two arguments by reference. NFCCraig Topper2018-03-011-1/+1
| | | | | | I think these used to be out parameters, but they haven't been for a while. llvm-svn: 326417
* Remove redundant casts. NFCGeorge Burgess IV2018-03-0151-178/+162
| | | | | | | | | | | | | | | | | | | So I wrote a clang-tidy check to lint out redundant `isa`, `cast`, and `dyn_cast`s for fun. This is a portion of what it found for clang; I plan to do similar cleanups in LLVM and other subprojects when I find time. Because of the volume of changes, I explicitly avoided making any change that wasn't highly local and obviously correct to me (e.g. we still have a number of foo(cast<Bar>(baz)) that I didn't touch, since overloading is a thing and the cast<Bar> did actually change the type -- just up the class hierarchy). I also tried to leave the types we were cast<>ing to somewhere nearby, in cases where it wasn't locally obvious what we were dealing with before. llvm-svn: 326416
* Convert more tests as linker scripts instead of assembly.Rui Ueyama2018-03-0136-491/+445
| | | | llvm-svn: 326415
* [test] Restore cleanup behavior in TestQuoting.pyVedant Kumar2018-03-011-1/+1
| | | | | | | | | | Before the change to compile tests out-of-tree, the cleanup classmethod in TestQuoting.py would remove a temp file. After the change it threw an exception due to a malformed call to getBuildArtifact(). Bring back the old behavior. llvm-svn: 326414
* [Support] Fix comments for handleAllErrors: it calls llvm_unreachable if theLang Hames2018-03-011-4/+4
| | | | | | contract is violated, not report_fatal_error. llvm-svn: 326413
* We were getting the wrong dynamic type if there were two classes with the ↵Jim Ingham2018-03-014-2/+106
| | | | | | | | | | | | | | same basename. There's a bug in FindTypes, it ignores the exact flag if you pass a name that doesn't begin with :: and pass eTypeClassAny for the type. In this case we always know that the name we get from the vtable name is absolute so we can work around the bug by prepending the "::". This doesn't fix the FindTypes bug. <rdar://problem/38010986> llvm-svn: 326412
* [WebAssembly] Remove unused forward declaration.Rui Ueyama2018-03-011-2/+0
| | | | llvm-svn: 326411
* Do not create multiple NOTE segments.Rui Ueyama2018-03-012-12/+22
| | | | | | | | | | | Previously, we didn't try to make effort to put .note sections next to each other in the output file, so two .note sections were likely to be stored to two separate NOTE segments. That's undesirable because we should create as few segments as possible in general. Differential Revision: https://reviews.llvm.org/D43858 llvm-svn: 326410
* Expand test a bit.Rafael Espindola2018-03-011-11/+27
| | | | | | | | | It now includes both linkerscript and non linkerscript variants. Extracted from a patch by Rui while I was trying to figure out what exactly was changing. llvm-svn: 326409
* [analyzer] [tests] Create a directory for the log fileGeorge Karpenkov2018-03-011-0/+2
| | | | llvm-svn: 326408
* [XRay] cache symbolized function names for a repeatedly queried function IDMartin Pelikan2018-03-012-1/+9
| | | | | | | | | | | | | | | | | | | Summary: Processing 2 GB XRay traces with "llvm-xray convert -symbolize" needs to go over each trace record and symbolize the function name refered to by its ID. Currently this happens by asking the LLVM symbolizer code every single time. A simple cache can save around 30 minutes of processing of that trace. llvm-xray's resident memory usage increased negligibly with this cache. Reviewers: dberris Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D43896 llvm-svn: 326407
* [RuntimeDyld][MachO] Fix assertion in encodeAddend, add missing directive toLang Hames2018-03-012-3/+7
| | | | | | | | | | | | test case. r326290 fixed the assertion for decodeAddend, but not encodeAddend. The regression test failed to catch this because it was missing the subsections_via_symbols flag, so the desired relocation was not applied. This patch also fixes the formatting of the assertion from r326290. llvm-svn: 326406
* [analyzer] Add a checker for mmap()s which are both writable and executable.Artem Dergachev2018-03-014-0/+131
| | | | | | | | | | | | | | | | | | | This is a security check that warns when both PROT_WRITE and PROT_EXEC are set during mmap(). If mmap()ed memory is both writable and executable, it makes it easier for the attacker to execute arbitrary code when contents of this memory are compromised. Some applications require such mmap()s though, such as different sorts of JIT. Re-applied after a revert in r324167. Temporarily stays in the alpha package because it needs a better way of determining macro values that are not immediately available in the AST. Patch by David Carlier! Differential Revision: https://reviews.llvm.org/D42645 llvm-svn: 326405
* [IPSCCP] do not break musttail invariant (PR36485)Reid Kleckner2018-03-012-1/+113
| | | | | | | | | | | | | | | | | Do not replace results of `musttail` calls with a constant if the call itself can't be removed. Do not zap returns of `musttail` callees, if the call site can't be removed and replaced with a constant. Do not zap returns of `musttail`-calling blocks, this breaks invariant too. Patch by Fedor Indutny Differential Revision: https://reviews.llvm.org/D43695 llvm-svn: 326404
* Convert more .s files to linker script files.Rui Ueyama2018-03-0136-468/+506
| | | | | | | | | | | | | | Summary: This change removes large "echo" commands from the test by writing tests themselves as linker scripts. Reviewers: rafael Subscribers: emaste, javed.absar, llvm-commits, arichardson Differential Revision: https://reviews.llvm.org/D43900 llvm-svn: 326403
* [CFG] [analyzer] Recall that we only skip NoOp casts in construction contexts.Artem Dergachev2018-03-012-1/+34
| | | | | | | | | | | | For now. We should also add support for ConstructorConversion casts as presented in the attached test case, but this requires more changes because AST around them seems different. The check was originally present but was accidentally lost during r326021. Differential Revision: https://reviews.llvm.org/D43840 llvm-svn: 326402
* Simplify removing empty output sections.Rafael Espindola2018-03-014-32/+30
| | | | | | | With this the meaning of the Live bit in output sections is clear: we have at some point added a input section into it. llvm-svn: 326401
* [ELF] Fix a test comment. NFCFangrui Song2018-03-011-1/+1
| | | | llvm-svn: 326400
* Add another entitlement that we need for debugserver.Jason Molenda2018-03-011-0/+2
| | | | | | <rdar://problem/29855293> llvm-svn: 326399
* [WebAssembly] Use Twine rather than StringRef for logging messagesSam Clegg2018-03-012-15/+19
| | | | | | | | Also add missing tracing to writeU8. Differential Revision: https://reviews.llvm.org/D43919 llvm-svn: 326398
* Start setting dllimport/dllexport in setGVProperties.Rafael Espindola2018-03-0114-169/+110
| | | | | | | | | | This is the next step in setting dso_local for COFF. The patches changes setGVProperties to first set dllimport/dllexport and changes a few cases that were setting dllimport/dllexport manually. With this a few more GVs are marked dso_local. llvm-svn: 326397
* [GlobalISel][AArch64] Adding -disable-gisel-legality-check CL optionRoman Tereshin2018-03-015-27/+4589
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently it's impossible to test InstructionSelect pass with MIR which is considered illegal by the Legalizer in Assert builds. In early stages of porting an existing backend from SelectionDAG ISel to GlobalISel, however, we would have very basic CallLowering, Legalizer, and RegBankSelect implementations, but rather functional Instruction Select with quite a few patterns selectable due to the semi-automatic porting process borrowing them from SelectionDAG ISel. As we are trying to define legality as a property of being selectable by the instruction selector, it would be nice to be able to easily check what the selector can do in its current state w/o the legality check provided by the Legalizer getting in the way. It also seems beneficial to have a regression testing set up that would not allow the selector to silently regress in its support of the MIR not supported yet by the previous passes in the GlobalISel pipeline. This commit adds -disable-gisel-legality-check command line option to llc that disables those legality checks in RegBankSelect and InstructionSelect passes. It also adds quite a few MIR test cases for AArch64's Instruction Selector. Every one of them would fail on the legality check at the moment, but will select just fine if the check is disabled. Every test MachineFunction is intended to exercise a specific selection rule and that rule only, encoded in the MachineFunction's name by the rule's number, ID, and index of its GIM_Try opcode in TableGen'erated MatchTable (-optimize-match-table=false). Reviewers: ab, dsanders, qcolombet, rovka Reviewed By: bogner Subscribers: kristof.beyls, volkan, aditya_nandakumar, aemerson, rengolin, t.p.northover, javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D42886 llvm-svn: 326396
* [DWARF] Emit a split line table only if there are split type units.Paul Robinson2018-03-013-0/+9
| | | | | | A .debug_info.dwo section doesn't use the .debug_line.dwo section. llvm-svn: 326395
* [DAE] don't remove args of musttail target/callerReid Kleckner2018-03-012-3/+53
| | | | | | | | | | | | | `musttail` requires identical signatures of caller and callee. Removing arguments breaks `musttail` semantics. PR36441 Patch by Fedor Indutny Differential Revision: https://reviews.llvm.org/D43708 llvm-svn: 326394
* [X86] Make sure we don't combine (fneg (fma X, Y, Z)) to a target specific ↵Craig Topper2018-03-012-1/+21
| | | | | | | | | | node when there are no FMA instructions. This would cause a 'cannot select' error at isel when we should have emitted a lib call and an xor. Fixes PR36553. llvm-svn: 326393
* Pass a GlobalDecl to SetCommonAttributes. NFC.Rafael Espindola2018-03-012-6/+6
| | | | | | Part of D43900. llvm-svn: 326392
* Inline a trivial function. NFC.Rafael Espindola2018-03-013-10/+2
| | | | llvm-svn: 326391
* [NVPTX] Lower loads from global constants using ld.global.nc (aka LDG).Justin Lebar2018-02-282-14/+47
| | | | | | | | | | | | | | | Summary: After D43914, loads from global variables in addrspace(1) happen with ld.global. But since they're constants, even better would be to use ld.global.nc, aka ldg. Reviewers: tra Subscribers: jholewinski, sanjoy, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D43915 llvm-svn: 326390
* [NVPTX] Use addrspacecast instead of target-specific intrinsics in ↵Justin Lebar2018-02-284-65/+19
| | | | | | | | | | | | | | | | | | | NVPTXGenericToNVVM. Summary: NVPTXGenericToNVVM was using target-specific intrinsics to do address space casts. Using the addrspacecast instruction is (a lot) simpler. But it also has the advantage of being understandable to other passes. In particular, InferAddrSpaces is able to understand these address space casts and remove them in most cases. Reviewers: tra Subscribers: jholewinski, sanjoy, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D43914 llvm-svn: 326389
* Pass a GlobalDecl to setNonAliasAttributes. NFC.Rafael Espindola2018-02-282-4/+5
| | | | | | Also part of D43900. llvm-svn: 326388
* [MIRParser] Accept overloaded intrinsic names w/o type suffixesRoman Tereshin2018-02-282-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Function::lookupIntrinsicID is somewhat forgiving as it comes to overloaded intrinsics' names: it returns an ID as soon as the name provided has a prefix that matches a registered intrinsic's name w/o actually checking that the rest of the name encodes all the concrete arg types, let alone that those types are compatible with the intrinsic's definition. That's probably fine and comes in handy in MIR serialization: we don't care about IR types at MIR level and every intrinsic should be selectable based on its ID and low-level types (LLTs) of its operands, including the overloaded ones, so there is no point in serializing mangled IR types as part of the intrinsic's name. However, lookupIntrinsicID is somewhat inconsistent in its forgiveness: if the name provided is actually an exact match, it will refuse to return the ID if the intrinsic is overloaded. There is probably no real reason for that and it renders MIRParser incapable to deserialize MIR MIRPrinter serialized. This commit fixes it. Reviewers: rnk, aditya_nandakumar, qcolombet, thegameg, dsanders, marcello.maggioni Reviewed By: bogner Subscribers: javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D43267 llvm-svn: 326387
* [clang-tidy] Another batch of checks to rename from misc- to bugprone-.Alexander Kornienko2018-02-2830-94/+104
| | | | | | | | | | | | | | | | Summary: clang-tidy/rename_check.py {misc,bugprone}-suspicious-semicolon clang-tidy/rename_check.py {misc,bugprone}-suspicious-string-compare clang-tidy/rename_check.py {misc,bugprone}-swapped-arguments clang-tidy/rename_check.py {misc,bugprone}-undelegated-constructor --check_class_name UndelegatedConstructor Reviewers: hokein, sammccall, aaron.ballman Subscribers: klimek, mgorny, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D43870 llvm-svn: 326386
* Pass a GlobalDecl to SetInternalFunctionAttributes. NFC.Rafael Espindola2018-02-287-26/+27
| | | | | | | | This just reduces the noise in a followup patch. Part of D43900. llvm-svn: 326385
* Rename more checks from misc- to bugprone-.Alexander Kornienko2018-02-2823-75/+87
| | | | | | | | | | | | | | | | Summary: clang-tidy/rename_check.py {misc,bugprone}-string-integer-assignment clang-tidy/rename_check.py {misc,bugprone}-string-literal-with-embedded-nul clang-tidy/rename_check.py {misc,bugprone}-suspicious-enum-usage clang-tidy/rename_check.py {misc,bugprone}-suspicious-missing-comma Reviewers: hokein, sammccall, aaron.ballman Subscribers: klimek, cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D43868 llvm-svn: 326384
* [libcxx] Fix last_write_time test for filesystems that don't support very ↵Volodymyr Sapsai2018-02-281-10/+32
| | | | | | | | | | | | | | | | | | | | | small times. APFS minimum supported file write time is -2^63 nanoseconds, which doesn't go as far as `file_time_type::min()` that is equal to -2^63 microseconds on macOS. This change doesn't affect filesystems that support `file_time_type` range only for in-memory file time representation but not for on-disk representation. Such filesystems are considered as `SupportsMinTime`. rdar://problem/35865151 Reviewers: EricWF, Hahnfeld Subscribers: jkorous-apple, mclow.lists, cfe-commits, christof Differential Revision: https://reviews.llvm.org/D42755 llvm-svn: 326383
* Use DenseMap::lookup() instead of find() and a hand-written null check.Rui Ueyama2018-02-282-8/+2
| | | | llvm-svn: 326382
* build: add the ability to create a symlink for dsymutilSaleem Abdulrasool2018-02-283-2/+14
| | | | | | | | | Add a `LLVM_INSTALL_CCTOOLS_SYMLINKS` to mirror `LLVM_INSTALL_BINUTILS_SYMLINKS`. For now, this allows us to create symlinks for `dsymutil` to `llvm-dsymutil`. This option is off by default, but the user can enable it. llvm-svn: 326381
* [X86] Regenerate cmpxchg testsSimon Pilgrim2018-02-283-23/+131
| | | | | | Add 64-bit cmpxchg8b tests llvm-svn: 326380
* [WebAssembly] Reduce code repetition. NFC.Rui Ueyama2018-02-283-21/+14
| | | | | | Differential Revision: https://reviews.llvm.org/D43910 llvm-svn: 326379
* Fix up the gtest targets for changes in the UnwindAssembly tests.Jim Ingham2018-02-281-20/+34
| | | | llvm-svn: 326378
* [InstCombine] simplify code for X * -1.0 --> -X; NFCSanjay Patel2018-02-282-9/+5
| | | | | | I've added random FMF to one of the tests to show those are propagated. llvm-svn: 326377
* [GlobalOpt] don't change CC of musttail calle(e|r)Jonas Devlieghere2018-02-282-1/+58
| | | | | | | | | | | | | | | When the function has musttail call - its cc is fixed to be equal to the cc of the musttail callee. In such case (and in the case of the musttail callee), GlobalOpt should not change the cc to fastcc as it will break the invariant. This fixes PR36546 Patch by: Fedor Indutny (indutny) Differential revision: https://reviews.llvm.org/D43859 llvm-svn: 326376
* [X86] Lower extract_element from k-registers by bitcasting from v16i1 to i16 ↵Craig Topper2018-02-285-41/+33
| | | | | | | | and extending/truncating. This is equivalent to what isel was doing anyway but by canonicalizing earlier we can remove some patterns. llvm-svn: 326375
* Add ability to collect memory limit.Han Ming Ong2018-02-286-6/+48
| | | | | | | | Reviewer: Jason Molenda <rdar://problem/37686560> llvm-svn: 326374
* [hwasan] update the asm snippet in the docs to match the current default ↵Kostya Serebryany2018-02-281-2/+0
| | | | | | behaviour llvm-svn: 326373
* [X86][AVX512] Improve support for signed saturation truncation storesSimon Pilgrim2018-02-282-9/+23
| | | | | | | | Matches what we already manage for unsigned saturation truncation stores Differential Revision: https://reviews.llvm.org/D43629 llvm-svn: 326372
* Make sure that clang-format doesn't reorder include files.Rui Ueyama2018-02-281-0/+2
| | | | | | | clang-format won't reorder include files if there is a blank line. Thanks to Nico for the tips. llvm-svn: 326371
* Attempt to fix cl-include.c on Windows.Nico Weber2018-02-281-2/+2
| | | | llvm-svn: 326370
* Adapt some tests to work with PPC64le architecturePavel Labath2018-02-284-4/+7
| | | | | | | | | | | | | | | Summary: Merge branch 'master' into adaptPPC64tests Reviewers: clayborg, alexandreyy, labath Reviewed By: clayborg, alexandreyy Subscribers: luporl, lbianc, alexandreyy, lldb-commits Differential Revision: https://reviews.llvm.org/D42917 Patch by Ana Julia Caetano <ana.caetano@eldorado.org.br>. llvm-svn: 326369
* [OpenMP] Extend NVPTX SPMD implementation of combined constructsCarlo Bertolli2018-02-2816-52/+476
| | | | | | | | Differential Revision: https://reviews.llvm.org/D43852 This patch extends the SPMD implementation to all target constructs and guards this implementation under a new flag. llvm-svn: 326368
OpenPOWER on IntegriCloud