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

113621 Commits

Author SHA1 Message Date
Peter Collingbourne
ce7b5daef7 MC: Remove NullStreamer hook, as it is redundant with NullTargetStreamer.
llvm-svn: 229799
2015-02-19 00:45:07 +00:00
Peter Collingbourne
258bbf91ac llvm-mc: Use Target::createNullStreamer to fix crashes on target-specific asm directives.
llvm-svn: 229798
2015-02-19 00:45:04 +00:00
Peter Collingbourne
73136ce42d Introduce Target::createNullTargetStreamer and use it from IRObjectFile.
A null MCTargetStreamer allows IRObjectFile to ignore target-specific
directives. Previously we were crashing.

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

llvm-svn: 229797
2015-02-19 00:45:02 +00:00
Michael Gottesman
86672937bd [objc-arc] Introduce the concept of RCIdentity and rename all relevant functions to use that name. NFC.
The RCIdentity root ("Reference Count Identity Root") of a value V is a
dominating value U for which retaining or releasing U is equivalent to
retaining or releasing V. In other words, ARC operations on V are
equivalent to ARC operations on U.

This is a useful property to ascertain since we can use this in the ARC
optimizer to make it easier to match up ARC operations by always mapping
ARC operations to RCIdentityRoots instead of pointers themselves. Then
we perform pairing of retains, releases which are applied to the same
RCIdentityRoot.

In general, the two ways that we see RCIdentical values in ObjC are via:

  1. PointerCasts
  2. Forwarding Calls that return their argument verbatim.

As such in ObjC, two RCIdentical pointers must always point to the same
memory location.

Previously this concept was implicit in the code and various methods
that dealt with this concept were given functional names that did not
conform to any name in the "ARC" model. This often times resulted in
code that was hard for the non-ARC acquanted to understand resulting in
unhappiness and confusion.

llvm-svn: 229796
2015-02-19 00:42:38 +00:00
Michael Gottesman
b9380fca86 [objc-arc-contract] Rename contractRelease => tryToContractReleaseIntoStoreStrong.
NFC. Makes it clearer what this method is actually supposed to do.

llvm-svn: 229795
2015-02-19 00:42:34 +00:00
Michael Gottesman
5352c179b7 [objc-arc-contract] Refactor out tryToPeepholeInstruction into its own method. NFC.
The main method of ObjCARCContract is really large and busy. By refactoring this
out, it becomes easier to reason about.

llvm-svn: 229794
2015-02-19 00:42:30 +00:00
Michael Gottesman
28626ad221 [objc-arc-contract] Reorganize the code a bit and make the debug output easier to read.
llvm-svn: 229793
2015-02-19 00:42:27 +00:00
Duncan P. N. Exon Smith
9d3d24622e IR: Drop scope from MDTemplateParameter
Follow-up to r229740, which removed `DITemplate*::getContext()` after my
upgrade script revealed that scopes are always `nullptr` for template
parameters.  This is the other shoe: drop `scope:` from
`MDTemplateParameter` and its two subclasses.  (Note: a bitcode upgrade
would be pointless, since the hierarchy hasn't been moved into place.)

llvm-svn: 229791
2015-02-19 00:37:21 +00:00
Eric Christopher
4d90747761 Avoid using a self-referential initializer and fix up uses.
llvm-svn: 229790
2015-02-19 00:22:47 +00:00
Eric Christopher
e2a3acb8e3 80-column fixups.
llvm-svn: 229789
2015-02-19 00:15:33 +00:00
Eric Christopher
0d42545048 Remove all use of is64bit off of NVPTXSubtarget and clean up code
accordingly. This changes the constructors of a number of classes
that don't need to know the subtarget's 64-bitness.

llvm-svn: 229787
2015-02-19 00:08:27 +00:00
Eric Christopher
5eacc05b40 Remove all use of getDrvInterface off of NVPTXSubtarget and clean
up code accordingly. Delete code that was checking for all cases
of an enum.

llvm-svn: 229786
2015-02-19 00:08:23 +00:00
Eric Christopher
182992e6cc Migrate the NVPTX backend asm printer to a per function subtarget.
This involved moving two non-subtarget dependent features (64-bitness
and the driver interface) to the NVPTX target machine and updating
the uses (or migrating around the subtarget use for ease of review).
Otherwise use the cached subtarget or create a default subtarget
based on the TargetMachine cpu and feature string for the module
level assembler emission.

llvm-svn: 229785
2015-02-19 00:08:14 +00:00
Chandler Carruth
4ca147df5a [x86] Merge checks for a recently added test case that is the same on
all SSE variants and AVX variants.

llvm-svn: 229770
2015-02-18 23:20:49 +00:00
Duncan P. N. Exon Smith
6c5c6d3ab2 IR: Allow MDSubrange to have 'count: -1'
It turns out that `count: -1` is a special value indicating an empty
array, such as `Values` in:

    struct T {
      unsigned Count;
      int Values[];
    };

Handle it.

llvm-svn: 229769
2015-02-18 23:17:51 +00:00
Reid Kleckner
53bc7b1858 Add an IR-to-IR test for dwarf EH preparation using opt
This tests the simple resume instruction elimination logic that we have
before making some changes to it.

llvm-svn: 229768
2015-02-18 23:17:41 +00:00
Lang Hames
bf643c2080 [Orc][Kaleidoscope] Fix a fixme - no reason we can't use C++14 in the tutorials.
llvm-svn: 229765
2015-02-18 23:16:09 +00:00
Lang Hames
c5f198ee8f [Orc][Kaleidoscope] Make the Orc/Kaleidoscope tutorials easier to build on
Darwin.

llvm-svn: 229761
2015-02-18 23:08:56 +00:00
Lang Hames
f12dbd8f5c [Orc][Kaleidoscope] Make sure to look for the mangled name when updating the
function body pointer in the fully lazy orc/kaleidoscope tutorial.

llvm-svn: 229760
2015-02-18 23:07:13 +00:00
Colin LeMahieu
0fc422e3ea [Objdump] Fixing crash when printing symbols in ELF sections with special types.
llvm-svn: 229759
2015-02-18 23:00:22 +00:00
Andrew Kaylor
de93ac8895 Style and formatting fixes for r229715
llvm-svn: 229758
2015-02-18 22:52:18 +00:00
Peter Collingbourne
604243217b CMake: Fix add_lit_target for the case where a test suite has zero target dependencies.
This can happen with a standalone project containing a test suite with no
internal dependencies.

llvm-svn: 229753
2015-02-18 22:25:35 +00:00
Marek Olsak
94f35587d1 R600/SI: Fix READLANE and WRITELANE lane select for VI
VOP2 declares vsrc1, but VOP3 declares src1.
We can't use the same "ins" if the operands have different names in VOP2
and VOP3 encodings.

This fixes a hang in geometry shaders which spill M0 on VI.
(BTW it doesn't look like M0 needs spilling and the spilling seems
duplicated 3 times)

llvm-svn: 229752
2015-02-18 22:12:45 +00:00
Marek Olsak
d85cc5f21e R600/SI: Simplify verification of AMDGPU::OPERAND_REG_INLINE_C
llvm-svn: 229751
2015-02-18 22:12:41 +00:00
Marek Olsak
1cc11a6a26 R600/SI: Remove explicit VOP operand checking
This should be handled by the OperandType checking.

llvm-svn: 229750
2015-02-18 22:12:37 +00:00
Duncan P. N. Exon Smith
8768f09195 IR: Swap order of name and value in MDEnum
Put the name before the value in assembly for `MDEnum`.  While working
on the testcase upgrade script for the new hierarchy, I noticed that it
"looks nicer" to have the name first, since it lines the names up in the
(somewhat typical) case that they have a common prefix.

llvm-svn: 229747
2015-02-18 21:16:33 +00:00
Duncan P. N. Exon Smith
f0e68933b4 IR: Add MDCompositeTypeBase::replace*()
Add `replaceElements()`, `replaceVTableHolder()`, and
`replaceTemplateParams()` to `MDCompositeTypeBase`.  Included an
assertion in `replaceElements()` to match the one in
`DICompositeType::replaceArrays()`.

llvm-svn: 229744
2015-02-18 20:47:52 +00:00
Duncan P. N. Exon Smith
b1b72c6d78 IR: Add MDCompileUnit::replace*()
Add `MDCompileUnit::replaceGlobalVariables()` and
`MDCompileUnit::replaceSubprograms()`.

llvm-svn: 229743
2015-02-18 20:36:09 +00:00
Duncan P. N. Exon Smith
a4c82560a4 IR: Add MDSubprogram::replaceFunction()
llvm-svn: 229742
2015-02-18 20:32:57 +00:00
Duncan P. N. Exon Smith
4d3e316522 IR: Drop the scope in DI template parameters
The scope/context is always the compile unit, which we replace with
`nullptr` anyway (via `getNonCompileUnitScope()`).  Drop it explicitly.

I noticed this field was always null while writing testcase upgrade
scripts to transition to the new hierarchy.  Seems wasteful to
transition it over if it's already out-of-use.

llvm-svn: 229740
2015-02-18 20:30:45 +00:00
Duncan P. N. Exon Smith
9c1b4f50b4 Fix -DNDEBUG -Werror build after r229733
llvm-svn: 229736
2015-02-18 19:56:50 +00:00
Reid Kleckner
c8eb2119c4 dos2unix the WinEH file and tests
llvm-svn: 229735
2015-02-18 19:52:46 +00:00
Duncan P. N. Exon Smith
13aaaca773 IR: isScopeRef() should check isScope()
r229733 removed an invalid use of `DIScopeRef`, so now we can enforce
that a `DIScopeRef` is actually a scope.

llvm-svn: 229734
2015-02-18 19:46:02 +00:00
Duncan P. N. Exon Smith
14c23d4c08 IR: Avoid DIScopeRef in DIImportedEntity::getEntity()
`DIImportedEntity::getEntity()` currently returns a `DIScopeRef`, but
the nodes it references aren't always `DIScope`s.  In particular, it can
reference global variables.

Introduce `DIDescriptorRef` to avoid the lie.

llvm-svn: 229733
2015-02-18 19:39:36 +00:00
Zachary Turner
35e4d81b8e Make frem.ll flush after calling printf.
Without this, the test was flaky, and FileCheck would sometimes
not detect any input on stdin.

llvm-svn: 229732
2015-02-18 19:32:28 +00:00
Sanjoy Das
48dc5bb962 Partial fix for bug 22589
Don't spend the entire iteration space in the scalar loop prologue if
computing the trip count overflows.  This change also gets rid of the
backedge check in the prologue loop and the extra check for
overflowing trip-count.

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

llvm-svn: 229731
2015-02-18 19:32:25 +00:00
Zachary Turner
68f80deaba Modify llvm-readobj to dump symbol record bytes.
This will help us study the format of individual symbol
records more closely.

Differential Revision: http://reviews.llvm.org/D7664
Reviewed by: Timur Iskhodzhanov

llvm-svn: 229730
2015-02-18 19:32:05 +00:00
Chris Bieneman
74f0557556 Adding install targets for individual LLVM tools and libraries.
Summary:
* add_llvm_tool and add_llvm_library now add install-${name} targets to install specific components
* added installhdrs target to install just the LLVM headers
* The above changes only apply for single-configuration generators (Ninja, Makefiles...), not for multi-configuration generators (Visual Studio, Xcode...)

Reviewers: pete

Reviewed By: pete

Subscribers: pete, llvm-commits

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

llvm-svn: 229727
2015-02-18 19:25:47 +00:00
Justin Bogner
485508085b InstrProf: Don't combine expansion regions with code regions
This was leading to duplicate counts when a code region happened to
overlap exactly with an expansion. The combining behaviour only makes
sense for code regions.

llvm-svn: 229723
2015-02-18 19:01:06 +00:00
David Blaikie
3963f3adef Remove unused member variables (-Wunused-private-field)
llvm-svn: 229722
2015-02-18 18:52:49 +00:00
Chris Bieneman
0146c3a225 Fixing a CMake developer warning.
llvm-svn: 229721
2015-02-18 18:52:11 +00:00
Chris Bieneman
eb4def6a36 Enable standard so versioning for libLLVM.
Summary: This resolves Bugzilla bug 15493.

Reviewers: chapuni, pete

Reviewed By: pete

Subscribers: pete, llvm-commits

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

Conflicts:
	cmake/modules/AddLLVM.cmake

llvm-svn: 229720
2015-02-18 18:52:06 +00:00
Justin Bogner
8ab6d199d1 InstrProf: Handle unknown functions if they consist only of zero-regions
This comes up when we generate coverage for a function but don't end
up emitting the function at all - dead static functions or inline
functions that aren't referenced in a particular TU, for example. In
these cases we'd like to show that the function was never called,
which is trivially true.

llvm-svn: 229717
2015-02-18 18:40:46 +00:00
Andrew Kaylor
eca1819627 Adding implementation to outline C++ catch handlers for native Windows 64 exception handling.
Differential Revision: http://reviews.llvm.org/D7363

llvm-svn: 229715
2015-02-18 18:31:51 +00:00
Justin Bogner
dfdc3baaba InstrProf: Make CoverageMapping testable and add a basic unit test
Make CoverageMapping easier to create, so that we can write targeted
unit tests for its internals, and add a some infrastructure to write
these tests. Finally, add a simple unit test for basic functionality.

llvm-svn: 229709
2015-02-18 18:01:14 +00:00
Jozef Kolek
6b4e19ed7b [mips][microMIPS] Make usage of ADDU16 and SUBU16 by code generator
Differential Revision: http://reviews.llvm.org/D7609

llvm-svn: 229706
2015-02-18 17:33:56 +00:00
Jozef Kolek
107ac262c2 [mips][microMIPS] Implement JALX instruction
Differential Revision: http://reviews.llvm.org/D5047

llvm-svn: 229702
2015-02-18 17:15:48 +00:00
Daniel Sanders
1701d245d4 [mips] Add backend support for Mips32r[35] and Mips64r[35].
Summary:
These ISA's didn't add any instructions so they are almost identical to
Mips32r2 and Mips64r2. Even the ELF e_flags are the same, However the ISA
revision in .MIPS.abiflags is 3 or 5 respectively instead of 2.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: tomatabacu, llvm-commits, atanasyan

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

llvm-svn: 229695
2015-02-18 16:24:50 +00:00
Kit Barton
96c9271be4 This patch adds the VSX logical instructions introduced in the Power ISA 2.07. It also removes the added complexity that favors VMX versions of the three instructions.
Phabricator review: http://reviews.llvm.org/D7616

Commiting on Nemanja's behalf.

llvm-svn: 229694
2015-02-18 16:21:46 +00:00
Tom Stellard
1f53e02aef R600/SI: Don't set isCodeGenOnly = 1 on all instructions
We only need to set this on pseudo instructions which won't
be used by the assembler.

llvm-svn: 229689
2015-02-18 16:08:17 +00:00