Commit Graph

100046 Commits

Author SHA1 Message Date
Craig Topper
49d687d58f Get rid of a vector copy by just making a pointer out of the reference returned by getInstructionsByEnumValue instead of assigning it to a new vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200828 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-05 07:56:49 +00:00
Craig Topper
725d7946c7 Fix a vector that was passed by value instead of reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200827 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-05 07:27:49 +00:00
Kai Nacke
0b2d8ed86d ARM: Enable use of relocation type tlsldo in debug info for tls data.
This fixes PR18554.

Reviewers: Renato Golin, Keith Walker


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200826 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-05 07:23:09 +00:00
Craig Topper
7583b60306 Fix a doxygen comment referencing the wrong method name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200825 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-05 07:21:07 +00:00
Craig Topper
0e8eceffbf Move matching for x86 BMI BLSI/BLSMSK/BLSR instructions to isel patterns instead of DAG combine. This weakens the ability to fold loads with them because we aren't able to match patterns that load the same thing twice. But maybe we should fix that if we care. The peephole optimizer will be able to fold some loads in its absense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200824 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-05 07:09:40 +00:00
Elena Demikhovsky
002683abc7 AVX-512: Added intrinsic for cvtph2ps.
Added VPTESTNM instruction.
Added a pattern to vselect (lit tests will follow).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200823 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-05 07:05:03 +00:00
Craig Topper
3211c86b96 Add CheckChildInteger to ISelMatcher operations. Removes nearly 2000 bytes from X86 matcher table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200821 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-05 05:44:28 +00:00
Rafael Espindola
deb0ab53b5 Use the information provided by getFlags to unify some code in llvm-nm.
It is not clear how much we should try to expose in getFlags. For example,
should there be a SF_Object and a SF_Text?

But for information that is already being exposed, we may as well use it in
llvm-nm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200820 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-05 05:19:19 +00:00
Todd Fiala
9cd9208565 Fix configure to find arc4random via header files.
ISSUE:

On Ubuntu 12.04 LTS, arc4random is provided by libbsd.so, which is a
transitive dependency of libedit. If a system had libedit on it that
was implemented in terms of libbsd.so, then the arc4random test,
previously implemented as a linker test, would succeed with -ledit.
However, on Ubuntu this would also require a #include <bsd/stdlib.h>.
This caused a build breakage on configure-based Ubuntu 12.04 with
libedit installed.

FIX:

This fix changes configure to test for arc4random by searching for it
in the standard header files. On Ubuntu 12.04, this test now properly
fails to find arc4random as it is not defined in the default header
locations. It also tweaks the #define names to match the output of the
header check command, which is slightly different than the linker
function check #defines.

I tested the following scenarios:

(1) Ubuntu 12.04 without the libedit package [did not find arc4random,
as expected]

(2) Ubuntu 12.04 with libedit package [properly did not find
arc4random, as expected]

(3) Ubuntu 12.04 with most recent libedit, custom built, and not
dependent on libbsd.so [properly did not find arc4random, as
expected].

(4) FreeBSD 10.0B1 [properly found arc4random, as expected]


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200819 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-05 05:04:36 +00:00
Rafael Espindola
9e849c7312 Add a test for printing absolute symbols in ELF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200818 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-05 04:36:47 +00:00
Jordan Rose
ab70fcff6b [CMake] Deliberately get all LLVM library dependencies for standalone builds.
CMake won't expand the dependency graph for us if the dependencies are in
another project, which leads to link errors in the standalone build.
This is a refinement of r200765.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200812 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-05 00:02:42 +00:00
Jordan Rose
1b7969eee2 [CMake] Move -stdlib=libc++ handling into its own file.
r200744 moved this into cmake/config-ix.cmake, so that it would happen very
early in the build process. However, standalone builds of Clang and other
external projects never include this file (which is correct).

Now, -stdlib=libc++ and the LLVM_COMPILER_IS_GCC_COMPATIBLE option are
both set in a new include file, HandleLLVMStdlib, which is included by
both config-ix.cmake and HandleLLVMOptions.cmake. This preserves existing
behavior for projects relying on HandleLLVMOptions and still does the
right thing for builds of LLVM itself.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200811 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-05 00:02:37 +00:00
Rafael Espindola
7e369ff2e5 Small fix for llvm-nm handling of weak symbols on ELF (print 'v').
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200808 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 23:53:15 +00:00
Manman Ren
524f08d603 Update testing case for r200806.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200807 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 23:53:12 +00:00
Manman Ren
58631c71e8 Fix wording of warning message about invalid debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200806 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 23:49:02 +00:00
Rafael Espindola
9b06b0fd55 Add a test for common symbols in coff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200803 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 23:18:52 +00:00
Chandler Carruth
51ca0040e6 Silence a warning:
In file included from ../unittests/Support/ProcessTest.cpp:11:
../utils/unittest/googletest/include/gtest/gtest.h:1448:28: warning: comparison of integers of different signs: 'const unsigned int' and 'const int' [-Wsign-compare]
GTEST_IMPL_CMP_HELPER_(NE, !=);
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
../utils/unittest/googletest/include/gtest/gtest.h:1433:12: note: expanded from macro 'GTEST_IMPL_CMP_HELPER_'
  if (val1 op val2) {\
           ^
../unittests/Support/ProcessTest.cpp:46:3: note: in instantiation of function template specialization 'testing::internal::CmpHelperNE<unsigned int, int>' requested here
  EXPECT_NE((r1 | r2), 0);
  ^

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200801 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 22:53:45 +00:00
Rafael Espindola
19a4033c68 Remove unused SF_ThreadLocal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200800 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 22:50:47 +00:00
Justin Bogner
d1cf804de3 llvm-cov: Fix include order in GCOV.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200796 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 21:03:17 +00:00
Benjamin Kramer
fb0ad6bd15 SimplifyLibCalls: Push TLI through the exp2->ldexp transform.
For the odd case of platforms with exp2 available but not ldexp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200795 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 20:27:23 +00:00
Peter Collingbourne
767a3dca4c Avoid using EL_GETFP.
This should fix the build against old versions of libedit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200794 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 20:04:46 +00:00
Lang Hames
051faa2cfa [X86] Only 213 FMA3 variants should be marked commutable.
Commuting the 231 and 132 variants would swap addends and
multiplicands/multipliers, which isn't valid.

I'm still trying to reduce a decent test case for this.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200792 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 19:42:47 +00:00
Duncan P. N. Exon Smith
483727da48 cleanup: scc_iterator consumers should use isAtEnd
No functional change.  Updated loops from:

    for (I = scc_begin(), E = scc_end(); I != E; ++I)

to:

    for (I = scc_begin(); !I.isAtEnd(); ++I)

for teh win.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200789 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 19:19:07 +00:00
Petar Jovanovic
7f15e90281 [mips] Implement %hi(sym1 - sym2) and %lo(sym1 - sym2) expressions
Patch implements %hi(sym1 - sym2) and %lo(sym1 - sym2) expressions for MIPS
by creating target expression class MipsMCExpr.

Patch by Sasa Stankovic.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200783 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 18:41:57 +00:00
Rafael Espindola
5e47632b8f Every target uses .align. Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200782 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 18:39:51 +00:00
Rafael Espindola
506eb6df35 Use the default values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200781 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 18:34:04 +00:00
David Peixotto
b92cca2228 Fix PR18345: ldr= pseudo instruction produces incorrect code when using in inline assembly
This patch fixes the ldr-pseudo implementation to work when used in
inline assembly.  The fix is to move arm assembler constant pools
from the ARMAsmParser class to the ARMTargetStreamer class.

Previously we kept the assembler generated constant pools in the
ARMAsmParser object. This does not work for inline assembly because
a new parser object is created for each blob of inline assembly.
This patch moves the constant pools to the ARMTargetStreamer class
so that the constant pool will remain alive for the entire code
generation process.

An ARMTargetStreamer class is now required for the arm backend.
There was no existing implementation for MachO, only Asm and ELF.
Instead of creating an empty MachO subclass, we decided to make the
ARMTargetStreamer a non-abstract class and provide default
(llvm_unreachable) implementations for the non constant-pool related
methods.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200777 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 17:22:40 +00:00
Tom Stellard
7d9ed1cac5 R600/SI: Expand i1 BR_CC
This fixes a crashes in the OpenCV test suite and also the scrypt
kernel in bfgminer.

I was unable to come up with a reduced test case for this.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200776 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 17:18:43 +00:00
Tom Stellard
0c7a6b6477 R600/SI: Don't assume copies will be coalesced in SIFixSGPRCopies
There is no lit test for this, because it would be too big and
complicated, but it does fix a crash in the Arithm/Absdiff.* OpenCV test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200775 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 17:18:42 +00:00
Tom Stellard
83918a2ad2 R600/SI: Custom lower i64 ISD::SELECT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200774 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 17:18:40 +00:00
Tom Stellard
4ee42eaec9 R600: Enable vector fpow.
The OpenCL specs say: "The vector versions of the math functions operate
component-wise. The description is per-component."

Patch by: Jan Vesely

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200773 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 17:18:37 +00:00
Tom Stellard
efb6bb6863 HowToReleaseLLVM: Add information about dot releases
Based on the following discussion:
http://llvm.1065342.n5.nabble.com/LLVM-3-4-stable-releases-td65005.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200772 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 17:18:20 +00:00
Tim Northover
8f0354c973 OS X: the correct function is __sincospif_stret, not __sincospi_stretf
rdar://problem/13729466

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200771 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 16:28:20 +00:00
Tim Northover
f9ced85e49 ARM & AArch64: merge NEON absolute compare intrinsics
There was an extremely confusing proliferation of LLVM intrinsics to implement
the vacge & vacgt instructions. This combines them all into two polymorphic
intrinsics, shared across both backends.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200768 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 14:55:42 +00:00
Aaron Ballman
8753ba91d2 Implemented support for Process::GetRandomNumber on Windows.
Patch thanks to Stephan Tolksdorf!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200767 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 14:49:21 +00:00
NAKAMURA Takumi
055e70063b [CMake] Get rid of llvm_config() to expand dependencies.
CMake's target_link_libraries() will manage dependencies.

Configuration time may be reduced by a few seconds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200765 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 14:42:14 +00:00
NAKAMURA Takumi
c4c93c1493 [CMake] LLVM-Config.cmake: Split explicit_map_components_to_libraries and introduce llvm_map_components_to_libnames and llvm_expand_dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200764 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 14:42:04 +00:00
NAKAMURA Takumi
82adfbd9f9 [CMake] add_llvm_loadable_module: Fixup r200762, I mis-eliminated wrong line. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200763 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 13:40:31 +00:00
NAKAMURA Takumi
455bf8d5bd Revert r122395, "Fixes file extension for loadable modules on OS X."
In trunk, every users assume add_llvm_loadable_module as "loadable module" and no one sets neither SHARED, ... nor also MODULE!
Unfortunately, all loadable modules were linked as not "MODULE" but "SHARED".

If this change caused any regressions, I wish guys to fix it properly. ;)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200762 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 13:33:13 +00:00
Dmitri Gribenko
07ce07daa0 Add a note to documentation that Clang + libstdc++ 4.7.2 can not be used to build LLD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200758 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 12:02:13 +00:00
Justin Bogner
01c0550584 llvm-cov: Implement the preserve-paths flag
Until now, when a path in a gcno file included a directory, we would
emit our .gcov file in that directory, whereas gcov always emits the
file in the current directory. In doing so, this implements gcov's
strange name-mangling -p flag, which is needed to avoid clobbering
files when two with the same name exist in different directories.

The path mangling is a bit ugly and only handles unix-like paths, but
it's simple, and it doesn't make any guesses as to how it should
behave outside of what gcov documents. If we decide this should be
cross platform later, we can consider the compatibility implications
then.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200754 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 10:45:02 +00:00
Tim Northover
284c931330 ARM: fix fast-isel assertion failure
Missing braces on if meant we inserted both ARM and Thumb load for a litpool
entry. This didn't end well.

rdar://problem/15959157

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200752 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 10:38:46 +00:00
Alexey Samsonov
c55ee815d4 [CMake] Revert r200695 and fix the problem with missing -fno-function-sections in a different way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200745 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 08:15:46 +00:00
Alexey Samsonov
caeb7f94c7 [CMake] Add -stdlib=libc++ to host Clang build flags before performing any header search
If LLVM_ENABLE_LIBCXX is specified, we should append -stdlib=libc++ to build
flags as early as possible, in particular, before we check for header presence
(as -stdlib=libc++ modifies header lookup rules). Otherwise we can find a header
at configure time (w/o -stdlib=libc++) but fail to find it at build time
(with -stdlib=libc++). See PR18569 for more details.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200744 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 07:55:18 +00:00
Michel Danzer
de2e0bc366 R600/SI: Fix fneg for 0.0
V_ADD_F32 with source modifier does not produce -0.0 for this. Just
manipulate the sign bit directly instead.

Also add a pattern for (fneg (fabs ...)).

Fixes a bunch of bit encoding piglit tests with radeonsi.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200743 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 07:12:38 +00:00
Justin Bogner
e2d1c6c19d llvm-cov: Implement the object-directory flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200741 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 06:41:43 +00:00
Justin Bogner
9433c770f7 llvm-cov: Ignore missing .gcda files
When gcov is run without gcda data, it acts as if the counts are all
zero and labels the file as - to indicate that there was no data. We
should do the same.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200740 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 06:41:39 +00:00
Justin Bogner
f7d0d0798e llvm-cov: Document the llvm-cov tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200739 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 06:41:33 +00:00
NAKAMURA Takumi
1a3b25343f RegAllocGreedy.cpp: Use more simple value as Hysteresis, to suppress -mfpmath-dependent behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200738 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 06:29:38 +00:00
Kai Nacke
6d0903f4a0 Revert: ARM: Enable use of relocation type tlsldo in debug info for tls data.
There seems to be a new problem with the debug info in the test case.
I'll have to investigate this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200737 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 06:07:00 +00:00