OSDN Git Service
Dean Michael Berris [Fri, 3 Aug 2018 09:21:31 +0000 (09:21 +0000)]
[XRay][tools] Use Support/JSON.h in llvm-xray convert
Summary:
This change removes the ad-hoc implementation used by llvm-xray's
`convert` subcommand to generate JSON encoded catapult (AKA Chrome
Trace Viewer) trace output, to instead use the JSON encoder now in the
Support library.
Reviewers: kpw, zturner, eizan
Reviewed By: kpw
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D50129
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338834
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 3 Aug 2018 09:20:02 +0000 (09:20 +0000)]
[X86] Add example of 'zero shift' guards on rotation patterns (PR34924)
Basic pattern that leaves an unnecessary select on a rotation by zero result. This variant is trivial - the more general case with a compare+branch to prevent execution of undefined shifts is more tricky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338833
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Fri, 3 Aug 2018 09:12:56 +0000 (09:12 +0000)]
[ARM] FP16: support VFMA
This is addressing PR38404.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338830
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Fri, 3 Aug 2018 09:06:11 +0000 (09:06 +0000)]
[XRay] fixup: add one more missing std::move(...)
Follow up to D48370.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338829
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Fri, 3 Aug 2018 07:54:37 +0000 (07:54 +0000)]
[XRay] fixup: Add missing std::move(...)
Follow up to D48370.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338827
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Fri, 3 Aug 2018 07:41:34 +0000 (07:41 +0000)]
[XRay] Fixup: remove 'noexcept' in defaulted move members
This is to appease stage1 builds using gcc.
Follow-up to D48370.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338826
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Fri, 3 Aug 2018 07:18:39 +0000 (07:18 +0000)]
[XRay][llvm] Load XRay Profiles
Summary:
This change implements the profile loading functionality in LLVM to
support XRay's profiling mode in compiler-rt.
We introduce a type named `llvm::xray::Profile` which allows building a
profile representation. We can load an XRay profile from a file to build
Profile instances, or do it manually through the Profile type's API.
The intent is to get the `llvm-xray` tool to generate `Profile`
instances and use that as the common abstraction through which all
conversion and analysis can be done. In the future we can generate
`Profile` instances from `Trace` instances as well, through conversion
functions.
Some of the key operations supported by the `Profile` API are:
- Path interning (`Profile::internPath(...)`) which returns a unique path
identifier.
- Block appending (`Profile::addBlock(...)`) to add thread-associated
profile information.
- Path ID to Path lookup (`Profile::expandPath(...)`) to look up a
PathID and return the original interned path.
- Block iteration.
A 'Path' in this context represents the function call stack in
leaf-to-root order. This is represented as a path in an internally
managed prefix tree in the `Profile` instance. Having a handle (PathID)
to identify the unique Paths we encounter for a particular Profile
allows us to reduce the amount of memory required to associate profile
data to a particular Path.
This is the first of a series of patches to migrate the `llvm-stacks`
tool towards using a single profile representation.
Depends on D48653.
Reviewers: kpw, eizan
Reviewed By: kpw
Subscribers: mgorny, llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D48370
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338825
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 3 Aug 2018 07:01:10 +0000 (07:01 +0000)]
[X86] Remove all the vector NOP bitcast patterns. Use a few lines of code in the Select method in X86ISelDAGToDAG.cpp instead.
There are a lot of permutations of types here generating a lot of patterns in the isel table. It's more efficient to just ReplaceUses and RemoveDeadNode from the Select function.
The test changes are because we have a some shuffle patterns that have a bitcast as their root node. But the behavior is identical to another instruction whose pattern doesn't start with a bitcast. So this isn't a functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338824
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 3 Aug 2018 07:00:08 +0000 (07:00 +0000)]
build_llvm_package.bat: Add OpenMP back
After r338721, it builds again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338823
91177308-0d34-0410-b5e6-
96231b3b80d8
Chijun Sima [Fri, 3 Aug 2018 06:51:35 +0000 (06:51 +0000)]
[Dominators] Refine the logic of recalculate() in the DomTreeUpdater
Summary:
This patch refines the logic of `recalculate()` in the `DomTreeUpdater` in the following two aspects:
1. Previously, `recalculate()` tests whether there are pending updates/BBs awaiting deletion and then do recalculation under Lazy UpdateStrategy; and do recalculation immediately under Eager UpdateStrategy. (The former behavior is inherited from the `DeferredDominance` class). This is an inconsistency between two strategies and there is no obvious reason to do this. So the behavior is changed to always recalculate available trees when calling `recalculate()`.
2. Fix the issue of when DTU under Lazy UpdateStrategy holds nothing but with BBs awaiting deletion, after calling `recalculate()`, BBs awaiting deletion aren't flushed. An additional unittest is added to cover this case.
Reviewers: kuhar, dmgreen, brzycki, grosser, davide
Reviewed By: kuhar
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D50173
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338822
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 3 Aug 2018 06:12:56 +0000 (06:12 +0000)]
[X86] Support fp128 and/or/xor/load/store with VEX and EVEX encoded instructions.
Move all the patterns to X86InstrVecCompiler.td so we can keep SSE/AVX/AVX512 all in one place.
To save some patterns we'll use an existing DAG combine to convert f128 fand/for/fxor to integer when sse2 is enabled. This allows use to reuse all the existing patterns for v2i64.
I believe this now makes SHA instructions the only case where VEX/EVEX and legacy encoded instructions could be generated simultaneously.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338821
91177308-0d34-0410-b5e6-
96231b3b80d8
Hiroshi Inoue [Fri, 3 Aug 2018 05:39:48 +0000 (05:39 +0000)]
[InstSimplify] fold extracting from std::pair (2/2)
This is the second patch of the series which intends to enable jump threading for an inlined method whose return type is std::pair<int, bool> or std::pair<bool, int>.
The first patch is https://reviews.llvm.org/rL338485.
This patch handles code sequences that merges two values using `shl` and `or`, then extracts one value using `and`.
Differential Revision: https://reviews.llvm.org/D49981
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338817
91177308-0d34-0410-b5e6-
96231b3b80d8
Chijun Sima [Fri, 3 Aug 2018 05:08:17 +0000 (05:08 +0000)]
[Dominators] Convert existing passes and utils to use the DomTreeUpdater class
Summary:
This patch is the second in a series of patches related to the [[ http://lists.llvm.org/pipermail/llvm-dev/2018-June/123883.html | RFC - A new dominator tree updater for LLVM ]].
It converts passes (e.g. adce/jump-threading) and various functions which currently accept DDT in local.cpp and BasicBlockUtils.cpp to use the new DomTreeUpdater class.
These converted functions in utils can accept DomTreeUpdater with either UpdateStrategy and can deal with both DT and PDT held by the DomTreeUpdater.
Reviewers: brzycki, kuhar, dmgreen, grosser, davide
Reviewed By: brzycki
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D48967
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338814
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 3 Aug 2018 04:49:42 +0000 (04:49 +0000)]
[X86] When post-processing the DAG to remove zero extending moves for YMM/ZMM, make sure the producing instruction is VEX/XOP/EVEX encoded.
If the producing instruction is legacy encoded it doesn't implicitly zero the upper bits. This is important for the SHA instructions which don't have a VEX encoded version. We might also be able to hit this with the incomplete f128 support that hasn't been ported to VEX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338812
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 3 Aug 2018 04:49:41 +0000 (04:49 +0000)]
[X86] Autogenerate complete checks. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338811
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 3 Aug 2018 03:45:19 +0000 (03:45 +0000)]
[X86] Add R13D to the isInefficientLEAReg in FixupLEAs.
I'm assuming the R13 restriction extends to R13D. Guessing this restriction is related to the funny encoding of this register as base always requiring a displacement to be encoded.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338806
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 3 Aug 2018 01:28:12 +0000 (01:28 +0000)]
[X86] Autogenerate complete checks. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338802
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 3 Aug 2018 01:20:32 +0000 (01:20 +0000)]
[X86] Autogenerate complete checks. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338799
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 3 Aug 2018 00:37:34 +0000 (00:37 +0000)]
[X86] Prevent promotion of i16 add/sub/and/or/xor to i32 if we can fold an atomic load and atomic store.
This makes them consistent with i8/i32/i64. Which still seems to be more aggressive on folding than icc, gcc, or MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338795
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 3 Aug 2018 00:21:56 +0000 (00:21 +0000)]
[LICM] Remove unneccessary safety check to increase sinking effectiveness
This one requires a bit of explaination. It's not every day you simply delete code to implement an optimization. :)
The transform in question is sinking an instruction from a loop to the uses in loop exiting blocks. We know (from LCSSA) that all of the uses outside the loop must be phi nodes, and after predecessor splitting, we know all phi users must have a single operand. Since the use must be strictly dominated by the def, we know from the definition of dominance/ssa that the exit block must execute along a (non-strict) subset of paths which reach the def. As a result, duplicating a potentially faulting instruction can not *introduce* a fault that didn't previously exist in the program.
The full story is that this patch builds on "rL338671: [LICM] Factor out fault legality from canHoistOrSinkInst [NFC]" which pulled this logic out of a common helper routine. As best I can tell, this check was originally added to the helper function for hoisting legality, later an incorrect fastpath for loads/calls was added, and then the bug was fixed by duplicating the fault safety check in the hoist path. This left the redundant check in the common code to pessimize sinking for no reason. I split it out in an NFC, and am not removing the unneccessary check. I wanted there to be something easy to revert in case I missed something.
Reviewed by: Anna Thomas (in person)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338794
91177308-0d34-0410-b5e6-
96231b3b80d8
Dave Lee [Fri, 3 Aug 2018 00:06:38 +0000 (00:06 +0000)]
objdump: Better handling of Mach-O universal binaries
Summary:
With Mach-O, there is a flag requirement discrepancy between working with
universal binaries and thin binaries. Many flags that don't require the `-macho`
flag (for example `-private-headers` and `-disassemble`) fail to work on
universal binaries unless `-macho` is given. When this happens, the error
message is unhelpful, stating:
The file was not recognized as a valid object file.
Which can lead to confusion.
This change allows generic flags to be used on universal binaries with and
without the `-macho` flag. This means flags that can be used for thin files can
be used consistently with fat files too.
To do this, the universal binary support within `ParseInputMachO()` is extracted
into a new function. This new function is called directly from `DumpInput()`
when the input binary is universal. Additionally the `-arch` flag validation in
`ParseInputMachO()` was extracted to be reused.
Reviewers: compnerd
Reviewed By: compnerd
Subscribers: keith, llvm-commits
Differential Revision: https://reviews.llvm.org/D48702
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338792
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 2 Aug 2018 23:54:16 +0000 (23:54 +0000)]
[GlobalMerge] Allow merging globals with explicit section markings.
At least on ELF, it's impossible to tell from the object file whether
two globals with the same section marking were merged: the merged global
uses "private" linkage to hide its symbol, and the aliases look like
regular symbols. I can't think of any other reason to disallow it.
(Of course, we can only merge globals in the same section.)
The weird alignment handling matches AsmPrinter; our alignment handling
for global variables should probably be refactored.
Differential Revision: https://reviews.llvm.org/D49822
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338791
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Renouf [Thu, 2 Aug 2018 23:33:01 +0000 (23:33 +0000)]
[AMDGPU] Minor change to d16 buffer load implementation
Summary:
By not reconstructing the operand list of the SDNode, this change makes
it easier to add the forthcoming new tbuffer and buffer intrinsics.
Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D49995
Change-Id: I0cb79ef0801532645d7dd954a6d7355139db7b38
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338784
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Renouf [Thu, 2 Aug 2018 23:31:32 +0000 (23:31 +0000)]
[AMDGPU] Reworked SIFixWWMLiveness
Summary:
I encountered some problems with SIFixWWMLiveness when WWM is in a loop:
1. It sometimes gave invalid MIR where there is some control flow path
to the new implicit use of a register on EXIT_WWM that does not pass
through any def.
2. There were lots of false positives of registers that needed to have
an implicit use added to EXIT_WWM.
3. Adding an implicit use to EXIT_WWM (and adding an implicit def just
before the WWM code, which I tried in order to fix (1)) caused lots
of the values to be spilled and reloaded unnecessarily.
This commit is a rework of SIFixWWMLiveness, with the following changes:
1. Instead of considering any register with a def that can reach the WWM
code and a def that can be reached from the WWM code, it now
considers three specific cases that need to be handled.
2. A register that needs liveness over WWM to be synthesized now has it
done by adding itself as an implicit use to defs other than the
dominant one.
Also added the following fixmes:
FIXME: We should detect whether a register in one of the above
categories is already live at the WWM code before deciding to add the
implicit uses to synthesize its liveness.
FIXME: I believe this whole scheme may be flawed due to the possibility
of the register allocator doing live interval splitting.
Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D46756
Change-Id: Ie7fba0ede0378849181df3f1a9a7a39ed1a94a94
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338783
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 2 Aug 2018 23:30:38 +0000 (23:30 +0000)]
[X86] Allow 'atomic_store (neg/not atomic_load)' to isel to a RMW instruction.
There was a FIXMe in the td file about a type inference issue that was easy to fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338782
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 2 Aug 2018 23:30:31 +0000 (23:30 +0000)]
[X86] Add NEG and NOT test cases to atomic_mi.ll in preparation for fixing the FIXME in X86InstrCompiler.td to make these work for atomic load/store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338781
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Renouf [Thu, 2 Aug 2018 22:53:57 +0000 (22:53 +0000)]
[AMDGPU] Avoid using divergent value in mubuf addr64 descriptor
Summary:
This fixes a problem where a load from global+idx generated incorrect
code on <=gfx7 when the index is divergent.
Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D47383
Change-Id: Ib4d177d6254b1dd3f8ec0203fdddec94bd8bc5ed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338779
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 2 Aug 2018 22:37:40 +0000 (22:37 +0000)]
[MS Demangler] Fix some tests that are no longer broken.
These were fixed with earlier patches, but had not yet been
re-enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338778
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 2 Aug 2018 22:17:53 +0000 (22:17 +0000)]
[Hexagon] Simplify CFG after atomic expansion
This will remove suboptimal branching from the generated ll/sc loops.
The extra simplification pass affects a lot of testcases, which have
been modified to accommodate this change: either by modifying the
test to become immune to the CFG simplification, or (less preferablt)
by adding option -hexagon-initial-cfg-clenaup=0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338774
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Thu, 2 Aug 2018 21:44:24 +0000 (21:44 +0000)]
[WebAssembly] Support for atomic.wait / atomic.wake instructions
Summary:
This adds support for atomic.wait / atomic.wake instructions in the wasm
thread proposal.
Reviewers: dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D49395
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338770
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 2 Aug 2018 20:45:06 +0000 (20:45 +0000)]
[Unittests] Fix returning string in SolveQuadraticEquationWrap
Returning a Twine caused runtime failures. Convert it to std::string
before retuning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338768
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 2 Aug 2018 20:28:45 +0000 (20:28 +0000)]
[X86] Autogenerate complete checks. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338765
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 2 Aug 2018 20:13:58 +0000 (20:13 +0000)]
[ORC] Add a re-exports fallback definition generator.
An instance of ReexportsFallbackDefinitionGenerator can be attached to a VSO
(via setFallbackDefinitionGenerator) to re-export symbols on demandy from a
backing VSO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338764
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Thu, 2 Aug 2018 19:50:27 +0000 (19:50 +0000)]
[Support] Add an enable bit to our DebugCounters
r337748 made us start incrementing DebugCounters all of the time. This
makes tsan unhappy in multithreaded environments.
Since it doesn't make much sense to use DebugCounters with multiple
threads, this patch makes us only count anything if the user passed a
-debug-counter option or if some other piece of code explicitly asks
for it (e.g. the pass in D50031).
The amount of global state here makes writing a unittest for this
behavior somewhat awkward. So, no test is provided.
Differential Revision: https://reviews.llvm.org/D50150
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338762
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 2 Aug 2018 19:38:18 +0000 (19:38 +0000)]
Unbreak build after r338758: specify lambda return type explicitly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338760
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Thu, 2 Aug 2018 19:29:38 +0000 (19:29 +0000)]
[DebugInfo/DWARF] Remove redundant iterator type. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338759
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 2 Aug 2018 19:13:35 +0000 (19:13 +0000)]
[SCEV] Properly solve quadratic equations
Differential Revision: https://reviews.llvm.org/D48283
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338758
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Haarman [Thu, 2 Aug 2018 18:27:21 +0000 (18:27 +0000)]
[Support] [NFC] change comment about retries in createUniqueEntity
Rewording as requested on D50126 after the change was pushed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338755
91177308-0d34-0410-b5e6-
96231b3b80d8
Puyan Lotfi [Thu, 2 Aug 2018 18:16:52 +0000 (18:16 +0000)]
[NFC] clang-format cleanup of a couple files in llvm-objcopy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338752
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 2 Aug 2018 18:16:10 +0000 (18:16 +0000)]
CMake: Remove LLVM_DYLIB_SYMBOL_VERSIONING
Summary:
This option is no longer needed since r300496 added symbol
versioning by default
Reviewers: sylvestre.ledru, beanz, mgorny
Reviewed By: mgorny
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D49835
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338751
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Pilkington [Thu, 2 Aug 2018 17:45:01 +0000 (17:45 +0000)]
[itanium demangler] Support dot suffixes on block invocation functions
rdar://
32378759
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338747
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Haarman [Thu, 2 Aug 2018 17:41:38 +0000 (17:41 +0000)]
[Support] fix TempFile infinite loop and permission denied errors
Summary:
On Windows, TempFile::create() was prone to failing with permission
denied errors when a process created many tempfiles without providing
a model large enough to accommodate them. There was also a problem
with createUniqueEntity getting into an infinite loop when all names
permitted by the model are in use. This change fixes both of these
problems and adds a unit test for them.
Reviewers: pcc, rnk, zturner
Reviewed By: zturner
Subscribers: inglorion, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D50126
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338745
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Thu, 2 Aug 2018 17:38:06 +0000 (17:38 +0000)]
[WebAssembly] Ensure bitcasts that would result in invalid wasm are removed by FixFunctionBitcasts
Rather than allowing invalid bitcasts to be lowered to wasm
call instructions that won't validate, generate wrappers that
contain unreachable thereby delaying the error until runtime.
Differential Revision: https://reviews.llvm.org/D49517
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338744
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 2 Aug 2018 17:33:33 +0000 (17:33 +0000)]
Fix one more warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338742
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 2 Aug 2018 17:20:31 +0000 (17:20 +0000)]
Update the LLVM VS integration to sign the assembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338740
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 2 Aug 2018 17:18:01 +0000 (17:18 +0000)]
Fix a couple of warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338739
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 2 Aug 2018 17:08:24 +0000 (17:08 +0000)]
Use %.*s instead of %*s when formatting strings with explicit length.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338737
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 2 Aug 2018 17:08:03 +0000 (17:08 +0000)]
[MS Demangler] Resolve back-references lazily.
We need to both record and resolve back-references lazily due to
not being able to know until a demangling is complete whether or
not a name should go into the back-reference table.. This patch
implements lazy resolution of back-references, but we still have
eager recording of back-references. This will be fixed in a
subsequent patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338736
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 2 Aug 2018 16:48:01 +0000 (16:48 +0000)]
[X86] Allow fake unary unpckhpd and movhlps to be commuted for execution domain fixing purposes
These instructions perform the same operation, but the semantic of which operand is destroyed is reversed. If the same register is used as both operands we can change the execution domain without worrying about this difference.
Unfortunately, this really only works in cases where the input register is killed by the instruction. If its not killed, the two address isntruction pass inserts a copy that will become a move instruction. This makes the instruction use different physical registers that contain the same data at the time the unpck/movhlps executes. I've considered using a unary pseudo instruction with tied operand to trick the two address instruction pass. We could then expand the pseudo post regalloc to get the same physical register on both inputs.
Differential Revision: https://reviews.llvm.org/D50157
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338735
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Thu, 2 Aug 2018 15:43:57 +0000 (15:43 +0000)]
[SLC] Refactor simplification of pow() (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338730
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 2 Aug 2018 15:34:51 +0000 (15:34 +0000)]
[X86][SSE] Add uniform/non-uniform exact sdiv vector tests covering all paths
Regenerated tests and tested on 64-bit (AVX2) as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338729
91177308-0d34-0410-b5e6-
96231b3b80d8
David Bolvansky [Thu, 2 Aug 2018 14:59:23 +0000 (14:59 +0000)]
[InstCombine] [NFC] Tests for select with binop fold
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338727
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 2 Aug 2018 14:33:40 +0000 (14:33 +0000)]
[InstSimplify] move minnum/maxnum with undef fold from instcombine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338719
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Thu, 2 Aug 2018 14:04:48 +0000 (14:04 +0000)]
[ARM][NFC] Follow up of r338568
I disabled more tests than necessary, this enables them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338717
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 2 Aug 2018 13:46:20 +0000 (13:46 +0000)]
[ValueTracking] fix maxnum miscompile for cannotBeOrderedLessThanZero (PR37776)
This adds the NAN checks suggested in PR37776:
https://bugs.llvm.org/show_bug.cgi?id=37776
If both operands to maxnum are NAN, that should get constant folded, so we don't
have to handle that case. This is the same assumption as other FP ops in this
function. Returning 'false' is always conservatively correct.
Copying from the bug report:
Currently, we have this for "when is cannotBeOrderedLessThanZero
(mustBePositiveOrNaN) true for maxnum":
L
-------------------
| Pos | Neg | NaN |
------------------------
|Pos | x | x | x |
------------------------
R |Neg | x | | x |
------------------------
|NaN | x | x | x |
------------------------
The cases with (Neg & NaN) are wrong. We should have:
L
-------------------
| Pos | Neg | NaN |
------------------------
|Pos | x | x | x |
------------------------
R |Neg | x | | |
------------------------
|NaN | x | | x |
------------------------
Differential Revision: https://reviews.llvm.org/D50081
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338716
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 2 Aug 2018 13:43:53 +0000 (13:43 +0000)]
DAG: Fix vector widening fcanonicalize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338715
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 2 Aug 2018 13:43:42 +0000 (13:43 +0000)]
AMDGPU: Fix scalarizing v4f16 fcanonicalize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338714
91177308-0d34-0410-b5e6-
96231b3b80d8
Ben Dunbobbin [Thu, 2 Aug 2018 12:27:01 +0000 (12:27 +0000)]
[llvm-ar] Fix help text test. NFC.
Missed from @338703
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338709
91177308-0d34-0410-b5e6-
96231b3b80d8
Ben Dunbobbin [Thu, 2 Aug 2018 11:27:38 +0000 (11:27 +0000)]
[llvm-ar] Correct help text
Corrected and simplified the help text.
It was clearly too difficult to maintain before (see e.g. @227296) making it
simpler and more consistent it should help people keep it up to date.
Differential Revision: https://reviews.llvm.org/D48577
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338703
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Thu, 2 Aug 2018 11:12:35 +0000 (11:12 +0000)]
[llvm-mca] Use a vector to store ResourceState objects in the ResourceManager.
We don't need to use a map to store ResourceState objects. The number of
processor resources is known statically from the scheduling model. We can
therefore use a vector, and reserve a slot for each processor resource that we
want to simulate.
Every time the ResourceManager queries the ResourceState vector, the index to
the vector of ResourceState objects can be easily computed from the processor
resource mask.
This drastically reduces the time complexity of method ResourceManager::use() and
method ResourceManager::release(). This patch gives an average speedup of 12%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338702
91177308-0d34-0410-b5e6-
96231b3b80d8
Guillaume Chatelet [Thu, 2 Aug 2018 11:12:02 +0000 (11:12 +0000)]
[llvm-exegesis] Rename InstructionInstance into InstructionBuilder.
Summary: Non functional change.
Subscribers: tschuett, courbet, llvm-commits
Differential Revision: https://reviews.llvm.org/D50176
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338701
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 2 Aug 2018 10:53:53 +0000 (10:53 +0000)]
[X86][SSE] Add more UDIV nonuniform-constant vector tests
Ensure we cover all paths for vector data as requested on D49248
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338698
91177308-0d34-0410-b5e6-
96231b3b80d8
Stefan Granitz [Thu, 2 Aug 2018 09:45:59 +0000 (09:45 +0000)]
Add include guard
Summary: Add missing include guard LLVM_DEMANGLE_DEMANGLE_H in llvm/Demangle/Demangle.h
Reviewers: erik.pilkington
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D50042
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338694
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 2 Aug 2018 09:20:27 +0000 (09:20 +0000)]
[X86][SSE] Pull out duplicate VSELECT to shuffle mask code. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338693
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Ivchenko [Thu, 2 Aug 2018 08:55:05 +0000 (08:55 +0000)]
[GlobalISel] Fix typo with missed override specifier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338689
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Savonichev [Thu, 2 Aug 2018 08:50:41 +0000 (08:50 +0000)]
[emacs] Indent statement continuation to match clang-format
Summary:
Was:
int LongVariableName =
veryLongFunctionNameThatExceeds80ColumnsRule(SomeParameter);
int ShortVar = veryLongFunctionNameThatStillFitsIntoOneLine(SomeParameter)
.nowThisDoesntFit()
.andThis()
Now:
int LongVariableName =
veryLongFunctionNameThatExceeds80ColumnsRule(SomeParameter);
int ShortVar = veryLongFunctionNameThatStillFitsIntoOneLine(SomeParameter)
.nowThisDoesntFit()
.andThis()
Reviewers: espindola, MaskRay
Reviewed By: MaskRay
Subscribers: greened, llvm-commits
Differential Revision: https://reviews.llvm.org/D49726
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338686
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Ivchenko [Thu, 2 Aug 2018 08:33:31 +0000 (08:33 +0000)]
[GlobalISel] Rewrite CallLowering::lowerReturn to accept multiple VRegs per Value
This is logical continuation of https://reviews.llvm.org/D46018 (r332449)
Differential Revision: https://reviews.llvm.org/D49660
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338685
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 2 Aug 2018 08:10:34 +0000 (08:10 +0000)]
utils/release/tag.sh: add debuginfo-tests to project list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338682
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 2 Aug 2018 07:48:44 +0000 (07:48 +0000)]
lit: bump version number
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338677
91177308-0d34-0410-b5e6-
96231b3b80d8
David Green [Thu, 2 Aug 2018 07:30:53 +0000 (07:30 +0000)]
[UnJ] Add debug messages for why loops are not unrolled. NFC
Adds some cleaned up debug messages from back when I was writing this.
Hopefully useful to others (and myself) as to why unroll and jam is not
transforming as expected.
Differential Revision: https://reviews.llvm.org/D50062
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338676
91177308-0d34-0410-b5e6-
96231b3b80d8
David Green [Thu, 2 Aug 2018 06:24:40 +0000 (06:24 +0000)]
[AArch64] Add support for got relocated LDR's
As a part of adding the tiny codemodel, we need to support ldr's with :got:
relocations on them. This seems to be mostly already done, just needs the
relocation type support.
Differential Revision: https://reviews.llvm.org/D50137
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338673
91177308-0d34-0410-b5e6-
96231b3b80d8
Kito Cheng [Thu, 2 Aug 2018 05:38:18 +0000 (05:38 +0000)]
Test commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338672
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 2 Aug 2018 04:08:04 +0000 (04:08 +0000)]
[LICM] Factor out fault legality from canHoistOrSinkInst [NFC]
This method has three callers, each of which wanted distinct handling:
1) Sinking into a loop is moving an instruction known to execute before a loop into the loop. We don't need to worry about introducing a fault at all in this case.
2) Hoisting from a loop into a preheader already duplicated the check in the caller.
3) Sinking from the loop into an exit block was the only true user of the code within the routine. For the moment, this has just been lifted into the caller, but up next is examining the logic more carefully. Whitelisting of loads and calls - while consistent with the previous code - is rather suspicious. Either way, a behavior change is worthy of it's own patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338671
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 2 Aug 2018 03:54:29 +0000 (03:54 +0000)]
[LICM] Expand tests to highlight an oddity in sinking implementation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338670
91177308-0d34-0410-b5e6-
96231b3b80d8
Lei Liu [Thu, 2 Aug 2018 01:54:12 +0000 (01:54 +0000)]
Fix FCOPYSIGN expansion
In expansion of FCOPYSIGN, the shift node is missing when the two
operands of FCOPYSIGN are of the same size. We should always generate
shift node (if the required shift bit is not zero) to put the sign
bit into the right position, regardless of the size of underlying
types.
Differential Revision: https://reviews.llvm.org/D49973
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338665
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 2 Aug 2018 00:54:14 +0000 (00:54 +0000)]
[LICM] hoisting/sinking legality - bail early for unsupported instructions
Originally, this was part of a larger refactoring I'd planned, but had to abandoned. I figured the minor improvement in readability was worthwhile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338663
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Shen [Thu, 2 Aug 2018 00:21:12 +0000 (00:21 +0000)]
[ADT] Add some documentation for GraphTraits.
Summary: Add some context for GraphTraits.
Reviewers: dblaikie, asbirlea
Subscribers: sanjoy, jlebar, bixia, dexonsmith, llvm-commits
Differential Revision: https://reviews.llvm.org/D50120
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338660
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Thu, 2 Aug 2018 00:03:22 +0000 (00:03 +0000)]
[PowerPC] Do not round values prior to converting to integer
Adding the FP_ROUND nodes when combining FP_TO_[SU]INT of elements
feeding a BUILD_VECTOR into an FP_TO_[SU]INT of the built vector
loses precision. This patch removes the code that adds these nodes
to true f64 operands. It also adds patterns required to ensure
the code is still vectorized rather than converting individual
elements and inserting into a vector.
Fixes https://bugs.llvm.org/show_bug.cgi?id=38342
Differential Revision: https://reviews.llvm.org/D50121
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338658
91177308-0d34-0410-b5e6-
96231b3b80d8
Lei Liu [Wed, 1 Aug 2018 23:46:49 +0000 (23:46 +0000)]
[AArch64] DWARF: do not generate AT_location for thread local
AArch64 ELF ABI does not define a static relocation type for TLS offset within
a module, which makes it impossible for compiler to generate a valid
DW_AT_location content for thread local variables. Currently LLVM generates an
invalid R_AARCH64_ABS64 relocation at the DW_AT_location field for a TLS
variable. That causes trouble for linker because thread local variable does
not have an absolute address at link time. AArch64 GCC solves the problem by
not generating DW_AT_location for thread local variables. We should do the
same in LLVM.
Differential Revision: https://reviews.llvm.org/D43860
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338655
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Desaulniers [Wed, 1 Aug 2018 23:46:48 +0000 (23:46 +0000)]
Add maybe-unused attribute to a variable.
Summary:
Mark a variable as maybe-unused to prevent a -Wunused-but-set-variable
warning in optimized builds where asserts are removed.Test/first commit
to check setup and understand patch submission process.
Reviewers: srhines, pirama, dblaikie
Reviewed By: dblaikie
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D49756
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338654
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Wed, 1 Aug 2018 23:14:14 +0000 (23:14 +0000)]
Reland r338431: "Add DebugCounters to DivRemPairs"
(Previously reverted in r338442)
I'm told that the breakage came from us using an x86 triple on configs
that didn't have x86 enabled. This is remedied by moving the
debugcounter test to an x86 directory (where there's also a
opt-bisect-isel.ll test for similar reasons).
I can't repro the reverse-iteration failure mentioned in the revert with
this patch, so I assume that a misconfiguration on my end is what caused
that.
Original commit message:
Add DebugCounters to DivRemPairs
For people who don't use DebugCounters, NFCI.
Patch by Zhizhou Yang!
Differential Revision: https://reviews.llvm.org/D50033
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338653
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 1 Aug 2018 23:05:55 +0000 (23:05 +0000)]
[InstSimplify] move minnum/maxnum with same arg fold from instcombine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338652
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 1 Aug 2018 22:56:05 +0000 (22:56 +0000)]
Load from the GOT for external symbols in the large, PIC code model
Do the same handling for external symbols that we do for jump table
symbols and global values.
Fixes one of the cases in PR38385
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338651
91177308-0d34-0410-b5e6-
96231b3b80d8
John Baldwin [Wed, 1 Aug 2018 22:51:13 +0000 (22:51 +0000)]
[ASAN] Use the correct shadow offset for ASAN on FreeBSD/mips64.
Reviewed By: atanasyan
Differential Revision: https://reviews.llvm.org/D49939
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338650
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 1 Aug 2018 22:42:23 +0000 (22:42 +0000)]
[ORC] Add a 'Callable' flag to JITSymbolFlags.
The callable flag can be used to indicate that a symbol is callable. If present,
the symbol is callable. If absent, the symbol may or may not be callable (the
client must determine this by context, for example by examining the program
representation that will provide the symbol definition).
This flag will be used in the near future to enable creation of lazy compilation
stubs based on SymbolFlagsMap instances only (without having to provide
additional information to determine which symbols need stubs).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338649
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rupprecht [Wed, 1 Aug 2018 20:59:39 +0000 (20:59 +0000)]
[llvm-objcopy] Add missing -I command line flag alias for --input-target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338635
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Wed, 1 Aug 2018 20:54:11 +0000 (20:54 +0000)]
[DebugInfo/DWARF] [4/4] Unify handling of compile and type units. NFC
This is patch 4 of 4 NFC refactorings to handle type units and compile
units more consistently and with less concern about the object-file
section that they came from.
Patch 4 combines separate DWARFUnitVectors for compile and type units
into a single DWARFUnitVector that contains both. For now the
implementation distinguishes compile units from type units by putting
all compile units at the front of the vector, reflecting the DWARF v4
distinction between .debug_info and .debug_types sections. A future
patch will change this to allow the free mixing of unit kinds, as is
specified by DWARF v5.
Differential Revision: https://reviews.llvm.org/D49744
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338633
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Wed, 1 Aug 2018 20:49:44 +0000 (20:49 +0000)]
[DebugInfo/DWARF] [3/4] Rename DWARFUnitSection to DWARFUnitVector. NFC
This is patch 3 of 4 NFC refactorings to handle type units and compile
units more consistently and with less concern about the object-file
section that they came from.
Patch 3 simply renames DWARFUnitSection to DWARFUnitVector, as the
object-file section of a unit is nearly irrelevant now.
Differential Revision: https://reviews.llvm.org/D49743
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338632
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 1 Aug 2018 20:49:00 +0000 (20:49 +0000)]
AMDGPU: Use SPseudoInst helper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338631
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Wed, 1 Aug 2018 20:46:46 +0000 (20:46 +0000)]
[DebugInfo/DWARF] [2/4] Type units no longer in a std::deque. NFC
This is patch 2 of 4 NFC refactorings to handle type units and compile
units more consistently and with less concern about the object-file
section that they came from.
Patch 2 takes the existing std::deque<DWARFUnitSection> for type units
and makes it a simple DWARFUnitSection, simplifying the handling of
type units and making it more consistent with compile units.
Differential Revision: https://reviews.llvm.org/D49742
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338629
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Wed, 1 Aug 2018 20:43:47 +0000 (20:43 +0000)]
[DebugInfo/DWARF] [1/4] De-templatize DWARFUnitSection. NFC
This is patch 1 of 4 NFC refactorings to handle type units and compile
units more consistently and with less concern about the object-file
section that they came from.
Patch 1 replaces the templated DWARFUnitSection with a non-templated
version. That is, instead of being a SmallVector of pointers to a
specific unit kind, it is not a SmallVector of pointers to the base
class for both type and compile units. Virtual methods are magic.
Differential Revision: https://reviews.llvm.org/D49741
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338628
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 1 Aug 2018 20:13:58 +0000 (20:13 +0000)]
AMDGPU: Improve hack for packing conversion ops
Mutate the node type during selection when it
doesn't matter. This avoids an intermediate bitcast
node on targets with legal i16/f16.
Also fixes missing output modifiers on v_cvt_pkrtz_f32_f16,
which I assume are OK.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338619
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 1 Aug 2018 19:57:34 +0000 (19:57 +0000)]
AMDGPU: Partially fix handling of packed amdgpu_ps arguments
Fixes annoying limitations when writing tests.
Also remove more leftover code for manually scalarizing arguments
and return values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338618
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Wed, 1 Aug 2018 19:40:28 +0000 (19:40 +0000)]
[WebAssembly] Support for a ternary atomic RMW instruction
Summary: This adds support for a ternary atomic RMW instruction: cmpxchg.
Reviewers: dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D49195
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338617
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Wed, 1 Aug 2018 19:38:20 +0000 (19:38 +0000)]
[DEBUGINFO] Disable emission of the dwarf sections, but allow directives.
Summary:
Added an option that allows to emit only '.loc' and '.file' kind debug
directives, but disables emission of the DWARF sections. Required for
NVPTX target to support profiling. It requires '.loc' and '.file'
directives, but does not require any DWARF sections for the profiler.
Reviewers: probinson, echristo, dblaikie
Subscribers: aprantl, JDevlieghere, llvm-commits
Differential Revision: https://reviews.llvm.org/D46021
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338616
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 1 Aug 2018 18:44:12 +0000 (18:44 +0000)]
Try to fix FreeBSD build.
It seems like perhaps because cstdio isn't directly included, the
compiler is accidentally picking up wprintf from somewhere else
and trying to call that. Hopefully this fixes it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338614
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 1 Aug 2018 18:38:46 +0000 (18:38 +0000)]
[X86] Canonicalize the pattern for __builtin_ffs in a similar way to '__builtin_ffs + 5'
We now emit a move of -1 before the cmov and do the addition after the cmov just like the case with an extra addition.
This may be slightly worse for code size, but is more consistent with other compilers. And we might be able to hoist the mov -1 outside of loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338613
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 1 Aug 2018 18:38:43 +0000 (18:38 +0000)]
[X86] Add test cases for the patterns used by __builtin_ffs.
We previously had tests for "__builtin_ffs + 5", but the SelectinoDAG without an extra addition came out slightly different.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338612
91177308-0d34-0410-b5e6-
96231b3b80d8
Jan Vesely [Wed, 1 Aug 2018 18:36:07 +0000 (18:36 +0000)]
AMDGPU/R600: Convert kernel param loads to use PARAM_I_ADDRESS
Non ext aligned i32 loads are still optimized to use CONSTANT_BUFFER (AS 8)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338610
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 1 Aug 2018 18:33:04 +0000 (18:33 +0000)]
[llvm-undname Add an option to dump back references.
This is useful for understanding how our demangler processes
back references and for investigating issues related to
back references. But it's a feature only useful for debugging
the demangling process itself, so I'm marking it hidden.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338609
91177308-0d34-0410-b5e6-
96231b3b80d8