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

112901 Commits

Author SHA1 Message Date
Matt Arsenault
e6e242235b Add support for double / float to EndianStream
Also add new unit tests for endian::Writer

llvm-svn: 228269
2015-02-05 03:30:08 +00:00
Michael Zolotukhin
eefcb25cfe Implement new heuristic for complete loop unrolling.
Complete loop unrolling can make some loads constant, thus enabling a
lot of other optimizations. To catch such cases, we look for loads that
might become constants and estimate number of instructions that would be
simplified or become dead after substitution.

Example:
Suppose we have:
int a[] = {0, 1, 0};
v = 0;
for (i = 0; i < 3; i ++)
  v += b[i]*a[i];

If we completely unroll the loop, we would get:
v = b[0]*a[0] + b[1]*a[1] + b[2]*a[2]

Which then will be simplified to:
v = b[0]* 0 + b[1]* 1 + b[2]* 0

And finally:
v = b[1]

llvm-svn: 228265
2015-02-05 02:34:00 +00:00
Cameron Esfahani
a75b0eb54b Value soft float calls as more expensive in the inliner.
Summary: When evaluating floating point instructions in the inliner, ask the TTI whether it is an expensive operation.  By default, it's not an expensive operation.  This keeps the default behavior the same as before.  The ARM TTI has been updated to return back TCC_Expensive for targets which don't have hardware floating point.

Reviewers: chandlerc, echristo

Reviewed By: echristo

Subscribers: t.p.northover, aemerson, llvm-commits

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

llvm-svn: 228263
2015-02-05 02:09:33 +00:00
Ahmed Bougacha
695ecfaf63 [ARM] Use patterns instead of hardcoded regs in test. NFC.
llvm-svn: 228259
2015-02-05 01:52:19 +00:00
Ahmed Bougacha
7ad91ab9fd [ARM] Make testcase more explicit. NFC.
The q8/d16 thing is silly;  I'd be happy to hear about a better
way to write those tests where simple substitution isn't enough..

llvm-svn: 228258
2015-02-05 01:45:28 +00:00
Reid Kleckner
fcd22de373 Try to fix the build in MCValue.cpp
llvm-svn: 228256
2015-02-05 01:23:14 +00:00
Sean Silva
7bda0f64c2 Fixup.
Didn't see these calls in my release build locally when testing.

llvm-svn: 228254
2015-02-05 01:13:47 +00:00
Duncan P. N. Exon Smith
fe2e84e098 IR: Split out getOperandAs(), NFC
llvm-svn: 228250
2015-02-05 01:07:47 +00:00
Sean Silva
9d2bea5968 [MC] Remove various unused MCAsmInfo parameters.
llvm-svn: 228244
2015-02-05 00:58:51 +00:00
Duncan P. N. Exon Smith
5ebb7c1d71 IR: Rename 'operator ==()' to 'isKeyOf()', NFC
`isKeyOf()` is a clearer name than overloading `operator==()`.

llvm-svn: 228242
2015-02-05 00:51:35 +00:00
Duncan P. N. Exon Smith
7f33c007a0 ADT: Add int64_t interoperability to APSInt
Add some API to `APSInt` to make it easier to compare with `int64_t`.

  - `APSInt::compareValues(APSInt, APSInt)` returns 1, -1 or 0 for
    greater, lesser, or equal, doing the right thing for mismatched
    "has-sign" and bitwidths.  This is just like `isSameValue()` (and is
    now the implementation of it).
  - `APSInt::get(int64_t)` gets a signed `APSInt`.
  - `operator<(int64_t)`, etc., are implemented trivially via `get()`
    and `compareValues()`.
  - Also added `APSInt::getUnsigned(uint64_t)` to make it easier to test
    `compareValues()`.

llvm-svn: 228239
2015-02-05 00:17:43 +00:00
Colin LeMahieu
59e60a7508 [Hexagon] Deleting unused instructions and adding isCodeGenOnly to some defs.
llvm-svn: 228238
2015-02-05 00:10:16 +00:00
Colin LeMahieu
a5cba70965 [Hexagon] Updating load extend to i64 patterns.
llvm-svn: 228237
2015-02-04 23:55:16 +00:00
Kostya Serebryany
64c4d4b6ad [fuzzer] add flag prefer_small_during_initial_shuffle, be a bit more verbose
llvm-svn: 228235
2015-02-04 23:42:42 +00:00
Colin LeMahieu
b25dd0b3f6 [Hexagon] Cleaning up i1 load and extension patterns.
llvm-svn: 228232
2015-02-04 23:27:48 +00:00
Colin LeMahieu
a83c8f413e [Hexagon] Simplifying more load and store patterns and using new addressing patterns.
llvm-svn: 228231
2015-02-04 23:23:16 +00:00
Reid Kleckner
8127f1fbb0 Remove useless call to isOSCygMing()
This used to do something when we modeled the Cygwin and MinGW
environments as distinct OSs, but now it is not needed.

llvm-svn: 228229
2015-02-04 23:17:19 +00:00
Tom Stellard
e60a7f33b1 R600/SI: Enable subreg liveness by default
llvm-svn: 228228
2015-02-04 23:14:18 +00:00
Colin LeMahieu
1968c41c8d [Hexagon] Simplifying some load and store patterns.
llvm-svn: 228227
2015-02-04 23:10:21 +00:00
Duncan P. N. Exon Smith
44f9466ee2 AsmParser: Split out LineField, NFC
Split out `LineField`, which restricts the legal line numbers.  This
will make it easier to be consistent between different node parsers.

llvm-svn: 228226
2015-02-04 22:59:18 +00:00
Colin LeMahieu
0d1a9ddbbe [Hexagon] Converting absolute-address load patterns to use AddrGP.
llvm-svn: 228225
2015-02-04 22:54:51 +00:00
Colin LeMahieu
528f1fe83c [Hexagon] Converting atomic store/load to use AddrGP addressing.
llvm-svn: 228223
2015-02-04 22:40:36 +00:00
Reid Kleckner
018690bc2a Don't warn or note if bash is missing
We haven't needed bash on Windows to run the test suite for a long time
now.

Patch by Michael Edwards!

llvm-svn: 228221
2015-02-04 22:36:52 +00:00
Colin LeMahieu
90f37476de [Hexagon] Simplifying some store patterns. Adding AddrGP addressing forms.
llvm-svn: 228220
2015-02-04 22:36:28 +00:00
Filipe Cabecinhas
774b1b57ed Handle LLVM_USE_SANITIZER=Address;Undefined (and the other way around)
Summary:
Handle LLVM_USE_SANITIZER=Address;Undefined to enable ASan and UBSan
If UBSan is compatible with more of the other sanitizers, maybe we should
deal with this in a better way where we allow combining UBSan with any of
the other sanitizers.

Reviewers: samsonov

Subscribers: llvm-commits

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

llvm-svn: 228219
2015-02-04 22:33:31 +00:00
Kostya Serebryany
bef8a9c563 [fuzzer] add -runs=N to limit the number of runs per session. Also, make sure we do some mutations w/o cross over.
llvm-svn: 228214
2015-02-04 22:20:09 +00:00
Duncan P. N. Exon Smith
ad1cd45f46 Fix GCC error caused by r228211
llvm-svn: 228213
2015-02-04 22:13:28 +00:00
Duncan P. N. Exon Smith
713761dd79 IR: Reduce boilerplate in DenseMapInfo overrides, NFC
Minimize the boilerplate required for the `MDNode` subclass
`DenseMapInfo<>` overrides in `LLVMContextImpl`.

llvm-svn: 228212
2015-02-04 22:08:30 +00:00
Duncan P. N. Exon Smith
4e9e353b27 AsmParser: Move MDField details to source file, NFC
Move all the types of `MDField` to an anonymous namespace in the source
file.  This also eliminates the duplication of `ParseMDField()`
declarations in the header for each new field type.

llvm-svn: 228211
2015-02-04 22:05:21 +00:00
Duncan P. N. Exon Smith
244d33ab06 AsmParser: Simplify assertion, NFC
llvm-svn: 228209
2015-02-04 22:02:18 +00:00
Duncan P. N. Exon Smith
5c1de81a19 AsmParser: Remove dead code, NFC
This condition is checked in the generic `ParseMDField()`.

llvm-svn: 228208
2015-02-04 22:00:59 +00:00
Duncan P. N. Exon Smith
0c1cc29553 AsmParser: Simplify MDUnsignedField
We only need `uint64_t` for storage.

llvm-svn: 228205
2015-02-04 21:57:52 +00:00
Duncan P. N. Exon Smith
2b8de5594c IR: Initialize MDNode abbreviations en masse, NFC
llvm-svn: 228203
2015-02-04 21:54:12 +00:00
Duncan P. N. Exon Smith
cb971a51bd IR: Define MDNode uniquing sets automatically, NFC
llvm-svn: 228200
2015-02-04 21:46:12 +00:00
Kevin Enderby
2f4b753a1a Add code to llvm-objdump so the -section option with -macho will dump ‘C’ string
sections with the Mach-O S_CSTRING_LITERALS section type.

llvm-svn: 228198
2015-02-04 21:38:42 +00:00
Rafael Espindola
b9eab9993a Don' try to make sections in comdats SHF_MERGE.
Parts of llvm were not expecting it and we wouldn't print
the entity size of the section.

Given what comdats are used for, having SHF_MERGE sections would be
just a small improvement, so just disable it for now.

Fixes pr22463.

llvm-svn: 228196
2015-02-04 21:27:24 +00:00
Sean Silva
f0d42da25b [docs] Put an explicit link to InAlloca.rst
llvm-svn: 228192
2015-02-04 20:51:19 +00:00
Tom Stellard
cf5e2de361 R600/SI: Expand misaligned 16-bit memory accesses
llvm-svn: 228190
2015-02-04 20:49:52 +00:00
Tom Stellard
e523dc6621 R600/SI: Make more store operations legal
v2i32, i32, trunc i32 to i16, and truc i32 to i8 stores are legal for
all address spaces.  We had marked them as custom in order to lower
them for the private address space, but this is no longer necessary.

This enables lowering of misaligned stores of these types in the
DAGLegalizer.

llvm-svn: 228189
2015-02-04 20:49:51 +00:00
Tom Stellard
5ea00f06af R600: Don't promote i64 stores to v2i32 during DAG legalization
We take care of this during instruction selection now.  This
fixes a potential infinite loop when lowering misaligned stores.

llvm-svn: 228188
2015-02-04 20:49:49 +00:00
Tom Stellard
25abb3b083 StructurizeCFG: Remove obsolete fix for loop backedge detection
This is no longer needed now that we are using a reverse post-order
traversal.

llvm-svn: 228187
2015-02-04 20:49:47 +00:00
Tom Stellard
e903257d57 StructurizeCFG: Use a reverse post-order traversal
We were previously doing a post-order traversal and operating on the
list in reverse, however this would occasionaly cause backedges for
loops to be visited before some of the other blocks in the loop.

We know use a reverse post-order traversal, which avoids this issue.

The reverse post-order traversal is not completely ideal, so we need
to manually fixup the list to ensure that inner loop backedges are
visited before outer loop backedges.

llvm-svn: 228186
2015-02-04 20:49:44 +00:00
Colin LeMahieu
6a07b73882 [Hexagon] Adding selection for GlobalAddress and converting [z/i]ext load patterns to make use of them.
llvm-svn: 228184
2015-02-04 20:38:01 +00:00
Bill Schmidt
b4a2fabd36 Add missing test case from r228046
llvm-svn: 228182
2015-02-04 20:00:04 +00:00
Duncan P. N. Exon Smith
89bed72563 Utils: Resolve cycles under distinct MDNodes
Track unresolved nodes under distinct `MDNode`s during `MapMetadata()`,
and resolve them at the end.  Previously, these cycles wouldn't get
resolved.

llvm-svn: 228180
2015-02-04 19:44:34 +00:00
Matthias Braun
84aaa1dd81 MachineCSE: Clear dead-def flag on CSE.
In case CSE reuses a previoulsy unused register the dead-def flag has to
be cleared on the def operand, as exposed by the arm64-cse.ll test.

This fixes PR22439 and the corresponding rdar://19694987

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

llvm-svn: 228178
2015-02-04 19:35:16 +00:00
Reid Kleckner
6182b47caf Add range adapters predecessors() and successors() for BBs
Use them in two isolated transforms so we know they work and aren't dead
code.

llvm-svn: 228173
2015-02-04 19:14:57 +00:00
Kostya Serebryany
31b6858756 [fuzzer] make multi-process execution more verbose; fix mutation to actually respect mutation depth and to never produce empty units
llvm-svn: 228170
2015-02-04 19:10:20 +00:00
Colin LeMahieu
7672352f54 [Hexagon] Replacing some load patterns with cleaner versions.
llvm-svn: 228169
2015-02-04 19:05:32 +00:00
Michael Kuperstein
69b881344b Fixes a bug in vector load legalization that confused bits and bytes.
Differential Revision: http://reviews.llvm.org/D7400

llvm-svn: 228168
2015-02-04 18:54:01 +00:00