oota-llvm.git
10 years agoAVX-512: PMIN/PMAX intrinsics and patterns
Elena Demikhovsky [Sun, 27 Oct 2013 08:18:37 +0000 (08:18 +0000)]
AVX-512: PMIN/PMAX intrinsics and patterns
Patch by Cameron McInally <cameron.mcinally@nyu.edu>

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

10 years agoA small grammar-os fixed.
Bill Wendling [Sun, 27 Oct 2013 05:09:12 +0000 (05:09 +0000)]
A small grammar-os fixed.

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

10 years agoUpdate to current output.
Bill Wendling [Sun, 27 Oct 2013 04:50:34 +0000 (04:50 +0000)]
Update to current output.
PR14039

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

10 years agoFix Sphinx warning.
Bill Wendling [Sun, 27 Oct 2013 04:25:02 +0000 (04:25 +0000)]
Fix Sphinx warning.

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

10 years agoUpdate to specify that both metadata and label types aren't proper return types.
Bill Wendling [Sun, 27 Oct 2013 04:19:29 +0000 (04:19 +0000)]
Update to specify that both metadata and label types aren't proper return types.

PR15447

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

10 years agoUpdate the Python version. And Perl isn't used anymore.
Bill Wendling [Sun, 27 Oct 2013 04:02:21 +0000 (04:02 +0000)]
Update the Python version. And Perl isn't used anymore.
PR17608

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

10 years agoUpdate link.
Bill Wendling [Sun, 27 Oct 2013 03:57:10 +0000 (03:57 +0000)]
Update link.
PR17608

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

10 years agoRevert r193251 : Use address-taken to disambiguate global variable and indirect memops.
Shuxin Yang [Sun, 27 Oct 2013 03:08:44 +0000 (03:08 +0000)]
Revert r193251 : Use address-taken to disambiguate global variable and indirect memops.

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

10 years agolli/RemoteMemoryManager.cpp: Resurrect __main stuff removed in r192504 to unbreak...
NAKAMURA Takumi [Sat, 26 Oct 2013 13:52:31 +0000 (13:52 +0000)]
lli/RemoteMemoryManager.cpp: Resurrect __main stuff removed in r192504 to unbreak mingw32.

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

10 years agoself.path may be empty or otherwise miss the normal system directories,
Joerg Sonnenberger [Sat, 26 Oct 2013 13:25:45 +0000 (13:25 +0000)]
self.path may be empty or otherwise miss the normal system directories,
so try PATH next. Assume it is sane enough to cover the usual system
bash locations too, but the old list is not good enough for NetBSD.

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

10 years agolit: Issue a note when multiprocessing fails to load
Alp Toker [Sat, 26 Oct 2013 09:29:58 +0000 (09:29 +0000)]
lit: Issue a note when multiprocessing fails to load

If multiprocessing was requested, detected as available and subsequently failed
to initialize it's worth letting the user know about it before falling back to
threads.

This condition can arise in certain OpenBSD / FreeBSD Python versions.

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

10 years agoFix a referenced before assignment in r193463
Alp Toker [Sat, 26 Oct 2013 08:46:05 +0000 (08:46 +0000)]
Fix a referenced before assignment in r193463

Some versions of Python on the builders seem strict about this.

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

10 years agolit: handle late multiprocessing errors gracefully
Alp Toker [Sat, 26 Oct 2013 08:22:44 +0000 (08:22 +0000)]
lit: handle late multiprocessing errors gracefully

This should be a better fix for lit multiprocessing failures, replacing the
OpenBSD and FreeBSD workarounds in r193413 and r193457.

Reference: http://bugs.python.org/issue3770

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

10 years agoQuick look-up for block in loop.
Wan Xiaofei [Sat, 26 Oct 2013 03:08:02 +0000 (03:08 +0000)]
Quick look-up for block in loop.

This patch implements quick look-up for block in loop by maintaining a hash set for blocks.
It improves the efficiency of loop analysis a lot, the biggest improvement could be 5-6%(458.sjeng).
Below are the compilation time for our benchmark in llc before & after the patch.

Benchmark llc - trunk llc - patched
401.bzip2 0.339081 100.00% 0.329657 102.86%
403.gcc 19.853966 100.00% 19.605466 101.27%
429.mcf 0.049823 100.00% 0.048451 102.83%
433.milc 0.514898 100.00% 0.510217 100.92%
444.namd 1.109328 100.00% 1.103481 100.53%
445.gobmk 4.988028 100.00% 4.929114 101.20%
456.hmmer 0.843871 100.00% 0.825865 102.18%
458.sjeng 0.754238 100.00% 0.714095 105.62%
464.h264ref 2.9668 100.00% 2.90612 102.09%
471.omnetpp 4.556533 100.00% 4.511886 100.99%
bitmnp01 0.038168 100.00% 0.0357 106.91%
idctrn01 0.037745 100.00% 0.037332 101.11%
libquake2 3.78689 100.00% 3.76209 100.66%
libquake_ 2.251525 100.00% 2.234104 100.78%
linpack 0.033159 100.00% 0.032788 101.13%
matrix01 0.045319 100.00% 0.043497 104.19%
nbench 0.333161 100.00% 0.329799 101.02%
tblook01 0.017863 100.00% 0.017666 101.12%
ttsprk01 0.054337 100.00% 0.053057 102.41%

Reviewer : Andrew Trick <atrick@apple.com>, Hal Finkel <hfinkel@anl.gov>
Approver : Andrew Trick <atrick@apple.com>
Test : Pass make check-all & llvm test-suite

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

10 years agollvm/test/lit.cfg: Tighten conditions to enable 'native'.
NAKAMURA Takumi [Sat, 26 Oct 2013 02:50:20 +0000 (02:50 +0000)]
llvm/test/lit.cfg: Tighten conditions to enable 'native'.

I saw the case that 'native' was mis-enabled when x86_64-pc-win32 on x86_64-linux.

FIXME: Consider cases that target can be executed even if host_triple were different from target_triple.

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

10 years agollvm/test/Other/close-stderr.ll: Remove "XFAIL:win32". It reverts r173509.
NAKAMURA Takumi [Sat, 26 Oct 2013 02:50:14 +0000 (02:50 +0000)]
llvm/test/Other/close-stderr.ll: Remove "XFAIL:win32". It reverts r173509.

"REQUIRES: shell" should cover if this failed.

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

10 years agoAttempt to fix the FreeBSD build, disable multiprocessing
Alp Toker [Sat, 26 Oct 2013 02:43:08 +0000 (02:43 +0000)]
Attempt to fix the FreeBSD build, disable multiprocessing

Speculative quick fix based on clang-X86_64-freebsd output:

  File "/usr/local/lib/python2.6/multiprocessing/synchronize.py", line 33, in <module>
    " function, see issue 3770.")
ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.

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

10 years agoFix SCEVExpander: don't try to expand quadratic recurrences outside a loop.
Andrew Trick [Fri, 25 Oct 2013 21:35:56 +0000 (21:35 +0000)]
Fix SCEVExpander: don't try to expand quadratic recurrences outside a loop.

Partial fix for PR17459: wrong code at -O3 on x86_64-linux-gnu
(affecting trunk and 3.3)

When SCEV expands a recurrence outside of a loop it attempts to scale
by the stride of the recurrence. Chained recurrences don't work that
way. We could compute binomial coefficients, but would hve to
guarantee that the chained AddRec's are in a perfectly reduced form.

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

10 years agoFix LSR: don't normalize quadratic recurrences.
Andrew Trick [Fri, 25 Oct 2013 21:35:52 +0000 (21:35 +0000)]
Fix LSR: don't normalize quadratic recurrences.

Partial fix for PR17459: wrong code at -O3 on x86_64-linux-gnu
(affecting trunk and 3.3)

ScalarEvolutionNormalization was attempting to normalize by adding and
subtracting strides. Chained recurrences don't work that way.

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

10 years agoHandle calls and invokes in GlobalStatus.
Rafael Espindola [Fri, 25 Oct 2013 21:29:52 +0000 (21:29 +0000)]
Handle calls and invokes in GlobalStatus.

This patch teaches GlobalStatus to analyze a call that uses the global value as
a callee, not as an argument.

With this change internalize call handle the common use of linkonce_odr
functions. This reduces the number of linkonce_odr functions in a LTO build of
clang (checked with the emit-llvm gold plugin option) from 1730 to 60.

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

10 years agoLoopVectorizer: Don't attempt to vectorize extractelement instructions
Hal Finkel [Fri, 25 Oct 2013 20:40:15 +0000 (20:40 +0000)]
LoopVectorizer: Don't attempt to vectorize extractelement instructions

The loop vectorizer does not currently understand how to vectorize
extractelement instructions. The existing check, which excluded all
vector-valued instructions, did not catch extractelement instructions because
it checked only the return value. As a result, vectorization would proceed,
producing illegal instructions like this:

  %58 = extractelement <2 x i32> %15, i32 0
  %59 = extractelement i32 %58, i32 0

where the second extractelement is illegal because its first operand is not a vector.

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

10 years agoDIEHash: Summary hashing of member functions
David Blaikie [Fri, 25 Oct 2013 20:04:25 +0000 (20:04 +0000)]
DIEHash: Summary hashing of member functions

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

10 years agoTry to fix the build on windows.
Rafael Espindola [Fri, 25 Oct 2013 19:47:55 +0000 (19:47 +0000)]
Try to fix the build on windows.

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

10 years agoChange MemoryBuffer::getFile to take a Twine.
Rafael Espindola [Fri, 25 Oct 2013 19:06:52 +0000 (19:06 +0000)]
Change MemoryBuffer::getFile to take a Twine.

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

10 years agoDIEHash: Summary hashing of nested types
David Blaikie [Fri, 25 Oct 2013 18:38:43 +0000 (18:38 +0000)]
DIEHash: Summary hashing of nested types

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

10 years ago[X86][AVX512] Add patterns that match the AVX512 floating point register vbroadcast...
Quentin Colombet [Fri, 25 Oct 2013 18:04:12 +0000 (18:04 +0000)]
[X86][AVX512] Add patterns that match the AVX512 floating point register vbroadcast intrinsics.

Patch by Cameron McInally <cameron.mcinally@nyu.edu>

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

10 years ago[X86][AVX512] Add patterns that match the AVX512 floating point vbroadcast intrinsics.
Quentin Colombet [Fri, 25 Oct 2013 17:47:18 +0000 (17:47 +0000)]
[X86][AVX512] Add patterns that match the AVX512 floating point vbroadcast intrinsics.

Patch by Cameron McInally <cameron.mcinally@nyu.edu>

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

10 years ago[bugpoint] Increase the default memory limit for subprocesses to 300MB.
Daniel Sanders [Fri, 25 Oct 2013 17:41:41 +0000 (17:41 +0000)]
[bugpoint] Increase the default memory limit for subprocesses to 300MB.

Summary:
Currently shared library builds (BUILD_SHARED_LIBS=ON in cmake) fail three
bugpoint tests (BugPoint/remove_arguments_test.ll,
BugPoint/crash-narrowfunctiontest.ll, and BugPoint/metadata.ll).

If I run the bugpoint commands that llvm-lit runs with without -silence-passes
I see errors such as this:
    opt: error while loading shared libraries: libLLVMSystemZInfo.so: failed to
    map segment from shared object: Cannot allocate memory

It seems that the increased size of the binaries in a shared library build is
causing the subprocess to exceed the 100MB memory limit. This patch therefore
increases the default limit to a level at which these tests pass.

Reviewers: dsanders

Reviewed By: dsanders

CC: llvm-commits, rafael
Differential Revision: http://llvm-reviews.chandlerc.com/D2013

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

10 years agollvm-c-test: Don't leak memory buffers.
Benjamin Kramer [Fri, 25 Oct 2013 15:58:58 +0000 (15:58 +0000)]
llvm-c-test: Don't leak memory buffers.

Detected by valgrind.

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

10 years agoTry to fix the openbsd bot.
Rafael Espindola [Fri, 25 Oct 2013 15:07:59 +0000 (15:07 +0000)]
Try to fix the openbsd bot.

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

10 years agoCall destroy from ~BasicCallGraph.
Rafael Espindola [Fri, 25 Oct 2013 15:01:34 +0000 (15:01 +0000)]
Call destroy from ~BasicCallGraph.

This fix a memory leak found by valgrind.

Calling it from the base class destructor would not destroy the BasicCallGraph
bits.

FIXME: BasicCallGraph is the only thing that inherits from CallGraph. Can
we merge the two?

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

10 years agoUse c comments.
Rafael Espindola [Fri, 25 Oct 2013 12:59:02 +0000 (12:59 +0000)]
Use c comments.

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

10 years agoARM: allow .thumb_func to be separated from symbol definition
Tim Northover [Fri, 25 Oct 2013 12:49:50 +0000 (12:49 +0000)]
ARM: allow .thumb_func to be separated from symbol definition

When assembling, a .thumb_func directive is supposed to be applicable to the
next symbol definition, even if there are intervening directives. We were
racing ahead to try and find it, and this commit should fix the issue.

Patch by Gabor Ballabas

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

10 years agoThe FIXME was indeed fixed in the linker, comment removed.
Yaron Keren [Fri, 25 Oct 2013 12:01:53 +0000 (12:01 +0000)]
The FIXME was indeed fixed in the linker, comment removed.

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

10 years agoARM: don't expand atomicrmw inline on Cortex-M0
Tim Northover [Fri, 25 Oct 2013 09:30:24 +0000 (09:30 +0000)]
ARM: don't expand atomicrmw inline on Cortex-M0

There's a barrier instruction so that should still be used, but most actual
atomic operations are going to need a platform decision on the correct
behaviour (either nop if single-threaded or OS-support otherwise).

rdar://problem/15287210

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

10 years agoLegalizeDAG: allow libcalls for max/min atomic operations
Tim Northover [Fri, 25 Oct 2013 09:30:20 +0000 (09:30 +0000)]
LegalizeDAG: allow libcalls for max/min atomic operations

ARM processors without ldrex/strex need to be able to make libcalls for all
atomic operations, including the newer min/max versions.

The alternative would probably be expanding these operations in terms of
cmpxchg (as x86 does always), but in the configurations where this matters
code-size tends to be paramount so the libcall is more desirable.

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

10 years agoARM: tweak test to pass on all platforms
Tim Northover [Fri, 25 Oct 2013 07:34:56 +0000 (07:34 +0000)]
ARM: tweak test to pass on all platforms

A TableGen indeterminacy means that the reason for the failure can
vary, and Windows gets the other option.

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

10 years agoOptimize concat_vectors(X, undef) -> scalar_to_vector(X).
Nadav Rotem [Fri, 25 Oct 2013 06:41:18 +0000 (06:41 +0000)]
Optimize concat_vectors(X, undef) -> scalar_to_vector(X).
This optimization is not SSE specific so I am moving it to DAGco.
The new scalar_to_vector dag node exposed a missing pattern in the AArch64 target that I needed to add.

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

10 years agoFix ODR violation.
Richard Smith [Fri, 25 Oct 2013 03:29:42 +0000 (03:29 +0000)]
Fix ODR violation.

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

10 years agollvm-cov dump to dbgs() instead of outs().
Yuchen Wu [Fri, 25 Oct 2013 02:22:24 +0000 (02:22 +0000)]
llvm-cov dump to dbgs() instead of outs().

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

10 years agoSupport for reading program counts in llvm-cov.
Yuchen Wu [Fri, 25 Oct 2013 02:22:21 +0000 (02:22 +0000)]
Support for reading program counts in llvm-cov.

llvm-cov will now be able to read program counts from the GCDA file and
output it in the same format as gcov. The program summary tag was
identified from gcov-io.h as "\0\0\0\a3".

There is currently a bug in GCOVProfiling.cpp which does not generate
the
run- or program-counting IR, so this change was tested manually by
modifying the GCDA file and comparing the gcov and llvm-cov outputs.

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

10 years agoARM: Test r193381 a bit more thoroughly.
Jim Grosbach [Thu, 24 Oct 2013 23:11:05 +0000 (23:11 +0000)]
ARM: Test r193381 a bit more thoroughly.

Make sure we're predicating right based on CPU even if the triple is 'wrong'.

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

10 years agoARM: Tweak usage of '*vfp' compiler_rt functions.
Jim Grosbach [Thu, 24 Oct 2013 23:07:11 +0000 (23:07 +0000)]
ARM: Tweak usage of '*vfp' compiler_rt functions.

Only use them if the subtarget has ARM mode, as these routines are implemented
as ARM code.

rdar://15302004

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

10 years agoMCStreamer: Reimplement the virtual EmitRawText as a protected member, EmitRawTextImp...
David Blaikie [Thu, 24 Oct 2013 22:43:10 +0000 (22:43 +0000)]
MCStreamer: Reimplement the virtual EmitRawText as a protected member, EmitRawTextImpl, to avoid string literal ambiguities

Also improve the implementation of EmitRawText(Twine) so it doesn't
bother using the SmallString buffer if the Twine is a simple StringRef
anyway.

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

10 years agolto.h: Use lto_bool_t instead of int to restore the ABI
Reid Kleckner [Thu, 24 Oct 2013 22:26:04 +0000 (22:26 +0000)]
lto.h: Use lto_bool_t instead of int to restore the ABI

This reverts commit r193255 and instead creates an lto_bool_t typedef
that points to bool, _Bool, or unsigned char depending on what is
available.  Only recent versions of MSVC provide a stdbool.h header.

Reviewers: rafael.espindola

Differential Revision: http://llvm-reviews.chandlerc.com/D2019

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

10 years agoDWARF emission: Remove unnecessary/redundant DIE reference code
David Blaikie [Thu, 24 Oct 2013 22:00:44 +0000 (22:00 +0000)]
DWARF emission: Remove unnecessary/redundant DIE reference code

The default case at the end of the switch handles this just fine.

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

10 years agoFix name of variable in comment.
Eric Christopher [Thu, 24 Oct 2013 21:54:58 +0000 (21:54 +0000)]
Fix name of variable in comment.

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

10 years agoGrammar.
Eric Christopher [Thu, 24 Oct 2013 21:20:23 +0000 (21:20 +0000)]
Grammar.

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

10 years agoUpdate misleading comment.
Eric Christopher [Thu, 24 Oct 2013 21:05:08 +0000 (21:05 +0000)]
Update misleading comment.

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

10 years agoFormatting and whitespace.
Eric Christopher [Thu, 24 Oct 2013 21:04:51 +0000 (21:04 +0000)]
Formatting and whitespace.

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

10 years agoDIEHash: Const correct and use references where non-null/non-rebound.
David Blaikie [Thu, 24 Oct 2013 18:29:03 +0000 (18:29 +0000)]
DIEHash: Const correct and use references where non-null/non-rebound.

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

10 years agoDIEHash: Do not use shallow type hashing for unnamed types
David Blaikie [Thu, 24 Oct 2013 17:53:58 +0000 (17:53 +0000)]
DIEHash: Do not use shallow type hashing for unnamed types

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

10 years agoDIEHash: Refactor ref attribute hashing into smaller functions
David Blaikie [Thu, 24 Oct 2013 17:51:43 +0000 (17:51 +0000)]
DIEHash: Refactor ref attribute hashing into smaller functions

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

10 years agoRemove unused debug-only member variable.
David Blaikie [Thu, 24 Oct 2013 17:10:13 +0000 (17:10 +0000)]
Remove unused debug-only member variable.

This may've been used at some point but the 'print' member function grew
an Indent parameter that entirely shadows this parameter.

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

10 years agoRemove class abstraction from ARM struct byval lowering
David Peixotto [Thu, 24 Oct 2013 16:39:36 +0000 (16:39 +0000)]
Remove class abstraction from ARM struct byval lowering

This commit changes the struct byval lowering for arm to use inline
checks for the subtarget instead of a class abstraction to represent
the differences. The class abstraction was judged to be too much
code for this task.

No intended functionality change.

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

10 years agoInliner: Handle readonly attribute per argument when adding memcpy
Tom Stellard [Thu, 24 Oct 2013 16:38:33 +0000 (16:38 +0000)]
Inliner: Handle readonly attribute per argument when adding memcpy

Patch by: Vincent Lejeune

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

10 years agoI had to move and remove
Renato Golin [Thu, 24 Oct 2013 16:31:43 +0000 (16:31 +0000)]
I had to move and remove

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

10 years agoARM: Mark double-precision instructions as such
Tim Northover [Thu, 24 Oct 2013 15:49:39 +0000 (15:49 +0000)]
ARM: Mark double-precision instructions as such

This prevents us from silently accepting invalid instructions on (for example)
Cortex-M4 with just single-precision VFP support.

No tests for the extra Pat Requires because they're essentially assertions: the
affected code should have been lowered to libcalls before ISel.

rdar://problem/15302004

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

10 years agoFix broken builds by moving test to x86 dir
Renato Golin [Thu, 24 Oct 2013 15:11:03 +0000 (15:11 +0000)]
Fix broken builds by moving test to x86 dir

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

10 years agoReverting my r193344 checkin due to build breakage.
John Thompson [Thu, 24 Oct 2013 14:52:56 +0000 (14:52 +0000)]
Reverting my r193344 checkin due to build breakage.

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

10 years agoMark vector loops as already vectorized
Renato Golin [Thu, 24 Oct 2013 14:50:51 +0000 (14:50 +0000)]
Mark vector loops as already vectorized

Make sure we mark all loops (scalar and vector) when vectorizing,
so that we don't try to vectorize them anymore. Also, set unroll
to 1, since this is what we check for on early exit.

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

10 years agoAdded std::string as a built-in type for mapping.
John Thompson [Thu, 24 Oct 2013 13:36:58 +0000 (13:36 +0000)]
Added std::string as a built-in type for mapping.

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

10 years agoARM: add a couple more NEON predicates.
Tim Northover [Thu, 24 Oct 2013 12:48:05 +0000 (12:48 +0000)]
ARM: add a couple more NEON predicates.

The fused multiply instructions were added in VFPv4 but are still NEON
instructions, in particular they shouldn't be available on a Cortex-M4 not
matter how floaty it is.

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

10 years agoARM: mark various aliases with their architecture requirements.
Tim Northover [Thu, 24 Oct 2013 12:22:58 +0000 (12:22 +0000)]
ARM: mark various aliases with their architecture requirements.

If an alias inherits directly from InstAlias then it doesn't get any default
"Requires" values, so llvm-mc will allow it even on architectures that don't
support the underlying instruction.

This tidies up the obvious VFP and NEON cases I found.

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

10 years agoAdded tests for microMIPS relocations 1.
Zoran Jovanovic [Thu, 24 Oct 2013 10:55:00 +0000 (10:55 +0000)]
Added tests for microMIPS relocations 1.

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

10 years agoARM: Use non-VFP softcalls on embedded Darwinish targets
Tim Northover [Thu, 24 Oct 2013 10:37:09 +0000 (10:37 +0000)]
ARM: Use non-VFP softcalls on embedded Darwinish targets

The compiler-rt functions __adddf3vfp and so on exist purely to allow Thumb1
code to make use of VFP instructions by switching back to ARM mode, they make
no sense for M-class processors which don't even have an ARM mode.

Given that justification, in practice this is a platform ABI decision so the
actual check is based on that rather than CPU features.

rdar://problem/15302004

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

10 years agoReplaced non-ASCII character.
Yaron Keren [Thu, 24 Oct 2013 10:04:47 +0000 (10:04 +0000)]
Replaced non-ASCII character.

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

10 years agoRevert part of r193291, restoring the deletion of loaded objects.
Chandler Carruth [Thu, 24 Oct 2013 09:52:56 +0000 (09:52 +0000)]
Revert part of r193291, restoring the deletion of loaded objects.
Without this, customers of the MCJIT were leaking memory like crazy.

It's not really clear what the *right* memory management is here, so I'm
not trying to add lots of tests or other logic, just trying to get us
back to a better baseline. I'll follow up on the original commit to
figure out the right path forward.

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

10 years agoARM: fix assert on unpredictable POP instruction.
Tim Northover [Thu, 24 Oct 2013 09:37:18 +0000 (09:37 +0000)]
ARM: fix assert on unpredictable POP instruction.

POP instructions are aliased to the ARM LDM variants but have different syntax.
This caused two problems: we tried to access a non-existent operand to annotate
the '!', and the error message didn't make much sense.

With some vigorous hand-waving in the error message both problems can be
fixed.

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

10 years agoAdded test for -elf configuration, to see that _alloca call is properly
Yaron Keren [Thu, 24 Oct 2013 09:36:08 +0000 (09:36 +0000)]
Added test for -elf configuration, to see that _alloca call is properly
generated. See:

http://llvm.org/viewvc/llvm-project?view=revision&revision=193289

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

10 years agoMake sure SP is always aligned on a 2 byte boundary
Job Noorman [Thu, 24 Oct 2013 09:32:31 +0000 (09:32 +0000)]
Make sure SP is always aligned on a 2 byte boundary

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

10 years agofix PR17635: false positive with packed structures
Nuno Lopes [Thu, 24 Oct 2013 09:17:24 +0000 (09:17 +0000)]
fix PR17635: false positive with packed structures
LLVM optimizers may widen accesses to packed structures that overflow the structure itself, but should be in bounds up to the alignment of the object

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

10 years ago[AArch64] Fix NZCV reg live-in bug in F128CSEL codegen.
Amara Emerson [Thu, 24 Oct 2013 08:28:24 +0000 (08:28 +0000)]
[AArch64] Fix NZCV reg live-in bug in F128CSEL codegen.

When generating the IfTrue basic block during the F128CSEL pseudo-instruction
handling, the NZCV live-in for the newly created BB wasn't being added. This
caused a fault during MI-sched/live range calculation when the predecessor
for the fall-through BB didn't have a live-in for phys-reg as expected.

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

10 years agoInclude missing Compiler.h for using LLVM_ENUM_INT_TYPE.
Zonr Chang [Thu, 24 Oct 2013 08:17:39 +0000 (08:17 +0000)]
Include missing Compiler.h for using LLVM_ENUM_INT_TYPE.

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

10 years agoAVX-512: added VCVTPH2PS, VCVTPS2PH with intrinsics
Elena Demikhovsky [Thu, 24 Oct 2013 07:16:35 +0000 (07:16 +0000)]
AVX-512: added VCVTPH2PS, VCVTPS2PH with intrinsics

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

10 years agoReplace sse41/sse42 with sse4.1/sse4.2 in test command lines to fix bots.
Craig Topper [Thu, 24 Oct 2013 07:00:06 +0000 (07:00 +0000)]
Replace sse41/sse42 with sse4.1/sse4.2 in test command lines to fix bots.

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

10 years agoAdd non-AVX tests for AES intrinsics.
Craig Topper [Thu, 24 Oct 2013 06:50:17 +0000 (06:50 +0000)]
Add non-AVX tests for AES intrinsics.

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

10 years agoAdd tests for SSE intrinsics in non-avx mode by copying from the AVX test cases....
Craig Topper [Thu, 24 Oct 2013 06:45:13 +0000 (06:45 +0000)]
Add tests for SSE intrinsics in non-avx mode by copying from the AVX test cases. Some of these may have been tested by other tests, but most weren't. Patch by Cameron McInally.

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

10 years agoFix a bug in LinearFunctionTestReplace that created invalid loop exit checks.
Juergen Ributzka [Thu, 24 Oct 2013 05:29:56 +0000 (05:29 +0000)]
Fix a bug in LinearFunctionTestReplace that created invalid loop exit checks.

Reviewed by Andy

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

10 years agoFixed llvm-cov to count edges instead of blocks.
Yuchen Wu [Thu, 24 Oct 2013 01:51:04 +0000 (01:51 +0000)]
Fixed llvm-cov to count edges instead of blocks.

This was a fundamental flaw in llvm-cov where it treated the values in
the GCDA files as block counts instead of edge counts. This created
incorrect line counts when branching was present. Instead, the edge
counts should be summed to obtain the correct block count.

The fix was tested using custom test files as well as single source
files from the test-suite directory. The behaviour can be verified by
reading the GCOV documentation that describes the GCDA spec ("ARC_COUNTS
gives the counter values for those arcs that are instrumented") and the
header description provided by GCOVProfiling.cpp ("instruments the code
that runs to records (sic) the edges between blocks that run and emit a
complementary "gcda" file on exit").

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

10 years agoClarify comments in genLoopLimit.
Andrew Trick [Thu, 24 Oct 2013 00:43:38 +0000 (00:43 +0000)]
Clarify comments in genLoopLimit.

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

10 years agoOptimizing MCJIT module state tracking
Andrew Kaylor [Thu, 24 Oct 2013 00:19:14 +0000 (00:19 +0000)]
Optimizing MCJIT module state tracking

Patch co-developed with Yaron Keren.

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

10 years ago(this is a corrected patch)
Yaron Keren [Wed, 23 Oct 2013 23:37:01 +0000 (23:37 +0000)]
(this is a corrected patch)

Calling _chkstk is required on ELF as well as COFF on Windows. Without
_chkstk, functions requiring large stack crash in initialization code.

Previous code tested for COFF format but not Mach-O and this patch modifies
the code to test for Windows OS (both Windows target and MingW target)
but not Mach-O object format: Looks like macho environment was used to
build some EFI code.

Credits to Andrew MacPherson.

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

10 years agoDebug Info: code clean up.
Manman Ren [Wed, 23 Oct 2013 23:05:28 +0000 (23:05 +0000)]
Debug Info: code clean up.

Since we never insert DIE for DITemplateTypeParameter to a map, there is no need
to call getDIE in getOrCreateTemplateTypeParameterDIE. It is also renamed to
constructTemplateTypeParameterDIE to match with other construct functions
in CompileUnit.

Same applies to getOrCreateTemplateValueParameterDIE.

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

10 years agoDebug Info: code clean up.
Manman Ren [Wed, 23 Oct 2013 23:00:44 +0000 (23:00 +0000)]
Debug Info: code clean up.

Rename createMemberDIE to constructMemberDIE to match other construct functions
in CompileUnit.

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

10 years agoDebug Info: code clean up.
Manman Ren [Wed, 23 Oct 2013 22:57:12 +0000 (22:57 +0000)]
Debug Info: code clean up.

Remove the unneeded return values from createMemberDIE, constructEnumTypeDIE,
getOrCreateTemplateTypeParameterDIE, and getOrCreateTemplateValueParameterDIE.

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

10 years agoDebug Info: code clean up.
Manman Ren [Wed, 23 Oct 2013 22:52:22 +0000 (22:52 +0000)]
Debug Info: code clean up.

Unifying the argument ordering of private construct functions in CompileUnit to
follow constructTypeDIE(DIE &, DIBasicType),
constructTypeDIE(DIE &, DIDerivedType), constructTypeDIE(DIE &, DICompositeType),
constructSubrangeDIE and constructArrayTypeDIE.

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

10 years agoActually switch the default to use multiprocessing
Rafael Espindola [Wed, 23 Oct 2013 22:32:53 +0000 (22:32 +0000)]
Actually switch the default to use multiprocessing

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

10 years ago[lit] Stop hacking the GIL check interval.
Daniel Dunbar [Wed, 23 Oct 2013 22:19:32 +0000 (22:19 +0000)]
[lit] Stop hacking the GIL check interval.

 - This was never a big win, and is irrelevant now that we commonly use
   multiprocessing based parallelism.

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

10 years ago[lit] Use multiprocessing based parallelism by default, on Unix.
Daniel Dunbar [Wed, 23 Oct 2013 22:19:07 +0000 (22:19 +0000)]
[lit] Use multiprocessing based parallelism by default, on Unix.

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

10 years agoRemove {} from one-line block.
Manman Ren [Wed, 23 Oct 2013 22:12:26 +0000 (22:12 +0000)]
Remove {} from one-line block.

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

10 years agoRevert "Calling _chkstk is required on ELF as well as COFF on Windows. Without _chkst...
Rafael Espindola [Wed, 23 Oct 2013 21:45:09 +0000 (21:45 +0000)]
Revert "Calling _chkstk is required on ELF as well as COFF on Windows. Without _chkstk functions requiring large stack crash in initialization code. Previous code tested for COFF format but not Mach-O and this patch modifies the code to test for Windows."

This reverts commit r193263.

It is causing CodeGen/X86/mingw-alloca.ll to fail.

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

10 years agoFixed doxygen comment to match Module.cpp
Yuchen Wu [Wed, 23 Oct 2013 21:25:44 +0000 (21:25 +0000)]
Fixed doxygen comment to match Module.cpp

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

10 years agoReduce casting and use a fully covered switch.
Rafael Espindola [Wed, 23 Oct 2013 21:24:34 +0000 (21:24 +0000)]
Reduce casting and use a fully covered switch.

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

10 years agoX86: Custom lower sext v16i8 to v16i16, and the corresponding truncate.
Benjamin Kramer [Wed, 23 Oct 2013 21:06:07 +0000 (21:06 +0000)]
X86: Custom lower sext v16i8 to v16i16, and the corresponding truncate.

Also update the cost model.

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

10 years agoFixed comment typo in GCOVProfiling.cpp
Yuchen Wu [Wed, 23 Oct 2013 20:35:00 +0000 (20:35 +0000)]
Fixed comment typo in GCOVProfiling.cpp

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

10 years agoUse a map instead of vector to store line counts.
Yuchen Wu [Wed, 23 Oct 2013 19:45:03 +0000 (19:45 +0000)]
Use a map instead of vector to store line counts.

There are a few motivations for this:
- Using a map allows for checking if line is in map. This differentiates
  unexecutable lines (such as comments) from unexecuted logical lines of
  code. "#####" is now outputted in this case, in line with gcov.
- Source files are no longer read in twice: once when storing the line
  counts, and once when outputting the data.
- Greatly simplifies the function FileInfo::addLineCount().

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

10 years agoCalling _chkstk is required on ELF as well as COFF on Windows.
Yaron Keren [Wed, 23 Oct 2013 19:40:07 +0000 (19:40 +0000)]
Calling _chkstk is required on ELF as well as COFF on Windows.
Without _chkstk functions requiring large stack crash in
initialization code. Previous code tested for COFF format but
not Mach-O and this patch modifies the code to test for Windows.

Credits to Andrew MacPherson.

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

10 years agoX86: Custom lower zext v16i8 to v16i16.
Benjamin Kramer [Wed, 23 Oct 2013 19:19:04 +0000 (19:19 +0000)]
X86: Custom lower zext v16i8 to v16i16.

On sandy bridge (PR17654) we now get
vpxor %xmm1, %xmm1, %xmm1
vpunpckhbw %xmm1, %xmm0, %xmm2
vpunpcklbw %xmm1, %xmm0, %xmm0
vinsertf128 $1, %xmm2, %ymm0, %ymm0

On haswell it's a simple
vpmovzxbw %xmm0, %ymm0

There is a maze of duplicated and dead transforms and patterns in this
area. Remove the dead custom lowering of zext v8i16 to v8i32, that's
already handled by LowerAVXExtend.

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

10 years agoFix PR17631
Michael Liao [Wed, 23 Oct 2013 18:32:43 +0000 (18:32 +0000)]
Fix PR17631

- Skip instructions added in prolog. For specific targets, prolog may
  insert helper function calls (e.g. _chkstk will be called when
  there're more than 4K bytes allocated on stack). However, these
  helpers don't use/def YMM/XMM registers.

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