summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Extend the GlobalObject metadata interfaceBenjamin Kramer2018-05-316-59/+64
| | | | | | | | | | | | - Make eraseMetadata return whether it changed something - Wire getMetadata for a single MDNode efficiently into the attachment map - Add hasMetadata, which is less weird than checking getMetadata == nullptr on a multimap. Use it to simplify code. llvm-svn: 333649
* Attempt to fix a buildbot.Rui Ueyama2018-05-311-1/+1
| | | | | | | Broken buildbot log: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/30855/steps/build/logs/stdio llvm-svn: 333648
* Fix a wrong `ld.lld --help` message.Rui Ueyama2018-05-311-1/+1
| | | | llvm-svn: 333647
* Implement --{push,pop}-state.Rui Ueyama2018-05-314-0/+66
| | | | | | | | | | | | | | | | | | | | --push-state implemented in this patch saves the states of --as-needed, --whole-archive and --static. It saves less number of flags than GNU linkers. Since even GNU linkers save different flags, no one seems to care about the details. In this patch, I tried to save the minimal number of flags to not complicate the implementation and the siutation. I'm not personally happy about adding the --{push,pop}-state flags though. That options seem too hacky to me. However, gcc started using the options since GCC 8 when GNU ld is available at the build time. Therefore, lld is no longer a drop-in replacmenet for GNU linker for that machine without supporting the flags. Fixes https://bugs.llvm.org/show_bug.cgi?id=34567 Differential Revision: https://reviews.llvm.org/D47542 llvm-svn: 333646
* [mips] Guard all short instructions correctly.Simon Dardis2018-05-315-33/+110
| | | | | | | | Reviewers: smaksimovic, atanasyan, abeserminji Differential Revision: https://reviews.llvm.org/D47533 llvm-svn: 333645
* Define SIZEOF_STRUCT_USTAT for 32bit sparc.Sylvestre Ledru2018-05-311-1/+1
| | | | | | | | Patch landed on gcc upstream: https://github.com/gcc-mirror/gcc/commit/27453e962b3fe2f918c5105b2a48ec3e92d4c873 Patch by Matthias Klose llvm-svn: 333644
* [InstCombine, ARM] Convert vld1 to llvm loadAlexandros Lamprineas2018-05-312-1/+148
| | | | | | | | | | Convert a vector load intrinsic into an llvm load instruction. This is beneficial when the underlying object being addressed comes from a constant, since we get constant-folding for free. Differential Revision: https://reviews.llvm.org/D46273 llvm-svn: 333643
* [X86] Extract latency of fldz/fld1 in separate classes.Clement Courbet2018-05-3119-56/+72
| | | | | | | | | | | | | | | | | Summary: - I've measured the values for Broadwell, Haswell, SandyBridge, Skylake. - For ZnVer1 and Atom, values were transferred form `InstRW`s. - For SLM and BtVer2, values are from Agner. This is split off from https://reviews.llvm.org/D47377 Reviewers: RKSimon, andreadb Subscribers: gbedwell, llvm-commits Differential Revision: https://reviews.llvm.org/D47523 llvm-svn: 333642
* [X86][SSE] Add support for detecting SUB(SPLAT_BV, SPLAT) cases for ↵Simon Pilgrim2018-05-314-224/+93
| | | | | | | | shift-rotate patterns. This improves splat rotations (rotation by an uniform value), to avoid having to use the generic non-uniform shift code (extension to PR37426). llvm-svn: 333641
* Remove the TestSequenceFunctions "example" testPavel Labath2018-05-311-34/+0
| | | | | | | | This test was using unittest (not unittest2) as the test framework, and it worked with dotest only by accident. Remove it as we have a much more realistic example test in test/testcases/sample_test. llvm-svn: 333640
* Remove append parameter to FindGlobalVariablesPavel Labath2018-05-3124-144/+88
| | | | | | | | | | | | | | | | | | | Summary: As discussed in https://bugs.llvm.org/show_bug.cgi?id=37317, FindGlobalVariables does not properly handle the case where append=false. As this doesn't seem to be used in the tree, this patch removes the parameter entirely. Reviewers: clayborg, jingham, labath Reviewed By: clayborg Subscribers: aprantl, lldb-commits, kubamracek, JDevlieghere Differential Revision: https://reviews.llvm.org/D46885 Patch by Tom Tromey <ttromey@mozilla.com>. llvm-svn: 333639
* Missing includeStephan Bergmann2018-05-311-0/+1
| | | | | | | (For some reason, my Mac build complained about unknown pthread_once_t and PTHREAD_ONCE_INIT, but not about pthread_once itself.) llvm-svn: 333638
* [Driver] Clean up tmp files when deleting Compilation objectsDavid Stenberg2018-05-314-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In rL327851 the createUniqueFile() and createTemporaryFile() variants that do not return the file descriptors were changed to create empty files, rather than only check if the paths are free. This change was done in order to make the functions race-free. That change led to clang-tidy (and possibly other tools) leaving behind temporary assembly files, of the form placeholder-*, when using a target that does not support the internal assembler. The temporary files are created when building the Compilation object in stripPositionalArgs(), as a part of creating the compilation database for the arguments after the double-dash. The files are created by Driver::GetNamedOutputPath(). Fix this issue by cleaning out temporary files at the deletion of Compilation objects. This fixes https://bugs.llvm.org/show_bug.cgi?id=37091. Reviewers: klimek, sepavloff, arphaman, aaron.ballman, john.brawn, mehdi_amini, sammccall, bkramer, alexfh, JDevlieghere Reviewed By: aaron.ballman, JDevlieghere Subscribers: erichkeane, lebedev.ri, Ka-Ka, cfe-commits Differential Revision: https://reviews.llvm.org/D45686 llvm-svn: 333637
* Simplify DWARFUnit::m_die_array swap() to use shrink_to_fit()Jan Kratochvil2018-05-311-9/+1
| | | | | | | | | rL145086 introduced m_die_array.shrink_to_fit() implemented by exact_size_die_array.swap, it was before LLVM became written in C++11. Differential revision: https://reviews.llvm.org/D47492 llvm-svn: 333636
* DWARFAcceleratorTable: fix equal_range iteratorsPavel Labath2018-05-314-33/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Both (Apple and DWARF5) implementations of the iterators had bugs which resulted in crashes if one attempted to iterate through the accelerator tables all the way. For the Apple tables, the issue was that we did not clear the DataOffset field when we reached the end, which made our iterator compare unequal to the "end" iterator. For the Dwarf5 tables, the problem was that we incremented the CurrentIndex pointer and then used the incremented (possibly invalid) pointer to check whether we have reached the end of the index list. The reason these bugs went undetected is because their only user (dwarfdump) only ever searched for the first match. Besides allowing us to test this fix, changing llvm-dwarfdump --find to display all matches seems like a good improvement (it makes the behavior consistent with the --name option), so I change llvm-dwarfdump to do that. The existing tests would be sufficient to test this fix with the new llvm-dwarfdump behavior, but I add a special test that demonstrates that the tool indeed displays multiple results. The find.test test needed to be tweaked a bit as the tool now does not print the ".debug_info contents" header (also consistent with how --name works). Reviewers: JDevlieghere, aprantl, dblaikie Subscribers: mgrang, llvm-commits Differential Revision: https://reviews.llvm.org/D47543 llvm-svn: 333635
* [AArch64] Reverted rL333427 fixing Clang UnitTest FailureLuke Geeson2018-05-313-5/+258
| | | | llvm-svn: 333634
* [NFC] Factor out a method for further extensionMax Kazantsev2018-05-311-20/+32
| | | | llvm-svn: 333633
* [llvm-exegesis][NFCI] Counter::Counter(): more useful msg on event open errorRoman Lebedev2018-05-311-3/+6
| | | | | | | | | | | | | | | | | | | | Summary: I'm slowly looking into a new X86 scheduler model, for AMD Bulldozer CPU, model 2 (bdver2, Piledriver). And naturally, i have hit that assert :) I happened to know what it meant, and how to fix it, but that is not too common knowledge. Reviewers: courbet, RKSimon Reviewed By: courbet Subscribers: tschuett, llvm-commits, craig.topper Differential Revision: https://reviews.llvm.org/D47572 llvm-svn: 333632
* Revert rL333106 / D46814: [InstCombine] Fold unfolded masked merge pattern ↵Roman Lebedev2018-05-317-168/+175
| | | | | | | | | | | | | with variable mask! In post-commit review, Eric Christopher notes that many new MSan warnings are being observed with this patch. The probable reason is: if 'y' is undef here and we could evaluate it twice and get different results. We can't increase the number of uses of a value. llvm-svn: 333631
* [lit] Fix windows cmd.exe test config for r333620Joel E. Denny2018-05-312-8/+8
| | | | llvm-svn: 333630
* [AMDGPU] Track occupancy in MFIStanislav Mekhanoshin2018-05-316-13/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep track of achieved occupancy in SIMachineFunctionInfo. At the moment we have a lot of duplicated or even missed code to query and maintain occupancy info. Record it in the MFI and query in a single call. Interfaces: - getOccupancy() - returns current recorded achieved occupancy. - getMinAllowedOccupancy() - returns lesser of the achieved occupancy and the lowest occupancy we are ready to tolerate. For example if a kernel is memory bound we are ready to tolerate 4 waves. - limitOccupancy() - record occupancy level if we have to lower it. - increaseOccupancy() - record occupancy if scheduler managed to increase the occupancy. MFI takes care of integrating different checks affecting occupancy, including LDS use and waves-per-eu attribute. Note that scheduler starts with not yet known register pressure, so has to record either limit or increase in occupancy after it is done. Later passes can just query a resulting value. New interface is used in the active scheduler and NFC wrt its work. Changes are also made to experimental schedulers to use it and record an occupancy after they are done. Before the change waves-per-eu was ignored by experimental schedulers and tolerance window for memory bound kernels was not used. Differential Revision: https://reviews.llvm.org/D47509 llvm-svn: 333629
* [XRay] Fixup: Remove unnecessary type aliasDean Michael Berris2018-05-311-6/+4
| | | | | | Follow-up to D45758. llvm-svn: 333628
* [XRay] Fixup: Explicitly call std::make_tuple(...)Dean Michael Berris2018-05-311-2/+2
| | | | | | Follow-up to D45758. llvm-svn: 333627
* [X86] Make 512-bit unmasked load/store builtins more like their 128/256-bit ↵Craig Topper2018-05-312-18/+20
| | | | | | | | equivalents. Previously we were just passing -1 mask to the masked builtin. This changes it to the more generic way that the 128/256 bit use. llvm-svn: 333626
* [XRay] Fixup: Address some warnings breaking buildDean Michael Berris2018-05-312-7/+7
| | | | | | Follow-up to D45758. llvm-svn: 333625
* [XRay][profiler] Part 3: Profile Collector ServiceDean Michael Berris2018-05-316-0/+556
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is part of the larger XRay Profiling Mode effort. This patch implements a centralised collector for `FunctionCallTrie` instances, associated per thread. It maintains a global set of trie instances which can be retrieved through the XRay API for processing in-memory buffers (when registered). Future changes will include the wiring to implement the actual profiling mode implementation. This central service provides the following functionality: * Posting a `FunctionCallTrie` associated with a thread, to the central list of tries. * Serializing all the posted `FunctionCallTrie` instances into in-memory buffers. * Resetting the global state of the serialized buffers and tries. Depends on D45757. Reviewers: echristo, pelikan, kpw Reviewed By: kpw Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D45758 llvm-svn: 333624
* AMDGPU/R600: Make sure functions are cacheline alignedJan Vesely2018-05-312-0/+17
| | | | | | | | | | | v2: use "ensureAlignment" make functions cache line aligned Fixes GPU hangs since r333219: "AMDGPU: Split R600 AsmPrinter code into its own class" Differential Revision: https://reviews.llvm.org/D47516 llvm-svn: 333622
* Update isl to isl-0.19-173-g77fe2538Tobias Grosser2018-05-3132-52/+343
| | | | | | | | | Besides other changes, this update introduces functions to translate a maps and sets into lists of their elements. These lists are useful as we can define iterators for lists, which allow us to replace many uses of foreach. llvm-svn: 333621
* [lit] Terminate ": RUN at line N" with ";" not "&&"Joel E. Denny2018-05-314-20/+20
| | | | | | | | This fixes projects/compiler-rt/test/fuzzer/sigusr.test, which was broken by r333614. The trouble was that "&&" changes the command for which "$!" gives the pid. llvm-svn: 333620
* [GlobalISel][Legalizer] LegalizerInfo verifier: Making ↵Roman Tereshin2018-05-311-0/+3
| | | | | | | | | | | | LegalizerInfo::verify(...) errors fatal Reviewers: aemerson, qcolombet Reviewed By: qcolombet Differential Revision: https://reviews.llvm.org/D46339 llvm-svn: 333619
* [GlobalISel][AArch64] LegalizerInfo verifier: Fixing bugs exposed by ↵Roman Tereshin2018-05-314-21/+12
| | | | | | | | | | | | LegalizerInfo::verify(...) Reviewers: aemerson, qcolombet Reviewed By: qcolombet Differential Revision: https://reviews.llvm.org/D46339 llvm-svn: 333618
* [X86] Fix wrong intrinsic semantic.Tim Shen2018-05-312-17/+17
| | | | llvm-svn: 333617
* [libFuzzer] add collect_data_flow.py that allows to run the data-flow tracer ↵Kostya Serebryany2018-05-312-0/+61
| | | | | | several times on subsets of inputs bytes, to overcome DFSan out-of-label failures llvm-svn: 333616
* [X86] Fix some places where macro arguments to intrinsics weren't cast to ↵Craig Topper2018-05-317-104/+104
| | | | | | | | | | _m512(i|d)/_m256(i|d/_m128(i|d) first. The majority of the cases were correct. This fixes the few that weren't. I also removed some superfluous parentheses in non-macros that confused by attempts at grepping for missing casts. llvm-svn: 333615
* [lit] Report line number for failed RUN commandJoel E. Denny2018-05-3117-11/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Relands r333584, reverted in 333592.) When debugging test failures with -vv (or -v in the case of the internal shell), this makes it easier to locate the RUN line that failed. For example, clang's test/Driver/linux-ld.c has 892 total RUN lines, and clang's test/Driver/arm-cortex-cpus.c has 424 RUN lines after concatenation for line continuations. When reading the generated shell script, this also makes it easier to locate the RUN line that produced each command. To support reporting RUN line numbers in the case of the internal shell, this patch extends the internal shell to support the null command, ":", except pipelines are not supported. To support reporting RUN line numbers in the case of windows cmd.exe as the external shell, this patch extends -vv to set "echo on" instead of "echo off" in bat files. (Support for windows cmd.exe as a lit external shell will likely be dropped later, but I found out too late.) Reviewed By: delcypher, asmith, stella.stamenova, jmorse, lebedev.ri, rnk Differential Revision: https://reviews.llvm.org/D44598 llvm-svn: 333614
* [X86] Remove __extension__ from macro intrinsics when its not needed.Craig Topper2018-05-3123-2941/+2939
| | | | | | | | | | I think this is a holdover from when we used to declare variables inside the macros. And then its been copy and pasted forward for years every time a new macro intrinsic gets added. Interestingly this caused some tests for IRGen to be slightly more optimized. We now return a zeroinitializer directly instead of going through a store+load. It also removed a bogus error message on another test. llvm-svn: 333613
* [analyzer] Trust _Nonnull annotations, and trust analyzer knowledge about ↵George Karpenkov2018-05-313-10/+75
| | | | | | | | | | | | | | | receiver nullability Previously, the checker was using the nullability of the expression, which is nonnull IFF both receiver and method are annotated as _Nonnull. However, the receiver could be known to the analyzer to be nonnull without being explicitly marked as _Nonnull. rdar://40635584 Differential Revision: https://reviews.llvm.org/D47510 llvm-svn: 333612
* [InstCombine] don't change the size of a select if it would mismatch its ↵Sanjay Patel2018-05-313-26/+32
| | | | | | | | | | | | | | | | | | | | | condition operands' sizes Don't always: cast (select (cmp x, y), z, C) --> select (cmp x, y), (cast z), C' This is something that came up as far back as D26556, and I lost track of it. I suspect that this transform is part of the underlying problem that is inspiring some of the recent proposals that seek to match larger patterns that include a cast op. Even if that's not true, this transform causes problems for codegen (particularly with vector types). A transform to actively match the size of cmp and select operand sizes should follow. This patch just removes the harmful canonicalization in the other direction. Differential Revision: https://reviews.llvm.org/D47163 llvm-svn: 333611
* [InstCombine] don't negate constant expression with fsub (PR37605)Sanjay Patel2018-05-302-1/+17
| | | | | | | X + (-C) would be transformed back into X - C, so infinite loop: https://bugs.llvm.org/show_bug.cgi?id=37605 llvm-svn: 333610
* [Coverage] Discard the last uncompleted deferred region in a declVedant Kumar2018-05-305-36/+27
| | | | | | | | | | | | | | | | | | | Discard the last uncompleted deferred region in a decl, if one exists. This prevents lines at the end of a function containing only whitespace or closing braces from being marked as uncovered, if they follow a region terminator (return/break/etc). The previous behavior was to heuristically complete deferred regions at the end of a decl. In practice this ended up being too brittle for too little gain. Users would complain that there was no way to reach full code coverage because whitespace at the end of a function would be marked uncovered. rdar://40238228 Differential Revision: https://reviews.llvm.org/D46918 llvm-svn: 333609
* [llvm-cov] Use the new PrintHTMLEscaped utilityVedant Kumar2018-05-302-27/+25
| | | | | | This removes some duplicate logic to escape characters in HTML output. llvm-svn: 333608
* Add "(default)" to default optionsRui Ueyama2018-05-301-24/+24
| | | | | | | | This improves the help message shown for `ld.lld --help`. Differential Revision: https://reviews.llvm.org/D47562 llvm-svn: 333607
* [www] Update C++ status to cover P0620.Richard Smith2018-05-301-7/+12
| | | | | | While here, mark three-way comparison as in progress and bump "Clang 6" items from yellow to green. llvm-svn: 333606
* AMDGPU: Split AMDGPUTTI into GCNTTI and R600TTITom Stellard2018-05-304-42/+212
| | | | | | | | | | | | Reviewers: arsenm, nhaehnle Reviewed By: arsenm Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, llvm-commits, t-tye Differential Revision: https://reviews.llvm.org/D47359 llvm-svn: 333605
* [LowerTypeTests] Discard extern_weak linkage for definitionsVlad Tsyrklevich2018-05-302-0/+19
| | | | | | | | | | | | | | | | | | Summary: Fix PR37625. It's possible for an extern_weak declaration to be emitted to the merged module when a definition exists in the ThinLTO portion of the build; discard the linkage on the declaration in that case. (otherwise we copy the linkage to the alias to the jumptable and fail) Reviewers: pcc Reviewed By: pcc Subscribers: mehdi_amini, llvm-commits, kcc Differential Revision: https://reviews.llvm.org/D47494 llvm-svn: 333604
* [X86] Use C style comments in intrinsic headers for overall consistency.Craig Topper2018-05-306-91/+100
| | | | | | | | Most of the origial comments used C style /* */ comments, but some C++ // comments had snuck in over time. Still need to convert all the doxygen comments. Which is much harder to do. llvm-svn: 333603
* IRGen: Rename bitsets -> type metadata. NFC.Peter Collingbourne2018-05-301-18/+17
| | | | | | | "Type metadata" is the term that we've been using for the CFI-related information on vtables for a while now. llvm-svn: 333602
* [NewGVN] Fix set comparison; reflow commentGeorge Burgess IV2018-05-301-7/+8
| | | | | | | | | | | | | | | | Looks like we intended to compare this->Members with Other->Members here, but ended up comparing this->Members with this->Members. Oops. :) Since CongruenceClass::Members is a SmallPtrSet anyway, we can probably skip building std::sets if we're willing to write a bit more code. This appears to be no functional change (for sufficiently lax values of "no"): this equality check was only being called inside of an assert. So, worst case, we'll catch more bugs in the form of assertion failures. Thanks to d0k for noting this! llvm-svn: 333601
* AST: Remove an unused ctor. NFC.Peter Collingbourne2018-05-301-3/+0
| | | | llvm-svn: 333600
* PR37631: verify that a member deduction guide has the same access as its ↵Richard Smith2018-05-303-7/+54
| | | | | | template. llvm-svn: 333599
OpenPOWER on IntegriCloud