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

106511 Commits

Author SHA1 Message Date
Rafael Espindola
d5eb943fe5 Convert from Windows to Unix paths in sys::path::native.
Part of pr20544. Test to follow in a second.

llvm-svn: 215241
2014-08-08 21:29:34 +00:00
Joerg Sonnenberger
71ad99879f Allow large immediates for branch instructions in 32bit mode.
llvm-svn: 215240
2014-08-08 20:57:58 +00:00
Joerg Sonnenberger
8e42fa93a6 Provide an implementation of getNoopForMachoTarget for PPC, otherwise
empty functions will assert in the MC object writer.

llvm-svn: 215238
2014-08-08 19:13:23 +00:00
Juergen Ributzka
896851e155 [FastISel][X86] Fix INC/DEC optimization (r215230)
I accidentally also used INC/DEC for unsigned arithmetic which doesn't work,
because INC/DEC don't set the required flag which is used for the overflow
check.

llvm-svn: 215237
2014-08-08 18:47:04 +00:00
Tim Northover
d67d6cf4fb AArch64: avoid deleting the current iterator in a loop.
std::map invalidates the iterator to any element that gets deleted, which means
we can't increment it correctly afterwards. This was causing Darwin test
failures.

llvm-svn: 215233
2014-08-08 17:31:52 +00:00
Juergen Ributzka
657fb37f68 [FastISel][AArch64] Attach MachineMemOperands to load and store instructions.
llvm-svn: 215231
2014-08-08 17:24:10 +00:00
Juergen Ributzka
18879eb501 [FastISel][X86] Use INC/DEC when possible for {sadd|ssub}.with.overflow intrinsics.
This is a small peephole optimization to emit INC/DEC when possible.

Fixes <rdar://problem/17952308>.

llvm-svn: 215230
2014-08-08 17:21:37 +00:00
David Blaikie
4d8d9e9994 DebugInfo: Recommit (reverted in r215217, originally committed in r215157) the assertion that no argument variable is overwritten by subsequent argument variables.
This turned up a bug in clang where arguments were emitted with
duplicate argument numbers (see r215227).

llvm-svn: 215228
2014-08-08 17:12:35 +00:00
NAKAMURA Takumi
52e4e2fd27 AArch64A57FPLoadBalancing.cpp: Define ColorNames in !NDEBUG.
llvm-svn: 215226
2014-08-08 17:00:59 +00:00
NAKAMURA Takumi
3134b96989 DataTypes.h.cmake: Define PRIx32 &c for !HAVE_INTTYPES_H hosts.
I supposed PRIx32 might be unused in the tree.

llvm-svn: 215225
2014-08-08 17:00:47 +00:00
Rafael Espindola
f941735080 Delete dead code. NFC.
llvm-svn: 215224
2014-08-08 16:49:35 +00:00
Pedro Artigas
1f3011cd4b Added a TLI hook to signal that the target does not have or does not care about
floating point exceptions, added use of flag to fold potentially exception 
raising floating point math in selection DAG. No functionality change, as 
targets have to explicitly ask for this behavior and none does today.

llvm-svn: 215222
2014-08-08 16:46:53 +00:00
Joerg Sonnenberger
4df95fac67 Add low-level option for avoiding float stores from va_start until
soft-float is properly supported.

llvm-svn: 215221
2014-08-08 16:46:10 +00:00
Joerg Sonnenberger
ca56042175 Add support for SPE load/store from memory.
llvm-svn: 215220
2014-08-08 16:43:49 +00:00
Rafael Espindola
4d002fe555 getLoadName is only implemented for ELF, make it ELF only.
llvm-svn: 215219
2014-08-08 16:39:22 +00:00
Rafael Espindola
ca3df92c52 Use a simpler predicate. NFC.
llvm-svn: 215218
2014-08-08 16:30:17 +00:00
David Blaikie
2ab7d3c438 DebugInfo: Remove assertion (added in r215157) that's firing on a blocks
test in the test-suite while I investigate further.

llvm-svn: 215217
2014-08-08 16:21:50 +00:00
Rafael Espindola
106e492216 pr20589: Fix duplicated arch flag.
llvm-svn: 215216
2014-08-08 16:18:29 +00:00
Rafael Espindola
97d54b71e5 pr20588: add missing calls to va_end.
llvm-svn: 215212
2014-08-08 15:57:37 +00:00
Daniel Sanders
626068878f [mips] Invert the abicalls feature bit to be noabicalls so that it's possible for -mno-abicalls to take effect.
Also added the testcase that should have been in r215194.

This behaviour has surprised me a few times now. The problem is that the
generated MipsSubtarget::ParseSubtargetFeatures() contains code like this:

   if ((Bits & Mips::FeatureABICalls) != 0) IsABICalls = true;

so '-abicalls' means 'leave it at the default' and '+abicalls' means 'set it to
true'. In this case, (and the similar -modd-spreg case) I'd like the code to be

  IsABICalls = (Bits & Mips::FeatureABICalls) != 0;

or possibly:

   if ((Bits & Mips::FeatureABICalls) != 0)
     IsABICalls = true;
   else
     IsABICalls = false;

and preferably arrange for 'Bits & Mips::FeatureABICalls' to be true by default
(on some triples).

llvm-svn: 215211
2014-08-08 15:47:17 +00:00
Josh Klontz
6f066a7766 Add missing Interpreter intrinsic lowering for sin, cos and ceil
llvm-svn: 215209
2014-08-08 15:00:12 +00:00
Josh Klontz
4a8465ca5b Fix for #20408 - CMake LLVM_ENABLE_FFI=ON build fails on reconfigure
llvm-svn: 215207
2014-08-08 14:32:56 +00:00
Jiangning Liu
264179daf4 [AArch64] Fix a type conversion bug for anlyzing compare.
The bug can cause spec2006/483.xalancbmk failure.

Patched by David Xu.

llvm-svn: 215206
2014-08-08 14:19:29 +00:00
Rafael Espindola
0c2eeeddf1 Fix bug 20125 - clang-format segfaults on bad config.
The problem was in unchecked dyn_cast inside of Input::createHNodes.
Patch by Roman Kashitsyn!

llvm-svn: 215205
2014-08-08 13:58:00 +00:00
Daniel Sanders
9c70c83628 [mips] Remove reason for XFAIL from a test that isn't actually XFAILed.
llvm-svn: 215201
2014-08-08 12:58:17 +00:00
James Molloy
23906392d8 [LoopVectorizer] Enable support for floating-point subtraction reductions
llvm-svn: 215200
2014-08-08 12:41:08 +00:00
James Molloy
c2be58dbb0 [AArch64] Add an FP load balancing pass for Cortex-A57
For best-case performance on Cortex-A57, we should try to use a balanced mix of odd and even D-registers when performing a critical sequence of independent, non-quadword FP/ASIMD floating-point multiply or multiply-accumulate operations.

This pass attempts to detect situations where the register allocation may adversely affect this load balancing and to change the registers used so as to better utilize the CPU.

Ideally we'd just take each multiply or multiply-accumulate in turn and allocate it alternating even or odd registers. However, multiply-accumulates are most efficiently performed in the same functional unit as their accumulation operand. Therefore this pass tries to find maximal sequences ("Chains") of multiply-accumulates linked via their accumulation operand, and assign them all the same "color" (oddness/evenness).

This optimization affects S-register and D-register floating point multiplies and FMADD/FMAs, as well as vector (floating point only) muls and FMADD/FMA. Q register instructions (and 128-bit vector instructions) are not affected.

llvm-svn: 215199
2014-08-08 12:33:21 +00:00
Tim Northover
9e05ba304d llvm-objdump: add missing % in format specifier.
llvm-svn: 215198
2014-08-08 12:08:51 +00:00
Tim Northover
603f54dc1c llvm-objdump: use portable format specifiers for info.
ARM bots (& others, I think, now that I look) were failing because we
were using incorrect printf-style format specifiers. They were wrong
on almost any platform, actually, just mostly harmlessly so.

llvm-svn: 215196
2014-08-08 12:00:09 +00:00
Daniel Sanders
dd2a57f697 [mips] Initial implementation of -mabicalls/-mno-abicalls.
This patch implements the main rules for -mno-abicalls such as reserving $gp,
and emitting the correct .option directive.

Patch by Matheus Almeida and Toma Tabacu

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

llvm-svn: 215194
2014-08-08 10:01:29 +00:00
Tim Northover
43f2f4770b AArch64: stop trying to take control of all UnknownArch triples.
This short-circuited our error reporting for incorrectly specified
target triples (you'd get AArch64 code instead).

Should fix PR20567.

llvm-svn: 215191
2014-08-08 08:27:44 +00:00
Patrik Hagglund
bac25efea1 [pr19635] Revert most of r170537, and add new testcase.
Patch provided by Andrey Kuharev.

Sorry, r170537 was obviously wrong.

llvm-svn: 215190
2014-08-08 08:21:19 +00:00
David Majnemer
69c601830a GlobalOpt: Optimize in the face of insertvalue/extractvalue
GlobalOpt didn't know how to simulate InsertValueInst or
ExtractValueInst.  Optimizing these is pretty straightforward.

N.B. This came up when looking at clang's IRGen for MS ABI member
pointers; they are represented as aggregates.

llvm-svn: 215184
2014-08-08 05:50:43 +00:00
NAKAMURA Takumi
49cffae9ae Fix llvm/test/DebugInfo/X86/recursive_inlining.ll to use %llc_dwarf.
llvm-svn: 215181
2014-08-08 02:24:05 +00:00
NAKAMURA Takumi
76338bbbe8 AArch64InstrInfo.cpp: Fix \param(s). [-Wdocumentation]
llvm-svn: 215180
2014-08-08 02:04:18 +00:00
Anton Yartsev
eb8d11ee02 [tablegen] - Eliminate memory leaks in TGParser.cpp
Ugly solution indicating that a refactoring is necessary to get the ownership under control.

llvm-svn: 215176
2014-08-08 00:29:54 +00:00
Adam Nemet
028986cf25 [AVX512] Add zero-masking variant to AVX512_masking multiclass
This completes one item from the todo-list of r215125 "Generate masking
instruction variants with tablegen".

The AddedComplexity is needed just like for the k variant.

Added a codegen test based on valignq.

llvm-svn: 215173
2014-08-07 23:53:38 +00:00
Gerolf Hoflehner
5ac532c359 Fix for multi-line comment warning
llvm-svn: 215169
2014-08-07 23:19:55 +00:00
Adam Nemet
d85e0c0ff8 [AVX512] Add codegen test for the masking variant of valign
The AddedComplexity is needed just like in avx512_perm_3src.  There may be a
bug in the complexity computation...

llvm-svn: 215168
2014-08-07 23:18:18 +00:00
Akira Hatanaka
6d09dc6814 [stack protector] Look through bitcasts to get global variable
__stack_chk_guard.

Handle the case where the pointer operand of the load instruction that loads the
stack guard is not a global variable but instead a bitcast.

%StackGuard = load i8** bitcast (i64** @__stack_chk_guard to i8**)
call void @llvm.stackprotector(i8* %StackGuard, i8** %StackGuardSlot)

Original test case provided by Ana Pazos.

This fixes PR20558.

llvm-svn: 215167
2014-08-07 23:08:24 +00:00
Adrian Prantl
ab8759a1d5 Make these regexes stricter by disallowing any additional characters in the output.
Thanks to dblaikie for pointing this out!

llvm-svn: 215166
2014-08-07 23:04:07 +00:00
Arnold Schwaighofer
3eaeaf1963 SLPVectorizer: Use the type of the value loaded/stored to get the ABI alignment
We were using the pointer type which is incorrect.

llvm-svn: 215162
2014-08-07 22:47:27 +00:00
Adrian Prantl
6a3341989b Add a separate testcase for a DWARF expression describing a value in a
subregister.

llvm-svn: 215161
2014-08-07 22:44:34 +00:00
Adrian Prantl
4f83792a23 Reflow this comment.
llvm-svn: 215160
2014-08-07 22:44:24 +00:00
David Blaikie
3dcc1380b8 DebugInfo: Fix overwriting/loss of inlined arguments to recursively inlined functions.
Due to an unnecessary special case, inlined arguments that happened to
be from the same function as they were inlined into were misclassified
as non-inline arguments and would overwrite the non-inlined arguments.

Assert that we never overwrite a function's arguments, and stop
misclassifying inlined arguments as non-inline arguments to fix this
issue.

Excuse the rather crappy test case - handcrafted IR might do better, or
someone who understands better how to tickle the inliner to create a
recursive inlining situation like this (though it may also be necessary
to tickle the variable in a particular way to cause it to be recorded in
the MMI side table and go down this particular path for location
information).

llvm-svn: 215157
2014-08-07 22:22:49 +00:00
Reed Kotler
bfb175d225 fix materialization of one bit constants and global values which are accessed through
a base GOT entry.

Summary:
get tip of tree mips fast-isel to pass test-suite

Two bugs were fixed:

1) one bit booleans were treated as 1 bit signed integers and so the literal '1' could become sign extended.
2) mips uses got for pic but in certain cases, as with string constants for example, many items can be referenced from the same got entry and this case was not handled properly.

Test Plan: test-suite

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: mcrosier

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

llvm-svn: 215155
2014-08-07 22:09:01 +00:00
Eric Christopher
378bc328f0 Temporarily Revert "Nuke the old JIT." as it's not quite ready to
be deleted. This will be reapplied as soon as possible and before
the 3.6 branch date at any rate.

Approved by Jim Grosbach, Lang Hames, Rafael Espindola.

This reverts commits r215111, 215115, 215116, 215117, 215136.

llvm-svn: 215154
2014-08-07 22:02:54 +00:00
Gerolf Hoflehner
24292cfa62 Debugging Utility - optional ability for dumping critical path length
llvm-svn: 215153
2014-08-07 21:49:44 +00:00
Gerolf Hoflehner
35c59e408d MachineCombiner Pass for selecting faster instruction sequence on AArch64
Re-commit of r214832,r21469 with a work-around that
avoids the previous problem with gcc build compilers

The work-around is to use SmallVector instead of ArrayRef
of basic blocks in preservesResourceLen()/MachineCombiner.cpp

llvm-svn: 215151
2014-08-07 21:40:58 +00:00
Kevin Enderby
8575f8fa8e Add two missing ARM cpusubtypes to the switch statement in
MachOObjectFile::getArch(uint32_t CPUType, uint32_t CPUSubType) .

Upcoming changes will cause existing test cases to use this but
I wanted to check in this obvious change separately.

llvm-svn: 215150
2014-08-07 21:30:25 +00:00