126540 Commits

Author SHA1 Message Date
David Majnemer
42a735c8ed [MC, COFF] Add .reloc support for WinCOFF
This adds rudimentary support for a few relocations that we will use for
the CodeView debug format.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258216 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 23:05:27 +00:00
Simon Pilgrim
df369b21b9 [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258215 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 23:04:56 +00:00
Nico Weber
b73878a88c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258210 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 22:46:33 +00:00
Lang Hames
b8b874987e [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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258208 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 22:32:58 +00:00
Quentin Colombet
871b3df6d9 [MachineFunction] Constify getter. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258207 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 22:31:12 +00:00
Lang Hames
b9be9b997a [Orc] Add missing capture to lambda.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258206 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 22:31:01 +00:00
Simon Pilgrim
250273a9ce [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258205 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 22:24:12 +00:00
Lang Hames
f32ef420e6 [Orc] Qualify call to make_unique to avoid ambiguity with std::make_unique.
This should fix some of the bot failures associated with r258185.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258204 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 22:22:43 +00:00
Lang Hames
4ce7a6cb25 [Orc] #undef a MACRO after I'm done with it.
Suggested by Philip Reames in review of r257951.

Thanks Philip!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258203 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 22:20:21 +00:00
Chad Rosier
e15795f83d [AArch64] Remove a bunch of useless FIXME comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258193 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 21:47:24 +00:00
Dan Gohman
92c68ce7c8 [WebAssembly] Remove an unused data member. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258192 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 21:31:41 +00:00
Chad Rosier
8ead0df472 [AArch64] Remove more dead code after r258093.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258191 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 21:27:05 +00:00
Nico Weber
3c247736dd 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258190 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 21:22:36 +00:00
Xinliang David Li
306bcccc42 Fix a coverage reading bug
function record pointer is not advanced when
duplicate entry is found.

Test case to be added.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258188 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 21:18:12 +00:00
Lang Hames
08e6e6af38 [Orc] Fix a stale comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258187 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 21:13:54 +00:00
Lang Hames
1665b573d9 [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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258185 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 21:06:38 +00:00
Sanjoy Das
96068f9791 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258184 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 20:53:51 +00:00
Sanjoy Das
95b171a2ef [SCEV] Use range-for; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258183 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 20:53:46 +00:00
JF Bastien
e5109343c1 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258182 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 20:53:12 +00:00
Nico Weber
d45a9597c8 Fix bootstrap -Werror builds after clang r258128
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258181 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 20:52:17 +00:00
Kostya Serebryany
429a7edf9b [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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258178 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 20:33:57 +00:00
Sanjay Patel
4d02b51dd0 getParent()->getParent() == getModule() ; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258176 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 19:58:49 +00:00
Sanjay Patel
130d7af1cf 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258172 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 19:46:10 +00:00
Hans Wennborg
f049f0721c test-release.sh: Use CMake also for Darwin
This didn't work for 3.7, but hopefully it should work now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258168 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 19:21:58 +00:00
Sanjay Patel
f04cfb4e1c fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258167 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 19:17:47 +00:00
Sanjay Patel
f62a7b5f62 don't repeat documentation comments in implementation file; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258166 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 19:16:10 +00:00
Sanjay Patel
70a272d71e don't repeat function names in documentation comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258164 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 19:10:10 +00:00
Manuel Jacob
5884e2f9ac Move part of an if condition into an assertion. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258163 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 19:04:49 +00:00
Michael Zuckerman
dee7d6fcc6 [AVX512] Adding VPERMT2B and VPERMI2B instruction .
Differential Revision: http://reviews.llvm.org/D16297


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258161 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 18:47:02 +00:00
Philip Reames
477926b924 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258159 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 18:41:10 +00:00
Sanjay Patel
507edcba42 [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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258158 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 18:38:52 +00:00
Philip Reames
c66b44070b [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




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258157 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 18:34:27 +00:00
Rong Xu
eeedfde497 [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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258156 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 18:29:54 +00:00
Philip Reames
c7630ca045 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258154 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 18:26:01 +00:00
Sanjay Patel
a9c8e55a04 [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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258153 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 18:15:12 +00:00
Chris Ray
6ef997afec NFC Test Commit whitespace change in a comment
Changed whitespace so comments line up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258151 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 18:01:20 +00:00
Rafael Espindola
be7a41bf5d 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258149 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 17:47:48 +00:00
Geoff Berry
73c7b058de [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258148 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 17:36:02 +00:00
Sanjay Patel
a27a3f756c remove outdated comment; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258147 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 17:29:22 +00:00
Eduard Burtescu
f70dc429e7 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258145 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 17:28:00 +00:00
Michael Zuckerman
b0025fa67f [AVX512] Adding VPERMB instruction
Differential Revision: http://reviews.llvm.org/D16294



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258144 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 17:07:43 +00:00
Dan Gohman
21495bccdc [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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258142 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 16:59:23 +00:00
Rafael Espindola
9f9435ed26 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258141 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 16:57:08 +00:00
Dan Gohman
8f77ee2167 [WebAssembly] Change a FIXME to a TODO in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258139 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 16:52:50 +00:00
Dan Gohman
67416f0bdd [WebAssembly] Re-enable this test, now that interactions with the coalescer are resolved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258138 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 16:52:09 +00:00
Chad Rosier
7351967b50 Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258137 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 16:50:45 +00:00
Marina Yatsina
b6f91a083c [X86] Add support for "xlat m8"
According to x86 spec "xlat m8" is a legal instruction and it is equivalent to "xlatb".

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258135 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 16:35:38 +00:00
Manuel Jacob
5ad54e5885 Fix constant folding of constant vector GEPs with undef or null as pointer argument.
Reviewers: eddyb

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258134 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 16:34:31 +00:00
Marina Yatsina
ba286d1b66 [X86] Adding support for missing variations of X86 string related instructions
The following are legal according to X86 spec:
ins mem, DX
outs DX, mem
lods mem
stos mem
scas mem
cmps mem, mem
movs mem, mem

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258132 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 15:37:56 +00:00
Manuel Jacob
95992a2e04 Rename Variable Ptr to PtrTy. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258130 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 15:21:15 +00:00