1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

126397 Commits

Author SHA1 Message Date
Rafael Espindola
0ca658f6d3 Simplify the logic. NFC.
Found while reviewing the change for PR26152.

llvm-svn: 258362
2016-01-20 22:38:23 +00:00
Manuel Jacob
f80921882b Run clang-format over ConstantFolding.h, fixing inconsistent indentation. NFC.
llvm-svn: 258361
2016-01-20 22:27:06 +00:00
Sanjay Patel
7980a4a5f4 don't repeat function names in comments; NFC
llvm-svn: 258360
2016-01-20 22:24:38 +00:00
David Blaikie
2c20fc8a28 Orc: Simplify lambda by using std::set's initializer_list ctor
llvm-svn: 258359
2016-01-20 22:24:26 +00:00
Lang Hames
7bbae4dc58 [Orc] Try to turn Orc execution unit tests back on for Linux.
The fix in r258324 (plus r258354) should allow Orc execution tests to run on
Linux.

llvm-svn: 258358
2016-01-20 22:16:14 +00:00
George Burgess IV
c1d01b0bd9 Fix typo in an error string. NFC.
llvm-svn: 258357
2016-01-20 22:15:23 +00:00
Evgeniy Stepanov
6c4fc98afa Fix PR26152.
Fix the condition for when the new global takes over the name of
the existing one to be the negation of the condition for the new
global to get internal linkage.

llvm-svn: 258355
2016-01-20 22:05:50 +00:00
Evgeniy Stepanov
6bc3fa852c Fix build warning.
error: field 'CCMgr' will be initialized after field 'IndirectStubsMgr' [-Werror,-Wreorder]
    : DL(TM.createDataLayout()), CCMgr(std::move(CCMgr)),

llvm-svn: 258354
2016-01-20 22:02:07 +00:00
Tom Stellard
1f5cbb2395 AMDGPU/SI: Promote i1 SETCC operations
Summary:
While working on uniform branching, I've hit a few cases where we emit
i1 SETCC operations.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

llvm-svn: 258352
2016-01-20 21:48:24 +00:00
Matt Arsenault
fd19a3f663 AMDGPU: Fix old comments that mention AMDIL
llvm-svn: 258350
2016-01-20 21:22:21 +00:00
Matt Arsenault
8442657275 AMDGPU: Remove AMDGPU.trunc intrinsic
llvm-svn: 258348
2016-01-20 21:05:53 +00:00
Matt Arsenault
ef8d51e654 AMDGPU: Remove AMDIL.fraction intrinsic
llvm-svn: 258347
2016-01-20 21:05:49 +00:00
Matt Arsenault
d256fbf59a AMDGPU: Remove AMDIL.round.nearest intrinsic
llvm-svn: 258346
2016-01-20 21:05:40 +00:00
Quentin Colombet
8d3acd6266 [GlobalISel] Add the proper cmake plumbing.
This patch adds the necessary plumbing to cmake to build the sources related to
GlobalISel.

To build the sources related to GlobalISel, we need to add -DBUILD_GLOBAL_ISEL=ON.
By default, this is OFF, thus GlobalISel sources will not impact people that do
not explicitly opt-in.

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

llvm-svn: 258344
2016-01-20 20:58:56 +00:00
Matt Arsenault
c463ea6063 AMDGPU: Remove abs intrinsic
llvm-svn: 258343
2016-01-20 20:58:29 +00:00
Matt Arsenault
97bf24516f AMDGPU: Remove min/max intrinsics
This removes support for mesa 11.0.x

llvm-svn: 258342
2016-01-20 20:50:19 +00:00
Sanjoy Das
b0b3d4c99d Add a "gc-transition" operand bundle
Summary:
This adds a new kind of operand bundle to LLVM denoted by the
`"gc-transition"` tag.  Inputs to `"gc-transition"` operand bundle are
lowered into the "transition args" section of `gc.statepoint` by
`RewriteStatepointsForGC`.

This removes the last bit of functionality that was unsupported in the
deopt bundle based code path in `RewriteStatepointsForGC`.

Reviewers: pgavlin, JosephTremoulet, reames

Subscribers: sanjoy, mcrosier, llvm-commits

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

llvm-svn: 258338
2016-01-20 19:50:25 +00:00
Simon Atanasyan
65cb28f51e [llvm-readobj][ELF] Teach llvm-readobj to show arch specific ELF section's flags
Some architecture specific ELF section flags might have the same value
(for example SHF_X86_64_LARGE and SHF_HEX_GPREL) and we have to check
machine architectures to select an appropriate set of possible flags.

The patch selects architecture specific flags into separate arrays
`ElfxxxSectionFlags` and combines `ElfSectionFlags` and `ElfxxxSectionFlags`
before pass to the `StreamWriter::printFlags()` method.

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

llvm-svn: 258334
2016-01-20 19:15:18 +00:00
Quentin Colombet
acf8746c63 [GlobalISel] Add a generic machine opcode for ADD.
The selection process being split into separate passes, we need generic opcodes
to translate the LLVM IR to target independent code.

This patch adds an opcode for addition: G_ADD.

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

llvm-svn: 258333
2016-01-20 19:14:55 +00:00
Sanjay Patel
bc36d3b932 fix typo; NFC
llvm-svn: 258332
2016-01-20 18:59:48 +00:00
Sanjay Patel
b8733f574f fix formatting; NFC
llvm-svn: 258330
2016-01-20 18:59:16 +00:00
Rafael Espindola
a193e28818 Accept subtractions involving a weak symbol.
When a symbol S shows up in an expression in assembly there are two
possible interpretations
* The expression is referring to the value of S in this file.
* The expression is referring to the value after symbol resolution.

In the first case the assembler can reason about the value and try to
produce a relocation.
In the second case, that is only possible if the symbol cannot be
preempted.

Assemblers are not very consistent about which interpretation gets used.
This changes MC to agree with GAS in the case of an expression of the
form "Sym - WeakSym".

llvm-svn: 258329
2016-01-20 18:57:48 +00:00
Sanjay Patel
3635b71b45 [LibCallSimplifier] don't get fooled by a fake sqrt()
The test case will crash without this patch because the subsequent call to
hasUnsafeAlgebra() assumes that the call instruction is an FPMathOperator
(ie, returns an FP type).

This part of the function signature check was omitted for the sqrt() case, 
but seems to be in place for all other transforms.

Before:
http://reviews.llvm.org/rL257400
...we would have needlessly continued execution in optimizeSqrt(), but the
bug was harmless because we'd eventually fail some other check and return
without damage.

This should fix:
https://llvm.org/bugs/show_bug.cgi?id=26211

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

llvm-svn: 258325
2016-01-20 17:41:14 +00:00
Lang Hames
a62c027701 [Orc] Fix a use-after-move bug in the Orc C-bindings stack.
llvm-svn: 258324
2016-01-20 17:39:52 +00:00
Sanjay Patel
a1fa737ea0 80-cols; NFC
llvm-svn: 258323
2016-01-20 16:41:43 +00:00
Keith Walker
a38818ea04 Write AArch64 big endian data fixup entries as BE.
There was support for writing the AArch64 big endian data fixup entries in
the .eh_frame section in BE.    This is changed to write all such fixup
entries in BE with no restriction on the section.  This is similar to
the existing support for fixup entries for ARM.

A test is added to check the length field in the .debug_line section as
this is an example of where such a fixup occurs.

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

llvm-svn: 258320
2016-01-20 15:59:14 +00:00
Tom Stellard
874368ba8b Correctly initialize SIAnnotateControlFlow
Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

llvm-svn: 258319
2016-01-20 15:48:27 +00:00
Michael Zuckerman
852ec66515 [AVX512] Adding VPERMB Intrinsics
Differential Revision: http://reviews.llvm.org/D16296

llvm-svn: 258316
2016-01-20 15:24:56 +00:00
Marina Yatsina
b35ff9ba57 Fixing bug in rL258132: [X86] Adding support for missing variations of X86 string related instructions
There was a bug in my rL258132 because there's an overloading of the "movsd" and "cmpsd" instructions, e.g. movsd can be either "Move Data from String to String" (the case I wanted to handle) or "Move or Merge Scalar Double-Precision Floating-Point Value" (the case that causes the asserts).
Added  code for escaping the unfamiliar scenarios and falling back to old behviour.
Also changed the asserts to llvm_unreachable. 

llvm-svn: 258312
2016-01-20 14:03:47 +00:00
Krzysztof Parzyszek
d1195ef11e Proper handling of diamond-like cases in if-conversion
If converter was somewhat careless about "diamond" cases, where there
was no join block, or in other words, where the true/false blocks did
not have analyzable branches. In such cases, it was possible for it to
remove (needed) branches, resulting in a loss of entire basic blocks.

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

llvm-svn: 258310
2016-01-20 13:14:52 +00:00
Igor Breger
866bd3ac74 AVX512: Store (MOVNTPD, MOVNTPS, MOVNTDQ) using non-temporal hint intrinsic implementation.
Differential Revision: http://reviews.llvm.org/D16350

llvm-svn: 258309
2016-01-20 13:11:47 +00:00
Oliver Stannard
80ad1149bf [AArch64] Fix two bugs in the .inst directive
The AArch64 .inst directive was implemented using EmitIntValue, which resulted
in both $x and $d (code and data) mapping symbols being emitted at the same
address. This fixes it to only emit the $x mapping symbol.

EmitIntValue also emits the value in big-endian order when targeting big-endian
systems, but instructions are always emitted in little-endian order for
AArch64.

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

llvm-svn: 258308
2016-01-20 12:54:31 +00:00
Dylan McKay
8e1fd47b87 [AVR] Defnined calling conventions. NFC.
llvm-svn: 258300
2016-01-20 09:30:01 +00:00
Petr Pavlu
b38595a7e2 [LTO] Fix error reporting when a file passed to libLTO is invalid or non-existent
This addresses PR26060 where function lto_module_create() could return nullptr
but lto_get_error_message() returned an empty string.

The error() call after LTOModule::createFromFile() in llvm-lto is then removed
because any error from this function should go through the diagnostic handler in
llvm-lto which will exit the program. The error() call was added because this
previously did not happen when the file was non-existent. This is fixed by the
patch. (The situation that llvm-lto reports an error when the input file does
not exist is tested by llvm/tools/llvm-lto/error.ll).

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

llvm-svn: 258298
2016-01-20 09:03:42 +00:00
Ivan Krasin
d1b806509e [Verifier] Fix performance regression for LTO builds
Summary:
Fix a significant performance regression by introducing GlobalValueVisited field and reusing the map.
This is a follow up to r257823 that slowed down linking Chrome with LTO by 2.5x.

If you revert this commit, please, also revert r257823.

BUG=https://llvm.org/bugs/show_bug.cgi?id=26214

Reviewers: pcc, loladiro, joker.eph

Subscribers: krasin1, joker.eph, loladiro, pcc

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

llvm-svn: 258297
2016-01-20 08:41:22 +00:00
Dan Gohman
4d1c91fc4d [SelectionDAG] Fold more offsets into GlobalAddresses
SelectionDAG previously missed opportunities to fold constants into
GlobalAddresses in several areas. For example, given `(add (add GA, c1), y)`, it
would often reassociate to `(add (add GA, y), c1)`, missing the opportunity to
create `(add GA+c, y)`. This isn't often visible on targets such as X86 which
effectively reassociate adds in their complex address-mode folding logic,
however it is currently visible on WebAssembly since it currently has very
simple address mode folding code that doesn't reassociate anything.

This patch fixes this by making SelectionDAG fold offsets into GlobalAddresses
at the same times that it folds constants together, so that it doesn't miss any
opportunities to perform such folding.

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

llvm-svn: 258296
2016-01-20 07:03:08 +00:00
Dan Gohman
eee0a5fe68 [WebAssembly] Tighten up some regexes in some tests.
llvm-svn: 258295
2016-01-20 05:55:09 +00:00
Dan Gohman
2ff7a96abf [WebAssembly] Minor code cleanups. NFC.
llvm-svn: 258294
2016-01-20 05:54:22 +00:00
Dan Gohman
31b1fe588c [WebAssembly] Remove the Relooper code, as it is not currently being used.
llvm-svn: 258293
2016-01-20 05:50:29 +00:00
Lang Hames
aabde6c57a [Orc] 'this' qualify more lambda-captured members.
More workaround attempts for GCC ICEs.

llvm-svn: 258288
2016-01-20 05:10:59 +00:00
Lang Hames
09c3ea7fd6 [Orc] More qualifications of lambda-captured member variables to fix GCC ICEs.
llvm-svn: 258286
2016-01-20 04:32:05 +00:00
Dan Gohman
e0f4353910 [WebAssembly] Don't stackify stores across instructions with side effects.
llvm-svn: 258285
2016-01-20 04:21:16 +00:00
Andrew Wilkins
e690f5b8b2 tools/llvm-config: improve shared library support
Summary:

This is a re-commit of r257003, which was reverted,
along with the fixes from http://reviews.llvm.org/D15986.

r252532 added support for reporting the monolithic library
when LLVM_BUILD_LLVM_DYLIB is used. This would only be done
if the individual components were not found, and the dynamic
library is found.

This diff extends this as follows:
 - If LLVM_LINK_LLVM_DYLIB is set, then prefer the shared
   library, even if all component libraries exist.
 - Two flags, --link-shared and --link-static are introduced
   to provide explicit guidance. If --link-shared is passed
   and the shared library does not exist, an error results.

Additionally, changed the expected shared library names from
(e.g.) LLVM-3.8.0 to LLVM-3.8. The former exists only in an
installation (and then only in CMake builds I think?), and not
in the build tree; this breaks usage of llvm-config during
builds, e.g. by llvm-go.

Reviewers: DiamondLovesYou, beanz

Subscribers: llvm-commits

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

llvm-svn: 258283
2016-01-20 04:03:09 +00:00
Lang Hames
b3263313ef [Orc] Qualify captured variable to work around GCC ICE.
llvm-svn: 258278
2016-01-20 03:12:40 +00:00
Xinliang David Li
67f63b17f1 Fix a bug in test
llvm-svn: 258276
2016-01-20 02:49:53 +00:00
Joseph Tremoulet
de5c9a8723 [Inliner/WinEH] Honor implicit nounwinds
Summary:
Funclet EH tables require that a given funclet have only one unwind
destination for exceptional exits.  The verifier will therefore reject
e.g. two cleanuprets with different unwind dests for the same cleanup, or
two invokes exiting the same funclet but to different unwind dests.
Because catchswitch has no 'nounwind' variant, and because IR producers
are not *required* to annotate calls which will not unwind as 'nounwind',
it is legal to nest a call or an "unwind to caller" catchswitch within a
funclet pad that has an unwind destination other than caller; it is
undefined behavior for such a call or catchswitch to unwind.

Normally when inlining an invoke, calls in the inlined sequence are
rewritten to invokes that unwind to the callsite invoke's unwind
destination, and "unwind to caller" catchswitches in the inlined sequence
are rewritten to unwind to the callsite invoke's unwind destination.
However, if such a call or "unwind to caller" catchswitch is located in a
callee funclet that has another exceptional exit with an unwind
destination within the callee, applying the normal transformation would
give that callee funclet multiple unwind destinations for its exceptional
exits.  There would be no way for EH table generation to determine which
is the "true" exit, and the verifier would reject the function
accordingly.

Add logic to the inliner to detect these cases and leave such calls and
"unwind to caller" catchswitches as calls and "unwind to caller"
catchswitches in the inlined sequence.

This fixes PR26147.


Reviewers: rnk, andrew.w.kaylor, majnemer

Subscribers: alexcrichton, llvm-commits

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

llvm-svn: 258273
2016-01-20 02:15:15 +00:00
Xinliang David Li
8c526c0741 [PGO] Add a new interface to be used by Indirect Call Promotion
llvm-svn: 258271
2016-01-20 01:26:34 +00:00
Eduard Burtescu
f4029d5940 [NFC] Replace several manual GEP loops with gep_type_iterator.
Reviewers: dblaikie

Subscribers: llvm-commits

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

llvm-svn: 258262
2016-01-20 00:26:52 +00:00
Xinliang David Li
09181f13bd Function name change /NFC
llvm-svn: 258260
2016-01-20 00:24:36 +00:00
Matthias Braun
3f5b3cdbf1 MachineScheduler: Allow independent scheduling of sub register defs
Note that this is disabled by default and still requires a patch to
handleMove() which is not upstreamed yet.

If the TrackLaneMasks policy/strategy is enabled the MachineScheduler
will build a schedule graph where definitions of independent
subregisters are no longer serialised.

Implementation comments:
- Without lane mask tracking a sub register def also counts as a use
  (except for the first one with the read-undef flag set), with lane
  mask tracking enabled this is no longer the case.
- Pressure Diffs where previously maintained per definition of a
  vreg with the help of the SSA information contained in the
  LiveIntervals.  With lanemask tracking enabled we cannot do this
  anymore and instead change the pressure diffs for all uses of the vreg
  as it becomes live/dead.  For this changed style to work correctly we
  ignore uses of instructions that define the same register again: They
  won't affect register pressure.
- With lanemask tracking we remove all read-undef flags from
  sub register defs when building the graph and re-add them later when
  all vreg lanes have become dead.

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

llvm-svn: 258259
2016-01-20 00:23:32 +00:00