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

115636 Commits

Author SHA1 Message Date
Duncan P. N. Exon Smith
ff5d299af6 Revert "DebugInfo: Loosen DILexicalBlock constructor"
This reverts commit r234222, while I look into bot failures [1].  I'll
recommit soon.

[1]: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/7117/

llvm-svn: 234225
2015-04-06 21:30:23 +00:00
David Blaikie
95456c7ea7 ArgPromo: Bail out earlier for varargs functions
llvm-svn: 234224
2015-04-06 21:27:31 +00:00
Duncan P. N. Exon Smith
a5e3c1760f DebugInfo: Loosen DILexicalBlock constructor
This class wraps `MDLexicalBlockBase`, so allow construction from it!
Currently doesn't cause any problems because of the explicit `MNode*`
constructor, but I'll be removing that soon enough.

llvm-svn: 234222
2015-04-06 21:16:11 +00:00
Ismail Pazarbasi
7fbc7a6a77 Move checkInterfaceFunction to ModuleUtils
Summary:
Instead of making a local copy of `checkInterfaceFunction` for each
sanitizer, move the function in a common place.

Reviewers: kcc, samsonov

Subscribers: llvm-commits

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

llvm-svn: 234220
2015-04-06 21:09:08 +00:00
David Blaikie
1c84936605 [opaque pointer type] Avoid using PointerType::getElementType when parsing IR
A few calls are left in for error checking - but I'm commenting those
out & trying to build some IR tests (aiming for Argument Promotion to
start with). When I get any of these tests passing I may add flag to
disable the checking so I can add tests that pass with the assertion in
place.

llvm-svn: 234206
2015-04-06 20:59:48 +00:00
Duncan P. N. Exon Smith
ea3fb29a5a DebugInfo: Remove DIDescriptor::Verify()
Remove `DIDescriptor::Verify()` and the `Verify()`s from subclasses.
They had already been gutted, and just did an `isa<>` check.

In a couple of cases I've temporarily dropped the check entirely, but
subsequent commits are going to disallow conversions to the
`DIDescriptor`s directly from `MDNode`, so the checks will come back in
another form soon enough.

llvm-svn: 234201
2015-04-06 19:49:39 +00:00
Duncan P. N. Exon Smith
3b24416de4 DebugInfo: Add MDTypeRefArray, to replace DITypeArray
This array-like wrapper adapts `MDTuple` to have elements of `MDTypeRef`
(whereas `MDTypeArray` has elements of `MDType`).  This is necessary to
migrate code using `DITypeArray`.  The only use of this is
`MDSubroutineType`'s `getTypeArray()` accessor.

llvm-svn: 234200
2015-04-06 19:48:50 +00:00
Duncan P. N. Exon Smith
757f930dcb DebugInfo: Remove dead DIType::operator DITypeRef(), NFC
llvm-svn: 234198
2015-04-06 19:23:22 +00:00
Duncan P. N. Exon Smith
e2d414997c DebugInfo: Use MDTypeRef throughout the hierarchy
Use `MDTypeRef` (etc.) in the new debug info hierarchy rather than raw
`Metadata *` pointers.

I rolled in a change to `DIBuilder` that looks unrelated: take `DIType`
instead of `DITypeRef` as type arguments when creating variables.
However, this was the simplest way to use `MDTypeRef` within the
functions, and didn't require any cleanups from callers in clang (since
they were all passing in `DIType`s anyway, relying on their implicit
conversions to `DITypeRef`).

llvm-svn: 234197
2015-04-06 19:03:45 +00:00
Reid Kleckner
b881568c8b [WinEH] Don't sink allocas into child handlers
The uselist isn't enough to infer anything about the lifetime of such
allocas. If we want to re-add this optimization, we will need to
leverage lifetime markers to do it.

Fixes PR23122.

llvm-svn: 234196
2015-04-06 18:50:38 +00:00
Tim Northover
497a3115c3 ARM: do not relax Thumb1 -> Thumb2 if only Thumb1 is available.
After recognising that a certain narrow instruction might need a relocation to
be represented, we used to unconditionally relax it to a Thumb2 instruction to
permit this. Unfortunately, some CPUs (e.g. v6m) don't even have most Thumb2
instructions, so we end up emitting a completely invalid instruction.

Theoretically, ELF does have relocations for these situations; but they are
fairly unusable with such short ranges and the ABI document even says they're
documented "for completeness". So an error is probably better there too.

rdar://20391953

llvm-svn: 234195
2015-04-06 18:44:42 +00:00
Simon Pilgrim
a5a17c0b23 [X86][SSE] Use (V)PINSRB for direct byte insertion in 16i8 buildvector on SSE4.1 targets
This patch allows SSE4.1 targets to use (V)PINSRB to create 16i8 vectors by inserting i8 scalars directly into a XMM register instead of merging pairs of i8 scalars into a i16 and using the SSE2 PINSRW instruction.

This allows folding of byte loads and reduces scalar register usage as well.

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

llvm-svn: 234193
2015-04-06 18:39:00 +00:00
Kevin Enderby
d56c59218e Fix failure on builder llvm-clang-lld-x86_64-debian-fast as the
test macho-objc-meta-data.test had a line it shouldn't have had.

llvm-svn: 234190
2015-04-06 18:18:23 +00:00
David Blaikie
5cf70c0e97 Add some type safety to GlobalObject/GlobalValue - they're always PointerTypes so let's type them that way.
llvm-svn: 234189
2015-04-06 18:06:06 +00:00
Duncan P. N. Exon Smith
446534adbc DebugInfo: Create MDTypeRef, etc., to replace DITypeRef
Create a string-based wrapper in the debug info hierarchy for type
references.

llvm-svn: 234188
2015-04-06 18:02:43 +00:00
Duncan P. N. Exon Smith
77af14bb29 DebugInfo: Remove dead DIRef::getName()
llvm-svn: 234186
2015-04-06 17:52:46 +00:00
Kevin Enderby
3bf355af03 For llvm-objdump added support for printing Objc2 32-bit runtime meta data
with the existing -objc-meta-data and -macho options for Mach-O files.

llvm-svn: 234185
2015-04-06 17:47:03 +00:00
Duncan P. N. Exon Smith
42f5bd3724 Metadata: Add typed array-like wrapper for MDTuple
Add `MDTupleTypedArrayWrapper`, a wrapper around `MDTuple` that adapts
it to look like an array and cast its operands to the given type.  This
is designed to be a replacement for `DITypedArray<>`, which is in the
`DIDescriptor` hierarchy.

llvm-svn: 234183
2015-04-06 17:45:07 +00:00
Duncan P. N. Exon Smith
061c09bd1b DebugInfo: Remove dead code for accessing fields
Most fields are now accessed via the new debug info hierarchy.  I'll
make the rest of this code dead soon.

llvm-svn: 234182
2015-04-06 17:21:05 +00:00
Duncan P. N. Exon Smith
6bf407cd57 AutoUpgrade: Remove obsolete dbg.declare/value upgrade
This upgrade of `@llvm.dbg.declare` and `@llvm.dbg.value` isn't useful,
since it's for an old debug info version.  The calls will get stripped
anyway by `UpgradeDebugInfo()`.

llvm-svn: 234181
2015-04-06 17:17:47 +00:00
Jingyue Wu
cee19c8e7e [SLSR] consider &B[S << i] as &B[(1 << i) * S]
Summary: This reduces handling &B[(1 << i) * s] to handling &B[i * S].

Test Plan: slsr-gep.ll

Reviewers: meheff

Subscribers: sanjoy, llvm-commits

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

llvm-svn: 234180
2015-04-06 17:15:48 +00:00
Simon Pilgrim
e8ed19bff1 [DAGCombiner] Add support for FCEIL, FFLOOR and FTRUNC vector constant folding
Differential Revision: http://reviews.llvm.org/D8715

llvm-svn: 234179
2015-04-06 17:15:41 +00:00
Duncan P. N. Exon Smith
acefeaad01 Verifier: Check composite type template params
Add missing checks for `templateParams:` in `MDCompositeType`.  Pull the
current check for `MDSubprogram` to reduce duplicated code and fix it up
to print a good message when the immediate operand isn't an `MDTuple`
(as a drive-by, make the same fix to `variables:` in `MDSubprogram`).

llvm-svn: 234177
2015-04-06 17:04:58 +00:00
Duncan P. N. Exon Smith
3d8d823eda DebugInfo: Use MDFile instead of accessing operands directly, NFC
llvm-svn: 234175
2015-04-06 16:43:40 +00:00
Rafael Espindola
6fa49967ca Use a comma after the unique keyword.
H.J. Lu noted that all .section options are separated by a comma.

This patch changes the syntax of unique to require one.

llvm-svn: 234174
2015-04-06 16:34:41 +00:00
Sanjay Patel
2458a92e2b fix typos; NFC
llvm-svn: 234171
2015-04-06 16:21:12 +00:00
Rafael Espindola
fd9484628a Remove unnecessary uses of AliasedSymbol.
As pr19627 points out, every use of AliasedSymbol is likely a bug.

The main use was to avoid the oddity of a variable showing up as undefined. That
was fixed in r233995, which made these calls nops.

llvm-svn: 234169
2015-04-06 16:10:05 +00:00
Aaron Ballman
9419d88907 Removing a spurious space; NFC.
llvm-svn: 234168
2015-04-06 16:09:13 +00:00
Rafael Espindola
91f7164378 Be consistent when deciding if a relocation is needed.
Before when deciding if we needed a relocation in A-B, we wore only checking
if A was weak.

This fixes the asymmetry.

The "InSet" argument should probably be renamed to "ForValue", since InSet is
very MachO specific, but doing so in this patch would make it hard to read.

This fixes PR22815.

llvm-svn: 234165
2015-04-06 15:27:57 +00:00
Rafael Espindola
3e664c2fee Disable all link optimizations in a debug build.
This taking linking clang on my machine with gold from 16.980257914 to
15.933037649 seconds.

llvm-svn: 234161
2015-04-06 15:04:31 +00:00
Rafael Espindola
17068f343b Don't pass -O3 to the linker in debug builds.
This takes linking clang in a debug build with gold form 19.518925697 to
16.406388685 seconds.

llvm-svn: 234160
2015-04-06 14:51:01 +00:00
Rafael Espindola
e72663a555 Don't use -ffunction-sections -fdata-sections on debug builds.
Unfortunately, on ELF there is not used attribute on the .o files,
so there is no easy way to keep the dump function alive.

If we are not gcing, we may as well produce non gcable files and
avoid the cost.

Linking a debug clang now takes 18.856225992 seconds, before it
took 21.206897447.

I will try avoiding --gc-sections -O3 on a followup patch.

llvm-svn: 234159
2015-04-06 14:34:43 +00:00
Pawel Bylica
fc6884e53a Test commit. Improve comments in APInt. NFC.
llvm-svn: 234158
2015-04-06 13:31:39 +00:00
Rafael Espindola
5574b26c05 Store the sh_link of ARM_EXIDX directly in MCSectionELF.
This avoids some pretty horrible and broken name based section handling.

llvm-svn: 234142
2015-04-06 04:25:18 +00:00
Rafael Espindola
3d38779bcb Simplify this function a bit. NFC.
The case values are not a tidy enum we can fully cover. They even ovelap
over the various extension.

Just use a default:

llvm-svn: 234140
2015-04-06 03:16:51 +00:00
Rafael Espindola
61955a1dba Simplify mapping from relocation sections to relocated sections.
Just store the section in MCSectionELF. This avoids multiple hash lookups.

This will also be used by ARM_EXIDX.

llvm-svn: 234139
2015-04-06 03:09:30 +00:00
Lang Hames
286487f927 [Orc] Tidy up the assembly for the x86-64 resolver block.
llvm-svn: 234138
2015-04-06 03:01:29 +00:00
David Blaikie
8a470f5492 [opaque pointer type] Remove some backwards compatible GEP APIs
Just doing the two-step so I don't get so much build-bot spam... (add
new API, migrate callers, remove old API)

llvm-svn: 234132
2015-04-05 22:53:21 +00:00
David Blaikie
924235accc clang-format my last commit
llvm-svn: 234127
2015-04-05 22:44:57 +00:00
David Blaikie
80477b5659 [opaque pointer type] The last of the GEP IRBuilder API migrations
There's still lots of callers passing nullptr, of course - some because
they'll never be migrated (InstCombines for bitcasts - well they don't
make any sense when the pointer type is opaque anyway, for example) and
others that will need more engineering to pass Types around.

llvm-svn: 234126
2015-04-05 22:41:44 +00:00
Benjamin Kramer
8d06ccc89f Mark BumpPtrAllocator::Allocate as returning a noalias pointer.
The GCC attribute is curiously named 'malloc', but I think it's better
to use LLVM terminology for the wrapper macro.

llvm-svn: 234121
2015-04-05 17:02:25 +00:00
Simon Pilgrim
cab2e12c29 [DAGCombiner] Merge FMUL Scalar and Vector constant canonicalization to RHS. NFCI.
llvm-svn: 234118
2015-04-05 14:30:37 +00:00
David Blaikie
2e42346c23 [opaque pointer type] More GEP API migrations
llvm-svn: 234108
2015-04-04 21:07:10 +00:00
Sanjay Patel
c92141d527 remove function/variable names from comments; NFC
llvm-svn: 234107
2015-04-04 21:06:39 +00:00
Sanjay Patel
e84686ac07 less space; NFC
llvm-svn: 234106
2015-04-04 21:05:52 +00:00
Rafael Espindola
afb68f165d Don't mix overload and default values.
It makes it hard to see which one is being called.

llvm-svn: 234100
2015-04-04 18:16:01 +00:00
Rafael Espindola
0601e2fab8 Implement unique sections with an unique ID.
This allows the compiler/assembly programmer to switch back to a
section. This in turn fixes the bootstrap failure on powerpc (tested
on gcc110) without changing the ppc codegen at all.

I will try to cleanup the various getELFSection overloads in a  followup patch.
Just using a default argument now would lead to ambiguities.

llvm-svn: 234099
2015-04-04 18:02:01 +00:00
David Blaikie
ecbaf6994b [opaque pointer type] More (constant, in this instance) GEP API migrations
llvm-svn: 234096
2015-04-04 15:12:13 +00:00
Simon Pilgrim
9b09e6fee5 [DAGCombiner] Canonicalize vector constants for ADD/MUL/AND/OR/XOR re-association
Scalar integers are commuted to move constants to the RHS for re-association - this ensures vectors do the same.

llvm-svn: 234092
2015-04-04 10:20:31 +00:00
Craig Topper
fcc8191397 [X86] Apply AddedComplexity consistently for similar patterns. This keeps them together in the DAGISel tables and reduces table size slightly.
llvm-svn: 234086
2015-04-04 04:22:12 +00:00