oota-llvm.git
10 years agoAArch64/ARM64: make NEON vector list parsing a bit more robust
Tim Northover [Tue, 6 May 2014 12:50:51 +0000 (12:50 +0000)]
AArch64/ARM64: make NEON vector list parsing a bit more robust

It doesn't change the results, but it seems silly not to diagnose obvious
problems early on.

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

10 years agoAArch64/ARM64: add more specific diagnostic for floating imm 0.0.
Tim Northover [Tue, 6 May 2014 12:50:47 +0000 (12:50 +0000)]
AArch64/ARM64: add more specific diagnostic for floating imm 0.0.

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

10 years agoAArch64/ARM64: add more specific diagnostic for invalid vector lanes
Tim Northover [Tue, 6 May 2014 12:50:44 +0000 (12:50 +0000)]
AArch64/ARM64: add more specific diagnostic for invalid vector lanes

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

10 years agoAArch64/ARM64: produce more informative diagnostic assembling some immediates
Tim Northover [Tue, 6 May 2014 11:18:53 +0000 (11:18 +0000)]
AArch64/ARM64: produce more informative diagnostic assembling some immediates

No tests here, they'll be added when the entire neon-diagnostics.s test from
AArch64 is enabled.

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

10 years agoARM: For thumb fixups store halfwords high first and low second
Christian Pirker [Tue, 6 May 2014 10:05:11 +0000 (10:05 +0000)]
ARM: For thumb fixups store halfwords high first and low second

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

10 years ago[ARM64] Enable alignment control option in front-end for ARM64.
Kevin Qin [Tue, 6 May 2014 09:48:52 +0000 (09:48 +0000)]
[ARM64] Enable alignment control option in front-end for ARM64.

This is the modification in llvm part.

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

10 years agoDisable -Wcomment when building with GCC.
Evgeniy Stepanov [Tue, 6 May 2014 09:46:06 +0000 (09:46 +0000)]
Disable -Wcomment when building with GCC.

GCC version of -Wcomment is not compatible with ascii art graph diagrams.

Reverts r207629.

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

10 years agoUpdate programmers manual to cover llvm::function_ref, and add a note to the
Richard Smith [Tue, 6 May 2014 07:45:39 +0000 (07:45 +0000)]
Update programmers manual to cover llvm::function_ref, and add a note to the
coding standard suggesting using it instead of the (unavailable) std::function.

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

10 years agoUse X86 memory operand enums instead of hardcoding.
Craig Topper [Tue, 6 May 2014 07:04:32 +0000 (07:04 +0000)]
Use X86 memory operand enums instead of hardcoding.

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

10 years agoFix some obvious Doxygen comment bugs.
Owen Anderson [Tue, 6 May 2014 05:05:59 +0000 (05:05 +0000)]
Fix some obvious Doxygen comment bugs.

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

10 years agoUpdate comment from a recent commit.
David Blaikie [Tue, 6 May 2014 03:53:10 +0000 (03:53 +0000)]
Update comment from a recent commit.

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

10 years ago[Build] Add rule to generate fully-expanded .td file
Adam Nemet [Tue, 6 May 2014 03:49:45 +0000 (03:49 +0000)]
[Build] Add rule to generate fully-expanded .td file

I found it useful in the past and now again to have a version of the .td file
where all the records are expanded.  This adds a makefile rule to generate
this on demand.

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

10 years agoPR19598: Provide the ability to RAUW a declaration with itself, creating a non-tempor...
David Blaikie [Tue, 6 May 2014 03:41:57 +0000 (03:41 +0000)]
PR19598: Provide the ability to RAUW a declaration with itself, creating a non-temporary copy and using that to RAUW.

Also, provide the ability to create temporary and non-temporary
declarations, as not all declarations may be replaced by definitions
later on.

This provides the necessary infrastructure for Clang to fix PR19598,
leaking temporary MDNodes in Clang's debug info generation.

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

10 years agoRevert "Walk back commits for unused function parameters - they're still being"
Eric Christopher [Tue, 6 May 2014 02:37:26 +0000 (02:37 +0000)]
Revert "Walk back commits for unused function parameters - they're still being"

this reapplies 208012 and 208002.

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

10 years agoblockfreq: Move include to .cpp
Duncan P. N. Exon Smith [Tue, 6 May 2014 01:57:42 +0000 (01:57 +0000)]
blockfreq: Move include to .cpp

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

10 years agoRevert accidentally-committed files.
Richard Smith [Tue, 6 May 2014 01:46:26 +0000 (01:46 +0000)]
Revert accidentally-committed files.

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

10 years agoRe-commit r208025, reverted in r208030, with a fix for a conformance issue
Richard Smith [Tue, 6 May 2014 01:44:26 +0000 (01:44 +0000)]
Re-commit r208025, reverted in r208030, with a fix for a conformance issue
which GCC detects and Clang does not!

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

10 years agoRevert r208025, which made buildbots unhappy for unknown reasons.
Richard Smith [Tue, 6 May 2014 01:26:00 +0000 (01:26 +0000)]
Revert r208025, which made buildbots unhappy for unknown reasons.

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

10 years agoFix i128 div/mod on mingw64
Reid Kleckner [Tue, 6 May 2014 01:20:42 +0000 (01:20 +0000)]
Fix i128 div/mod on mingw64

The Win64 docs are very clear that anything larger than 8 bytes is
passed by reference, and GCC MinGW64 honors that for __modti3 and
friends.

Patch by Jameson Nash!

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

10 years ago[Support/MemoryBuffer] Rename IsVolatile -> IsVolatileSize and add a comment about...
Argyrios Kyrtzidis [Tue, 6 May 2014 01:03:52 +0000 (01:03 +0000)]
[Support/MemoryBuffer] Rename IsVolatile -> IsVolatileSize and add a comment about the use case for the new parameter.

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

10 years agoAdd llvm::function_ref (and a couple of uses of it), representing a type-erased refer...
Richard Smith [Tue, 6 May 2014 01:01:29 +0000 (01:01 +0000)]
Add llvm::function_ref (and a couple of uses of it), representing a type-erased reference to a callable object.

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

10 years agoInclude intrin.h before windows.h as a workaround for the x64 self-host
Reid Kleckner [Tue, 6 May 2014 00:57:33 +0000 (00:57 +0000)]
Include intrin.h before windows.h as a workaround for the x64 self-host

On x64, windows.h doesn't include intrin.h for intrinsics.  It just
declares them in the global namespace and uses them, expecting the
compiler to lower it as a builtin.  We basically need to do this in
clang, eventually.

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

10 years ago[Support/MemoryBuffer] Move the IsVolatile check inside shouldUseMmap() and make...
Argyrios Kyrtzidis [Tue, 6 May 2014 00:51:45 +0000 (00:51 +0000)]
[Support/MemoryBuffer] Move the IsVolatile check inside shouldUseMmap() and make sure to zero-initialize the rest
of the buffer if we unexpectedly reach end-of-file while reading.

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

10 years agoDetabify.
Nick Lewycky [Tue, 6 May 2014 00:46:20 +0000 (00:46 +0000)]
Detabify.

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

10 years agoImprove 'tail' call marking in TRE. A bootstrap of clang goes from 375k calls marked...
Nick Lewycky [Mon, 5 May 2014 23:59:03 +0000 (23:59 +0000)]
Improve 'tail' call marking in TRE. A bootstrap of clang goes from 375k calls marked tail in the IR to 470k, however this improvement does not carry into an improvement of the call/jmp ratio on x86. The most common pattern is a tail call + br to a block with nothing but a 'ret'.

The number of tail call to loop conversions remains the same (1618 by my count).

The new algorithm does a local scan over the use-def chains to identify local "alloca-derived" values, as well as points where the alloca could escape. Then, a visit over the CFG marks blocks as being before or after the allocas have escaped, and annotates the calls accordingly.

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

10 years agoWalk back commits for unused function parameters - they're still being
Eric Christopher [Mon, 5 May 2014 23:26:59 +0000 (23:26 +0000)]
Walk back commits for unused function parameters - they're still being
used via dragonegg for now.

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

10 years agoReapply: Add slp vectorization to LTO passes. The bug it exposed has been fixed by...
Yi Jiang [Mon, 5 May 2014 23:14:46 +0000 (23:14 +0000)]
Reapply: Add slp vectorization to LTO passes. The bug it exposed has been fixed by r207983. <radar://16641956>

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

10 years agoRemove a now unnecessary function since all calls have one version
Eric Christopher [Mon, 5 May 2014 22:36:07 +0000 (22:36 +0000)]
Remove a now unnecessary function since all calls have one version
and inline it into its caller.

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

10 years agoRemove a call to std::exit in a library. Make "Help" return
Eric Christopher [Mon, 5 May 2014 22:01:47 +0000 (22:01 +0000)]
Remove a call to std::exit in a library. Make "Help" return
a 0 as a default answer.

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

10 years ago[Support/MemoryBuffer] Introduce a boolean parameter (false by default) 'IsVolatile...
Argyrios Kyrtzidis [Mon, 5 May 2014 21:55:51 +0000 (21:55 +0000)]
[Support/MemoryBuffer] Introduce a boolean parameter (false by default) 'IsVolatile' for the open file functions.

This provides a hint that the file may be changing often so mmap is avoided.

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

10 years agoFix typo.
Eric Christopher [Mon, 5 May 2014 21:50:57 +0000 (21:50 +0000)]
Fix typo.

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

10 years agoR600: Expand i64 ISD:SUB
Tom Stellard [Mon, 5 May 2014 21:47:15 +0000 (21:47 +0000)]
R600: Expand i64 ISD:SUB

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

10 years agoRemove unused argument from AddFeature.
Eric Christopher [Mon, 5 May 2014 21:40:44 +0000 (21:40 +0000)]
Remove unused argument from AddFeature.

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

10 years agoFix typo (also tab character).
Eric Christopher [Mon, 5 May 2014 21:40:41 +0000 (21:40 +0000)]
Fix typo (also tab character).

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

10 years agoUse a range loop.
Rafael Espindola [Mon, 5 May 2014 20:06:41 +0000 (20:06 +0000)]
Use a range loop.

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

10 years agoRevert "Optimize shufflevector that copies an i64/f64 and zeros the rest."
Filipe Cabecinhas [Mon, 5 May 2014 19:40:36 +0000 (19:40 +0000)]
Revert "Optimize shufflevector that copies an i64/f64 and zeros the rest."

This reverts commit 207992. I misread the phab number on the LGTM.

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

10 years agoOptimize shufflevector that copies an i64/f64 and zeros the rest.
Filipe Cabecinhas [Mon, 5 May 2014 19:36:28 +0000 (19:36 +0000)]
Optimize shufflevector that copies an i64/f64 and zeros the rest.

Summary:
Also ran clang-format on the function. The code added is the last else
if block.

Reviewers: nadav, craig.topper

Subscribers: llvm-commits

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

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

10 years agoR600/SI: allow 5 more input SGPRs to a shader
Marek Olsak [Mon, 5 May 2014 19:30:54 +0000 (19:30 +0000)]
R600/SI: allow 5 more input SGPRs to a shader

Our OpenGL driver needs 22 SGPRs (16 user SGPRs + 6 streamout non-user SGPRs).

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207990 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMove test from r207969 to another folder and rename it.
Michael Zolotukhin [Mon, 5 May 2014 18:10:15 +0000 (18:10 +0000)]
Move test from r207969 to another folder and rename it.

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

10 years agoAlways set alignment of vectorized LD/ST in SLP-Vectorizer. <rdar://problem/16812145>
Yi Jiang [Mon, 5 May 2014 17:59:14 +0000 (17:59 +0000)]
Always set alignment of vectorized LD/ST in SLP-Vectorizer.   <rdar://problem/16812145>

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

10 years agoFix spelling.
Joerg Sonnenberger [Mon, 5 May 2014 17:58:46 +0000 (17:58 +0000)]
Fix spelling.

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

10 years agoBe a bit more specific in the release notes.
Rafael Espindola [Mon, 5 May 2014 17:53:29 +0000 (17:53 +0000)]
Be a bit more specific in the release notes.

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

10 years agoLTO: -internalize sets visibility to default
Duncan P. N. Exon Smith [Mon, 5 May 2014 17:40:44 +0000 (17:40 +0000)]
LTO: -internalize sets visibility to default

Visibility is meaningless when the linkage is local.  Change
`-internalize` to reset the visibility to `default`.

<rdar://problem/16141113>

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

10 years agoRemove the -disable-cfi option.
Rafael Espindola [Mon, 5 May 2014 17:33:26 +0000 (17:33 +0000)]
Remove the -disable-cfi option.

This also add a release note about it. If this stays I will cleanup MC
next week.

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

10 years ago[Test] Remove substitution for clang
Adam Nemet [Mon, 5 May 2014 17:17:27 +0000 (17:17 +0000)]
[Test] Remove substitution for clang

clang should not be used in the llvm tests.  The topic was discussed in this
thread:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140428/214905.html

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

10 years agoModify test to not use -disable-cfi.
Rafael Espindola [Mon, 5 May 2014 16:47:07 +0000 (16:47 +0000)]
Modify test to not use -disable-cfi.

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

10 years agoSelect bdver2 instead of bdver1 if TBM support is present on models < 0x10.
Kaelyn Takata [Mon, 5 May 2014 16:32:10 +0000 (16:32 +0000)]
Select bdver2 instead of bdver1 if TBM support is present on models < 0x10.

Tested that the right -target-cpu is set in the clang -cc1 command line
when running "clang -march=native -E -v - </dev/null" on both an FX-8150
and an FX-8350. Both are family 15h; the FX-8150 (Bulldozer processor)
reports a model number of 1, and the FX-8350 (Piledriver processor)
reports a model number of 2.

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

10 years agoMove test to the ARM64 directory.
Rafael Espindola [Mon, 5 May 2014 16:14:37 +0000 (16:14 +0000)]
Move test to the ARM64 directory.

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

10 years agoConvert a CodeGen test into a MC test.
Rafael Espindola [Mon, 5 May 2014 15:34:13 +0000 (15:34 +0000)]
Convert a CodeGen test into a MC test.

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

10 years agoFix test from r207966 and add a comment there.
Michael Zolotukhin [Mon, 5 May 2014 14:46:53 +0000 (14:46 +0000)]
Fix test from r207966 and add a comment there.

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

10 years ago[ASan/Win] Fix issue 305 -- don't instrument .CRT initializer/terminator callbacks
Timur Iskhodzhanov [Mon, 5 May 2014 14:28:38 +0000 (14:28 +0000)]
[ASan/Win] Fix issue 305 -- don't instrument .CRT initializer/terminator callbacks

See https://code.google.com/p/address-sanitizer/issues/detail?id=305
Reviewed at http://reviews.llvm.org/D3607

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

10 years agoTrivial simplification. No functionality change.
Rafael Espindola [Mon, 5 May 2014 14:18:16 +0000 (14:18 +0000)]
Trivial simplification. No functionality change.

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

10 years agoAdd regression test for r207692.
Michael Zolotukhin [Mon, 5 May 2014 14:05:25 +0000 (14:05 +0000)]
Add regression test for r207692.

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

10 years agoFix gcc -pedantic warning in lto.cpp.
Patrik Hagglund [Mon, 5 May 2014 12:24:08 +0000 (12:24 +0000)]
Fix gcc -pedantic warning in lto.cpp.

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

10 years agoAdd range access to ELFFile's sections collection.
Simon Atanasyan [Mon, 5 May 2014 06:48:34 +0000 (06:48 +0000)]
Add range access to ELFFile's sections collection.

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

10 years agoCodeGen: correct memset emittance for WoA
Saleem Abdulrasool [Sun, 4 May 2014 23:13:21 +0000 (23:13 +0000)]
CodeGen: correct memset emittance for WoA

Windows on ARM does not conform to AEABI.  However, memset would be emitted
using the AEABI signature, resulting in inverted parameters.  Handle this
special case appropriately.

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

10 years agoCodeGen: strengthen WoA AEABI avoidance tests
Saleem Abdulrasool [Sun, 4 May 2014 23:13:18 +0000 (23:13 +0000)]
CodeGen: strengthen WoA AEABI avoidance tests

Add additional test cases for WoA AEABI avoidance checking.

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

10 years agoMC: support FK_SecRel_4 for Windows on ARM
Saleem Abdulrasool [Sun, 4 May 2014 23:13:15 +0000 (23:13 +0000)]
MC: support FK_SecRel_4 for Windows on ARM

Add handling for FK_SecRel_4 (4-byte section relative relocations).  These are
used by the generation of DWARF debug information (the abbrevations use section
relative relocations).  This will also be used in generation of CodeView line
tables.

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

10 years agoLoopUnroll: If we're doing partial unrolling, use the PartialThreshold to limit unrol...
Benjamin Kramer [Sun, 4 May 2014 19:12:38 +0000 (19:12 +0000)]
LoopUnroll: If we're doing partial unrolling, use the PartialThreshold to limit unrolling.

Otherwise we use the same threshold as for complete unrolling, which is
way too high. This made us unroll any loop smaller than 150 instructions
by 8 times, but only if someone specified -march=core2 or better,
which happens to be the default on darwin.

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

10 years agoSLPVectorizer: Bring back the insertelement patch (r205965) with fixes
Arnold Schwaighofer [Sun, 4 May 2014 17:10:15 +0000 (17:10 +0000)]
SLPVectorizer: Bring back the insertelement patch (r205965) with fixes

When can't assume a vectorized tree is rooted in an instruction. The IRBuilder
could have constant folded it. When we rebuild the build_vector (the series of
InsertElement instructions) use the last original InsertElement instruction. The
vectorized tree root is guaranteed to be before it.

Also, we can't assume that the n-th InsertElement inserts the n-th element into
a vector.

This reverts r207746 which reverted the revert of the revert of r205018 or so.

Fixes the test case in PR19621.

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

10 years agoAVX-512: minor change in rndscale intrinsic
Elena Demikhovsky [Sun, 4 May 2014 13:35:37 +0000 (13:35 +0000)]
AVX-512: minor change in rndscale intrinsic

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

10 years ago[LCG] Add the last (and most complex) of the edge insertion mutation
Chandler Carruth [Sun, 4 May 2014 09:38:32 +0000 (09:38 +0000)]
[LCG] Add the last (and most complex) of the edge insertion mutation
operations on the call graph. This one forms a cycle, and while not as
complex as removing an internal edge from an SCC, it involves
a reasonable amount of work to find all of the nodes newly connected in
a cycle.

Also somewhat alarming is the worst case complexity here: it might have
to walk roughly the entire SCC inverse DAG to insert a single edge. This
is carefully documented in the API (I hope).

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

10 years ago[LCG] Reorder the tests to be a bit more logical: inter-SCC mutation
Chandler Carruth [Sun, 4 May 2014 09:38:23 +0000 (09:38 +0000)]
[LCG] Reorder the tests to be a bit more logical: inter-SCC mutation
before intra-SCC mutation, insertion before removal.

No functionality changed.

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

10 years agoX86: further range-loopify AsmPrinter
Saleem Abdulrasool [Sun, 4 May 2014 01:54:17 +0000 (01:54 +0000)]
X86: further range-loopify AsmPrinter

Use more range loops in the X86AsmPrinter.  NFC.

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

10 years agoX86: remove X86COFFMachineModuleInfo
Saleem Abdulrasool [Sun, 4 May 2014 01:54:12 +0000 (01:54 +0000)]
X86: remove X86COFFMachineModuleInfo

Remove dead code.  This is vestigial after r98384.

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

10 years agoX86: repair export compatibility with MinGW/cygwin
Saleem Abdulrasool [Sun, 4 May 2014 00:03:48 +0000 (00:03 +0000)]
X86: repair export compatibility with MinGW/cygwin

Both MinGW and cygwin (i686) construct export directives without the global
leader prefix.  This is mostly due to the fact that they use GNU ld which does
not correctly handle the export directive.  This apparently has been been broken
for a while.  However, this was recently reported as being broken by
mingwandroid and diorcety of the msys2 project.

Remove the global leader prefix if targeting MinGW or cygwin, otherwise, retain
the global leader prefix.  Add an explicit test for cygwin's behaviour of export
directives.

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

10 years agoX86: refactor export directive generation
Saleem Abdulrasool [Sun, 4 May 2014 00:03:41 +0000 (00:03 +0000)]
X86: refactor export directive generation

Create a helper function to generate the export directive.  This was previously
duplicated inline to handle export directives for variables and functions.  This
also enables the use of range-based iterators for the generation of the
directive rather than the traditional loops.  NFC.

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

10 years agoIR: Cleanup AttributeSet::get for AttrBuilder
David Majnemer [Sat, 3 May 2014 23:00:35 +0000 (23:00 +0000)]
IR: Cleanup AttributeSet::get for AttrBuilder

We don't modify the AttrBuilder in AttributeSet::get, make the reference
argument const.

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

10 years ago[TBAA] Fix handling of mixed TBAA (path-aware and non-path-aware TBAA).
Juergen Ributzka [Sat, 3 May 2014 22:32:52 +0000 (22:32 +0000)]
[TBAA] Fix handling of mixed TBAA (path-aware and non-path-aware TBAA).

This fix simply ensures that both metadata nodes are path-aware before
performing path-aware alias analysis.

This issue isn't normally triggered in LLVM, because we perform an autoupgrade
of the TBAA metadata to the new format when reading in LL or BC files. This
issue only appears when a client creates the IR manually and mixes old and new
TBAA metadata format.

This fixes <rdar://problem/16760860>.

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

10 years agoFix pr19645.
Rafael Espindola [Sat, 3 May 2014 19:57:04 +0000 (19:57 +0000)]
Fix pr19645.

The fix itself is fairly simple: move getAccessVariant to MCValue so that we
replace the old weak expression evaluation with the far more general
EvaluateAsRelocatable.

This then requires that EvaluateAsRelocatable stop when it finds a non
trivial reference kind. And that in turn requires the ELF writer to look
harder for weak references.

Last but not least, this found a case where we were being bug by bug
compatible with gas and accepting an invalid input. I reported pr19647
to track it.

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

10 years ago[ARM64] Correctly select ANDWri in FastISel.
Joey Gouly [Sat, 3 May 2014 17:27:06 +0000 (17:27 +0000)]
[ARM64] Correctly select ANDWri in FastISel.

http://reviews.llvm.org/D3598

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

10 years agoSLPVectorizer: Lazily allocate the map for block numbering.
Benjamin Kramer [Sat, 3 May 2014 15:50:37 +0000 (15:50 +0000)]
SLPVectorizer: Lazily allocate the map for block numbering.

There is no point in creating it if we're not going to vectorize
anything. Creating the map is expensive as it creates large values.
No functionality change.

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

10 years agoRename member variable to try to fix the bots.
Rafael Espindola [Sat, 3 May 2014 15:28:13 +0000 (15:28 +0000)]
Rename member variable to try to fix the bots.

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

10 years agoUpdate docs still mentioning LLVM_ENABLE_CXX11
Alp Toker [Sat, 3 May 2014 15:10:04 +0000 (15:10 +0000)]
Update docs still mentioning LLVM_ENABLE_CXX11

C++11 is now required.

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

10 years agoMove LTOModule and LTOCodeGenerator to the llvm namespace.
Rafael Espindola [Sat, 3 May 2014 14:59:52 +0000 (14:59 +0000)]
Move LTOModule and LTOCodeGenerator to the llvm namespace.

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

10 years agoStyle fix: don't duplicate the method names.
Rafael Espindola [Sat, 3 May 2014 14:46:47 +0000 (14:46 +0000)]
Style fix: don't duplicate the method names.

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

10 years agoStyle update: don't duplicate comments, they were getting out of sync.
Rafael Espindola [Sat, 3 May 2014 14:34:48 +0000 (14:34 +0000)]
Style update: don't duplicate comments, they were getting out of sync.

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

10 years agoUpdated Doxygen link for InstIterator.h.
Yaron Keren [Sat, 3 May 2014 12:06:13 +0000 (12:06 +0000)]
Updated Doxygen link for InstIterator.h.

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

10 years ago[ELFYAML] Group ELF header falgs to target specific blocks. Handle flags
Simon Atanasyan [Sat, 3 May 2014 11:39:50 +0000 (11:39 +0000)]
[ELFYAML] Group ELF header falgs to target specific blocks. Handle flags
which are corresponding to the current target read from the ELF file.

This fix cannot be tested until obj2yaml does not support ELF format.

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

10 years ago[ELFYAML] Add more SHT_xxx flags to the YAML section type mapping.
Simon Atanasyan [Sat, 3 May 2014 11:39:44 +0000 (11:39 +0000)]
[ELFYAML] Add more SHT_xxx flags to the YAML section type mapping.

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

10 years agoInstIterator.h lives in llvm/IR.
Yaron Keren [Sat, 3 May 2014 11:30:49 +0000 (11:30 +0000)]
InstIterator.h lives in llvm/IR.

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

10 years agoVectorize intrinsic math function calls in SLPVectorizer.
Karthik Bhat [Sat, 3 May 2014 09:59:54 +0000 (09:59 +0000)]
Vectorize intrinsic math function calls in SLPVectorizer.
This patch adds support to recognize and vectorize intrinsic math functions in SLPVectorizer.
Review: http://reviews.llvm.org/D3560 and http://reviews.llvm.org/D3559

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

10 years ago[LSR] Add llc testcase for r207271/r207569.
Adam Nemet [Fri, 2 May 2014 23:49:01 +0000 (23:49 +0000)]
[LSR] Add llc testcase for r207271/r207569.

See PR19608 for the details but to summarize it was easy to modify the .ll
file to get the desired def-use ordering.

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

10 years agoTry simplifying LexicalScopes ownership again.
David Blaikie [Fri, 2 May 2014 22:21:05 +0000 (22:21 +0000)]
Try simplifying LexicalScopes ownership again.

Committed initially in r207724-r207726 and reverted due to compiler-rt
crashes in r207732.

Instead, fix this harder with unordered_map and store the LexicalScopes
by value in the map. This did necessitate moving the definition of
LexicalScope above the definition of LexicalScopes.

Let's see how the buildbots/compilers tolerate unordered_map::emplace +
std::piecewise_construct + std::forward_as_tuple...

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

10 years ago[sanitizers] Propagate the sanitizer options through to the lit context.
Chandler Carruth [Fri, 2 May 2014 21:47:35 +0000 (21:47 +0000)]
[sanitizers] Propagate the sanitizer options through to the lit context.
This makes it *really* easy to debug leaks FYI:

ASAN_OPTIONS=detect_leaks=1 ./bin/llvm-lit -v <path to test>

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

10 years agoSatisfy GCC's urgent need for parentheses around ‘&&’ within ‘||’.
Benjamin Kramer [Fri, 2 May 2014 21:28:49 +0000 (21:28 +0000)]
Satisfy GCC's urgent need for parentheses around ‘&&’ within ‘||’.

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

10 years agoAliases are always definitions. Delete dead code.
Rafael Espindola [Fri, 2 May 2014 21:10:48 +0000 (21:10 +0000)]
Aliases are always definitions. Delete dead code.

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

10 years agoClean up constructor logic and member access for LoopVectorizeHints.
Eric Christopher [Fri, 2 May 2014 20:40:04 +0000 (20:40 +0000)]
Clean up constructor logic and member access for LoopVectorizeHints.

There are public functions that mutate various members as well as
another private member already, so make all the members private to
avoid the discontinuity and add accessors for the values. Should
be no functional change.

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

10 years agollvm-cov: Fix handling of line zero appearing in a line table
Justin Bogner [Fri, 2 May 2014 20:01:24 +0000 (20:01 +0000)]
llvm-cov: Fix handling of line zero appearing in a line table

Reading line tables in llvm-cov was pretty broken, but would happen to
work as long as no line in the table was 0. It's not clear to me
whether a line of zero *should* show up in these tables, but deciding
to read a string in the middle of the line table is certainly the
wrong thing to do if it does.

I've also added some comments, as trying to figure out what this block
of code was doing was fairly unpleasant.

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

10 years ago[tablegen] !strconcat accepts more than two arguments but this wasn't documented...
Daniel Sanders [Fri, 2 May 2014 19:25:52 +0000 (19:25 +0000)]
[tablegen] !strconcat accepts more than two arguments but this wasn't documented or tested.

Summary:
* Updated the documentation
* Added a test for >2 arguments
* Added a check for the lexical concatenation
* Made the existing test a bit stricter.

Reviewers: t.p.northover

Reviewed By: t.p.northover

Subscribers: t.p.northover, llvm-commits

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

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

10 years agoRemove dead declaration.
Rafael Espindola [Fri, 2 May 2014 18:37:07 +0000 (18:37 +0000)]
Remove dead declaration.

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

10 years agoTeach GlobalDCE how to remove empty global_ctor entries.
Nico Weber [Fri, 2 May 2014 18:35:25 +0000 (18:35 +0000)]
Teach GlobalDCE how to remove empty global_ctor entries.

This moves most of GlobalOpt's constructor optimization
code out of GlobalOpt into Transforms/Utils/CDtorUtils.{h,cpp}. The
public interface is a single function OptimizeGlobalCtorsList() that
takes a predicate returning which constructors to remove.

GlobalOpt calls this with a function that statically evaluates all
constructors, just like it did before. This part of the change is
behavior-preserving.

Also add a call to this from GlobalDCE with a filter that removes global
constructors that contain a "ret" instruction and nothing else – this
fixes PR19590.

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

10 years ago[GVN] Pass the phi-translated address of a load instead of the untranslated
Akira Hatanaka [Fri, 2 May 2014 17:59:17 +0000 (17:59 +0000)]
[GVN] Pass the phi-translated address of a load instead of the untranslated
address to AnalyzeLoadFromClobberingLoad. This fixes a bug in load-PRE where
PRE is applied to a load that is not partially redundant.

<rdar://problem/16638765>.

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

10 years agoMC: place .file records into the correct section
Saleem Abdulrasool [Fri, 2 May 2014 17:45:24 +0000 (17:45 +0000)]
MC: place .file records into the correct section

.file records are supposed to have a section identifier of 65534
(IMAGE_SCN_DEBUG) rather than 0.  This is spelt out clearly within the PE/COFF
specification.  Fix this minor oversight with the implementation for support for
.file records.

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

10 years agoDAGCombine: prevent formation of illegal ConstantFP nodes.
Tim Northover [Fri, 2 May 2014 17:25:02 +0000 (17:25 +0000)]
DAGCombine: prevent formation of illegal ConstantFP nodes.

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

10 years agoAdd a description for AMD's bdver4 (aka Excavator).
Benjamin Kramer [Fri, 2 May 2014 15:47:07 +0000 (15:47 +0000)]
Add a description for AMD's bdver4 (aka Excavator).

This is just bdver3 + AVX2 + BMI2.

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

10 years agoR600/SI: Add processor type for Mullins.
Tom Stellard [Fri, 2 May 2014 15:41:49 +0000 (15:41 +0000)]
R600/SI: Add processor type for Mullins.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Samuel Li <samuel.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207846 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Expand vector sin and cos.
Tom Stellard [Fri, 2 May 2014 15:41:47 +0000 (15:41 +0000)]
R600: Expand vector sin and cos.

v2: move code to AMDGPUISelLowering.cpp
    squash with tests (both EG and SI)

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207845 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Expand TruncStore i64 -> {i16,i8}
Tom Stellard [Fri, 2 May 2014 15:41:46 +0000 (15:41 +0000)]
R600: Expand TruncStore i64 -> {i16,i8}

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

10 years agoR600/SI: Only create one instruction when spilling/restoring register v3
Tom Stellard [Fri, 2 May 2014 15:41:42 +0000 (15:41 +0000)]
R600/SI: Only create one instruction when spilling/restoring register v3

The register spiller assumes that only one new instruction is created
when spilling and restoring registers, so we need to emit pseudo
instructions for vector register spills and lower them after
register allocation.

v2:
  - Fix calculation of lane index
  - Extend VGPR liveness to end of program.

v3:
  - Use SIMM16 field of S_NOP to specify multiple NOPs.

https://bugs.freedesktop.org/show_bug.cgi?id=75005

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