Commit Graph

128798 Commits

Author SHA1 Message Date
David Majnemer
3aae575a24 [Bitcode] Make writeComdats less strange
It had a weird artificial limitation on the write side: the comdat name
couldn't be bigger than 2**16.  However, the reader had no such
limitation.  Make the reader and the writer agree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263377 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-13 08:01:03 +00:00
Fiona Glaser
b704b7aec9 ConstantFoldInstruction: avoid wasted calls to ConstantFoldConstantExpression
Check to see if all operands are constant before calling simplify on them
so that we don't perform wasted simplifications.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263374 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-13 05:36:15 +00:00
Matt Arsenault
cdca53531f Fix build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263372 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-13 05:22:08 +00:00
Matt Arsenault
499f78c4e0 APFloat: Fix ilogb for denormals
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263370 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-13 05:12:32 +00:00
Matt Arsenault
2ef9469788 APFloat: Fix scalbn handling of denormals
This was incorrect for denormals, and also failed
on longer exponent ranges.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263369 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-13 05:11:51 +00:00
Rui Ueyama
1f9d59bf0f Define IsRela static const member to Elf_Rel type.
So that we can write RelTy::IsRela to query its type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263367 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-13 04:55:44 +00:00
Craig Topper
db96b37522 [X86] Remove many operands that represent memory stores from outs to ins. These operands are the registers and immediates that specify the memory address not the memory itself thus they are inputs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263354 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-13 02:56:31 +00:00
Amaury Sechet
fdae897487 Add echo test for constant data arrays in the LLVM C API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263350 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-13 00:58:25 +00:00
Amaury Sechet
439cd320e2 Use templated version of unwrap instead of cats in the Core.cpp. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263349 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-13 00:54:40 +00:00
Amaury Sechet
cd077ccc77 Move LLVMConstStructInContext so that declarationa nd definition order match. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263348 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-13 00:40:12 +00:00
Sanjay Patel
8f4f26c9c7 update test to use FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263347 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 21:09:26 +00:00
Sanjay Patel
134f33040d fix documentation comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263346 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 20:44:58 +00:00
Sanjay Patel
87a52d46ba fix documentation comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263345 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 20:44:30 +00:00
Sanjay Patel
34d4afa5ad remove unnecessary cast; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263343 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 18:17:41 +00:00
Sanjay Patel
52c58851ea fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263342 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 18:05:53 +00:00
Sanjay Patel
a5b740a791 use range loops; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263341 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 16:52:17 +00:00
Sanjay Patel
b1ec9c2aaf [x86, InstCombine] delete x86 SSE2 masked store with zero mask
This follows up on the related AVX instruction transforms, but this
one is too strange to do anything more with. Intel's behavioral
description of this instruction in its Software Developer's Manual
is tragi-comic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263340 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 15:16:59 +00:00
Nemanja Ivanovic
6f20310e9e Fix for PR 26378
This patch corresponds to review:
http://reviews.llvm.org/D17712

We were not clearing the TOC vector in PPCAsmPrinter when initializing it. This
caused duplicate definition asserts when the pass is reused on the module
(i.e. with -compile-twice or in JIT contexts).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263338 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 10:23:07 +00:00
Teresa Johnson
8335dded89 Use default destructor and remove unnecessary virtual destructor
Only the virtual destructor in the base class is needed, and can use the
default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263335 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 05:38:22 +00:00
Kostya Serebryany
258d1e6be7 [libFuzzer] refresh docs more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263332 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 03:23:02 +00:00
Kostya Serebryany
b3dcade510 [libFuzzer] refresh docs more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263331 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 03:11:27 +00:00
Kostya Serebryany
4b45ff1d5d [libFuzzer] refresh docs more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263330 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 03:05:37 +00:00
Chandler Carruth
cdb6339f8b [lit] Hack lit to allow a test suite to request that it is run "early".
This lets us for example start running the unit test suite early. For
'check-llvm' on my machine, this drops the tim e from 44s to 32s!!!!!

It's pretty ugly. I barely know how to write Python, so feel free to
just tell me how I should write it instead. =D Thanks to Filipe and
others for help.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263329 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 03:03:31 +00:00
Kostya Serebryany
409f59e332 [libFuzzer] refresh docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263328 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 02:56:25 +00:00
Sanjoy Das
4f234e79a3 Make gc relocates more strongly typed; NFC
Don't use a `Value *` where we can use a stronger `GCRelocateInst *`
type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263327 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 02:54:27 +00:00
Quentin Colombet
f02ed558bd [X86] Make sure we do not clobber RBX with cmpxchg when used as a base pointer.
cmpxchg[8|16]b uses RBX as one of its argument.
In other words, using this instruction clobbers RBX as it is defined to hold one
the input. When the backend uses dynamically allocated stack, RBX is used as a
reserved register for the base pointer. 

Reserved registers have special semantic that only the target understands and
enforces, because of that, the register allocator don’t use them, but also,
don’t try to make sure they are used properly (remember it does not know how
they are supposed to be used).

Therefore, when RBX is used as a reserved register but defined by something that
is not compatible with that use, the register allocator will not fix the
surrounding code to make sure it gets saved and restored properly around the
broken code. This is the responsibility of the target to do the right thing with
its reserved register.

To fix that, when the base pointer needs to be preserved, we use a different
pseudo instruction for cmpxchg that save rbx.
That pseudo takes two more arguments than the regular instruction:
- One is the value to be copied into RBX to set the proper value for the
  comparison.
- The other is the virtual register holding the save of the value of RBX as the
  base pointer. This saving is done as part of isel (i.e., we emit a copy from
  rbx).

cmpxchg_save_rbx <regular cmpxchg args>, input_for_rbx_reg, save_of_rbx_as_bp

This gets expanded into:
rbx = copy input_for_rbx_reg
cmpxchg <regular cmpxchg args>
rbx = save_of_rbx_as_bp

Note: The actual modeling of the pseudo is a bit more complicated to make sure
the interferes that appears after the pseudo gets expanded are properly modeled
before that expansion.

This fixes PR26883.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263325 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 02:25:27 +00:00
Kostya Serebryany
b30f32650e [libFuzzer] try to use max_len based on the items of the corpus instead of blindly defaulting to 64 bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263323 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 01:57:04 +00:00
Eric Christopher
3529ae09b5 Temporarily revert:
commit ae14bf6488
Author: Mehdi Amini <mehdi.amini@apple.com>
Date:   Fri Mar 11 17:15:50 2016 +0000

    Remove PreserveNames template parameter from IRBuilder

    Summary:
    Following r263086, we are now relying on a flag on the Context to
    discard Value names in release builds.

    Reviewers: chandlerc

    Subscribers: mzolotukhin, llvm-commits

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

    From: Mehdi Amini <mehdi.amini@apple.com>

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263258
    91177308-0d34-0410-b5e6-96231b3b80d8

until we can figure out what to do about clang and Release build testing.

This reverts commit 263258.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263321 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 01:47:22 +00:00
Eric Christopher
aac261190c Add Lanai.def to the module map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263319 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 01:31:53 +00:00
Michael Zolotukhin
150be6b78b [LoopUnroll] Convert some existing tests to unit-tests.
Summary: As we now have unit-tests for UnrollAnalyzer, we can convert some existing tests to this format. It should make the tests more robust.

Reviewers: chandlerc, sanjoy

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263318 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 01:28:56 +00:00
Teresa Johnson
192d305276 Fix a memory leak due to missing virtual destructors
Caused a couple of sanitizer bot failures in ThinLTO tests due to
r263275.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263317 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 01:23:57 +00:00
Wilfred Hughes
0ba30ee421 Updating source languages entry in FAQ.
Dragonegg is no longer actively maintained[1], and the Pypy team is not
actively pursuing LLVM[2].

1: http://reviews.llvm.org/D9331
2: http://rpython.readthedocs.org/en/latest/faq.html#could-we-use-llvm



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263314 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 00:43:26 +00:00
Chris Matthews
053b5e9854 Fix the docs I broke
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263309 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 23:31:02 +00:00
Mike Aizatsky
b18a07cf76 [sancov] using md5 for anchors in attempt to reduce file size.
Differential Revision: http://reviews.llvm.org/D18102

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263308 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 23:28:28 +00:00
Mike Aizatsky
e9983cf9b4 Don't crash sancov if file is unreadable.
Summary:
Caller can provides the list of .so files where some files are
unreadable (e.g linux-vdso.so.1). It's more convenient to handler this in
sancov with warning then making all callers to check files.

Reviewers: aizatsky

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263307 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 23:26:41 +00:00
Chris Matthews
41cfc0be88 Extend test-suite docs to describe how to run test-suite with cmake+lit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263305 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 22:33:36 +00:00
Mehdi Amini
194378dd27 Minor cleanup and documentation to IRMover (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263304 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 22:19:06 +00:00
Simon Pilgrim
ddeaf238c9 [X86][SSE] Simplify vector LOAD + EXTEND on pre-SSE41 hardware
Improve vector extension of vectors on hardware without dedicated VSEXT/VZEXT instructions.

We already convert these to SIGN_EXTEND_VECTOR_INREG/ZERO_EXTEND_VECTOR_INREG but can further improve this by using the legalizer instead of prematurely splitting into legal vectors in the combine as this only properly helps for lowering to VSEXT/VZEXT.

Removes a lot of unnecessary any_extend + mask pattern - (Fix for PR25718).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263303 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 22:18:05 +00:00
Ahmed Bougacha
cdae7a5e30 [AArch64] Don't blindly lower f16/f128 FCCMPs.
Instead, extend f16 (like we do when lowering a standalone SETCC),
and let f128 be legalized to the RT calls.

Fixes PR26803.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263301 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 22:02:58 +00:00
Teresa Johnson
632e48cb4b Initialize CalleeInfo to fix bot after r263275
Hopefully will fix garbage output in
http://lab.llvm.org:8011/builders/clang-x86-win2008-selfhost/builds/6901

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263297 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 21:34:45 +00:00
Rui Ueyama
ddeff4c27a Define NT_GNU_BUILD_ID constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263288 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 20:20:25 +00:00
Dan Gohman
7a0d68c080 [WebAssembly] Add final keywords to a few more subclasses, for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263287 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 19:45:37 +00:00
George Burgess IV
d2347160ec [MemorySSA] Make a return type reflect reality. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263286 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 19:34:03 +00:00
Sanjoy Das
f9e7219610 Introduce @llvm.experimental.deoptimize
Summary:
This intrinsic, together with deoptimization operand bundles, allow
frontends to express transfer of control and frame-local state from
one (typically more specialized, hence faster) version of a function
into another (typically more generic, hence slower) version.

In languages with a fully integrated managed runtime this intrinsic can
be used to implement "uncommon trap" like functionality.  In unmanaged
languages like C and C++, this intrinsic can be used to represent the
slow paths of specialized functions.

Note: this change does not address how `@llvm.experimental_deoptimize`
is lowered.  That will be done in a later change.

Reviewers: chandlerc, rnk, atrick, reames

Subscribers: llvm-commits, kmod, mjacob, maksfb, mcrosier, JosephTremoulet

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263281 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 19:08:34 +00:00
Vedant Kumar
eac2b3065f [PGO] Skip value profile instrumentation of inline asm
Value profile instrumentation treats inline asm calls like they are
indirect calls. This causes problems when the 'Callee' is passed to a
ptrtoint cast -- the verifier rightly claims that this is bogus and
crashes opt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263278 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 18:57:48 +00:00
Teresa Johnson
dc6615addb [ThinLTO] Support for reference graph in per-module and combined summary.
Summary:
This patch adds support for including a full reference graph including
call graph edges and other GV references in the summary.

The reference graph edges can be used to make importing decisions
without materializing any source modules, can be used in the plugin
to make file staging decisions for distributed build systems, and is
expected to have other uses.

The call graph edges are recorded in each function summary in the
bitcode via a list of <CalleeValueIds, StaticCount> tuples when no PGO
data exists, or <CalleeValueId, StaticCount, ProfileCount> pairs when
there is PGO, where the ValueId can be mapped to the function GUID via
the ValueSymbolTable. In the function index in memory, the call graph
edges reference the target via the CalleeGUID instead of the
CalleeValueId.

The reference graph edges are recorded in each summary record with a
list of referenced value IDs, which can be mapped to value GUID via the
ValueSymbolTable.

Addtionally, a new summary record type is added to record references
from global variable initializers. A number of bitcode records and data
structures have been renamed to reflect the newly expanded scope of the
summary beyond functions. More cleanup will follow.

Reviewers: joker.eph, davidxl

Subscribers: joker.eph, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263275 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 18:52:24 +00:00
Mike Spertus
fcb50867e5 Type correct Visual Studio native visualization for PointerUnions
Visualize pointer unions by their actual type rather than as void *.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263270 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 18:26:47 +00:00
Chad Rosier
9c9879a621 Update test case to appease bots after 263255.
I'll follow up with Matt to confirm this is the correct fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263268 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 17:33:36 +00:00
Simon Pilgrim
0cf8ba232e Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263266 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 17:31:43 +00:00
Quentin Colombet
36053724e3 [IRTranslator] Translate unconditional branches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263265 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 17:28:03 +00:00