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

118775 Commits

Author SHA1 Message Date
Rafael Espindola
5cda6a10f4 Move function to the only file that uses it.
llvm-svn: 241040
2015-06-30 03:41:26 +00:00
Rafael Espindola
46f3b9973b Don't return error_code from a function that doesn't fail.
llvm-svn: 241039
2015-06-30 03:33:18 +00:00
Adrian Prantl
987dbcd199 Debug info: Add dwarf backend support for DIModule.
rdar://problem/20965932

llvm-svn: 241034
2015-06-30 02:13:04 +00:00
Rafael Espindola
6f9850f8a9 Don't return error_code from a function that doesn't fail.
llvm-svn: 241033
2015-06-30 01:53:01 +00:00
Dan Gohman
a3e07eb2de Fix LastArchType to point to the new last arch.
llvm-svn: 241030
2015-06-30 00:56:48 +00:00
Rafael Espindola
75e27b270d Cleanup getRelocationAddend.
Realistically, this will be returning ErrorOr for some time as refactoring the
user code to check once per section will take some time.

Given that, use it for checking if a relocation has addend or not.

While at it, add ELFRelocationRef to simplify the users.

llvm-svn: 241028
2015-06-30 00:33:59 +00:00
Matthias Braun
bb1a92ea1b RegisterCoalescer: Cleanup empty subranges after shrinkToUses()
A call to removeEmptySubranges() is necessary after every operation that
potentially removes all segments from a subregister range; this case in
the register coalescer was missing.

llvm-svn: 241027
2015-06-30 00:33:44 +00:00
Adrian Prantl
6de49f1494 llvm-bcanalyzer: Add a field that was missed in r241016.
llvm-svn: 241026
2015-06-30 00:25:41 +00:00
Rui Ueyama
d456e99974 Object/COFF: Define coff_symbol_generic.
If you only need Name and Value fields in the COFF symbol,
you don't need to distinguish 32 bit and 64 bit COFF symbols.
These fields start at the same offsets and have the same size.

This data strucutre is one pointer smaller than COFFSymbolRef
thus slightly efficient. I'll use this class in LLD as we create
millions of LLD symbol objects that currently contain COFFSymbolRef.
Shaving off 8 byte (or 4 byte on 32 bit) from that class actually
matters becasue of the number of objects we create in LLD.

llvm-svn: 241024
2015-06-30 00:03:56 +00:00
Rafael Espindola
e0349dbfc3 Use asserts for checks that should never fail.
If a section is not SHT_REL or SHT_RELA, we never create a valid iterator,
so the getRelocation* methods should always see a section with the correct type.

llvm-svn: 241023
2015-06-29 23:55:05 +00:00
Dan Gohman
e04339a4ce [WebAssembly] Initial WebAssembly backend
This WebAssembly backend is just a skeleton at this time and is not yet
functional.

llvm-svn: 241022
2015-06-29 23:51:55 +00:00
Rafael Espindola
fc4e4023de Don't return error_code from function that never fails.
llvm-svn: 241021
2015-06-29 23:29:12 +00:00
Peter Collingbourne
8c8a8f77d7 lto: Clean up C libLTO interfaces pertaining to linker flags.
Specifically, remove the dependent library interface and replace the existing
linker option interface with a new one that returns a single list of flags.

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

llvm-svn: 241018
2015-06-29 23:09:12 +00:00
Adrian Prantl
cb1b7b7b80 Add a DIModule metadata node to the IR.
It is meant to be used to record modules @imported by the current
compile unit, so a debugger an import the same modules to replicate this
environment before dropping into the expression evaluator.

DIModule is a sibling to DINamespace and behaves quite similarly.
In addition to the name of the module it also records the module
configuration details that are necessary to uniquely identify the module.
This includes the configuration macros (e.g., -DNDEBUG), the include path
where the module.map file is to be found, and the isysroot.

The idea is that the backend will turn this into a DW_TAG_module.

http://reviews.llvm.org/D9614
rdar://problem/20965932

llvm-svn: 241017
2015-06-29 23:03:47 +00:00
Duncan P. N. Exon Smith
eba562775f bcanalyzer: Rewrite all the METADATA_ codes
Add all the new `Metadata` codes since LLVM 3.6, and at the same time
follow the precedent set in other blocks by removing the `METADATA_`
prefix from the string output.

llvm-svn: 241016
2015-06-29 22:50:35 +00:00
Duncan P. N. Exon Smith
f335bd73c1 bcanalyzer: Use a macro to decode bitcodes, NFC
I'm about to add a whack of missing names for metadata.  Add a macro to
make this easier.

llvm-svn: 241015
2015-06-29 22:50:32 +00:00
Ben Langmuir
4ce87a6d5e Reapply "Use gethostuuid() on Mac to identify hosts for LockFileManager"
Reapplies r241005 after fixing the build on non-Mac platforms. Original
commit message below.

The hostname can be very unstable when there are many machines on the
network competing for the same name. Using the hardware UUID makes it
less likely to have collisions or to consider files written by the
current host to be owned by a different one at a later time.

rdar://problem/21512307

llvm-svn: 241012
2015-06-29 22:16:39 +00:00
Peter Collingbourne
d3c303721f Teach LTOModule to emit linker flags for dllexported symbols, plus interface cleanup.
This change unifies how LTOModule and the backend obtain linker flags
for globals: via a new TargetLoweringObjectFile member function named
emitLinkerFlagsForGlobal. A new function LTOModule::getLinkerOpts() returns
the list of linker flags as a single concatenated string.

This change affects the C libLTO API: the function lto_module_get_*deplibs now
exposes an empty list, and lto_module_get_*linkeropts exposes a single element
which combines the contents of all observed flags. libLTO should never have
tried to parse the linker flags; it is the linker's job to do so. Because
linkers will need to be able to parse flags in regular object files, it
makes little sense for libLTO to have a redundant mechanism for doing so.

The new API is compatible with the old one. It is valid for a user to specify
multiple linker flags in a single pragma directive like this:

 #pragma comment(linker, "/defaultlib:foo /defaultlib:bar")

The previous implementation would not have exposed
either flag via lto_module_get_*deplibs (as the test in
TargetLoweringObjectFileCOFF::getDepLibFromLinkerOpt was case sensitive)
and would have exposed "/defaultlib:foo /defaultlib:bar" as a single flag via
lto_module_get_*linkeropts. This may have been a bug in the implementation,
but it does give us a chance to fix the interface.

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

llvm-svn: 241010
2015-06-29 22:04:09 +00:00
Sanjoy Das
7226bf4ba4 [FaultMaps][Docs] Document the ImplicitNullChecks pass.
llvm-svn: 241009
2015-06-29 22:00:30 +00:00
Ben Langmuir
62aaec0b27 Revert "Use gethostuuid() on Mac to identify hosts for LockFileManager"
Broke non-Mac builds.

This reverts commit r241005.

llvm-svn: 241007
2015-06-29 21:56:03 +00:00
Ben Langmuir
8dbfe1de07 Use gethostuuid() on Mac to identify hosts for LockFileManager
The hostname can be very unstable when there are many machines on the
network competing for the same name. Using the hardware UUID makes it
less likely to have collisions or to consider files written by the
current host to be owned by a different one at a later time.

rdar://problem/21512307

llvm-svn: 241005
2015-06-29 21:47:44 +00:00
Tim Northover
f460862bbe ARM: add correct kill flags when combining stm instructions
When the store sequence being combined actually stores the base register, we
should not mark it as killed until the end.

rdar://21504262

llvm-svn: 241003
2015-06-29 21:42:16 +00:00
Matthias Braun
c4e357521f X86: Rework inline asm integer register specification.
This is a new version of http://reviews.llvm.org/D10260.

It turned out that when you specify an integer register in inline asm on
x86 you get the register of the required type size back. That means that
X86TargetLowering::getRegForInlineAsmConstraint() has to accept any of
the integer registers and adapt its size to the given target size which
may be any 8/16/32/64 bit sized type. Surprisingly that means given a
constraint of "{ax}" and a type of MVT::F32 we need to return X86::EAX.

This change makes this face explicit, the previous code seemed like
working by accident because there it never returned an error once a
register was found. On the other hand this rewrite allows to actually
return errors for invalid situations like requesting an integer register
for an i128 type.

Related to rdar://21042280

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

llvm-svn: 241002
2015-06-29 21:35:51 +00:00
Alexey Samsonov
e322012e46 [LoopSimplify] Set proper debug location in loop backedge blocks.
Set debug location for terminator instruction in loop backedge block
(which is an unconditional jump to loop header). We can't copy debug
location from original backedges, as there can be several of them,
with different debug info locations. So, we follow the approach of
SplitBlockPredecessors, and copy the debug info from first non-PHI
instruction in the header (i.e. destination block).

This is yet another change for PR23837.

llvm-svn: 240999
2015-06-29 21:30:14 +00:00
Sanjoy Das
d6c4d72807 [FaultMaps] Fix test case.
implicit-null-check-negative.ll had a missing 2>&1.  Fix this, and
remove an incorrect test case that this exposes.

llvm-svn: 240998
2015-06-29 21:27:36 +00:00
Rafael Espindola
811342ba38 Convert obj->getSymbolName to sym->getName.
I doesn't depend on the object anymore.

llvm-svn: 240996
2015-06-29 21:24:55 +00:00
Pawel Bylica
7882eec9af [DAGCombiner] Fix & simplify constant folding of sext/zext.
Summary: This patch fixes the cases of sext/zext constant folding in DAG combiner where constans do not fit 64 bits. The fix simply removes un$

Test Plan: New regression test included.

Reviewers: RKSimon

Reviewed By: RKSimon

Subscribers: RKSimon, llvm-commits

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

llvm-svn: 240991
2015-06-29 20:28:47 +00:00
Benjamin Kramer
89234b3b07 [MMI] Use TinyPtrVector instead of PointerUnion with vector.
Also simplify duplicated code a bit. No functionality change intended.

llvm-svn: 240990
2015-06-29 20:21:55 +00:00
Diego Novillo
7eba6b73f2 Tidy comment.
llvm-svn: 240987
2015-06-29 20:03:46 +00:00
Dan Liew
290240ec68 Fix bug #23967. The gtest and gtest_main targets were exported into the
CMake files and should not be by both build systems and also the targets
were also installed by the CMake build system which they should not be.

The problem was that

- the CMake build of LLVM installs and exports the gtest library
targets. We should not being doing this, these are not part of LLVM.

- the Autoconf/Makefile build of LLVM still had gtest libraries in the
installed LLVMConfig.cmake.

These problems would cause problems for an external project because when
calling llvm_map_components_to_libnames(XXX all) ${XXX} would to contain
LLVM's internal gtest libraries.

llvm-svn: 240981
2015-06-29 18:45:56 +00:00
Duncan P. N. Exon Smith
7f95b75044 Simplify .gitignore: projects/* => projects/*/
Avoid listing inclusions (like `!projects/LLVMBuild.txt`) for files
directly underneath `projects/` in `.gitignore`.  Instead, change the
`projects/*` exclusion to the more specific `projects/*/`.

llvm-svn: 240973
2015-06-29 17:43:26 +00:00
Ben Langmuir
392c77b892 Clean up unique lock files on signal and always release the lock
Make sure to remove the unique lock file, which is what the .lock
symlink points to, if there is a signal while the lock is held. This
will release the lock, since the symlink will point to nothing (already
tested in unit tests). For good measure, also clean up the unique lock
file if there is an error or signal before the lock is acquired.

I will add a clang test.

rdar://problem/21512307

llvm-svn: 240967
2015-06-29 17:08:41 +00:00
Alex Lorenz
b12c23d4ef MIR Serialization: Serialize the register mask machine operands.
This commit implements serialization of the register mask machine
operands. This commit serializes only the call preserved register
masks that are defined by a target, it doesn't serialize arbitrary
register masks.

This commit also extends the TargetRegisterInfo class and TableGen so that
the users of TRI can get the list of all the call preserved register masks and
their names.

Reviewers: Duncan P. N. Exon Smith

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

llvm-svn: 240966
2015-06-29 16:57:06 +00:00
Benjamin Kramer
90df916d25 [SymbolSize] Skip sorting by index, just assign by index.
No functional change intended.

llvm-svn: 240961
2015-06-29 16:05:00 +00:00
Benjamin Kramer
1c4173a195 Upgrade JIT listeners for changes in the libObject API.
llvm-svn: 240956
2015-06-29 15:18:48 +00:00
Tobias Grosser
ce9ed925b6 Move delinearization from SCEVAddRecExpr to ScalarEvolution
The expressions we delinearize do not necessarily have to have a SCEVAddRecExpr
at the outermost level. At this moment, the additional flexibility  is not
exploited in LLVM itself, but in Polly we will soon soonish use this
functionality. For LLVM, this change should not affect existing functionality
(which is covered by test/Analysis/Delinearization/)

llvm-svn: 240952
2015-06-29 14:42:48 +00:00
Rafael Espindola
50a3948f04 Factor out the checking of string tables.
This moves the error checking for string tables to getStringTable which returns
an ErrorOr<StringRef>.

This improves error checking, makes it uniform across all string tables and
makes it possible to check them once instead of once per name.

llvm-svn: 240950
2015-06-29 14:39:25 +00:00
Rafael Espindola
f9a95b0fa5 Add a testcase for an invalid file.
We were already checking this, but had no tests.

llvm-svn: 240945
2015-06-29 14:12:14 +00:00
Rafael Espindola
d966b65619 Convert an assert that can fail into error checking.
llvm-svn: 240944
2015-06-29 14:02:24 +00:00
Rafael Espindola
a75ed1253b Remove Elf_Sym_Iter.
It was a fairly broken concept for an ELF only class.

An ELF file can have two symbol tables, but they have exactly the same
format. There is no concept of a dynamic or a static symbol. Storing this
on the iterator also makes us do more work per symbol than necessary. To fetch
a name we would:

* Find if we had a static or a dynamic symbol.
* Look at the corresponding symbol table and find the string table section.
* Look at the string table section to fetch its contents.
* Compute the name as a substring of the string table.

All but the last step can be done per symbol table instead of per symbol. This
is a step in that direction.

llvm-svn: 240939
2015-06-29 12:38:31 +00:00
Elena Demikhovsky
12bde41e5a AVX-512: all forms of SCATTER instruction on SKX,
encoding, intrinsics and tests.

llvm-svn: 240936
2015-06-29 12:14:24 +00:00
Javed Absar
2a5b4cc74c [ARM]: Extend -mfpu options for half-precision and vfpv3xd
removing default label in switch as it results.
This is part of earlier commit http://reviews.llvm.org/D1064

Subscribers: llvm-commits
llvm-svn: 240932
2015-06-29 09:53:33 +00:00
Javed Absar
013d6e555c [ARM]: Extend -mfpu options for half-precision and vfpv3xd
Some of the the permissible ARM -mfpu options, which are supported in GCC,
are currently not present in llvm/clang.This patch adds the options:
'neon-fp16', 'vfpv3-fp16', 'vfpv3-d16-fp16', 'vfpv3xd' and 'vfpv3xd-fp16.
These are related to half-precision floating-point and single precision.

Reviewers: rengolin, ranjeet.singh

Subscribers: llvm-commits

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

llvm-svn: 240930
2015-06-29 09:32:29 +00:00
Igor Breger
7ca2ee2eb1 AVX-512: Implemented missing encoding and intrinsics for FMA instructions
Added tests for DAG lowering ,encoding and intrinsics

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

llvm-svn: 240926
2015-06-29 09:10:00 +00:00
NAKAMURA Takumi
ebf43b6005 Whitespace.
llvm-svn: 240924
2015-06-29 04:50:09 +00:00
Matt Arsenault
0bf3df2409 AMDGPU/SI: Fix extra space when printing v_div_fmas_*
llvm-svn: 240911
2015-06-28 18:16:14 +00:00
Jingyue Wu
f9f0e7b832 [SLSR] S's basis must have the same type as S
llvm-svn: 240910
2015-06-28 17:45:05 +00:00
Asaf Badouh
732e3b5425 [x86][AVX512]
Add vscalef support
include encoding and intrinsics


review:
http://reviews.llvm.org/D10730

llvm-svn: 240906
2015-06-28 14:30:39 +00:00
Elena Demikhovsky
02169f53d0 AVX-512: Added all SKX forms of GATHER instructions.
Added intrinsics.
Added encoding and tests.

llvm-svn: 240905
2015-06-28 10:53:29 +00:00
Adrian Prantl
b1876ae604 Revert "Debug Info: One more bitfield bugfix. While yesterday's r240853 fixed"
This reverts commit 240890. Breaking the gdb buildbot.

llvm-svn: 240893
2015-06-27 21:55:00 +00:00