1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

129895 Commits

Author SHA1 Message Date
Matthias Braun
ca2eebf587 TargetLowering: Add missing doxygen group end.
The missing end was also confusing the '{', '}' matching heuristics in
vim.

llvm-svn: 266036
2016-04-12 02:16:15 +00:00
Matthias Braun
c7cce2e862 AArch64: Drive-by cleanup
llvm-svn: 266035
2016-04-12 02:16:13 +00:00
George Burgess IV
cbf8ff2965 Attempt to make buildbot happier with r266032.
Apparently std::numeric_limits<unsigned>::max() isn't constexpr
everywhere yet.

llvm-svn: 266034
2016-04-12 01:44:13 +00:00
George Burgess IV
4e2d8dca99 Add the allocsize attribute to LLVM.
`allocsize` is a function attribute that allows users to request that
LLVM treat arbitrary functions as allocation functions.

This patch makes LLVM accept the `allocsize` attribute, and makes
`@llvm.objectsize` recognize said attribute.

The review for this was split into two patches for ease of reviewing:
D18974 and D14933. As promised on the revisions, I'm landing both
patches as a single commit.

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

llvm-svn: 266032
2016-04-12 01:05:35 +00:00
Quentin Colombet
c4bc2f5fb2 [AArch64] Add test cases for the repairing of physical registers.
llvm-svn: 266030
2016-04-12 00:43:40 +00:00
Quentin Colombet
ad76f07a25 [RegBankSelect] Teach the repairing code how to handle physical
registers.

llvm-svn: 266029
2016-04-12 00:38:51 +00:00
Quentin Colombet
049dfdbb3c [AArch64] Add a test case for the propagation of register banks through
phis.

llvm-svn: 266028
2016-04-12 00:32:55 +00:00
Quentin Colombet
51b348dd13 [RegisterBankInfo] Do not provide a default mapping for non-reg of phi
operations.

llvm-svn: 266027
2016-04-12 00:30:14 +00:00
Quentin Colombet
5b91aa8e53 [AArch64] Add a test case for the repairing of definitions.
llvm-svn: 266026
2016-04-12 00:25:22 +00:00
Quentin Colombet
312261ffb2 [RegBankSelect] Teach how to repair definitions.
Although repairing definitions is not mandatory for correctness (only
phis would be impacted because of the RPO traversal), not repairing
might go against the cost model. Therefore, just repair when it is
possible.

llvm-svn: 266025
2016-04-12 00:12:59 +00:00
Quentin Colombet
afceaae11d [MachineIRBuilder] Expose the insertion point in the public API.
It may be convenient to know where we are about to insert some code, for
instance to save and then restore this insertion.

llvm-svn: 266024
2016-04-12 00:07:14 +00:00
JF Bastien
457191ce8d MergeFunctions: test alloca better
r237193 fix handling of alloca size / align in MergeFunctions, but only tested one and didn't follow FunctionComparator::cmpOperations's usual comparison pattern. It also didn't update Instruction.cpp:haveSameSpecialState which I'll do separately.

llvm-svn: 266022
2016-04-12 00:03:26 +00:00
Quentin Colombet
df50861994 [AArch64] Test that RegBankSelect inserts the proper copies to fix the
register bank assignments.

llvm-svn: 266021
2016-04-12 00:00:42 +00:00
Derek Schuff
bf676249bc Replace MachineRegisterInfo::TracksLiveness with a MachineFunctionProperty
Use the MachineFunctionProperty mechanism to indicate whether the
liveness info is accurate instead of a bool flag on MRI.
Keeps the MRI accessor function for convenience. NFC

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

llvm-svn: 266020
2016-04-11 23:32:13 +00:00
Adrian Prantl
907584df51 Add a missing DICompileUnit to testcase.
llvm-svn: 266019
2016-04-11 23:30:29 +00:00
Mehdi Amini
bf78d0ed58 ThinLTO renaming: use module hash instead of position in the summary
This is more robust to changes in the link ordering.

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266018
2016-04-11 23:26:46 +00:00
Adrian Prantl
d4a72b1280 Legalize the debug info in this testcase in anticipation of future Verifier improvements.
llvm-svn: 266017
2016-04-11 23:26:31 +00:00
JF Bastien
90197fbce1 AtomicExpandPass: mark assert variable as used
Avoid -Wunused-variable

llvm-svn: 266016
2016-04-11 23:03:54 +00:00
James Y Knight
6ff1d98c2b Fix compile with GCC after r266002 (Add __atomic_* lowering to AtomicExpandPass)
It doesn't like implicitly calling the ArrayRef constructor with a
returned array -- it appears to decays the returned value to a pointer,
first, before trying to make an ArrayRef out of it.

llvm-svn: 266011
2016-04-11 22:52:42 +00:00
Justin Bogner
c3bbc8a9c7 CodeGen: Fix a use-after-free in TailDuplication
The call to processPHI already erased MI from its parent, so MI isn't
even valid here, making the getParent() call a use-after-free in
addition to being redundant.

Found by ASan with the ArrayRecycler changes in llvm.org/pr26808.

llvm-svn: 266008
2016-04-11 22:37:13 +00:00
JF Bastien
1eb45544f8 NFC: keep comment up to date
MergeFunctions was refactored a while ago, and Instruction.cpp's comments went out of sync. The content did as well, will fix later.

llvm-svn: 266007
2016-04-11 22:30:37 +00:00
Evgeniy Stepanov
b10de1bbaa [safestack] Add canary to unsafe stack frames
Add StackProtector to SafeStack. This adds limited protection against
data corruption in the caller frame. Current implementation treats
all stack protector levels as -fstack-protector-all.

llvm-svn: 266004
2016-04-11 22:27:48 +00:00
Tim Northover
83aa2384f4 ARM: use r7 as the frame-pointer on all MachO targets.
This is better for a few reasons:
  + It matches the other tooling for iOS.
  + It matches EABI in more cases (i.e. Thumb-mode, and in practice we don't
    use ARM mode).
  + It leads to infinitesimally smaller code (0.2%, yay!).

rdar://25369506

llvm-svn: 266003
2016-04-11 22:27:40 +00:00
James Y Knight
003ee915ba Add __atomic_* lowering to AtomicExpandPass.
AtomicExpandPass can now lower atomic load, atomic store, atomicrmw, and
cmpxchg instructions to __atomic_* library calls, when the target
doesn't support atomics of a given size.

This is the first step towards moving all atomic lowering from clang
into llvm. When all is done, the behavior of __sync_* builtins,
__atomic_* builtins, and C11 atomics will be unified.

Previously LLVM would pass everything through to the ISelLowering
code. There, unsupported atomic instructions would turn into __sync_*
library calls. Because of that behavior, Clang currently avoids emitting
llvm IR atomic instructions when this would happen, and emits __atomic_*
library functions itself, in the frontend.

This change makes LLVM able to emit __atomic_* libcalls, and thus will
eventually allow clang to depend on LLVM to do the right thing.

It is advantageous to do the new lowering to atomic libcalls in
AtomicExpandPass, before ISel time, because it's important that all
atomic operations for a given size either lower to __atomic_*
libcalls (which may use locks), or native instructions which won't. No
mixing and matching.

At the moment, this code is enabled only for SPARC, as a
demonstration. The next commit will expand support to all of the other
targets.

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

llvm-svn: 266002
2016-04-11 22:22:33 +00:00
Manman Ren
41e16ffe96 swifterror: fix up a testing case.
llvm-svn: 266000
2016-04-11 21:45:33 +00:00
Davide Italiano
eff78dd58c [DebugInfo/Test] Add CU as required.
llvm-svn: 265999
2016-04-11 21:16:48 +00:00
Simon Pilgrim
02dd72b456 [DAGCombiner] Fold xor/and/or (bitcast(A), bitcast(B)) -> bitcast(op (A,B)) anytime before LegalizeVectorOprs
xor/and/or (bitcast(A), bitcast(B)) -> bitcast(op (A,B)) was only being combined at the AfterLegalizeTypes stage, this patch permits the combine to occur anytime before then as well.

The main aim with this to improve the ability to recognise bitmasks that can be converted to shuffles.

I had to modify a number of AVX512 mask tests as the basic bitcast to/from scalar pattern was being stripped out, preventing testing of the mmask bitops. By replacing the bitcasts with loads we can get almost the same result.

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

llvm-svn: 265998
2016-04-11 21:10:33 +00:00
Manman Ren
e6636caf43 Swift Calling Convention: swifterror target support.
Differential Revision: http://reviews.llvm.org/D18716

llvm-svn: 265997
2016-04-11 21:08:06 +00:00
Adrian Prantl
e345ecd143 Revert accidentally committed change
llvm-svn: 265996
2016-04-11 21:00:26 +00:00
Adrian Prantl
8e51262d6a Add missing DICompileUnit to this testcase
llvm-svn: 265995
2016-04-11 20:58:57 +00:00
Zachary Turner
54c5237c6b Fix some display bugs in llvm-pdbdump.
We were incorrectly reporting all non-64 bit integers as int64s.
This is most evident when trying to print the "short" type, but
in theory could happen with chars too (although usually chars use
a different builtin type).

Additionally, we were using the wrong check when deciding whether
to print an enum definition as a global enum.  We were checking
whether or not the enum was "nested", and if so saving it until
we print the class definition that it was nested in.  But this is
not correct in rare situations where the enum is nested, but the
class that it's nested in does not have type information in the PDB.
So instead we check if there is a class definition for the parent
in the PDB.  If so we save it for later, otherwise we print it.

llvm-svn: 265993
2016-04-11 20:39:17 +00:00
Tom Stellard
2898e45c97 Revert "AMDGPU/SI: Do not generate s_waitcnt after ds_permute/ds_bpermute"
This reverts commit r263720.

Just confirmed that s_waitcnt is required after ds_permute/ds_bpermute.

llvm-svn: 265992
2016-04-11 20:38:40 +00:00
Hans Wennborg
76cdaa5530 Fix repeated conditional expression (PR20711)
llvm-svn: 265990
2016-04-11 20:36:05 +00:00
Hans Wennborg
f1f7a0ce15 Fix broken assert, PR24624
llvm-svn: 265989
2016-04-11 20:35:41 +00:00
Hans Wennborg
338186f6bb Remove redundant .c_str(), as suggested by PR25633
llvm-svn: 265988
2016-04-11 20:35:17 +00:00
Hans Wennborg
e065abf74b Fix a couple of redundant conditional expressions (PR27283, PR28282)
llvm-svn: 265987
2016-04-11 20:35:01 +00:00
Sanjay Patel
7c69078dc9 use range-loops; NFCI
llvm-svn: 265985
2016-04-11 20:13:44 +00:00
Tim Northover
b874382d3e MCParser: diagnose missing directional labels more clearly.
Before, ELF at least managed a diagnostic but it was a completely untraceable
"undefined symbol" error. MachO had a variety of even worse behaviours: crash,
emit corrupt file, or an equally bad message.

llvm-svn: 265984
2016-04-11 19:50:46 +00:00
Matthew Simpson
94955b1eeb [LoopUtils, LV] Fix PR27246 (first-order recurrences)
This patch ensures that when we detect first-order recurrences, we reject a phi
node if its previous value is also a phi node. During vectorization the initial
and previous values of the recurrence are shuffled together to create the value
for the current iteration. However, phi nodes are not widened like other
instructions. This fixes PR27246.

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

llvm-svn: 265983
2016-04-11 19:48:18 +00:00
Davide Italiano
50a1bb5adb [DebugInfo] Fix even more tests to include DICompileunit.
llvm-svn: 265980
2016-04-11 18:53:27 +00:00
Sriraman Tallam
0bd1bfc81e Test commit.
llvm-svn: 265976
2016-04-11 18:40:50 +00:00
Lang Hames
bcb113ba80 [Object] Make .alt_entry directive parsing MachO specific.
ELF and COFF will now treat .alt_entry like any other unrecognized directive.

llvm-svn: 265975
2016-04-11 18:33:45 +00:00
Adrian Prantl
b333fd2831 Fix missing DICompileUnits in testcases
llvm-svn: 265974
2016-04-11 18:15:44 +00:00
Sanjay Patel
1bd30061be [InstCombine] consolidate tests for related bugs
llvm-svn: 265973
2016-04-11 17:58:37 +00:00
Reid Kleckner
4c1925e12c Use member initializers for all scalar fields of MachineFrameInfo to save boilerplate
No functionality change.

llvm-svn: 265972
2016-04-11 17:54:16 +00:00
Reid Kleckner
20a4aff741 Combine redundant stack realignment booleans in MachineFrameInfo
MachineFrameInfo does not need to be able to distinguish between the
user asking us not to realign the stack and the target telling us it
doesn't support stack realignment. Either way, fixed stack objects have
their alignment clamped.

llvm-svn: 265971
2016-04-11 17:54:03 +00:00
Sanjay Patel
68bd68b7b2 add FIXME comment; NFC
llvm-svn: 265970
2016-04-11 17:35:57 +00:00
Sanjay Patel
86526c47b6 add an assert for safety; NFC
llvm-svn: 265969
2016-04-11 17:27:44 +00:00
Sanjay Patel
3172549776 variable names start with a capital letter; NFC
llvm-svn: 265968
2016-04-11 17:25:23 +00:00
Hemant Kulkarni
6e8f9c1c5f [llvm-readobj] Add ELF hash histogram printing
Differential Revision: http://reviews.llvm.org/D18907

llvm-svn: 265967
2016-04-11 17:15:30 +00:00