1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

144608 Commits

Author SHA1 Message Date
Diana Picus
ac31e77632 Revert "[Assembler] Enable nicer diagnostics for inline assembly."
This reverts commit r294433 because it seems it broke the buildbots.

llvm-svn: 294448
2017-02-08 14:02:16 +00:00
NAKAMURA Takumi
fe7417d149 Revert r294356, "DebugInfo: Track spilled variables in LiveDebugValues"
It caused undefined behavior in VarLoc. As far as I investigated,

  - VarLoc::VarLoc() treats negative offset value as InvalidKind.
    Consider the case that (int64_t)MI.getOperand(1).getImm() is negative and whether it satisfies ((uint64_t)Offset < (1ULL << 32)).

  - Comparison operators in VarLoc behave undefined since VarLoc::Loc.Hash is uninitialized in case of InvalidKind.

I guess Offset (in VarLoc) could be made aware of signed, but I am not sure.
So I have reverted it for now.

llvm-svn: 294447
2017-02-08 13:49:28 +00:00
Diana Picus
734944bf21 Move test from r294430 to target-specific directory
The test is X86-specific, and it broke on the ARM bots because they don't build
the X86 target.

llvm-svn: 294446
2017-02-08 13:48:08 +00:00
Konstantin Zhuravlyov
a802442d9d [AMDGPU][NFC] De-tabify
llvm-svn: 294445
2017-02-08 13:29:23 +00:00
Alexander Kornienko
f3d9cfa9b0 Adding virtual destructor for PredicateBase.
A virtual destructor is needed, since the derived classes are stored in
`iplist<PredicateBase> AllInfos;` and, apparently, ilist_node doesn't have a
virtual destructor.

llvm-svn: 294443
2017-02-08 13:28:27 +00:00
Diana Picus
3daf58db54 [ARM] GlobalISel: Add FPR reg bank
Add a register bank for floating point values and select simple instructions
using them (add, copies from GPR).

This assumes that the hardware can cope with a single precision add (VADDS)
instruction, so the legalizer will treat G_FADD as legal and the instruction
selector will refuse to select if the hardware doesn't support it. In the future
we'll want to be more careful about this, and legalize to libcalls if we have to
use soft float.

llvm-svn: 294442
2017-02-08 13:23:04 +00:00
Konstantin Zhuravlyov
78c67c8322 [AMDGPU] Distinguish between S/VGPR allocation and encoding granularities
Differential Revision: https://reviews.llvm.org/D29633

llvm-svn: 294441
2017-02-08 13:18:40 +00:00
Konstantin Zhuravlyov
9fccb13d0b [AMDGPU] Move register related queries to subtarget class
Differential Revision: https://reviews.llvm.org/D29318

llvm-svn: 294440
2017-02-08 13:02:33 +00:00
Amara Emerson
1aff3665bd [AArch64][TableGen] Skip tied result operands for InstAlias
This patch checks the number of operands in the resulting
instruction instead of just the alias, then skips over
tied operands when generating the printing method.

This allows us to generate the preferred assembly syntax
for the AArch64 'ins' instruction, which should always be
displayed as 'mov' according to the ARMARM.

Several unit tests have changed as a result, but only to
reflect the preferred disassembly.

Some other InstAlias patterns (movk/bic/orr) needed a
slight adjustment to stop them becoming the default
and breaking other unit tests.

Patch by Graham Hunter.

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

llvm-svn: 294437
2017-02-08 11:28:08 +00:00
Dylan McKay
f83feac3c7 Update CODE_OWNERS with my new email address
llvm-svn: 294436
2017-02-08 10:38:06 +00:00
Dylan McKay
3f38cefda5 [AVR] XFAIL a set of failing CodeGen tests
There are about 3 underlying bugs causing the tests to fail.

On top of that, some tests just we're 'generic' enough. i.e. 32-bit
registers.

llvm-svn: 294434
2017-02-08 10:24:18 +00:00
Sanne Wouda
2ff17740cf [Assembler] Enable nicer diagnostics for inline assembly.
Summary:
Enables source location in diagnostic messages from the backend.  This
is after parsing, during finalization.  This requires the SourceMgr, the
inline assembly string buffer, and DiagInfo to still be alive after
EmitInlineAsm returns.

This patch creates a single SourceMgr for inline assembly inside the
AsmPrinter.  MCContext gets a pointer to this SourceMgr.  Using one
SourceMgr per call to EmitInlineAsm would make it difficult for
MCContext to figure out in which SourceMgr the SMLoc is located, while a
single SourceMgr can figure it out if it has multiple buffers.

The Str argument to EmitInlineAsm is copied into a buffer and owned by
the inline asm SourceMgr.  This ensures that DiagHandlers won't print
garbage.  (Clang emits a "note: instantiated into assembly here", which
refers to this string.)

The AsmParser gets destroyed before finalization, which means that the
DiagHandlers the AsmParser installs into the SourceMgr will be stale.
Restore the saved DiagHandlers.

Since now we're using just one SourceMgr for multiple inline asm
strings, we need to tell the AsmParser which buffer it needs to parse
currently.  Hand a buffer id -- returned from SourceMgr::
AddNewSourceBuffer -- to the AsmParser.

Reviewers: rnk, grosbach, compnerd, rengolin, rovka, anemet

Reviewed By: rnk

Subscribers: llvm-commits

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

llvm-svn: 294433
2017-02-08 10:20:07 +00:00
Sam Parker
51f358fb59 Use dynamic symbols for ELF disassembly
Disassembly currently begins from addresses obtained from the objects
symbol table. For ELF, add the dynamic symbols to the list if no
static symbols are available so that we can more successfully
disassemble stripped binaries.

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

llvm-svn: 294430
2017-02-08 09:44:18 +00:00
Chandler Carruth
0d0478b061 [ArgPromote] Delete a test that makes no sense (any more).
This test is under 'ArgumentPromotion' but there are no arguments that
get promoted in the test case, so there seems to be no point. Also,
there are no assertions about the output at all, so this seems like
something we should just delete given the low value.

llvm-svn: 294428
2017-02-08 08:54:08 +00:00
Dylan McKay
3eeff9b0b2 [AVR] Add missing #includes
A previous change seems to have remove #includes from header files. This
fixes the build.

llvm-svn: 294427
2017-02-08 08:52:46 +00:00
Chandler Carruth
663bbd6b17 [ArgPromote] Clean up a crash test case by rinsing it through opt,
renaming things to at least have somewhat spelled out names, and even
have meaningful names where I could guess at what they should be.

Also add FileCheck assertions that we're actually doing what we set out
to do for some of the tests, for example not promoting a type that would
result in infinite promotion.

llvm-svn: 294426
2017-02-08 08:47:35 +00:00
Chandler Carruth
35bba91acb [ArgPromote] Actually add FileCheck to a test that I actually updated to
have nice CHECK patterns instead of relying on a coarse 'not grep'
check. Sorry that I missed this the first time through.

llvm-svn: 294422
2017-02-08 08:04:02 +00:00
Chandler Carruth
e89d7bf7df [ArgPromote] Actually run FileCheck on this test. The CHECK lines are
already there, just waiting to, well, be checked. =]

llvm-svn: 294421
2017-02-08 08:01:14 +00:00
Matt Arsenault
25233f6591 TargetLowering: Remove AddrSpace parameter from GetAddrModeArguments
It doesn't make any sense to pass in to what is supposed to be parsing
the call, and this can be inferred from the pointer output.

llvm-svn: 294412
2017-02-08 07:09:03 +00:00
Matt Arsenault
e887c01560 LSR: Check atomic instruction pointer operands
llvm-svn: 294410
2017-02-08 06:44:58 +00:00
Matt Arsenault
15bde0a3d5 AMDGPU: Enable InferAddressSpaces
llvm-svn: 294408
2017-02-08 06:16:04 +00:00
Craig Topper
5eaada1e12 [X86] Add test for clflushopt intrinsic and only enable it to be selected if the feature flag is set.
llvm-svn: 294407
2017-02-08 05:45:46 +00:00
Craig Topper
3079e57bb9 [X86] Remove the VMFUNC feature flag. It was only partially implemented and we have no support for codegening vmfunc instructions today.
If that support ever gets added, the full feature flag support should come along with it.

llvm-svn: 294406
2017-02-08 05:45:42 +00:00
Craig Topper
1cb14e7d5f [X86] Remove PCOMMIT instruction support since Intel has deprecated this instruction with no plans to release products with it.
Intel's documentation for the deprecation https://software.intel.com/en-us/blogs/2016/09/12/deprecate-pcommit-instruction

llvm-svn: 294405
2017-02-08 05:45:39 +00:00
Craig Topper
4d5a27ef2a Move mnemonicIsValid to Mips target.
Summary:
The Mips target is the only user of mnemonicIsValid. This patch
moves this method from AsmMatcherEmitter.cpp to MipsAsmParser.cpp,
getting rid of the method in all other targets where it generated
warnings about an unused function.

Patch by Gonsolo.

Reviewers: craig.topper

Reviewed By: craig.topper

Subscribers: sdardis

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

llvm-svn: 294400
2017-02-08 02:54:12 +00:00
Daniel Berlin
aff30afd6f Revert "CVP: Make CVP iterate in an order that maximizes reuse of LVI cache"
This reverts commit r294398, it seems to be failing on the bots.

llvm-svn: 294399
2017-02-08 02:48:25 +00:00
Daniel Berlin
08557dd706 CVP: Make CVP iterate in an order that maximizes reuse of LVI cache
Summary:
After the DFS order change for LVI, i have a few testcases that now
take forever.

The TL;DR - This is mainly due to the overdefined cache, but that
requires predicateinfo to fix[1]

In order to maximize reuse of the LVI cache for now, change the order
we iterate in.

This reduces my testcase from 5 minutes to 4 seconds.

I have verified cases like gmic do not get slower.

I am playing with whether the order should be postorder or idf.

[1] In practice, overdefined anywhere should be overdefined
everywhere, so this cache should be global.  That also fixes this bug.
The problem, however, is that LVI relies on this cache being filled in
per-block because it wants different values in different blocks due to
precisely the naming issue that predicateinfo fixes.  With
predicateinfo, making the cache global works fine on individual
passes, and also resolves this issue.

Reviewers: davide, sanjoy, chandlerc

Subscribers: llvm-commits, djasper

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

llvm-svn: 294398
2017-02-08 02:35:07 +00:00
Amaury Sechet
95fe0b1163 [DAGCombiner] Push truncate through adde when the carry isn't used.
Summary: As per title.

Reviewers: mkuper, spatel, bkramer, RKSimon, zvi

Subscribers: llvm-commits

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

llvm-svn: 294394
2017-02-08 00:32:36 +00:00
Lang Hames
efecfcc24b [Orc][RPC] Add a HandlerTratis specialization for free functions.
llvm-svn: 294392
2017-02-08 00:13:51 +00:00
Marcos Pividori
f7fe49c66d [libFuzzer] Use long long to ensure 64 bits.
We should always use unsigned long long to ensure 64 bits. On Windows, unsigned
long is 4 bytes. This was the reason why value-profile-cmp4.test was failing on
Windows.

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

llvm-svn: 294390
2017-02-08 00:03:31 +00:00
Marcos Pividori
a987f5c9ea [libFuzzer] Use custom target instead of list of binaries for tests.
Update cmake to use a custom target TestBinaries instead of a list of targets.
This simplifies cmake, and fix some errors. This way, we don't have to propagate
the values into parents directories. We only need to use add_dependencies.

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

llvm-svn: 294389
2017-02-08 00:03:26 +00:00
Marcos Pividori
0e996298b5 [libFuzzer] Properly use Handle instead of FD on Windows.
For Windows, sanitizers work with Handles, not with posix file descriptors,
because they use the windows-specific API. So we need to convert the fds to
handles before passing them to the sanitizer library.
After this change, close_fd_mask is fixed for Windows (this fix some tests too).

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

llvm-svn: 294388
2017-02-08 00:03:18 +00:00
Marcos Pividori
f49239b668 [libFuzzer] Change Uninstrumented test name.
On Windows, executables with the word "uninst" included in their names are
associated with administrator privileges.

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

llvm-svn: 294387
2017-02-08 00:03:13 +00:00
Marcos Pividori
d95b3df910 [libFuzzer] fuzzer-jobs requires posix.
llvm-svn: 294386
2017-02-08 00:03:07 +00:00
Marcos Pividori
091ae16db7 [libFuzzer] Update fuzzer.test to properly set environment variables.
Use env to set environment variables, so it works on Windows and Linux.

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

llvm-svn: 294385
2017-02-08 00:03:03 +00:00
Marcos Pividori
9378b085a2 [libFuzzer] Don't add newline character when using echo in tests.
Add the option "-n", so we don't add a new line character at the end of the file
when using echo. (on Windows this means 2 characters).

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

llvm-svn: 294384
2017-02-08 00:02:59 +00:00
Marcos Pividori
ab85d9d20e [libFuzzer] Disable ulimit test on windows.
Differential Revision: https://reviews.llvm.org/D29535

llvm-svn: 294383
2017-02-08 00:02:54 +00:00
Marcos Pividori
d0a8d0f32b [libFuzzer] Remove ? wildcard on tests.
We can not use the wildcard ? on Windows.

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

llvm-svn: 294382
2017-02-08 00:02:50 +00:00
Marcos Pividori
239e584cdd [libFuzzer] Update fuzzer-segv to set environment variables.
Use env to set environment variables, so it works on Linux and Windows.

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

llvm-svn: 294381
2017-02-08 00:02:45 +00:00
Marcos Pividori
87b8887c08 [libFuzzer] Properly configure tests for Windows.
This configuration is necessary, and is included in all tests suites.
We need to execute: `config.test_format = lit.formats.ShTest(False)`
Otherwise, lit will try to use bash, which generates many problems.

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

llvm-svn: 294380
2017-02-08 00:02:41 +00:00
Marcos Pividori
49baf48cc8 [libFuzzer] Simplify dump_coverage test.
Environment variables are handled differently on Windows. In this case it is not
necessary to use environment variables. So, I simplify the test to work on
Windows.

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

llvm-svn: 294379
2017-02-08 00:02:36 +00:00
Marcos Pividori
373b5f62d1 [libFuzzer] Update Load test to work on 32 bits.
We should ensure the size of the variable `a` is 8 bytes. Otherwise, this
generates a stack buffer overflow inside the memcpy call in 32 bits machines.
(We write more bytes than the size of a, when it is 4 bytes)

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

llvm-svn: 294378
2017-02-08 00:02:32 +00:00
Marcos Pividori
74432f4efe [libFuzzer] Update test to consider different exceptions.
Differential Revision: https://reviews.llvm.org/D29531

llvm-svn: 294377
2017-02-08 00:02:25 +00:00
Marcos Pividori
7f9b9089f9 [libFuzzer] Temporarily fix Shmem for Windows.
In this diff, I add stubs for shared memory on Windows. Now we can compile and
use libFuzzer without support for shared memory.

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

llvm-svn: 294376
2017-02-08 00:02:12 +00:00
Sanjoy Das
45937543a4 [IRCE] Add a missing invariant check
Currently IRCE relies on the loops it transforms to be (semantically) of
the form:

  for (i = START; i < END; i++)
    ...

or

  for (i = START; i > END; i--)
    ...

However, we were not verifying the presence of the START < END entry
check (i.e. check before the first iteration).  We were only verifying
that the backedge was guarded by (i + 1) < END.

Usually this would work "fine" since (especially in Java) most loops do
actually have the START < END check, but of course that is not
guaranteed.

llvm-svn: 294375
2017-02-07 23:59:07 +00:00
Chris Bieneman
7c80cb46fa [CMake] Allow overriding CMAKE_LIBTOOL
This patch allows a user to specify a their own libtool instead of auto-detecting one.

llvm-svn: 294371
2017-02-07 23:32:56 +00:00
Eugene Zelenko
b36bc37b12 [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 294369
2017-02-07 23:02:00 +00:00
Eugene Zelenko
ad0489e470 [PowerPC] Fix some Include What You Use warnings; other minor fixes (NFC).
This is preparation to reduce MC headers dependencies.

llvm-svn: 294368
2017-02-07 22:59:46 +00:00
Eric Fiselier
7afb27af72 [CMake] Fix USE_LLVM_SANITIZER configuration for out-of-tree builds.
Summary:
r291918 changed `HandleLLVMOptions.cmake` to add `-fsanitize-blacklist=<llvm-file>` when `LLVM_USE_SANITIZER=Undefined` is specified. This breaks out-of-tree users of `LLVM_USE_SANITIZER` since that file is not present.

This patch fixes the issue by checking if the file exists first.

Reviewers: mgorny, bogner, vitalybuka, krasin

Reviewed By: krasin

Subscribers: llvm-commits

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

llvm-svn: 294367
2017-02-07 22:48:20 +00:00
Kostya Serebryany
46cf1b2be5 [libFuzzer] replace std::random_shuffle with std::shuffle as std::random_shuffle is being deprecated in C++17. Also simplify fuzzer::Random. NFC
llvm-svn: 294366
2017-02-07 22:37:34 +00:00