139106 Commits

Author SHA1 Message Date
Simon Dardis
c072c50d24 [mips][fastisel] Consider soft-float an unsupported floating point mode
Treat soft-float as unsupported for fast-isel. Additionally, ensure we check
that lowering f32 arguments also considers the case of soft-float mode.

Reviewers: ehostunreach, vkalintiris, zoran.jovanovic

Differential Review: https://reviews.llvm.org/D24505


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283209 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-04 10:35:07 +00:00
George Rimar
cd988cd581 [Object/ELF] - Do not crash on invalid sh_offset value of REL[A] section.
Previously code would access invalid memory and may crash,
patch fixes the issue.

Differential revision: https://reviews.llvm.org/D25187

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283204 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-04 09:25:39 +00:00
whitequark
e1a1a52945 [SelectionDAG] Fix calling convention in expansion of ?MULO.
The SMULO/UMULO DAG nodes, when not directly supported by the target,
expand to a multiplication twice as wide. In case that the resulting
type is not legal, an __mul?i3 intrinsic is used. Since the type is
not legal, the legalizer cannot directly call the intrinsic with
the wide arguments; instead, it "pre-lowers" them by splitting them
in halves.

The "pre-lowering" code in essence made assumptions about
the calling convention, specifically that i(N*2) values will be
split into two iN values and passed in consecutive registers in
little-endian order. This, naturally, breaks on a big-endian system,
such as our OR1K out-of-tree backend.

Thanks to James Miller <james@aatch.net> for help in debugging.

Differential Revision: https://reviews.llvm.org/D25223

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283203 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-04 09:07:49 +00:00
George Rimar
1390211bdb [Object/ELF] - Avoid possible crash in getExtendedSymbolTableIndex().
When using broken input object found using AFL,
getExtendedSymbolTableIndex() crashed because ShndxTable
was empty as object does not contain SHT_SYMTAB_SHNDX section.

Differential revision: https://reviews.llvm.org/D25189

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283196 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-04 08:44:03 +00:00
Sjoerd Meijer
a074ac8dd7 Consistent fp denormal mode names. NFC.
This fixes the inconsistency of the fp denormal option names: in LLVM this was
DenormalType, but in Clang this is DenormalMode which seems better.

Differential Revision: https://reviews.llvm.org/D24906


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283192 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-04 08:03:36 +00:00
Nemanja Ivanovic
02ede7e72c Fix a test case failure on Apple PPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283191 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-04 07:37:38 +00:00
Nemanja Ivanovic
d0e875cdad [Power9] Part-word VSX integer scalar loads/stores and sign extend instructions
This patch corresponds to review:
https://reviews.llvm.org/D23155

This patch removes the VSHRC register class (based on D20310) and adds
exploitation of the Power9 sub-word integer loads into VSX registers as well
as vector sign extensions.
The new instructions are useful for a few purposes:

    Int to Fp conversions of 1 or 2-byte values loaded from memory
    Building vectors of 1 or 2-byte integers with values loaded from memory
    Storing individual 1 or 2-byte elements from integer vectors

This patch implements all of those uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283190 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-04 06:59:23 +00:00
Michal Gorny
aeddc35a35 [cmake] Reintroduce (ldconfig-compatible) SOVERSIONs on shared libraries
Reintroduce versioning of shared libraries via SOVERSION, addressing
the issues with the previous design, since Gentoo is relying
on shared-split install of LLVM. The SOVERSIONs were originally
introduced in r229720 for all libraries, and removed in r252093 in favor
of custom SONAME. As far as I understand, the major concern with the old
versioning was that the used versions were incompatible with ldconfig.

Having considered that, this commit introduce SOVERSIONS with the
following considerations:

1. SOVERSIONs are formed of major & minor version concatenated -- i.e.
for 4.0 its .so.40. This matches the common practice where the first
version number indicates ABI breakage, and therefore fixes the issues
with ldconfig. Additionally, VERSION with the remaining verion
components appended is used, however this is not strictly necessary.

2. The versioning is only applied to libraries with no explicit SONAME
specified -- i.e. it won't apply to libLLVM but only to the split
libraries. It will also apply to libraries installed by the subprojects.

3. The versioning is only done on *nix systems, Darwin excluded. This
matches the current use of SONAME.

Differential Revision: https://reviews.llvm.org/D24757

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283189 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-04 06:09:18 +00:00
Michal Gorny
40960f6361 [cmake] Use separate doctrees to prevent races between Sphinx instances
Use separate doctrees between different Sphinx builders in order to
prevent race condition issues due to multiple Sphinx instances accessing
the same doctree cache in parallel.

Bug: https://llvm.org/bugs/show_bug.cgi?id=23781

Differential Revision: https://reviews.llvm.org/D23755

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283188 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-04 06:09:14 +00:00
Kostya Serebryany
eedfbe0313 [libFuzzer] remove dfsan support and some related stale code. This is not being used and as is is pretty weak anyway
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283187 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-04 06:08:46 +00:00
Craig Topper
e17aeaefbf [X86] Add MOV8rm_NOREX to switch in isReallyTriviallyReMaterializable to match MOV8rm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283184 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-04 03:11:44 +00:00
Kostya Serebryany
bd79a5935d [libFuzzer] change the probabilities so that we choose only the inputs that are known to be minimal inputs for at least one coverage feature (works only with -shrink=1 for now)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283178 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-04 01:51:44 +00:00
Matt Arsenault
548c83d355 AMDGPU: Refactor indirect vector lowering
Allow inserting multiple instructions in the
expanded loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283177 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-04 01:41:05 +00:00
Matt Arsenault
dc1ddc021d AMDGPU: Factor SGPR spilling into separate functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283175 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-04 01:14:56 +00:00
Kyle Butt
77893035df Revert "Codegen: Tail-duplicate during placement."
This reverts commit ff234efbe23528e4f4c80c78057b920a51f434b2.

Causing crashes on aarch64 build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283172 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-04 00:38:23 +00:00
Brian Gesiak
6b3629eb07 [lit] Remove workaround for Python 2.5
Summary:
The minimum version of Python necessary to run the LLVM test suite is
2.7. Code to work around Python 2.5 and lower isn't necessary.

Reviewers: ddunbar, echristo, delcypher, beanz

Subscribers: llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D25209

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283169 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-04 00:15:37 +00:00
Eli Friedman
aba0070ed8 Make GlobalsAA ignore dead constant expressions.
Slightly improves the precision of GlobalsAA in certain situations, and
makes the behavior of optimization passes more predictable.

Differential Revision: https://reviews.llvm.org/D24104



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283165 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-04 00:03:55 +00:00
Kyle Butt
ff234efbe2 Codegen: Tail-duplicate during placement.
The tail duplication pass uses an assumed layout when making duplication
decisions. This is fine, but passes up duplication opportunities that
may arise when blocks are outlined. Because we want the updated CFG to
affect subsequent placement decisions, this change must occur during
placement.

In order to achieve this goal, TailDuplicationPass is split into a
utility class, TailDuplicator, and the pass itself. The pass delegates
nearly everything to the TailDuplicator object, except for looping over
the blocks in a function. This allows the same code to be used for tail
duplication in both places.

This change, in concert with outlining optional branches, allows
triangle shaped code to perform much better, esepecially when the
taken/untaken branches are correlated, as it creates a second spine when
the tests are small enough.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283164 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-04 00:00:09 +00:00
George Burgess IV
e602ff91e3 [MSSA] Allow unittests to use BasicAA when building.
We now build MemorySSA in its ctor, instead of waiting until the user
calls MemorySSA::getWalker. This silently changed our unittests, since
we add BasicAA to AAResults *after* constructing MemorySSA (...but
before calling MemorySSA::getWalker).

None of them broke because we do most of our "did this get optimized
correctly?" tests in .ll files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283158 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 23:12:35 +00:00
Dan Gohman
3f22f87fb5 [WebAssembly] Update to more stack-machine-oriented terminology.
WebAssembly has officially switched from being an AST to being a stack
machine. Update various bits of terminology and README.md entries
accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283154 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 22:43:53 +00:00
Dan Gohman
bafb9a4eed [WebAssemby] Clean up an obsolete comment.
The comment is present inside the body of GetVRegDef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283153 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 22:32:21 +00:00
Chris Bieneman
6eb10d97ee [lit] Use argparse instead of optparse
Summary:
optparse is deprecated in Python 2.7, which is the minimum version of
Python required to run the LLVM test suite. Replace its usage in lit
with argparse, optparse's 2.7 replacement module.

argparse has several benefits over optparse, but this commit does not
make use of those benefits yet. Instead, it simply uses the new API,
and attempts to keep the number of changes to a minimum.

Confirmed that lit's test suite, as well as LLVM's regression test suite,
still pass with these changes.

Patch By Brian Gesiak!

Reviewers: ddunbar, echristo, beanz, delcypher

Subscribers: llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D25173

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283152 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 22:12:42 +00:00
Matthias Braun
3d8b8c8458 TargetMachine: Make the win32-macho workaround more specific.
This is to avoid problems with win32 + ELF which surprisingly happens a
lot in practice: If a user just specifies -march on the commandline the
object format changes along with the architecture to ELF in many
instances while the OS stays with the default/host OS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283151 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 22:12:37 +00:00
Dan Gohman
1596f9b429 [WebAssembly] Delete an unused function. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283150 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 22:06:28 +00:00
Matthias Braun
6b11127921 Set some tests to an unknown vendor and OS
This avoids llc using the hosts OS/vendor as defaults and triggering
unwanted behaviour in the tests. This should deal with the buildbot
breakages on windows after r283140.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283149 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 21:58:20 +00:00
Mehdi Amini
5c1bdf9245 [LTO] Fix test to not depend on the exact address of symbols, just their linkage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283148 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 21:40:50 +00:00
Dan Gohman
e2559a883e [WebAssembly] Fix indentation. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283147 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 21:33:09 +00:00
Dan Gohman
e0c2ec2a7e [WebAssembly] Rename OPERAND_FP32IMM to OPERAND_F32IMM.
WebAssembly documentation consistently says "f32" rather than "fp32" to
describe 32-bit floating-point.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283146 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 21:31:31 +00:00
Quentin Colombet
0a7ba882e5 [AArch64][RegisterBankInfo] Add getSameKindofOperandsMapping.
Refactor the code so that the same function can be used for all
instructions with all the same operands for up to 3 operands.

This is going to be useful for cast instructions.
NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283144 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 20:20:13 +00:00
Krzysztof Parzyszek
6f4042b831 [RDF] Fix liveness propagation through shadows
Each shadow only represents data flow that is restricted to its reaching
def. Propagating more than that could lead to spurious register liveness,
resulting in extra (incorrectly) block live-ins.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283143 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 20:17:20 +00:00
Matthias Braun
f455558a9f AArch64Subtarget: Remove unused CPUString field
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283142 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 20:17:02 +00:00
Matthias Braun
4f52404044 X86: Do not produce GOT relocations on windows
Windows has no GOT relocations the way elf/darwin has. Some people use
x86_64-pc-win32-macho to build EFI firmware; Do not produce GOT
relocations for this target.

Differential Revision: https://reviews.llvm.org/D24627

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283140 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 20:11:24 +00:00
Zachary Turner
f378e2727f Add unit tests for StringSwitch.
Differential revision: https://reviews.llvm.org/D25205

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283138 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 19:56:50 +00:00
Sanjoy Das
dd99e950f7 [PruneEH] Be correct in the face IPO
This fixes one spot I had missed in r265762.  Credit goes to Philip
Reames for spotting this one!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283137 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 19:35:30 +00:00
Mike Aizatsky
aa36ef278b [sancov] using env for better portability
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283136 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 19:22:05 +00:00
Dehao Chen
ba1158fa75 Refactor LICM pass in preparation for LoopSink pass.
Summary: LoopSink pass uses some common function in LICM. This patch refactor the LICM code to make it usable by LoopSink pass (https://reviews.llvm.org/D22778).

Reviewers: davidxl, danielcdh, hfinkel, chandlerc

Subscribers: hfinkel, llvm-commits

Differential Revision: https://reviews.llvm.org/D24168

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283134 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 18:52:08 +00:00
Konstantin Zhuravlyov
49e7805871 [AMDGPU] Pass optimization level to SelectionDAGISel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283133 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 18:47:26 +00:00
Konstantin Zhuravlyov
1e8f5fd9f8 [AMDGPU] Sign extend AShr when promoting (instead of zero extending)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283130 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 18:29:01 +00:00
Hans Wennborg
61f013c7b7 Jump threading: avoid trying to split edge into landingpad block (PR27840)
Splitting the edge is nontrivial because of the landing pad, and we would
currently assert trying to do it.

Differential Revision: https://reviews.llvm.org/D24680

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283129 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 18:18:04 +00:00
Zachary Turner
932630880c Rename Error -> ReportError.
Error conflicts with the llvm::Error datatype, creating
ambiguities.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283128 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 18:17:18 +00:00
Rafael Espindola
ee3cdffe7e Revert "Use getSize instead of data().size(). NFC."
This reverts commit r283125.

lld needs to be updated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283127 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 18:01:10 +00:00
Krzysztof Parzyszek
4fbe7c8ae1 [RDF] Further improve readability of the graph
Print target basic block for a branch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283126 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 17:54:33 +00:00
Rafael Espindola
1c287c05a6 Use getSize instead of data().size(). NFC.
Also assert isFinalized in getSize(). This just reduces the noise from
another patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283125 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 17:49:19 +00:00
Lang Hames
420bc5679c [RTDyld] Fix a bug in RTDyldMemoryManager::deregisterEHFrames.
It should forward to deregisterEHFramesInProcess by default, not
registerEHFramesInProcess.

No test case: I haven't come up with a good way to unit test EH frame
registration yet.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283123 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 17:34:56 +00:00
Krzysztof Parzyszek
d1ed87a667 [RDF] Replace RegisterAliasInfo with target-independent code using lane masks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283122 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 17:14:48 +00:00
Sanjay Patel
7b05e5c94e [x86, SSE/AVX] allow 128/256-bit lowering for copysign vector intrinsics (PR30433)
This should fix:
https://llvm.org/bugs/show_bug.cgi?id=30433

There are a couple of open questions about the codegen:
1. Should we let scalar ops be scalars and avoid vector constant loads/splats?
2. Should we have a pass to combine constants such as the inverted pair that we have here?

Differential Revision: https://reviews.llvm.org/D25165
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283119 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 16:38:27 +00:00
Rafael Espindola
da49ba4e37 Don't drop the llvm. prefix when renaming.
If the llvm. prefix is dropped other parts of llvm don't see this as
an intrinsic.  This means that the number of regular symbols depends
on the context the module is loaded into, which causes LTO to abort.

Fixes PR30509.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283117 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 15:51:42 +00:00
Sanjay Patel
097e03386e fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283115 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 15:18:36 +00:00
Nirav Dave
3e3a0a0307 Prevent out of order HashDirective lexing in AsmLexer.
Retrying after buildbot reset.

To lex hash directives we peek ahead to find component tokens, create a
unified token, and unlex the peeked tokens so the parser does not need
to parse the tokens then. Make sure we do not to lex another hash
directive during peek operation.

This fixes PR28921.

Reviewers: rnk, loladiro

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D24839

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283111 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 13:48:27 +00:00
Matt Arsenault
510a4bca2e AMDGPU: Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283108 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 13:06:58 +00:00