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

126397 Commits

Author SHA1 Message Date
Matthias Braun
895450b36f RegisterPressure: Make liveness tracking subregister aware
Differential Revision: http://reviews.llvm.org/D14968

llvm-svn: 258258
2016-01-20 00:23:26 +00:00
Matthias Braun
e562f1b2e1 LiveInterval: Add utility class to rename independent subregister usage
This renaming is necessary to avoid a subregister aware scheduler
accidentally creating liveness "holes" which are rejected by the
MachineVerifier.

Explanation as found in this patch:

Helper class that can divide MachineOperands of a virtual register into
equivalence classes of connected components.
MachineOperands belong to the same equivalence class when they are part of
the same SubRange segment or adjacent segments (adjacent in control
flow); Different subranges affected by the same MachineOperand belong to
the same equivalence class.

Example:
  vreg0:sub0 = ...
  vreg0:sub1 = ...
  vreg0:sub2 = ...
  ...
  xxx        = op vreg0:sub1
  vreg0:sub1 = ...
  store vreg0:sub0_sub1

The example contains 3 different equivalence classes:
  - One for the (dead) vreg0:sub2 definition
  - One containing the first vreg0:sub1 definition and its use,
    but not the second definition!
  - The remaining class contains all other operands involving vreg0.

We provide a utility function here to rename disjunct classes to different
virtual registers.

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

llvm-svn: 258257
2016-01-20 00:23:21 +00:00
Tom Stellard
936d0be6f9 AMDGPU/SI: Prevent the DAGCombiner from creating setcc with i1 inputs
Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

llvm-svn: 258256
2016-01-20 00:13:22 +00:00
Sanjoy Das
d2d9b2b709 [MachineSink] Don't break ImplicitNulls
Summary:
This teaches MachineSink to not sink instructions that might break the
implicit null check optimization that runs later.  This should not
affect frontends that do not use implicit null checks.

Reviewers: aadg, reames, hfinkel, atrick

Subscribers: majnemer, llvm-commits

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

llvm-svn: 258254
2016-01-20 00:06:14 +00:00
Davide Italiano
85e195fefe Reinstate the second part of a comment. NFC.
Reported by:  Filipe Cabecinhas
Pointy-hat to: me

llvm-svn: 258223
2016-01-19 23:39:28 +00:00
Quentin Colombet
2fd9288cb1 [X86] Do not run shrink-wrapping on function with split-stack attribute or HiPE
calling convention.
The implementation of the related callbacks in the x86 backend for such
functions are not ready to deal with a prologue block that is not the entry
block of the function.

This fixes PR26107, but the longer term solution would be to fix those callbacks.

llvm-svn: 258221
2016-01-19 23:29:03 +00:00
Sanjay Patel
691c821001 add tests to show missing memset/malloc optimizations (PR25892)
llvm-svn: 258218
2016-01-19 23:07:10 +00:00
David Majnemer
7c946c0aa3 [MC, COFF] Add .reloc support for WinCOFF
This adds rudimentary support for a few relocations that we will use for
the CodeView debug format.

llvm-svn: 258216
2016-01-19 23:05:27 +00:00
Simon Pilgrim
709595fe14 [X86][SSE] Add VZEXT_MOVL target shuffle decoding.
Add support for decoding VZEXT_MOVL target shuffle masks, allowing it to be used as a source in target shuffle combines.

llvm-svn: 258215
2016-01-19 23:04:56 +00:00
Nico Weber
31b01d59cc Reenable -Wexpansion-to-defined.
I think I fixed all instances of this in the codebase
(r258202, 258200, 258190).  Also, the suppression didn't
have an effect on bots using make anyways, and it looks
like many bots still use configure/make bots.

llvm-svn: 258210
2016-01-19 22:46:33 +00:00
Lang Hames
1805d7e728 [Orc] Oops - lambda capture changed in r258206 was correct.
Fully qualify reference to Finalized in the body of the lambda instead to work
around GCC ICE.

llvm-svn: 258208
2016-01-19 22:32:58 +00:00
Quentin Colombet
44cd309151 [MachineFunction] Constify getter. NFC.
llvm-svn: 258207
2016-01-19 22:31:12 +00:00
Lang Hames
0f7fb08594 [Orc] Add missing capture to lambda.
llvm-svn: 258206
2016-01-19 22:31:01 +00:00
Simon Pilgrim
f1e3dd87e3 [X86][SSE] Add INSERTPS target shuffle combines.
As vector shuffles can only reference two inputs many (V)INSERTPS patterns end up being split over two targets shuffles.

This patch adds combines to attempt to combine (V)INSERTPS nodes with input/output nodes that are just zeroing out these additional vector elements.

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

llvm-svn: 258205
2016-01-19 22:24:12 +00:00
Lang Hames
563a3b3f49 [Orc] Qualify call to make_unique to avoid ambiguity with std::make_unique.
This should fix some of the bot failures associated with r258185.

llvm-svn: 258204
2016-01-19 22:22:43 +00:00
Lang Hames
f5d5e165bf [Orc] #undef a MACRO after I'm done with it.
Suggested by Philip Reames in review of r257951.

Thanks Philip!

llvm-svn: 258203
2016-01-19 22:20:21 +00:00
Chad Rosier
1efd881aea [AArch64] Remove a bunch of useless FIXME comments.
llvm-svn: 258193
2016-01-19 21:47:24 +00:00
Dan Gohman
d4e981ce4b [WebAssembly] Remove an unused data member. NFC.
llvm-svn: 258192
2016-01-19 21:31:41 +00:00
Chad Rosier
91ad8191d7 [AArch64] Remove more dead code after r258093.
llvm-svn: 258191
2016-01-19 21:27:05 +00:00
Nico Weber
3f7b353711 Fix undefined behavior in llvm's local changes to googletest.
r100895 landed an llvm-only change to add minix support to googletest.
It did that by putting "defined()" in a macro, which has undefined
behavior.  Slightly reshuffle things to remove that undefined behavior.
Also mention in README.LLVM that minix support is a local change.

llvm-svn: 258190
2016-01-19 21:22:36 +00:00
Xinliang David Li
1d582a4528 Fix a coverage reading bug
function record pointer is not advanced when
duplicate entry is found.

Test case to be added.

llvm-svn: 258188
2016-01-19 21:18:12 +00:00
Lang Hames
8017e50962 [Orc] Fix a stale comment.
llvm-svn: 258187
2016-01-19 21:13:54 +00:00
Lang Hames
526cf61162 [Orc] Refactor ObjectLinkingLayer::addObjectSet to defer loading objects until
they're needed.

Prior to this patch objects were loaded (via RuntimeDyld::loadObject) when they
were added to the ObjectLinkingLayer, but were not relocated and finalized until
a symbol address was requested. In the interim, another object could be loaded
and finalized with the same memory manager, causing relocation/finalization of
the first object to fail (as the first finalization call may have marked the
allocated memory for the first object read-only).

By deferring the loadObject call (and subsequent memory allocations) until an
object file is needed we can avoid prematurely finalizing memory.

llvm-svn: 258185
2016-01-19 21:06:38 +00:00
Sanjoy Das
c6887c7e27 [SCEV] Fix PR26207
In some cases, the max backedge taken count can be more conservative
than the exact backedge taken count (for instance, because
ScalarEvolution::getRange is not control-flow sensitive whereas
computeExitLimitFromICmp can be).  In these cases,
computeExitLimitFromCond (specifically the bit that deals with `and` and
`or` instructions) can create an ExitLimit instance with a
`SCEVCouldNotCompute` max backedge count expression, but a computable
exact backedge count expression.  This violates an implicit SCEV
assumption: a computable exact BE count should imply a computable max BE
count.

This change

 - Makes the above implicit invariant explicit by adding an assert to
   ExitLimit's constructor

 - Changes `computeExitLimitFromCond` to be more robust around
   conservative max backedge counts

llvm-svn: 258184
2016-01-19 20:53:51 +00:00
Sanjoy Das
bad46059e0 [SCEV] Use range-for; NFC
llvm-svn: 258183
2016-01-19 20:53:46 +00:00
JF Bastien
76215efe3e WebAssembly: mark known failure caused by r258125
The following test program triggers the assertion:
https://github.com/gcc-mirror/gcc/blob/master/gcc/testsuite/gcc.c-torture/execute/20030916-1.c

llvm-svn: 258182
2016-01-19 20:53:12 +00:00
Nico Weber
70c6fe4d8d Fix bootstrap -Werror builds after clang r258128
llvm-svn: 258181
2016-01-19 20:52:17 +00:00
Kostya Serebryany
8820217862 [libFuzzer] use std::mt19937 for generating random numbers by default. Fix MyStoll to handle negative values. Use std::any_of instead of std::find_if
llvm-svn: 258178
2016-01-19 20:33:57 +00:00
Sanjay Patel
ff21b77f07 getParent()->getParent() == getModule() ; NFC
llvm-svn: 258176
2016-01-19 19:58:49 +00:00
Sanjay Patel
73930e2b84 function names start with a lowercase letter; NFC
Note: There are no uses of these functions outside of
SimplifyLibCalls, so they could be static functions in
that file.

llvm-svn: 258172
2016-01-19 19:46:10 +00:00
Hans Wennborg
f92fdb084e test-release.sh: Use CMake also for Darwin
This didn't work for 3.7, but hopefully it should work now.

llvm-svn: 258168
2016-01-19 19:21:58 +00:00
Sanjay Patel
2932dde796 fix formatting; NFC
llvm-svn: 258167
2016-01-19 19:17:47 +00:00
Sanjay Patel
1af845b00b don't repeat documentation comments in implementation file; NFC
llvm-svn: 258166
2016-01-19 19:16:10 +00:00
Sanjay Patel
4fac32a1de don't repeat function names in documentation comments; NFC
llvm-svn: 258164
2016-01-19 19:10:10 +00:00
Manuel Jacob
becbd7b6ad Move part of an if condition into an assertion. NFC.
llvm-svn: 258163
2016-01-19 19:04:49 +00:00
Michael Zuckerman
553ef84e85 [AVX512] Adding VPERMT2B and VPERMI2B instruction .
Differential Revision: http://reviews.llvm.org/D16297

llvm-svn: 258161
2016-01-19 18:47:02 +00:00
Philip Reames
e0ccb686f9 Revert 258157
According the build bots, clang is using the Registry class somewhere as well. Will reapply with appropriate clang changes at a later point.

llvm-svn: 258159
2016-01-19 18:41:10 +00:00
Sanjay Patel
a2ab3d6165 [LibCallSimplifier] use instruction-level fast-math-flags to shrink calls
This is a continuation of adding FMF to call instructions:
http://reviews.llvm.org/rL255555

llvm-svn: 258158
2016-01-19 18:38:52 +00:00
Philip Reames
5419400ae8 [GC] Registry initialization and linkage interactions
The Registry class constructs a linked list of nodes whose storage is inside static variables and nodes are added via static initializers. The trick is that those static initializers are in both the LLVM code base, and some random plugin that might get loaded in at runtime. The existing code tries to use C++ templates and their ODR rules to get a single definition of the registry for each type, but, experimentally, this doesn't quite work as designed. (Well, the entire structure doesn't. It might not actually be an ODR problem.)

Previously, when I tried moving the GCStrategy class (along with it's registry) from CodeGen to IR, I ran into a problem where asking the GCStrategyRegistry a question would return inconsistent results depending on whether you asked from CodeGen (where the static initializers still were) or Transforms. My best guess is that this is a result of either a) an order of initialization error, or b) we ended up with two copies of the registry being created. I remember at the time having convinced myself it was probably (b), but I don't have any of my notes around from that investigation any more.

See http://reviews.llvm.org/rL226311 for the original patch in question.

This patch tries to remove the possibility of (b) above. (a) was already fixed in change 258109.

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

llvm-svn: 258157
2016-01-19 18:34:27 +00:00
Rong Xu
a4b335c5a6 [PGO] Create the profile data variable before the lowering
This patch creates the profile data variable before lowering the profile intrinsics.

Reviewers: davidxl, silvas

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

llvm-svn: 258156
2016-01-19 18:29:54 +00:00
Philip Reames
642c77546e Add clarifying comments defining what a Loop is
Our loop construct is not a way to identify cycles in the CFG.  This wasn't immediately obvious from the header, so clarify that fact.

The motivation for this was that I just fixed a out of tree bug due to a mistaken assumption (on my part) on what a Loop actually was.  While it was fresh in my mind, I wanted to document the key point.

llvm-svn: 258154
2016-01-19 18:26:01 +00:00
Sanjay Patel
a46637dede [LibCallSimplifier] use instruction-level fast-math-flags to transform pow(x, [small integer]) calls
This is a continuation of adding FMF to call instructions:
http://reviews.llvm.org/rL255555

As with D15937, the intent of the patch is to preserve the current behavior of the transform
except that we use the pow call's 'fast' attribute as a trigger rather than a function-level
attribute.

The TODO comment notes a potential follow-on patch that would propagate FMF to the new
instructions.

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

llvm-svn: 258153
2016-01-19 18:15:12 +00:00
Chris Ray
b2705cf351 NFC Test Commit whitespace change in a comment
Changed whitespace so comments line up.

llvm-svn: 258151
2016-01-19 18:01:20 +00:00
Rafael Espindola
a9f441b419 Use larger write sizes for MCFillFragment.
This brings the pr26208 testcase down to 3.2 seconds. Not checking it in
since it does create a 4GB .o file.

llvm-svn: 258149
2016-01-19 17:47:48 +00:00
Geoff Berry
40581de42f [cmake] Fix add_version_info_from_vcs git svn version bug.
Summary:
add_version_info_from_vcs was setting SVN_REVISION to the last fetched
svn revision when using git svn instead of the svn revision
corresponding to HEAD.  This leads to conflicts with the definition of
SVN_REVISION in SVNVersion.inc generated by GetSVN.cmake when HEAD is
not the most recently fetched svn revision.

Use 'git svn info' to determine SVN_REVISION when git svn is being used
instead (as is done in GetSVN.cmake).

Reviewers: beanz

Subscribers: llvm-commits

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

llvm-svn: 258148
2016-01-19 17:36:02 +00:00
Sanjay Patel
76380d0013 remove outdated comment; NFC
llvm-svn: 258147
2016-01-19 17:29:22 +00:00
Eduard Burtescu
c55147fcdc [opaque pointer types] [NFC] GEP: replace get(Pointer)ElementType uses with get{Source,Result}ElementType.
Summary:
GEPOperator: provide getResultElementType alongside getSourceElementType.
This is made possible by adding a result element type field to GetElementPtrConstantExpr, which GetElementPtrInst already has.

GEP: replace get(Pointer)ElementType uses with get{Source,Result}ElementType.

Reviewers: mjacob, dblaikie

Subscribers: llvm-commits

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

llvm-svn: 258145
2016-01-19 17:28:00 +00:00
Michael Zuckerman
71a84dc5a5 [AVX512] Adding VPERMB instruction
Differential Revision: http://reviews.llvm.org/D16294

llvm-svn: 258144
2016-01-19 17:07:43 +00:00
Dan Gohman
fb437bc669 [WebAssembly] Rematerialize constants rather than hold them live in registers.
Teach the register stackifier to rematerialize constants that have multiple
uses instead of leaving them in registers. In the WebAssembly encoding, it's
the same code size to materialize most constants as it is to read a value
from a register.

llvm-svn: 258142
2016-01-19 16:59:23 +00:00
Rafael Espindola
2f2a76fc6a Simplify MCFillFragment.
The value size was always 1 or 0, so we don't need to store it.

In a no asserts build this takes the testcase of pr26208 from 11 to 10
seconds.

llvm-svn: 258141
2016-01-19 16:57:08 +00:00