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

118927 Commits

Author SHA1 Message Date
NAKAMURA Takumi
843c7b07fa [CMake] add_llvm_symbol_exports: Use Python oneliner instead of "cmd.exe /c type" to generate *.def.
llvm-svn: 241402
2015-07-05 08:56:38 +00:00
Nemanja Ivanovic
4dede06034 Add missing builtins to the PPC back end for ABI compliance (vol. 2)
This patch corresponds to review:
http://reviews.llvm.org/D10874

Back end portion of the second round of additions to altivec.h.

llvm-svn: 241398
2015-07-05 06:03:51 +00:00
Sanjay Patel
120029f6af use range-based for loops; NFCI
llvm-svn: 241395
2015-07-04 19:38:52 +00:00
Simon Pilgrim
ae34c3f1f4 [X86][SSE] Improved i8/i16 to f64 uint2fp vector conversions
Followup to D10433 and D10589 that fixes i8/i16 uint2fp vector conversions by zero extending to i32 and using the sint2fp path (unless the target does actually support uint2fp).

llvm-svn: 241394
2015-07-04 15:33:34 +00:00
Sanjay Patel
c0d734a9ee use valid bits to avoid unnecessary machine trace metric recomputations
Although this does cut the number of traces recomputed by ~10% for the
test case mentioned in http://reviews.llvm.org/D10460, it doesn't
make a dent in the overall performance. That example needs to be more
selective when invalidating traces.

llvm-svn: 241393
2015-07-04 15:00:28 +00:00
Yaron Keren
7c51289046 Fix spelling, NFC.
llvm-svn: 241392
2015-07-04 05:48:52 +00:00
Peter Collingbourne
4022d17865 LTO: expose LTO_SYMBOL_ALIAS, which indicates that the symbol is an alias.
This is needed for COFF linkers to distinguish between weak external aliases
and regular symbols with LLVM weak linkage, which are represented as strong
symbols in COFF.

llvm-svn: 241389
2015-07-04 03:42:35 +00:00
Rui Ueyama
b90c13a50c Object/COFF: Do not rely on VirtualSize being 0 in object files.
llvm-svn: 241387
2015-07-04 03:25:51 +00:00
Lang Hames
a2c451c57b [RuntimeDyld] Skip relocations for external symbols with 64-bit address ~0ULL.
Requested by Eugene Rozenfeld of the LLILC team, this feature allows JIT
clients to skip relocations for selected external symbols by returning ~0ULL
from their symbol resolver. If this value is returned for a given symbol,
RuntimeDyld will skip all relocations for that symbol. The client will be
responsible for applying the skipped relocations manually before the code
is executed.

llvm-svn: 241383
2015-07-04 01:35:26 +00:00
Craig Topper
3faa86f8f9 [X86] Add proper 64-bit mode checks to jrcxz and jcxz.
llvm-svn: 241381
2015-07-04 00:01:07 +00:00
Matt Arsenault
30008082bc AMDGPU: Fix indentation of switch
llvm-svn: 241380
2015-07-03 23:33:38 +00:00
Simon Atanasyan
755b9d9d7d [ELFYAML] Fix handling SHT_NOBITS sections by obj2yaml/yaml2obj tools
SHT_NOBITS sections do not have content in an object file. Now the yaml2obj
tool does not accept `Content` field for such sections, and the obj2yaml
tool does not attempt to read the section content from a file.

Restore r241350 and r241352.

llvm-svn: 241377
2015-07-03 23:00:54 +00:00
Rafael Espindola
db06c879b7 Use a continue to reduce indentation.
llvm-svn: 241375
2015-07-03 22:02:28 +00:00
Rafael Espindola
ebdecc87f9 Use a continue to reduce indentation.
llvm-svn: 241374
2015-07-03 21:57:41 +00:00
Rafael Espindola
c989578497 Context is allocated just a few lines above. Don't check if it is null.
llvm-svn: 241373
2015-07-03 21:54:41 +00:00
Rafael Espindola
8939198881 Fix build with -DLLVM_USE_INTEL_JITEVENTS=ON -DLLVM_USE_OPROFILE=ON.
Is anyone using those?

llvm-svn: 241372
2015-07-03 21:47:00 +00:00
Filipe Cabecinhas
bcf71cd35c Remove always-true comparison, NFC.
Summary:
Looking at r241279, I noticed that UpgradedIntrinsics only gets written
to in the following code:

    if (UpgradeIntrinsicFunction(&F, NewFn))
      UpgradedIntrinsics[&F] = NewFn;

Looking through UpgradeIntrinsicFunction, we always return false OR
NewFn will be set to a different function from our source.

This patch pulls the F != NewFn into UpgradeIntrinsicFunction as an
assert, and removes the check from callers of UpgradeIntrinsicFunction.

Reviewers: rafael, chandlerc

Subscribers: llvm-commits-list

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

llvm-svn: 241369
2015-07-03 20:12:01 +00:00
Simon Pilgrim
4be0188219 [X86] Added 32-bit builds to fp<->int tests.
Ensure that i686 x87/SSE/SSE2 targets all build.

llvm-svn: 241368
2015-07-03 20:07:57 +00:00
Benjamin Kramer
8743c61a6d Delete dead code. NFC.
llvm-svn: 241367
2015-07-03 19:10:09 +00:00
Rafael Espindola
06691d6e5a Return ErrorOr from getSymbolAddress.
It can fail trying to get the section on ELF and COFF. This makes sure the
error is handled.

llvm-svn: 241366
2015-07-03 18:19:00 +00:00
Rafael Espindola
7af299bc9a Replace a few more MachO only uses of getSymbolAddress.
llvm-svn: 241365
2015-07-03 18:02:36 +00:00
Rafael Espindola
9ff7aba38a Use getValue instead of getAddress in a few MachO only cases.
In MachO the value of the symbol is always the address, so we can use the
simpler function.

llvm-svn: 241364
2015-07-03 17:44:18 +00:00
Rafael Espindola
3a040454d4 This reverts commit r241350 and r241352.
r241350 broke lld tests.
r241352 depends on r241350.

Original messages:
"[ELFYAML] Fix handling SHT_NOBITS sections by obj2yaml/yaml2obj tools"
"[ELFYAML] Make the Size field for .bss section optional"

llvm-svn: 241354
2015-07-03 14:54:02 +00:00
Rafael Espindola
0d79988e69 Delete dead code.
llvm-svn: 241353
2015-07-03 14:46:17 +00:00
Simon Atanasyan
d8a1b5611d [ELFYAML] Make the Size field for .bss section optional
It's a common case to have a zero-size .bss section in an object file.

llvm-svn: 241352
2015-07-03 14:19:06 +00:00
Simon Atanasyan
a4c43e6acb [ELFYAML] Fix handling SHT_NOBITS sections by obj2yaml/yaml2obj tools
SHT_NOBITS sections do not have content in an object file. Now yaml2obj
tool does not accept `Content` field for such sections, and obj2yaml
tool does not attempt to read the section content from a file.

llvm-svn: 241350
2015-07-03 14:07:06 +00:00
Rafael Espindola
d823dc1246 Avoid warning about unused variable when building without assertions.
llvm-svn: 241348
2015-07-03 12:53:50 +00:00
Rafael Espindola
ec9812c0f2 Avoid a use after free.
llvm-svn: 241345
2015-07-03 12:20:34 +00:00
Rafael Espindola
6b29eac84a Continue to remove the notion that ELF has dynamic and static symbols.
The ELFObjectFile now just reasons about a section/index pair, removing
one of the users that force ELF.h to maintain the difference.

llvm-svn: 241344
2015-07-03 12:00:05 +00:00
NAKAMURA Takumi
a114fd42ae llvm/test/CodeGen/ARM/fnattr-trap.ll: Add -mtriple, to appease targeting *-win32.
LLVM ERROR: CPU: 'generic' does not support ARM mode execution!

llvm-svn: 241329
2015-07-03 08:21:38 +00:00
Simon Pilgrim
9c5ee1cefc whitespace tidyup. NFC.
llvm-svn: 241326
2015-07-03 08:02:12 +00:00
Simon Pilgrim
555783cecd [X86][SSE] Sign extension for target vector sizes less than 128 bits (pt2)
Add support for v2i8/v2i16 to v2f64 by using a sign extension to v2i32 before conversion to v2f64.

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

llvm-svn: 241325
2015-07-03 08:01:36 +00:00
Yaron Keren
d111182146 Initialize booleans CallsUnwindInit and CallsEHReturn with false instead of 0.
llvm-svn: 241324
2015-07-03 07:56:24 +00:00
Simon Pilgrim
438ea7ca28 [X86][SSE] Sign extension for target vector sizes less than 128 bits (pt1)
This patch adds support for sign extension for sub 128-bit vectors, such as to v2i32. It concatenates with UNDEF subvectors up to 128-bits, performs the sign extension (i.e. as v4i32) and then extracts the target subvector.

Patch 1/2 of D10589 - the second patch covers the conversion of v2i8/v2i16 to v2f64.

llvm-svn: 241323
2015-07-03 07:51:01 +00:00
Nadav Rotem
4e07210007 Fix an overly aggressive assertion in getCopyFromPartsVector.
The assertion in getCopyFromPartsVector assumed that the vector 'part' must
match the type of argument (arguments are potentially split into multiple
parts). However, in some cases the targets return a 'part' of the right size
but with a different type. We already handle this case correctly later on
and generate a bitcast. This commit just makes sure that we are actually
checking the property that we care about.

llvm-svn: 241312
2015-07-02 23:23:52 +00:00
Adrian Prantl
9c43298950 DIBuilder: Now that DICompileUnit is distinct, stop using temporary nodes
for the arrays.

llvm-svn: 241308
2015-07-02 22:32:52 +00:00
Akira Hatanaka
09b63898c4 Use function attribute "trap-func-name" and remove TargetOptions::TrapFuncName.
This commit changes normal isel and fast isel to read the user-defined trap
function name from function attribute "trap-func-name" attached to llvm.trap or
llvm.debugtrap instead of from TargetOptions::TrapFuncName. This is needed to
use clang's command line option "-ftrap-function" for LTO and enable changing
the trap function name on a per-call-site basis.

Out-of-tree projects currently using TargetOptions::TrapFuncName to specify the
trap function name should attach attribute "trap-func-name" to the call sites
of llvm.trap and llvm.debugtrap instead.

rdar://problem/21225723

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

llvm-svn: 241305
2015-07-02 22:13:27 +00:00
Akira Hatanaka
6d78b5b1b5 Add functions for adding and testing string attributes to CallInst. NFC.
This change is needed later when I make changes to attach string function
attributes to llvm.trap and llvm.debugtrap.

llvm-svn: 241304
2015-07-02 22:08:48 +00:00
Dan Gohman
512ba1b916 [WebAssembly] Set the HasFloatingPointExceptions flag for WebAssembly.
llvm-svn: 241302
2015-07-02 21:36:25 +00:00
Rafael Espindola
18ea56ad3b Try to fix the build of IntelJITEventListener.
llvm-svn: 241301
2015-07-02 21:24:12 +00:00
Rafael Espindola
165a342cde Return ErrorOr from SymbolRef::getName.
This function can really fail since the string table offset can be out of
bounds.

Using ErrorOr makes sure the error is checked.

Hopefully a lot of the boilerplate code in tools/* can go away once we have
a diagnostic manager in Object.

llvm-svn: 241297
2015-07-02 20:55:21 +00:00
Bill Schmidt
8da856ce76 [PPC64LE] Remove implicit-subreg restriction from VSX swap removal
In r241285, I removed the SUBREG_TO_REG restriction from VSX swap
removal, determining that this was overly conservative.  We have
another form of the same restriction in that we check for the presence
of implicit subregs in vector operations.  As with SUBREG_TO_REG for
partial register conversions, an implicit subreg is safe in and of
itself, provided no other operation makes a lane-sensitive assumption
about the result.  This patch removes that restriction, by removing
the HasImplicitSubreg flag and all code that relies on it.

I've added a test case that fails to optimize before this patch is
applied, and optimizes properly with the patch.  Test based on a
report from Anton Blanchard.

llvm-svn: 241290
2015-07-02 19:01:22 +00:00
Sanjoy Das
4fb0ba046e [Statepoints] Make operator bool() explicit.
(Addressing post-commit review.)

llvm-svn: 241288
2015-07-02 18:15:18 +00:00
Rafael Espindola
41d3912acd Remove a report_fatal_error that should be unreachable.
If we created a relocation iterator, we have a valid relocation section.

llvm-svn: 241286
2015-07-02 17:16:07 +00:00
Bill Schmidt
0c245b6f0f [PPC64LE] Teach swap optimization about the doubleword splat idiom
With a previous patch, the VSX swap optimization is able to recognize
the doubleword load-splat idiom that can be implemented using lxvdsx.
However, that does not cover a doubleword splat where the source is a
register.  We can implement this using xxspltd (a special form of
xxpermdi).  This patch teaches the swap optimization pass about this
idiom.

As a prerequisite, it also permits swap optimization to succeed for
all forms of SUBREG_TO_REG.  Previously we were conservative and only
allowed SUBREG_TO_REG when it copied a full register.  However, on
reflection any form of SUBREG_TO_REG is safe in and of itself, so long
as an unsafe operation is not performed on its result.  In particular,
a widening SUBREG_TO_REG often occurs as an input to a doubleword
splat idiom, particularly in auto-vectorized code.

The doubleword splat idiom is an XXPERMDI operation where both source
registers are identical, and the selection mask is either 0 (splat the
first element) or 3 (splat the second element).  To determine whether
the registers are identical, we use the existing mechanism for looking
through "copy-like" operations.  That mechanism has a side effect of
marking the XXPERMDI operation as using a physical register, which
would invalidate its presence in a swap-optimized region.  This is
correct for the form of XXPERMDI that performs a swap and hence would
be removed, but is not what we want for a doubleword-splat variety of
XXPERMDI.  Therefore we reset the physical-register flag on the
XXPERMDI when it represents a splat.

A simple test case is added to verify that we generate the splat and
that we also remove the xxswapd instructions that would otherwise be
associated with the load and store of another operand.

llvm-svn: 241285
2015-07-02 17:03:06 +00:00
Rafael Espindola
fd6d635fbc Convert a member variable to a local one.
llvm-svn: 241284
2015-07-02 16:59:57 +00:00
Gabor Ballabas
be1cdfe5c6 Reworking the test part of r241149
The test part of r241149 has been reverted in r241451, due to misplaced test cases.
This patch splits those test cases among the appropriate targets.

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

llvm-svn: 241283
2015-07-02 16:53:23 +00:00
Rafael Espindola
43efaa4095 Fix for PR23310: llvm-dis crashes when trying to upgrade an intrinsic.
When trying to upgrade @llvm.x86.sse2.psrl.dq while parsing a module,
BitcodeReader adds the function to its worklist twice, resulting in a
crash when accessing it the second time.

This patch replaces the worklist vector by a map.

Patch by Philip Pfaffe.

llvm-svn: 241281
2015-07-02 16:22:40 +00:00
Rafael Espindola
3c7377260c Handle .dynsym a bit more like we handle .symtab.
They have the same format and we find them in the same way, no reason to handle
them differently.

llvm-svn: 241280
2015-07-02 16:03:38 +00:00
Rafael Espindola
7cab16c0e5 Rangify some loops.
Patch by Philip Pfaffe!

llvm-svn: 241279
2015-07-02 15:55:09 +00:00