1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

114554 Commits

Author SHA1 Message Date
Sanjay Patel
b09f1ac09a use range-based for loops; NFC
llvm-svn: 231747
2015-03-10 03:26:39 +00:00
Craig Topper
605895c7e7 Improve and simplify EnforceSmallerThan for vector types.
Explicitly compare the size of the scalar types and the whole vector size rather than just comparing enum encodings.

llvm-svn: 231746
2015-03-10 03:25:07 +00:00
Craig Topper
38f7090cef Remove extra indentation of entire function body. NFC.
llvm-svn: 231745
2015-03-10 03:25:04 +00:00
Rafael Espindola
240f1f5b6b Move label creation close to emission. NFC.
llvm-svn: 231744
2015-03-10 03:11:11 +00:00
George Burgess IV
939966a7bc Added ConstantExpr support to CFLAA.
CFLAA didn't know how to properly handle ConstantExprs; it would silently
ignore them. This was a problem if the ConstantExpr is, say, a GEP of a global,
because CFLAA wouldn't realize that there's a global there. :)

llvm-svn: 231743
2015-03-10 02:58:15 +00:00
George Burgess IV
27ecf15e8f Added special handling for inttoptr in CFLAA.
We now treat pointers given to ptrtoint and pointers retrieved from
inttoptr as similar to arguments or globals (can alias anything, etc.)

This solves some of the problems we were having with giving incorrect
results.

llvm-svn: 231741
2015-03-10 02:40:06 +00:00
Mehdi Amini
f88efe5f8a DataLayout is mandatory, update the API to reflect it with references.
Summary:
Now that the DataLayout is a mandatory part of the module, let's start
cleaning the codebase. This patch is a first attempt at doing that.

This patch is not exactly NFC as for instance some places were passing
a nullptr instead of the DataLayout, possibly just because there was a
default value on the DataLayout argument to many functions in the API.
Even though it is not purely NFC, there is no change in the
validation.

I turned as many pointer to DataLayout to references, this helped
figuring out all the places where a nullptr could come up.

I had initially a local version of this patch broken into over 30
independant, commits but some later commit were cleaning the API and
touching part of the code modified in the previous commits, so it
seemed cleaner without the intermediate state.

Test Plan:

Reviewers: echristo

Subscribers: llvm-commits

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 231740
2015-03-10 02:37:25 +00:00
Kostya Serebryany
1c5044f9e7 [sanitizer] fix instrumentation with -mllvm -sanitizer-coverage-block-threshold=0 to actually do something useful.
llvm-svn: 231736
2015-03-10 01:58:27 +00:00
Kostya Serebryany
a4f5e50c70 [sanitizer] decrease sanitizer-coverage-block-threshold from 1000 to 500 as another horrible workaround for PR17409
llvm-svn: 231733
2015-03-10 01:11:53 +00:00
Frederic Riss
9c6539e46b DwarfAccelTable: Fix handling of hash collisions.
It turns out accelerator tables where totally broken if they contained
entries with colliding hashes. The failure mode is pretty bad, as it not
only impacted the colliding entries, but would basically make all the
entries after the first hash collision pointing in the wrong place.

The testcase uses the symbol names that where found to collide during a
clang build.

From a performance point of view, the patch adds a sort and a linear
walk over each bucket contents. While it has a measurable impact on the
accelerator table emission, it's not showing up significantly in clang
profiles (and I'd argue that correctness is priceless :-)).

llvm-svn: 231732
2015-03-10 00:46:31 +00:00
Eric Christopher
0c42dfb65e Temporarily revert r231726 and r231724 as they're breaking the build.:
Author: Lang Hames <lhames@gmail.com>
Date:   Mon Mar 9 23:51:09 2015 +0000

    [Orc][MCJIT][RuntimeDyld] Add header that was accidentally left out of r231724.

Author: Lang Hames <lhames@gmail.com>
Date:   Mon Mar 9 23:44:13 2015 +0000

    [Orc][MCJIT][RuntimeDyld] Add symbol flags to symbols in RuntimeDyld. Thread the
    new types through MCJIT and Orc.

    In particular, add a 'weak' flag. When plumbed through RTDyldMemoryManager, this
    will allow us to distinguish between weak and strong definitions and find the
    right ones during symbol resolution.

llvm-svn: 231731
2015-03-10 00:33:27 +00:00
Eric Christopher
bf1458c86c Remove an unused variable.
llvm-svn: 231730
2015-03-10 00:33:22 +00:00
Ben Langmuir
c98fb0bc5d Don't treat .foo as two path components in path::iterators
We were treating '/.foo' as ['/', '.', 'foo'] instead of ['/', '.foo'],
which lead to insanity.  Same for '..'.

llvm-svn: 231727
2015-03-10 00:04:29 +00:00
Lang Hames
9267b635b3 [Orc][MCJIT][RuntimeDyld] Add header that was accidentally left out of r231724.
llvm-svn: 231726
2015-03-09 23:51:09 +00:00
Lang Hames
4143eb6862 [Orc][MCJIT][RuntimeDyld] Add symbol flags to symbols in RuntimeDyld. Thread the
new types through MCJIT and Orc.

In particular, add a 'weak' flag. When plumbed through RTDyldMemoryManager, this
will allow us to distinguish between weak and strong definitions and find the
right ones during symbol resolution.

llvm-svn: 231724
2015-03-09 23:44:13 +00:00
Colin LeMahieu
71ac12bc35 [Hexagon] Removing unused patterns.
llvm-svn: 231723
2015-03-09 23:08:46 +00:00
David Blaikie
d9778583bf LLParser: gep: Simplify parsing error handling
llvm-svn: 231722
2015-03-09 23:08:44 +00:00
Ahmed Bougacha
c37ed67e4a [CodeGen] Replace the reused stores' chain for extractelt expansion.
This fixes a subtle issue that was introduced in r205153.

When reusing a store for the extractelement expansion (to load directly
from it, inserting of going through the stack), later stores to the
same location might have overwritten the data we were expecting to
extract from.

To fix that, we need to explicitly replace the chain going out of the
reused store, so that later stores also have an explicit dependency on
the generated element-extracting loads, and can't clobber them.

rdar://20066785
Differential Revision: http://reviews.llvm.org/D8180

llvm-svn: 231721
2015-03-09 22:51:05 +00:00
Ahmed Bougacha
03e5ee9dd0 [X86] Add nounwind to vector-idiv.ll testcases. NFC.
In preparation for a patch where cfi directives get in the way.

llvm-svn: 231720
2015-03-09 22:46:02 +00:00
Reid Kleckner
dd109017af Reland r229944: EH: Prune unreachable resume instructions during Dwarf EH preparation
Fix the double-deletion of AnalysisResolver when delegating through to
Dwarf EH preparation by creating one from scratch. Hopefully the new
pass manager simplifies this.

This reverts commit r229952.

llvm-svn: 231719
2015-03-09 22:45:16 +00:00
Rafael Espindola
bc2dad2e08 Use a MapVector instead of an extra sort.
This also has the advantage of not depending on the brittle getLabelBeginName.

llvm-svn: 231714
2015-03-09 22:08:37 +00:00
Colin LeMahieu
91da68b7ad [Hexagon] Use single tailcall pseudoinst and fix checking for label jumping versus tail calling.
llvm-svn: 231713
2015-03-09 22:05:21 +00:00
Colin LeMahieu
a4d567fa07 [Hexagon] Reapply r231699. Remove assumption that second operand is an immediate when checking if A2_tfrsi is combinable.
llvm-svn: 231710
2015-03-09 21:48:13 +00:00
Sanjoy Das
dd01838ee9 [SCEV] Unify getUnsignedRange and getSignedRange
Summary:
This removes some duplicated code, and also helps optimization: e.g. in
the test case added, `%idx ULT 128` in `@x` is not currently optimized
to `true` by `-indvars` but will be, after this change.

The only functional change in ths commit is that for add recurrences,
ScalarEvolution::getRange will be more aggressive -- computing the
unsigned (resp. signed) range for a SCEVAddRecExpr will now look at the
NSW (resp. NUW) bits and check for signed (resp. unsigned) overflow.
This can be a strict improvement in some cases (such as the attached
test case), and should be no worse in other cases.

Reviewers: atrick, nlewycky

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D8142

llvm-svn: 231709
2015-03-09 21:43:43 +00:00
Sanjoy Das
632d955ab8 [SCEV] Add a `scalar-evolution-print-constant-ranges' option
Summary:
Unused in this commit, but will be used in a subsequent change (D8142)
by a FileCheck test.

Reviewers: atrick

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D8143

llvm-svn: 231708
2015-03-09 21:43:39 +00:00
Colin LeMahieu
9d1d946c75 [Hexagon] Reverting r231699
llvm-svn: 231703
2015-03-09 21:19:02 +00:00
Frederic Riss
b9251b7d03 DwarfAccelTable: fix obvious typo.
I have a test for that issue, but I didn't include it in the commit as it's
a 200KB file for a pretty minor issue. (The reason the file is so big is
that it needs > 1024 variables/functions to trigger and that with debug
information.

The issue/fix on the other side is totally trivial. If poeple want the test
commited, I can do that. It just didn't seem worth it to me.

llvm-svn: 231701
2015-03-09 21:09:50 +00:00
Colin LeMahieu
08e0cb05d4 [Hexagon] Updating constant set to simpler versions.
llvm-svn: 231699
2015-03-09 20:33:12 +00:00
Reid Kleckner
14e7cd0103 TableGen: Use 'enum : uint64_t' for feature flags to fix -Wmicrosoft
clang-cl would warn that this value is not representable in 'int':
  enum { FeatureX = 1ULL << 31 };
All MS enums are 'ints' unless otherwise specified, so we have to use an
explicit type.  The AMDGPU target just hit 32 features, triggering this
warning.

Now that we have C++11 strong enum types, we can also eliminate the
'const uint64_t' codepath from tablegen and just use 'enum : uint64_t'.

llvm-svn: 231697
2015-03-09 20:23:14 +00:00
Benjamin Kramer
02fbb23c87 Remove the remaining uses of abs64 and nuke it.
std::abs works just fine and we're already using it in many places. NFC intended.

llvm-svn: 231696
2015-03-09 20:20:16 +00:00
Colin LeMahieu
91d2d63512 [Hexagon] Removing old halfword codegen instructions and updating const32/64 splitting.
llvm-svn: 231695
2015-03-09 20:11:02 +00:00
Rafael Espindola
bfecc2407c Don't prime the section map.
This was just creating unused labels for .text when the module had no
functions.

llvm-svn: 231694
2015-03-09 20:09:58 +00:00
Colin LeMahieu
899cabf2eb [Hexagon] Eliminating immediate condition set.
llvm-svn: 231693
2015-03-09 19:57:18 +00:00
Colin LeMahieu
996edd9328 [Hexagon] Removing TFR_condset_ir/TFR_condset_ri modeling.
llvm-svn: 231689
2015-03-09 19:31:25 +00:00
Colin LeMahieu
6ed4dadb96 [Hexagon] Changing AddrFI back to ADDRri to address test issue.
llvm-svn: 231687
2015-03-09 18:57:33 +00:00
Justin Bogner
7887cf041c InstrProf: Use the proftext format for these coverage tests
This format's easier to understand and update by hand.

llvm-svn: 231686
2015-03-09 18:54:58 +00:00
Justin Bogner
cdce389220 InstrProf: Allow hexadecimal function hashes in proftext format
llvm-svn: 231685
2015-03-09 18:54:49 +00:00
Tom Stellard
74f429e67a R600/SI: Move gds operand to the end of operand list
Also print it in the assembly string.

llvm-svn: 231684
2015-03-09 18:49:54 +00:00
Tom Stellard
f18a8e2294 R600/SI: Refactor DS instruction defs
llvm-svn: 231683
2015-03-09 18:49:45 +00:00
Rafael Espindola
7f746ba5ac Delete dead code. NFC.
llvm-svn: 231682
2015-03-09 18:48:29 +00:00
Ed Schouten
bbe9625d3a Add support for Nuxi CloudABI.
CloudABI is a POSIX-like runtime environment built around the concept of
capability-based security. More details:

	https://github.com/NuxiNL/cloudlibc

CloudABI uses its own ELFOSABI number. This number has been allocated by
the maintainers of ELF a couple of days ago.

Reviewed by:	echristo

llvm-svn: 231681
2015-03-09 18:40:45 +00:00
Benjamin Kramer
61481a2f9a Drop the hacks used for partial C99 math libraries.
All supported platforms have half-way decent C99 support.

llvm-svn: 231679
2015-03-09 18:35:18 +00:00
Colin LeMahieu
ea9e0a1b68 [Hexagon] Adding PackHL nodes and some missing modeling instructions and patterns
llvm-svn: 231678
2015-03-09 18:34:05 +00:00
Rafael Espindola
90d175f38e Print jump tables before exception tables.
In the case where just tables are part of the function section, this produces
more readable assembly by avoiding switching to the eh section and back
to .text.

This would also break with non unique section names, as trying to switch to
a unique section actually creates a new one.

llvm-svn: 231677
2015-03-09 18:29:12 +00:00
Rafael Espindola
f97fea3045 Don't repeat name in comment. NFC.
llvm-svn: 231676
2015-03-09 18:11:42 +00:00
Rafael Espindola
99f144e698 Remove dummy method implementations.
These are pure virtual in the base class, so the compiler checks that they
are implemented.

llvm-svn: 231673
2015-03-09 17:58:49 +00:00
Reed Kotler
09f88fcab2 Add logical ops to Mips fast-isel
Summary:
Code is mostly copied from AArch64 port and modified where needed for Mips.

This handles the "non" legal cases of logical ops. Legal cases are handled by tablegen patterns.

Test Plan:
Make check test logopm.ll

All of test-suite passes at O0/O2 and mips32 r1/r2 with this new change.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: echristo, llvm-commits, aemerson, rfuhler

Differential Revision: http://reviews.llvm.org/D6599

llvm-svn: 231665
2015-03-09 16:28:10 +00:00
Benjamin Kramer
5ce1e9672a Make helper functions static.
Found by -Wmissing-prototypes. NFC.

llvm-svn: 231664
2015-03-09 16:23:46 +00:00
Tom Stellard
4ecbba8a1a R600/SI: Fix DS definitions and add missing instructions
llvm-svn: 231663
2015-03-09 16:03:45 +00:00
Tom Stellard
3dba385a6c R600/SI: Fix opcode for ds_read2_b64 and ds_read2st64_b64
llvm-svn: 231662
2015-03-09 16:03:39 +00:00