Commit Graph

151676 Commits

Author SHA1 Message Date
Simon Pilgrim
3b6486c8f9 [Hexagon] Fix some more -Wimplicit-fallthrough warnings. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307395 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 13:21:43 +00:00
Simon Pilgrim
8cbd9aac54 [AArch64] Fix -Wimplicit-fallthrough warnings. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307393 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 13:03:28 +00:00
Anna Thomas
25f28db283 [SafepointIRVerifier] Avoid false positives in GC verifier for compare between pointers
Today the safepoint IR verifier catches some unrelocated uses of base
pointers that are actually valid.

With this change, we narrow down the set of false positives.
Specifically, the verifier knows about compares to null and compares
between 2 unrelocated pointers.

Reviewed by: skatkov

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307392 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 13:02:29 +00:00
Florian Hahn
287aa279ce [AArch64] Use 16 bytes as preferred function alignment on Cortex-A57.
Summary:
This change gives a 0.89% speed on execution time, a 0.94% improvement
in benchmark scores and a 0.62% increase in binary size on a Cortex-A57.
These numbers are the geomean results on a wide range of benchmarks from
the test-suite, SPEC2000, SPEC2006 and a range of proprietary suites.

The software optimization guide for the Cortex-A57 recommends 16 byte
branch alignment.

Reviewers: t.p.northover, mcrosier, javed.absar, kristof.beyls, sbaranga

Reviewed By: kristof.beyls

Subscribers: aemerson, rengolin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307389 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 10:43:01 +00:00
Daniel Jasper
9889fe2290 Fix uninitalized memory access introduced in r307350.
Found by MSAN :).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307383 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 10:23:13 +00:00
Simon Pilgrim
daa5b43a38 [PowerPC] Fix -Wimplicit-fallthrough warnings. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307382 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 10:21:44 +00:00
Simon Pilgrim
26aa51226a [AMDGPU] Fix -Wimplicit-fallthrough warnings. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307381 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 10:18:57 +00:00
Florian Hahn
d04ee305d8 [AArch64] Use 16 bytes as preferred function alignment on Cortex-A72.
Summary:
This change gives a 0.34% speed on execution time, a 0.61% improvement
in benchmark scores and a 0.57% increase in binary size on a Cortex-A72.
These numbers are the geomean results on a wide range of benchmarks from
the test-suite, SPEC2000, SPEC2006 and a range of proprietary suites.

The software optimization guide for the Cortex-A72 recommends 16 byte
branch alignment.


Reviewers: t.p.northover, kristof.beyls, rengolin, sbaranga, mcrosier, javed.absar

Reviewed By: kristof.beyls

Subscribers: llvm-commits, aemerson

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307380 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 10:15:49 +00:00
Simon Pilgrim
4a533c58e1 [Sparc] Fix -Wimplicit-fallthrough warning. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307378 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 10:14:46 +00:00
Alex Lorenz
9976ad92c3 Update the Windows version of updateTripleOSVersion to account for
changes in r307372


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307377 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 10:08:52 +00:00
Simon Pilgrim
03251f283c [SystemZ] Fix -Wimplicit-fallthrough warnings. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307376 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 10:07:09 +00:00
Simon Pilgrim
1289f803e2 [Arm] Fix -Wimplicit-fallthrough warnings. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307375 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 10:05:45 +00:00
Simon Pilgrim
244313d541 [Hexagon] Fix -Wimplicit-fallthrough warnings. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307374 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 10:04:12 +00:00
Alex Lorenz
25b2f9273d [Support] sys::getProcessTriple should return a macOS triple using
the system's version of macOS

sys::getProcessTriple returns LLVM_HOST_TRIPLE, whose system version might not
be the actual version of the system on which the compiler running. This commit
ensures that, for macOS, sys::getProcessTriple returns a triple with the
system's macOS version.

rdar://33177551

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307372 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 09:53:47 +00:00
Florian Hahn
20cee5d628 [AArch64] Add test case for preferred function alignment (NFC).
Reviewers: evandro, joelkevinjones, mcrosier

Reviewed By: joelkevinjones, mcrosier

Subscribers: mcrosier, aemerson, llvm-commits, rengolin, evandro, javed.absar, joelkevinjones, kristof.beyls

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307369 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 09:17:53 +00:00
Diana Picus
4f529ec57c [ARM] GlobalISel: Fixup r307365
Rename member DebugLoc -> DbgLoc (so it doesn't conflict with the class
name).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307366 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 08:53:27 +00:00
Diana Picus
a479e53b55 [ARM] GlobalISel: Select hard G_FCMP for s32
We lower to a sequence consisting of:
- MOVi 0 into a register
- VCMPS to do the actual comparison and set the VFP flags
- FMSTAT to move the flags out of the VFP unit
- MOVCCi to either use the "zero register" that we have previously set
  with the MOVi, or move 1 into the result register, based on the values
  of the flags

As was the case with soft-float, for some predicates (one, ueq) we
actually need two comparisons instead of just one. When that happens, we
generate two VCMPS-FMSTAT-MOVCCi sequences and chain them by means of
using the result of the first MOVCCi as the "zero register" for the
second one. This is a bit overkill, since one comparison followed by
two non-flag-setting conditional moves should be enough. In any case,
the backend manages to CSE one of the comparisons away so it doesn't
matter much.

Note that unlike SelectionDAG and FastISel, we always use VCMPS, and not
VCMPES. This makes the code a lot simpler, and it also seems correct
since the LLVM Lang Ref defines simple true/false returns if the
operands are QNaN's. For SNaN's, even VCMPS throws an Invalid Operand
exception, so they won't be slipping through unnoticed.

Implementation-wise, this introduces a template so we can share the same
code that we use for handling integer comparisons, since the only
differences are in the details (exact opcodes to be used etc). Hopefully
this will be easy to extend to s64 G_FCMP.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307365 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 08:39:04 +00:00
Craig Topper
dc02fd0b4d [TableGen] Cleanup capturing of instruction namespace for the fast isel emitter to remove a std::string and duplicated code. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307363 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 06:22:36 +00:00
Craig Topper
77eddb74c0 [TableGen] Use StringRef instead of std::string for CodeGenInstruction namespace. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307362 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 06:22:35 +00:00
Craig Topper
2986f4761d [TableGen] Add a proper namespace to an Instruction in an AsmMatcher test. This is required after r307358.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307361 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 05:50:45 +00:00
Rafael Espindola
ef8ed10be5 Reduce code duplication.
By addding a mapNameToDWARFSection we only need to check section names
in one place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307359 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 05:36:53 +00:00
Craig Topper
3e595d0a2b [TableGen] Fix some mismatches in the use of Namespace fields versus Target name in some of our emitters.
Some of our emitters were using the name of the Target to reference things that were created by others emitters using Namespace.

Apparently all targets have the same Target name as their instruction and register Namespace field?

Someone on IRC had a target that didn't do this and was getting build errors. This patch is a necessary, but maybe not sufficient fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307358 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 05:19:25 +00:00
Zachary Turner
5974613ee5 [PDB] Teach libpdb to write DBI Stream ECNames.
Based strictly on the name, this seems to have something to do
width edit & continue.  The goal of this patch has nothing to do
with supporting edit and continue though.  msvc link.exe writes
very basic information into this area even when *not* compiling
with support for E&C, and so the goal here is to bring lld-link
to parity.  Since we cannot know what assumptions standard tools
make about the content of PDB files, we need to be as close as
possible.

This ECNames data structure is a standard PDB string hash table.
link.exe puts a single string into this hash table, which is the
full path to the PDB file on disk.  It then references this string
from the module descriptor for the compiler generated `* Linker *`
module.

With this patch, lld-link will generate the exact same sequence of
bytes as MSVC link for this subsection for a given object file
input (as reported by `llvm-pdbutil bytes -ec`).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307356 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 05:04:36 +00:00
Lang Hames
7df94ee855 [Orc] Add missing return value (left out in r307350).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307354 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 03:22:57 +00:00
Tony Tye
af26c83f3b Correct GFX9 processor names.
Differential Revision: https://reviews.llvm.org/D33736



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307353 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 03:10:01 +00:00
Matthias Braun
192187283c RegisterScavenging: Fix PR33687
When scavenging for a use in instruction MI, we will reload after
that instruction and hence cannot spill uses/defs of this instruction.

This fixes http://llvm.org/PR33687

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307352 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 03:02:18 +00:00
Matthias Braun
a819fad865 LiveRegUnits: Rename accumulateBackward()->accumulate()
Contrary to the stepForward()/stepBackward() method accumulate() doesn't
have a direction as defs, uses and clobbers all have the same effect.

Also improve the documentation comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307351 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 03:02:17 +00:00
Lang Hames
a81793582b [ORC] Errorize the ORC APIs.
This patch updates the ORC layers and utilities to return and propagate
llvm::Errors where appropriate. This is necessary to allow ORC to safely handle
error cases in cross-process and remote JITing.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307350 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 02:59:13 +00:00
Yaxun Liu
d0585d352f [InferAddressSpaces] Fix assertion about null pointer
InferAddressSpaces does not check address space in collectFlatAddressExpressions,
which causes values with non flat address space put into Postorder and causes
assertion in cloneValueWithNewAddressSpace.

This patch fixes assertion in OpenCL 2.0 conformance test generic_address_space
subtest for amdgcn target.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307349 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 02:40:13 +00:00
Sam Clegg
20bde08716 [WebAssembly] Support weak defined symbols
Model weakly defined symbols as symbols that are both
exports and imported and marked as weak. Local references
to the symbols refer to the import but the linker can
resolve this to the weak export if not strong symbol
is found at link time.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307348 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 02:01:29 +00:00
Sean Fertile
471398ffea Extend memcpy expansion in Transform/Utils to handle wider operand types.
Adds loop expansions for known-size and unknown-sized memcpy calls, allowing the
target to provide the operand types through TTI callbacks. The default values
for the TTI callbacks use int8 operand types and matches the existing behaviour
if they aren't overridden by the target.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307346 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 02:00:06 +00:00
Evgeniy Stepanov
104fd8eec7 Revert r307342, r307343.
Revert "Copy arguments passed by value into explicit allocas for ASan."
Revert "[asan] Add end-to-end tests for overflows of byval arguments."

Build failure on lldb-x86_64-ubuntu-14.04-buildserver.
Test failure on clang-cmake-aarch64-42vma and sanitizer-x86_64-linux-android.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307345 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 01:31:23 +00:00
Evgeniy Stepanov
3b48753a2f Copy arguments passed by value into explicit allocas for ASan.
ASan determines the stack layout from alloca instructions. Since
arguments marked as "byval" do not have an explicit alloca instruction, ASan
does not produce red zones for them. This commit produces an explicit alloca
instruction and copies the byval argument into the allocated memory so that red
zones are produced.

Patch by Matt Morehouse.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307342 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 00:48:25 +00:00
Anna Thomas
eb0c2c435b [SafepointIRVerifier] NFC: Refactor code for identifying exclusive base type
Added a new Enum to identify if the base pointer is exclusively null or
exlusively some constant or not exclusively any constant.
Converted the base pointer identification method from recursive to
iterative form.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307340 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 00:40:37 +00:00
George Karpenkov
80c7e63a6d [lit] Modify LIT to accept environment variable LIT_FILTER to select tests.
This is especially useful when lit is invoked indirectly by the build
system, and additional arguments can not be easily specified.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307339 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 00:22:11 +00:00
Wei Mi
0082096cc7 [ConstHoisting] Turn on consthoist-with-block-frequency by default.
Using profile information to guide consthoisting is generally helpful for
performance, so the patch turns it on by default. No compile time or perf
regression were found using spec2000 and spec2006 on x86.  Some significant
improvement (>20%) was seen on internal benchmarks.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307338 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 00:11:05 +00:00
Michael Kuperstein
77b223ff61 Reverting r307326 because it breaks clang tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307334 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 23:24:39 +00:00
Craig Topper
239d9c373b [InstCombine] No need to pass DataLayout to helper functions if we're passing the InstCombiner object. We can just ask it for the DataLayout. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307333 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 23:18:43 +00:00
Craig Topper
05cd772a60 [InstCombine] Remove unused arguments from some helper functions. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307332 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 23:18:42 +00:00
Craig Topper
6671b32e56 [InstCombine] Change a couple helper functions to only take the IRBuilder as an argument and not the whole InstCombiner object. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307331 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 23:18:41 +00:00
Wei Mi
8e52a552c3 [ConstHoisting] choose to hoist when frequency is the same.
The patch is to adjust the strategy of frequency based consthoisting:
Previously when the candidate block has the same frequency with the existing
blocks containing a const, it will not hoist the const to the candidate block.
For that case, now we change the strategy to hoist the const if only existing
blocks have more than one block member. This is helpful for reducing code size.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307328 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 22:32:27 +00:00
Michael Kuperstein
1803a9f234 [NVPTX] Add lowering of i128 params.
The patch adds support of i128 params lowering. The changes are quite trivial to
support i128 as a "special case" of integer type. With this patch, we lower i128
params the same way as aggregates of size 16 bytes: .param .b8 _ [16].

Currently, NVPTX can't deal with the 128 bit integers:
* in some cases because of failed assertions like
ValVTs.size() == OutVals.size() && "Bad return value decomposition"
* in other cases emitting PTX with .i128 or .u128 types (which are not valid [1])
[1] http://docs.nvidia.com/cuda/parallel-thread-execution/index.html#fundamental-types

Differential Revision: https://reviews.llvm.org/D34555
Patch by: Denys Zariaiev (denys.zariaiev@gmail.com)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307326 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 22:18:54 +00:00
Lang Hames
513399718a [ORC] Add missing <memory> include for shared_ptr.
Accidentally left out of r307319.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307322 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 22:02:49 +00:00
David L. Jones
8804b79c2b Change remaining references to lit.util.capture to use subprocess.check_output.
Summary:
The capture() function was removed in r306625. This should fix PGO breakages
reported by Michael Zolotukhin.

Reviewers: mzolotukhin

Subscribers: sanjoy, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307320 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 21:46:47 +00:00
Lang Hames
0125881b40 [ORC] Update GlobalMappingLayer::addModuleSet to addModule.
This layer was accidentally left out of r306166.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307319 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 21:33:48 +00:00
Rafael Espindola
b5e3177787 Use @LINE in two more tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307318 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 21:33:23 +00:00
Martin Storsjo
cc030dee9f [COFF, AArch64] Set the private label prefix to .L
This fixes calls to external functions starting with a capital L,
fixing errors like this:
fatal error: error in backend: assembler label 'LocalFree' can not be undefined

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307317 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 21:08:34 +00:00
Matt Arsenault
8763b3ac42 AMDGPU: Add macro fusion schedule DAG mutation
Try to increase opportunities to shrink vcc uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307313 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 20:57:05 +00:00
Matt Arsenault
92223c6fe5 AMDGPU: Minor cleanup of shrinking logic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307312 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 20:56:59 +00:00
Matt Arsenault
0f915c6a85 AMDGPU: Remove unnecessary IR from MIR tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307311 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 20:56:57 +00:00