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

112266 Commits

Author SHA1 Message Date
Marek Olsak
1c17e8e231 R600/SI: Add VI versions of MUBUF loads and stores
This enables a lot of existing patterns for VI.

llvm-svn: 227209
2015-01-27 17:24:58 +00:00
Marek Olsak
7552625b6d R600/SI: Add pseudos for MUBUF loads and stores
This defines the SI versions only, so it shouldn't change anything.

There are no changes other than using the new multiclasses, adding missing
mayLoad/mayStore, and formatting fixes.

llvm-svn: 227208
2015-01-27 17:24:54 +00:00
Andrea Di Biagio
a698cd7c36 [InstCombine] Teach how to fold a select into a cttz/ctlz with the 'is_zero_undef' flag.
This patch teaches the Instruction Combiner how to fold a cttz/ctlz followed by
a icmp plus select into a single cttz/ctlz with flag 'is_zero_undef' cleared.

Added test InstCombine/select-cmp-cttz-ctlz.ll.

llvm-svn: 227197
2015-01-27 15:58:14 +00:00
Evgeniy Stepanov
fa79c0bc21 [sancov] Fix unspecified constructor order between sancov and asan.
Sanitizer coverage constructor must run after asan constructor (for each DSO).
Bump constructor priority to guarantee that.

llvm-svn: 227195
2015-01-27 15:01:22 +00:00
Manuel Jacob
3f8d565b43 Add a FIXME in SelectionDAGBuilder before an assert that is valid only on X86.
When lowering memcpy, memset or memmove, this assert checks whether the pointer
operands are in an address space < 256 which means "user defined address space"
on X86.  However, this notion of "user defined address space" does not exist
for other targets.

llvm-svn: 227191
2015-01-27 13:14:35 +00:00
Eric Christopher
21d322e23d Replace some uses of getSubtargetImpl with the cached version
off of the MachineFunction or with the version that takes a
Function reference as an argument.

llvm-svn: 227185
2015-01-27 08:48:42 +00:00
Chandler Carruth
cb89fb621a [PM] Clean up file banner comments prior to refactoring this code.
llvm-svn: 227182
2015-01-27 08:28:33 +00:00
Eric Christopher
1e072c6078 Have the PBQP register allocator use the subtarget on the MachineFunction.
(and remove an extraneous private).

llvm-svn: 227181
2015-01-27 08:27:06 +00:00
Eric Christopher
a2b58b2c96 Remove some extraneous includes.
llvm-svn: 227180
2015-01-27 08:27:03 +00:00
Eric Christopher
94e139eef0 Fix build failure with pointer vs reference.
NB: Saving files after editing helps.
llvm-svn: 227178
2015-01-27 08:00:42 +00:00
Eric Christopher
06e06ed4f4 Update a few calls to getSubtarget<> to either be getSubtargetImpl
when we didn't need the cast to the base class or the cached version
off of the subtarget.

llvm-svn: 227176
2015-01-27 07:54:39 +00:00
Eric Christopher
9f216c5684 Clean up the AArch64 store pair suppression pass initialization
and remove and unnecessary class variable.

llvm-svn: 227175
2015-01-27 07:54:36 +00:00
Eric Christopher
12ccd90a3b The subtarget is cached on the MachineFunction. Access it directly.
llvm-svn: 227173
2015-01-27 07:31:29 +00:00
Eric Christopher
f8bc96fd00 Migrate SeparateConstOffsetFromGEP to use a Function with
getSubtarget.

llvm-svn: 227172
2015-01-27 07:16:37 +00:00
David Majnemer
532fcd01e2 LoopRotate: Don't walk the uses of a Constant
LoopRotate wanted to avoid live range interference by looking at the
uses of a Value in the loop latch and seeing if any lied outside of the
loop.  We would wrongly perform this operation on Constants.

This fixes PR22337.

llvm-svn: 227171
2015-01-27 06:21:43 +00:00
Eric Christopher
68c45cc723 Remove unused include.
llvm-svn: 227170
2015-01-27 05:58:44 +00:00
Richard Trieu
1f29a38c3b Revert r227148 & r227154 which added a test which infinitely loops.
r227148 added test CommandLineTest.HideUnrelatedOptionsMulti which repeatedly
outputs two following lines:

-tool: CommandLine Error: Option 'test-option-1' registered more than once!
-tool: CommandLine Error: Option 'test-option-2' registered more than once!

r227154 depends on changes from r227148

llvm-svn: 227167
2015-01-27 03:03:47 +00:00
Chandler Carruth
1183a3c833 [PM] Run clang-format over this header to clean up the very few)
divergent formatting issues. This should prevent any format-only diffs
from sneaking into subsequent changes to port TTI to the new pass
manager.

llvm-svn: 227165
2015-01-27 02:20:43 +00:00
Chandler Carruth
c9b9f56b78 [PM] Switch a doxygen comment to the standard format. NFC
llvm-svn: 227164
2015-01-27 02:20:41 +00:00
Chandler Carruth
521a9f1f0d [PM] Refactor the core logic to run EarlyCSE over a function into an
object that manages a single run of this pass.

This was already essentially how it worked. Within the run function, it
would point members at *stack local* allocations that were only live for
a single run. Instead, it seems much cleaner to have a utility object
whose lifetime is clearly bounded by the run of the pass over the
function and can use member variables in a more direct way.

This also makes it easy to plumb the analyses used into it from the pass
and will make it re-usable with the new pass manager.

No functionality changed here, its just a refactoring.

llvm-svn: 227162
2015-01-27 01:34:14 +00:00
Eric Christopher
a73e46cb64 MachineRegisterInfo can access TII off of the MachineFunction's
subtarget and so doesn't need the TargetMachine or to access via
getSubtargetImpl. Update all callers.

llvm-svn: 227160
2015-01-27 01:15:16 +00:00
Eric Christopher
a4eaaf2583 Migrate AtomicExpandPass and DwarfEHPrepare to using a Function-ized getSubtargetImpl.
llvm-svn: 227159
2015-01-27 01:04:42 +00:00
Eric Christopher
a4602a8109 Fix unsigned/signed comparison warning.
llvm-svn: 227158
2015-01-27 01:01:39 +00:00
Eric Christopher
f62df37b3d Migrate CodeGenPrepare to use the Function based getSubtarget
code.

llvm-svn: 227157
2015-01-27 01:01:38 +00:00
Eric Christopher
a7bc04d3a5 Grab the TargetLowering info from the DAG rather than querying for
a subtarget.

llvm-svn: 227156
2015-01-27 01:01:36 +00:00
Eric Christopher
f90c632cee Remove extraneous period.
llvm-svn: 227155
2015-01-27 01:01:34 +00:00
Chris Bieneman
a6800a9ac5 One more fix to the new API to fix const-correctness.
llvm-svn: 227154
2015-01-27 00:42:00 +00:00
Adrian Prantl
f80b6c11e8 Replace this testcase with an even shorter one provided by dblaikie.
llvm-svn: 227152
2015-01-27 00:22:17 +00:00
Chad Rosier
f89b8ccace Commoning of target specific load/store intrinsics in Early CSE.
Phabricator revision: http://reviews.llvm.org/D7121
Patch by Sanjin Sijaric <ssijaric@codeaurora.org>!

llvm-svn: 227149
2015-01-26 22:51:15 +00:00
Chris Bieneman
4f9237ff63 Pete Cooper suggested the new API should use ArrayRef instead of SmallVectorImpl. Also adding a test case.
llvm-svn: 227148
2015-01-26 22:50:47 +00:00
Philip Reames
2b71db1121 Add test cases for PRE w/volatile loads
These tests check that the combination of 227110 (cross block query inst) and 227112 (volatile load semantics) work together properly to allow PRE in cases where a loop contains a volatile access.

llvm-svn: 227146
2015-01-26 22:40:44 +00:00
Simon Pilgrim
8cbdc5422d [X86][SSE] Float comparisons can sometimes be safely commuted
For ordered, unordered, equal and not-equal tests, packed float and double comparison instructions can be safely commuted without affecting the results. This patch checks the comparison mode of the (v)cmpps + (v)cmppd instructions and commutes the result if it can.

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

llvm-svn: 227145
2015-01-26 22:29:24 +00:00
Zachary Turner
ced9340aa9 Have the UTF conversion wrappers append a null terminator.
This is especially useful for the UTF8 -> UTF16 direction, since
there is no equivalent of llvm::SmallString<> for wide characters.
This means that anyone who wants a null terminated string is forced
to manually push and pop their own null terminator.

Reviewed by: Reid Kleckner.

llvm-svn: 227143
2015-01-26 22:05:50 +00:00
Simon Pilgrim
00b317ad36 [X86][PCLMUL] Enable commutation for PCLMUL instructions
Patch to allow (v)pclmulqdq to be commuted - swaps the src registers and inverts the immediate (low/high) src mask.

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

llvm-svn: 227141
2015-01-26 22:00:18 +00:00
Chris Bieneman
71ee606a8c Add new HideUnrelatedOptions API that takes a SmallVectorImpl.
Need a new API for clang-modernize that allows specifying a list of option categories to remain visible. This will allow clang-modernize to move off getRegisteredOptions.

llvm-svn: 227140
2015-01-26 21:57:29 +00:00
Simon Pilgrim
95cf90f418 Line endings fix. NFC.
llvm-svn: 227138
2015-01-26 21:28:32 +00:00
Matt Arsenault
4cd6c4c4c3 R600: Cleanup or test
Fix broken check lines, use multiple check prefixes,
add an additional test for i1 or.

llvm-svn: 227137
2015-01-26 21:16:10 +00:00
Simon Pilgrim
718751993f Line endings fix. NFC.
llvm-svn: 227136
2015-01-26 21:15:42 +00:00
Alexei Starovoitov
ddd39a4542 bpf: fix build due to 'Move DataLayout back to the TargetMachine'
commit r227113 moved DataLayout

llvm-svn: 227133
2015-01-26 20:43:15 +00:00
Bruno Cardoso Lopes
68ec9cc54a [x86][MMX] Rename and cleanup tests: arith, intrinsics and shuffle
- Rename mmx-builtins to mmx-intrinsics to match other intrinsic test naming.
- Remove tests that duplicate functionality from mmx-intrinsics.ll.
- Move arith related tests to mmx-arith.ll.
- MMX related shuffle goes to vector-shuffle-mmx.ll.

llvm-svn: 227130
2015-01-26 20:06:51 +00:00
Hans Wennborg
c53389f42a SimplifyCFG: Omit range checks for switch lookup tables when default is unreachable
The range check would get optimized away later, but we might as well not emit
them in the first place.

http://reviews.llvm.org/D6471

llvm-svn: 227126
2015-01-26 19:52:34 +00:00
Hans Wennborg
c27e49ae48 SimplifyCFG: don't remove unreachable default switch destinations
An unreachable default destination can be exploited by other optimizations and
allows for more efficient lowering. Both the SDag switch lowering and
LowerSwitch can exploit unreachable defaults.

Also make TurnSwitchRangeICmp handle switches with unreachable default.
This is kind of separate change, but it cannot be tested without the change
above, and I don't want to land the change above without this since that would
regress other tests.

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

llvm-svn: 227125
2015-01-26 19:52:32 +00:00
Hans Wennborg
b03f8bd16b Make ConstantFoldTerminator() handle switches with unreachable default.
Tested by Transforms/SimplifyCFG/switch-to-br.ll's @unreachable function.

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

llvm-svn: 227124
2015-01-26 19:52:24 +00:00
Justin Holewinski
a0a83cc9da [NVPTX] Generate a more optimal sequence for select of i1
Instead of creating a pattern like "(p && a) || ((!p) && b)",
just expand the i8 operands to i32 and perform the selp on them.

Fixes PR22246

llvm-svn: 227123
2015-01-26 19:52:20 +00:00
Reid Kleckner
15971afe2e Add a UTF8 to UTF16 conversion wrapper for use in the pdb dumper
This can also be used instead of the WindowsSupport.h ConvertUTF8ToUTF16
helpers, but that will require massaging some character types. The
Windows support routines want wchar_t output, but wchar_t is often 32
bits on non-Windows OSs.

llvm-svn: 227122
2015-01-26 19:51:00 +00:00
Eric Christopher
f65e796f77 Cache the lookup of TargetLowering in the atomic expand pass.
llvm-svn: 227121
2015-01-26 19:45:40 +00:00
Ahmed Bougacha
8d46cf46ff [SelectionDAG] Fix assert message copypasta. NFC.
llvm-svn: 227119
2015-01-26 19:31:42 +00:00
Eric Christopher
0810d29bc7 Add a FIXME about preferred alignment to DataLayout.
Essentially DataLayout is global and affects the layout of ABI
level objects. Preferred alignment could change on a per function
basis as we change CPU features.

llvm-svn: 227118
2015-01-26 19:19:04 +00:00
Justin Holewinski
c8855c02f3 [NVPTX] Handle floating-point conversion patterns that are not explicitly ordered or unordered
Fixes PR22322

llvm-svn: 227117
2015-01-26 19:11:20 +00:00
Alex Rosenberg
6b9851d1e6 Use a different encoding for debugtrap on PS4.
llvm-svn: 227116
2015-01-26 19:09:27 +00:00