121147 Commits

Author SHA1 Message Date
Matthias Braun
a83ba0a1b8 Fix dependencies/shared library build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245955 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-25 17:07:40 +00:00
David Blaikie
47c36ab1cd Fix dropped conditional in cleanup in r245752
Code review feedback by Charlie Turner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245954 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-25 17:01:36 +00:00
Wei Mi
e922c3ebfc The patch replace the overflow check in loop vectorization with the minimum loop iterations check.
The loop minimum iterations check below ensures the loop has enough trip count so the generated
vector loop will likely be executed, and it covers the overflow check.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245952 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-25 16:43:47 +00:00
Sanjay Patel
af7c00f213 make fast unaligned memory accesses implicit with SSE4.2 or SSE4a
This is a follow-on from the discussion in http://reviews.llvm.org/D12154.

This change allows memset/memcpy to use SSE or AVX memory accesses for any chip that has
generally fast unaligned memory ops.

A motivating use case for this change is a clang invocation that doesn't explicitly set
the CPU, but does target a feature that we know only exists on a CPU that supports fast
unaligned memops. For example:
$ clang -O1 foo.c -mavx

This resolves a difference in lowering noted in PR24449:
https://llvm.org/bugs/show_bug.cgi?id=24449

Before this patch, we used different store types depending on whether the example can be
lowered as a memset or not.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245950 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-25 16:29:21 +00:00
Reid Kleckner
b6566b103f [lit] Speculatively fix PR24554 by manually closing the process handle
My theory is that somehow Python's refcounting and GC strategy isn't
closing the subprocess handle in a timely fashion.  This accesses the
private '_handle' field of the Popen object, but I see no other way to
do this. If this doesn't address the problem on the sanitizer-windows
buildbot, we can revert this change. If it does, then let's keep the
hack.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245946 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-25 16:07:06 +00:00
Reid Kleckner
2140b798ec [cmake] Pass /manifest:no to the linker when asan is enabled
This is a workaround for PR24476.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245945 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-25 16:06:40 +00:00
Diego Novillo
eb6eb153d9 Convert SampleProfile pass into a Module pass.
Eventually, we will need sample profiles to be incorporated into the
inliner's cost models.  To do this, we need the sample profile pass to
be a module pass.

This patch makes no functional changes beyond the mechanical adjustments
needed to run SampleProfile as a module pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245940 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-25 15:25:11 +00:00
Davide Italiano
39e2b39af7 [MachO] Introduce MinVersion API.
While introducing support for MinVersionLoadCommand in llvm-readobj I noticed there's
no API to extract Major/Minor/Update components conveniently. Currently consumers
do the bit twiddling on their own, but this will change from now on.

I'll convert llvm-objdump (and llvm-readobj) in a later commit.

Differential Revision:	 http://reviews.llvm.org/D12282
Reviewed by:	rafael


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245938 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-25 15:02:23 +00:00
Michael Kuperstein
89024e86ad [X86] Remove references to _ftol2
As of r245924, _ftol2 is no longer used for fptoui on MS platforms.
Remove the dead code associated with it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245925 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-25 07:58:33 +00:00
Michael Kuperstein
f48b1beeec [X86] Fix fptoui conversions
This fixes two issues in x86 fptoui lowering.
1) Makes conversions from f80 go through the right path on AVX-512.
2) Implements an inline sequence for fptoui i64 instead of a library
call. This improves performance by 6X on SSE3+ and 3X otherwise.
Incidentally, it also removes the use of ftol2 for fptoui, which was
wrong to begin with, as ftol2 converts to a signed i64, producing
wrong results for values >= 2^63.

Patch by: mitch.l.bodart@intel.com
Differential Revision: http://reviews.llvm.org/D11316

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245924 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-25 07:42:09 +00:00
Steve King
46ff6da860 Pass function attributes instead of boolean in isIntDivCheap().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245921 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-25 02:31:21 +00:00
Piotr Padlewski
602a9cd084 assume.ll test fixup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245920 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-25 01:48:49 +00:00
Piotr Padlewski
8e6aecec25 Assume intrinsic handling in global opt
It doesn't solve the problem, when for example we load something, and
then assume that it is the same as some constant value, because
globalopt will fail on unknown load instruction. The proposed solution
would be to skip some instructions that we can't evaluate and they are
safe to skip (f.e. load, assume and many others) and see if they are
required to perform optimization (f.e. we don't care about ephemeral
instructions that may appear using @llvm.assume())

http://reviews.llvm.org/D12266

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245919 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-25 01:34:15 +00:00
Mehdi Amini
4bc8e7e0c1 Revert "Fix LLVM C API for DataLayout"
This reverts commit 433bfd94e4b7e3cc3f8b08f8513ce47817941b0c.
Broke some bot, have to see why it passed locally.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245917 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-25 01:21:09 +00:00
Mehdi Amini
8b07e8e08f Fix LLVM C API for DataLayout
We removed access to the DataLayout on the TargetMachine and
deprecated the C API function LLVMGetTargetMachineData() in r243114.
However the way I tried to be backward compatible was broken: I
changed the wrapper of the TargetMachine to be a structure that
includes the DataLayout as well. However the TargetMachine is also
wrapped by the ExecutionEngine, in the more classic way. A client
using the TargetMachine wrapped by the ExecutionEngine and trying
to get the DataLayout would break.

It seems tricky to solve the problem completely in the C API
implementation. This patch tries to address this backward
compatibility in a more lighter way in the C++ API. The C API is
restored in its original state and the removed C++ API is
reintroduced, but privately. The C API is friended to the
TargetMachine and should be the only consumer for this API.

Reviewers: ributzka

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245916 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-25 01:07:25 +00:00
Vedant Kumar
654072f80a [docs] Improvements to CMake.rst
- Fix some grammatical and typographical errors.
- Try to improve upon some awkward/nonstandard phrasings.
- Expand slightly the treatment of how you specify arguments to cmake.
- Update the list of possible LLVM_BUILD_TESTS and state where to find the
  definitive list.
- Correct the name of llvm-tblgen.
- Expand slightly the treatment of several build options, including
  LLVM_LIT_TOOLS_DIR, LLVM_ENABLE_FFI, and LLVM_EXTERNAL_project_SOURCE_DIR.

Patch by Brian R. Gaeke!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245911 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-25 00:09:47 +00:00
Hal Finkel
0297590fc2 [PowerPC] PPCVSXFMAMutate should ignore trivial-copy addends
We might end up with a trivial copy as the addend, and if so, we should ignore
the corresponding FMA instruction. The trivial copy can be coalesced away later,
so there's nothing to do here. We should not, however, assert. Fixes PR24544.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245907 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 23:48:28 +00:00
Hans Wennborg
d4825d27e8 Revert r245355 "Release script: correctly symlink clang-tools-extra into the build (PR22765)"
This worked with the CMake build but broke the Autoconf one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245902 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 23:34:28 +00:00
Matthias Braun
e11e167a1f Try to fix buildbots
Apparently std::vector::erase(const_iterator) (as opposed to the
non-const iterator) is a part of C++11 but it seems this is not available
on all the buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245900 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 23:30:39 +00:00
Sanjay Patel
002f836e73 fix typos; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245899 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 23:20:16 +00:00
Matthias Braun
2dd939e51c Let's try to fix GNU libstdc++ buildbots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245898 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 23:19:39 +00:00
Sanjay Patel
22d4f8a9a1 fix typo; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245896 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 23:18:44 +00:00
Matthias Braun
56dd2d0886 MachineBasicBlock: Add liveins() method returning an iterator_range
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245895 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 22:59:52 +00:00
Dan Gohman
b7e01a085a [WebAssembly] DYNAMIC_STACKALLOC returns a pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245893 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 22:31:52 +00:00
Peter Collingbourne
8c1602df50 LTO: Simplify merged module ownership.
This change moves LTOCodeGenerator's ownership of the merged module to a
field of type std::unique_ptr<Module>. This helps simplify parts of the code
and clears the way for the module to be consumed by LLVM CodeGen (see D12132
review comments).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245891 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 22:22:53 +00:00
JF Bastien
3a9c43563b WebAssembly: Implement call
Summary: Support function calls.

Reviewers: sunfish, sunfishcode

Subscribers: sunfishcode, jfb, llvm-commits

Differential revision: http://reviews.llvm.org/D12219

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245887 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 22:16:48 +00:00
JF Bastien
9f728dbfdc Revert two bad commits.
Summary: I forgot to squash git commits before doing an svn dcommit of D12219. Reverting, and re-submitting.

Subscribers: jfb, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245886 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 22:07:33 +00:00
JF Bastien
b7a8e4c591 Missing print.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245883 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 22:00:04 +00:00
JF Bastien
03685a9bf4 call
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245882 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 21:59:51 +00:00
Simon Pilgrim
e6f4f28248 [X86][SSE] Added tests for zero-extension vector shuffles that don't extend starting from the 0'th lane.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245878 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 21:28:13 +00:00
Dan Gohman
99f0983900 [WebAssembly] Make the assembly printer indent instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245875 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 21:19:48 +00:00
Peter Collingbourne
43a77da0e6 LTO: Rename mergedModule variables to MergedModule to prepare for ownership change.
Also convert a few loops to range-for loops and correct a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245874 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 21:15:35 +00:00
Rafael Espindola
850ecaba66 Report an error if a SHT_SYMTAB_SHNDX section has the wrong size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245873 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 21:09:41 +00:00
Dan Gohman
8ccfc118c6 [WebAssembly] CodeGen support for __builtin_wasm_page_size()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245872 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 21:03:24 +00:00
Sanjay Patel
a1da6bba1e fix typo; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245869 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 20:11:14 +00:00
Bill Schmidt
8c932ac614 [PPC64LE] Fix PR24546 - Swap optimization and debug values
This patch fixes PR24546, which demonstrates a segfault during the VSX
swap removal pass.  The problem is that debug value instructions were
not excluded from the list of instructions to be analyzed for webs of
related computation.  I've added the test case from the PR as a crash
test in test/CodeGen/PowerPC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245862 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 19:27:27 +00:00
Dan Gohman
3c334d631e [WebAssembly] Skeleton FastISel support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245860 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 18:44:37 +00:00
Dan Gohman
0ff46edca1 [WebAssembly] Implement floating point rounding operators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245859 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 18:23:13 +00:00
Philip Reames
506ace9d6f [docs][PerformanceTips] Framing the generic IR tips
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245858 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 18:16:02 +00:00
Philip Reames
ac704fe134 [docs][PerformanceTips] Point people towards llvm-dev
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245856 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 17:46:11 +00:00
Philip Reames
047904e858 [docs] Further organization of the Performance Tips document
Arranging the language specific property section into readable groupings and adding a couple of notes about pass order, extensions, and the like.

For the record, suggestion for word smithing are welcomed.  I'm happy to revise; I'm just trying to get *something* in place.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245855 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 17:38:58 +00:00
Philip Reames
1cc793439f [docs] Organize the 'Performance Tips' page
This change just groups the suggestions by broad topic.  I'm planning a couple of follow on changes to improve the readability of this document.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245854 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 17:19:18 +00:00
Dan Gohman
18595a0862 [WebAssembly] Tell TargetTransformInfo about popcnt and sqrt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245853 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 16:51:46 +00:00
Dan Gohman
c723870037 [WebAssembly] Use the checked form of MachineFunction::getSubtarget. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245852 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 16:46:31 +00:00
Dan Gohman
c26771d7ab [WebAssembly] Implement the is_zero_undef forms of cttz and ctlz
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245851 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 16:39:37 +00:00
Adhemerval Zanella
9708c4754d [sanitizers] Add DFSan support for AArch64 42-bit VMA
This patch adds support for dfsan on aarch64-linux with 42-bit VMA
(current default config for 64K pagesize kernels).  The support is
enabled by defining the SANITIZER_AARCH64_VMA to 42 at build time
for both clang/llvm and compiler-rt.  The default VMA is 39 bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245840 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 13:48:10 +00:00
Michael Zuckerman
59dfeede45 [X86] Add support for mmword memory operand size for Intel-syntax x86 assembly
Differential Revision: http://reviews.llvm.org/D12151


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245835 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 10:26:54 +00:00
Oliver Stannard
67a54d2081 Add DAG optimisation for FP16_TO_FP
The FP16_TO_FP node only uses the bottom 16 bits of its input, so the
following pattern can be optimised by removing the AND:

  (FP16_TO_FP (AND op, 0xffff)) -> (FP16_TO_FP op)

This is a common pattern for ARM targets when functions have __fp16
arguments, as they are passed as floats (so that they get passed in the
correct registers), but then bitcast and truncated to ignore the top 16
bits.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245832 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 09:47:45 +00:00
Scott Douglass
3ad50284cb [ARM] Use AEABI helpers for i64 div and rem
Differential Revision: http://reviews.llvm.org/D12232

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245830 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 09:17:18 +00:00
Scott Douglass
9b11d5f703 [ARM] Refactor LowerDivRem before adding LowerREM (nfc)
Differential Revision: http://reviews.llvm.org/D12230

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245829 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-24 09:17:11 +00:00