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

118047 Commits

Author SHA1 Message Date
Hans Wennborg
f5f2adf45b Switch lowering: fix assert in buildBitTests (PR23738)
When checking (High - Low + 1).sle(BitWidth), BitWidth would be truncated
to the size of the left-hand side. In the case of this PR, the left-hand
side was i4, so BitWidth=64 got truncated to 0 and the assert failed.

llvm-svn: 239048
2015-06-04 15:55:00 +00:00
Rafael Espindola
e4278af625 Omit unused section symbols from the symbol table.
Section symbols exist as an optimization: instead of having multiple relocations
point to different symbols, many of them can point to a single section symbol.

When that optimization is unused, a section symbol is also unused and adds no
extra information to the object file.

This saves a bit of space on the object files and makes the output of
llvm-objdump -t easier to read and consequently some tests get quite a bit
simpler.

llvm-svn: 239045
2015-06-04 15:33:30 +00:00
Chris Bieneman
5b17e7f4ee [CMake] Add warning for using compile and link pools on unsupported versions of CMake or non-ninja generators.
Summary: I've gotten feedback from users on CMake 2.8 that the compile and link pool options were not working. This is expected so I'm adding a warning so we can report invalid configurations to users.

Reviewers: eugenis

Reviewed By: eugenis

Subscribers: llvm-commits

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

llvm-svn: 239044
2015-06-04 15:33:08 +00:00
Rafael Espindola
22f3e6f348 Move test that depends on x86 to the x86 directory.
llvm-svn: 239043
2015-06-04 15:25:47 +00:00
Rafael Espindola
014efeabf9 No need to check the raw relocation bytes if checking the parsed dump.
llvm-svn: 239042
2015-06-04 15:21:17 +00:00
Rafael Espindola
7510290388 llvm-readobj can parse relocations, no need to check the raw bytes.x
llvm-svn: 239041
2015-06-04 15:15:12 +00:00
Benjamin Kramer
55692fb42d Replace custom fixed endian to raw_ostream emission with EndianStream.
Less code, clearer and more efficient. No functionality change intended.

llvm-svn: 239040
2015-06-04 15:03:02 +00:00
Rafael Espindola
a4ac37168e Disassemble the start of sections even if there is no symbol there.
We already handled a section with no symbols, extend that to also handle a
section with symbols that don't include the section start.

llvm-svn: 239039
2015-06-04 15:01:05 +00:00
James Molloy
3c711cad2a Don't create a MIN/MAX node if the underlying compare has more than one use.
If the compare in a select pattern has another use then it can't be removed, so we'd just
be creating repeated code if we created a min/max node.

Spotted by Matt Arsenault!

llvm-svn: 239037
2015-06-04 13:48:23 +00:00
Daniel Sanders
06c811431c Replace string GNU Triples with llvm::Triple in MCAsmInfo subclasses and create*AsmInfo(). NFC.
Summary:
This is the first of several patches to eliminate StringRef forms of GNU
triples from the internals of LLVM. After this is complete, GNU triples
will be replaced by a more authoratitive representation in the form of
an LLVM TargetTuple.

Reviewers: rengolin

Reviewed By: rengolin

Subscribers: ted, llvm-commits, rengolin, jholewinski

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

llvm-svn: 239036
2015-06-04 13:12:25 +00:00
Daniel Sanders
9420bd300f Include BPF target in CMake builds.
llvm-svn: 239035
2015-06-04 12:51:20 +00:00
Diego Novillo
8b982408dd Tidy code in InstrProfiling.cpp. NFC.
Removed the redundant "llvm::" from class names in InstrProfiling.cpp
clang-format is ran on the changes.

Patch from Betul Buyukkurt.

llvm-svn: 239034
2015-06-04 11:45:32 +00:00
Peter Zotov
d7ef402b7c [C API] Add LLVMStructGetTypeAtIndex.
Patch by deadalnix (Amaury SECHET).

llvm-svn: 239029
2015-06-04 09:09:53 +00:00
Elena Demikhovsky
682c692fe7 AVX-512: I brought back vector-shuffle-512-v8.ll test.
I re-generated it after all AVX-512 shuffle optimizations.

llvm-svn: 239026
2015-06-04 07:49:56 +00:00
Craig Topper
972503638b [TableGen] Replace a couple if/else chains with a switch. NFC
llvm-svn: 239023
2015-06-04 07:40:16 +00:00
Craig Topper
ed67ff0612 [TableGen] Use range-based for loops. NFC
llvm-svn: 239022
2015-06-04 07:40:14 +00:00
Craig Topper
db6fb90199 [TableGen] Merge single prefix bit in RecordVal into PointerIntPair with Name to reduce memory usage.
llvm-svn: 239021
2015-06-04 07:40:12 +00:00
Igor Breger
452695b2e5 Test commit
llvm-svn: 239019
2015-06-04 07:23:38 +00:00
David Majnemer
3c1a9b7d86 Make the test introduced in r239015 more targeted.
We don't need to go through LSR to trigger this bug.  Instead,
hand-craft a tricky GEP and get the constant folder to hack on it when
parsing the IR.

llvm-svn: 239017
2015-06-04 07:21:42 +00:00
Elena Demikhovsky
2b7fd2c6ef AVX-512: added all SKX forms of VPERMW/D/Q instructions.
Added all forms of VPERMPS/PD instrcuctions.
Added encoding tests.

llvm-svn: 239016
2015-06-04 07:07:13 +00:00
David Majnemer
76d0684125 [ConstantFold] Don't skip the first gep index when folding geps
We neglected to check if the first index made the GEP ineligible for
'inbounds'.

This fixes PR23753.

llvm-svn: 239015
2015-06-04 07:01:56 +00:00
Elena Demikhovsky
51b2050982 Removed {}, NFC.
llvm-svn: 239014
2015-06-04 07:01:29 +00:00
Rafael Espindola
58fdd31cd1 Bring back r239006 with a fix.
The fix is just that getOther had not been updated for packing the st_other
values in fewer bits and could return spurious values:

-  unsigned Other = (getFlags() & (0x3f << ELF_STO_Shift)) >> ELF_STO_Shift;
+  unsigned Other = (getFlags() & (0x7 << ELF_STO_Shift)) >> ELF_STO_Shift;

Original message:

Pack the MCSymbolELF bit fields into MCSymbol's Flags.

This reduces MCSymolfELF from 64 bytes to 56 bytes on x86_64.

While at it, also make getOther/setOther easier to use by accepting unshifted
STO_* values.

llvm-svn: 239012
2015-06-04 05:59:23 +00:00
Rafael Espindola
570d4cb272 Add testcase that would crash before the previous revert.
llvm-svn: 239011
2015-06-04 05:51:13 +00:00
Rafael Espindola
ab39f50035 Revert "Pack the MCSymbolELF bit fields into MCSymbol's Flags."
This reverts commit r239006.

I am debugging the powerpc failures.

llvm-svn: 239010
2015-06-04 05:00:12 +00:00
Rafael Espindola
e2a1190807 Pack the MCSymbolELF bit fields into MCSymbol's Flags.
This reduces MCSymolfELF from 64 bytes to 56 bytes on x86_64.

While at it, also make getOther/setOther easier to use by accepting unshifted
STO_* values.

llvm-svn: 239006
2015-06-04 02:32:20 +00:00
Chandler Carruth
935258c90a [PM/AA] Start refactoring AliasAnalysis to remove the analysis group and
port it to the new pass manager.

All this does is extract the inner "location" class used by AA into its
own full fledged type. This seems *much* cleaner as MemoryDependence and
soon MemorySSA also use this heavily, and it doesn't make much sense
being inside the AA infrastructure.

This will also make it much easier to break apart the AA infrastructure
into something that stands on its own rather than using the analysis
group design.

There are a few places where this makes APIs not make sense -- they were
taking an AliasAnalysis pointer just to build locations. I'll try to
clean those up in follow-up commits.

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

llvm-svn: 239003
2015-06-04 02:03:15 +00:00
Sanjay Patel
d41c35dc2f make reciprocal estimate code generation more flexible by adding command-line options (3rd try)
The first try (r238051) to land this was reverted due to ExecutionEngine build failure;
that was hopefully addressed by r238788.

The second try (r238842) to land this was reverted due to BUILD_SHARED_LIBS failure;
that was hopefully addressed by r238953.

This patch adds a TargetRecip class for processing many recip codegen possibilities.
The class is intended to handle both command-line options to llc as well
as options passed in from a front-end such as clang with the -mrecip option.

The x86 backend is updated to use the new functionality.
Only -mcpu=btver2 with -ffast-math should see a functional change from this patch.
All other x86 CPUs continue to *not* use reciprocal estimates by default with -ffast-math.

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

llvm-svn: 239001
2015-06-04 01:32:35 +00:00
Tom Stellard
ff4a31fb85 R600: Re-enable sub-reg liveness
The bug in the R600 backend that this uncovered has been fixed.

llvm-svn: 238999
2015-06-04 01:20:04 +00:00
Rafael Espindola
f7db6d4a8a Remove MCELFSymbolFlags.h. It is now internal to MCSymbolELF.
llvm-svn: 238996
2015-06-04 00:47:43 +00:00
Alexey Samsonov
4784124872 Improve test added in r238481.
llvm-svn: 238985
2015-06-03 22:36:17 +00:00
Alexey Samsonov
af72061a9a [Object, MachO] Introduce MachOObjectFile::load_commands() range iterator.
Summary:
Now users don't have to manually deal with getFirstLoadCommandInfo() /
getNextLoadCommandInfo(), calculate the number of load segments, etc.

No functionality change.

Test Plan: regression test suite

Reviewers: rafael, lhames, loladiro

Subscribers: llvm-commits

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

llvm-svn: 238983
2015-06-03 22:19:36 +00:00
Rafael Espindola
2e73b12f3d Remember if a weakref of a symbol has been used.
This avoids yet another last minute patching of the binding.

While at it, also simplify the weakref implementation a bit by not walking
past it in the expression evaluation.

llvm-svn: 238982
2015-06-03 21:52:06 +00:00
Rafael Espindola
d8f4abb370 Store whether a symbol is a comdat signature in MCSymbolELF.
With this getBinging can now return the correct answer for all cases not
involving a .symver and the elf writer doesn't need to patch it last minute.

llvm-svn: 238980
2015-06-03 21:41:59 +00:00
Rafael Espindola
556c09100f Record in a MCSymbolELF if it has been used in a relocation.
No functionality change, just saves an on the side map.

llvm-svn: 238979
2015-06-03 21:30:10 +00:00
Rafael Espindola
5d6d3e1b4d Simplify the logic in ELFObjectWriter::isInSymtab. NFC.
_GLOBAL_OFFSET_TABLE_ is not magical and we can now directly check for a
symbol never getting an explicit binding.

llvm-svn: 238978
2015-06-03 21:23:21 +00:00
Rafael Espindola
63813d4589 Convert BindingExplicitlySet into a MCSymbolELF field.
I will pack it better in a followup patch.

llvm-svn: 238975
2015-06-03 21:18:03 +00:00
Frederic Riss
22476acba6 Reapply r238941 - [dsymutil] Accept a YAML debug map as input instead of a binary.
With a couple more constructors that GCC thinks are necessary.

Original commit message:

[dsymutil] Accept a YAML debug map as input instead of a binary.

To do this, the user needs to pass the new -y flag.
As it wasn't tested before, the debug map YAML deserialization was
completely buggy (mainly because the DebugMapObject has a dual
mapping that allows to search by name and by address, but only the
StringMap got populated). It's fixed and tested in this commit by
augmenting some test with a 2 stage dwarf link: a frist llvm-dsymutil
reads the debug map and pipes it in a second instance that does the
actual link without touching the initial binary.

llvm-svn: 238959
2015-06-03 20:29:24 +00:00
Matt Arsenault
785faf78e8 R600/SI: Fix tests with triples in them
Only set the triple from the command line options.
Some of these were still testing SI features and using the
old r600-- triple.

llvm-svn: 238958
2015-06-03 20:04:05 +00:00
Sanjay Patel
6e86f62fd3 add missing dependency on Target lib for tools
This was exposed by r238842 (which was reverted by r238900)
when doing a CMake build with -DBUILD_SHARED_LIBS=ON.

llvm-svn: 238953
2015-06-03 19:07:51 +00:00
Rafael Espindola
5d3bece91c Remove getOrCreateSymbolData. There is no MCSymbolData anymore.
llvm-svn: 238952
2015-06-03 19:03:11 +00:00
Tim Northover
8b6076e4a8 RuntimeDyld: override EH frame registration with trivial version.
llvm-rtdyld was relying on the default memory manager's EH frame registration,
which is host-dependent rather than target-dependent. As a result, big-endian
ELF Mips EH frames were being registered on OS X (and elsewhere). This is a
really bad idea.

llvm-svn: 238951
2015-06-03 18:26:52 +00:00
Colin LeMahieu
9a3629f84a [Hexagon] Test doesn't work on all platforms. At any rate the uninitialized variable issue was fixed. Removing re-registering ASM backend.
llvm-svn: 238949
2015-06-03 18:00:45 +00:00
Colin LeMahieu
b480f20398 [Hexagon] Reapply 238772 OSABI was not correctly set, added empty_elf test to make sure it is.
llvm-svn: 238947
2015-06-03 17:34:16 +00:00
Frederic Riss
2b70992149 Revert "[dsymutil] Accept a YAML debug map as input instead of a binary."
This reverts commit r238941 while I figure out the bot issues.

llvm-svn: 238943
2015-06-03 17:08:42 +00:00
Frederic Riss
b9a1d403e1 [dsymutil] Accept a YAML debug map as input instead of a binary.
To do this, the user needs to pass the new -y flag.
As it wasn't tested before, the debug map YAML deserialization was
completely buggy (mainly because the DebugMapObject has a dual
mapping that allows to search by name and by address, but only the
StringMap got populated). It's fixed and tested in this commit by
augmenting some test with a 2 stage dwarf link: a frist llvm-dsymutil
reads the debug map and pipes it in a second instance that does the
actual link without touching the initial binary.

llvm-svn: 238941
2015-06-03 16:57:16 +00:00
Frederic Riss
fde81c10a9 [dsymutil] Replace -parse-only option with -dump-debug-map
As the serialized debug map is becoming a first class citizen, a way
to cleanly dump it is required. We used -parse-only combined with
-v for that purpose before, but it dumps a lot of unrelated debug
stuff. Dumping the debug map was the only use of the -parse-only flag
anyway, so replace it with a more useful option.

llvm-svn: 238940
2015-06-03 16:57:12 +00:00
Frederic Riss
1ee05a07da [dsymutil] Reflow option declarations to be more readable.
llvm-svn: 238939
2015-06-03 16:57:07 +00:00
Matthias Braun
80e08ad23e ARM: Thumb2 LDRD/STRD supports independent input/output regs
The existing code would unnecessarily break LDRD/STRD apart with
non-adjacent registers, on thumb2 this is not necessary.

Ideally on thumb2 we shouldn't match for ldrd/strd pre-regalloc anymore
as there is not reason to set register hints anymore, changing that is
something for a future patch however.

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

Recommiting after the revert in r238821, the buildbot still failed with
the patch removed so there seems to be another reason for the breakage.

llvm-svn: 238935
2015-06-03 16:30:24 +00:00
Diego Novillo
61f99aaf9a Fix typo in comment. NFC.
llvm-svn: 238933
2015-06-03 16:22:12 +00:00