Commit Graph

166729 Commits

Author SHA1 Message Date
Petar Jovanovic a5da588b2f [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

llvm-svn: 200783
2014-02-04 18:41:57 +00:00
Rafael Espindola 7cbbd28c67 Every target uses .align. Simplify.
llvm-svn: 200782
2014-02-04 18:39:51 +00:00
Rafael Espindola 7b51496975 Use the default values.
llvm-svn: 200781
2014-02-04 18:34:04 +00:00
Dmitry Vyukov d7fcee8d8c tsan: add windows native build script
llvm-svn: 200780
2014-02-04 17:52:41 +00:00
Dmitry Vyukov a61c2b0bd5 tsan: fix windows build
llvm-svn: 200779
2014-02-04 17:29:44 +00:00
Dmitry Vyukov a538aac8ce tsan: fix windows build
llvm-svn: 200778
2014-02-04 17:27:29 +00:00
David Peixotto b9b7362cdc 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

llvm-svn: 200777
2014-02-04 17:22:40 +00:00
Tom Stellard aeb456438c 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

llvm-svn: 200776
2014-02-04 17:18:43 +00:00
Tom Stellard b8725d84d6 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.

llvm-svn: 200775
2014-02-04 17:18:42 +00:00
Tom Stellard 0ec134f3d6 R600/SI: Custom lower i64 ISD::SELECT
llvm-svn: 200774
2014-02-04 17:18:40 +00:00
Tom Stellard bfebd1fc7e 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>
llvm-svn: 200773
2014-02-04 17:18:37 +00:00
Tom Stellard 711ce3db3d HowToReleaseLLVM: Add information about dot releases
Based on the following discussion:
http://llvm.1065342.n5.nabble.com/LLVM-3-4-stable-releases-td65005.html

llvm-svn: 200772
2014-02-04 17:18:20 +00:00
Tim Northover 103e648d30 OS X: the correct function is __sincospif_stret, not __sincospi_stretf
rdar://problem/13729466

llvm-svn: 200771
2014-02-04 16:28:20 +00:00
Tim Northover 7ffb2c5523 ARM & AArch64: combine implementation of vcaXYZ intrinsics
Now that the back-end intrinsics are more regular, there's no need for the
special handling these got in the front-end, so they can be moved to
EmitCommonNeonBuiltinExpr.

llvm-svn: 200769
2014-02-04 14:55:52 +00:00
Tim Northover fdbdb4b6d5 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.

llvm-svn: 200768
2014-02-04 14:55:42 +00:00
Aaron Ballman 7844073402 Implemented support for Process::GetRandomNumber on Windows.
Patch thanks to Stephan Tolksdorf!

llvm-svn: 200767
2014-02-04 14:49:21 +00:00
Dmitry Vyukov 2da2cee706 tsan: update Go public interface
in preparation for https://codereview.appspot.com/55100044

llvm-svn: 200766
2014-02-04 14:45:54 +00:00
NAKAMURA Takumi 7b2528b741 [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.

llvm-svn: 200765
2014-02-04 14:42:14 +00:00
NAKAMURA Takumi 906dad8bb3 [CMake] LLVM-Config.cmake: Split explicit_map_components_to_libraries and introduce llvm_map_components_to_libnames and llvm_expand_dependencies.
llvm-svn: 200764
2014-02-04 14:42:04 +00:00
NAKAMURA Takumi 79aaf8de1a [CMake] add_llvm_loadable_module: Fixup r200762, I mis-eliminated wrong line. :(
llvm-svn: 200763
2014-02-04 13:40:31 +00:00
NAKAMURA Takumi a6c161abac 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. ;)

llvm-svn: 200762
2014-02-04 13:33:13 +00:00
Alexey Samsonov fafbcb6d4c [CMake] Fixup for r200753
llvm-svn: 200761
2014-02-04 13:24:13 +00:00
NAKAMURA Takumi da94d8a72e [CMake] add_clang_library(): Fix LLVM_PLUGIN_EXT in MODULE. It was broken since my r199902.
llvm-svn: 200760
2014-02-04 12:26:48 +00:00
NAKAMURA Takumi 75ab7f9b88 [CMake] add_clang_library(): Honor STATIC.
llvm-svn: 200759
2014-02-04 12:26:40 +00:00
Dmitri Gribenko 57150d3a22 Add a note to documentation that Clang + libstdc++ 4.7.2 can not be used to build LLD.
llvm-svn: 200758
2014-02-04 12:02:13 +00:00
Alexander Potapenko 4672bacaef [ASan] Get rid of asan_mac.h, which contents have been moved to sanitizer_mac.h
llvm-svn: 200757
2014-02-04 11:35:59 +00:00
Alexander Potapenko 844a3cf77e [ASan] Use replace_str=0 and replace_intrin=0 in printf-{2,4}.c to avoid triggering a buffer overflow in strlen and memcpy.
This change fixes printf-2.c and printf-4.c under OSX.

llvm-svn: 200756
2014-02-04 11:32:05 +00:00
Dmitry Vyukov 2e1634b69f tsan: fix darwin Go build
llvm-svn: 200755
2014-02-04 11:29:09 +00:00
Justin Bogner c6af350698 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.

llvm-svn: 200754
2014-02-04 10:45:02 +00:00
Justin Bogner ad560c4c11 CMake: Enable -Werror for the -fno-function-sections check
If the -fno-function-sections flag isn't recognized, the compiler
emits a warning. This isn't enough to cause the check to fail, so we
enable -Werror as well.

llvm-svn: 200753
2014-02-04 10:40:46 +00:00
Tim Northover e42fb07618 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

llvm-svn: 200752
2014-02-04 10:38:46 +00:00
Alexander Potapenko 40fcff653c [ASan] Fix printf-5.c on OSX: fix a compiler warning, avoid intercepting memcpy (which triggers the error report before printf does).
llvm-svn: 200751
2014-02-04 10:36:55 +00:00
Dmitry Vyukov 9244c48b29 tsan: update public Go interface
in preparation for https://codereview.appspot.com/55100044

llvm-svn: 200750
2014-02-04 10:35:23 +00:00
Alexander Potapenko 2e7dc60ee3 [ASan] Replace the call to "vname" with "WRAP(vname)" in FORMAT_INTERCEPTOR_IMPL
It's incorrect to call the function by its name in the interceptor, because that means WRAP(vname) on Linux and REAL(vname) on OSX.

This patch fixes asan/lit_tests/TestCases/printf-3.c on Mac.

llvm-svn: 200749
2014-02-04 09:35:09 +00:00
Kostya Serebryany b965a2fa32 [lsan] simplify use_tls_dynamic.cc test
llvm-svn: 200748
2014-02-04 09:07:16 +00:00
Dmitry Vyukov fd0affac37 tsan: add SANITIZER_INTERFACE_ATTRIBUTE to more callbacks
so that it's possible to override them from a dynamic library.

llvm-svn: 200747
2014-02-04 08:46:09 +00:00
Alexey Samsonov d23c79604e [CMake] Check that compiler supports -fno-function-sections flag
llvm-svn: 200746
2014-02-04 08:28:17 +00:00
Alexey Samsonov 482beff8ae [CMake] Revert r200695 and fix the problem with missing -fno-function-sections in a different way.
llvm-svn: 200745
2014-02-04 08:15:46 +00:00
Alexey Samsonov 34a466f8da [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.

llvm-svn: 200744
2014-02-04 07:55:18 +00:00
Michel Danzer 624b02aa67 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>
llvm-svn: 200743
2014-02-04 07:12:38 +00:00
Dmitry Vyukov 8aaa44c43d tsan: relax check for errno spoiling more
We do not detect errno spoiling for SIGTERM,
because some SIGTERM handlers do spoil errno but reraise SIGTERM,
tsan reports false positive in such case.
It's difficult to properly detect this situation (reraise),
because in async signal processing case (when handler is called directly
from rtl_generic_sighandler) we have not yet received the reraised
signal; and it looks too fragile to intercept all ways to reraise a signal.

llvm-svn: 200742
2014-02-04 07:10:45 +00:00
Justin Bogner f69557e670 llvm-cov: Implement the object-directory flag
llvm-svn: 200741
2014-02-04 06:41:43 +00:00
Justin Bogner 93d1edbb7d 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.

llvm-svn: 200740
2014-02-04 06:41:39 +00:00
Justin Bogner b5bff69ac6 llvm-cov: Document the llvm-cov tests
llvm-svn: 200739
2014-02-04 06:41:33 +00:00
NAKAMURA Takumi a71003ae10 RegAllocGreedy.cpp: Use more simple value as Hysteresis, to suppress -mfpmath-dependent behavior.
llvm-svn: 200738
2014-02-04 06:29:38 +00:00
Kai Nacke ab7ee461c2 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.

llvm-svn: 200737
2014-02-04 06:07:00 +00:00
Kai Nacke a56bb78021 Add strchr(p, 0) -> p + strlen(p) to SimplifyLibCalls
Add the missing transformation strchr(p, 0) -> p + strlen(p) to SimplifyLibCalls
and remove the ToDo comment.

Reviewer: Duncan P.N. Exan Smith
llvm-svn: 200736
2014-02-04 05:55:16 +00:00
Kai Nacke 5e8c30f192 ARM: Enable use of relocation type tlsldo in debug info for tls data.
This fixes PR18554.

Reviewers: Renato Golin, Keith Walker
llvm-svn: 200735
2014-02-04 05:43:09 +00:00
Kostya Serebryany f6e085cf89 [sanitizer] make __tls_get_addr interceptor (more) AS-safe. No good test so far, will keep trying.
llvm-svn: 200734
2014-02-04 05:22:00 +00:00
Kostya Serebryany 51f135d820 [sanitizer] Handle TLS sizes for glibc < 2.13; As discussed in http://gcc.gnu.org/PR60038, the hardcoded sizeof(struct thread); patch by Jakub Jelinek
llvm-svn: 200733
2014-02-04 04:09:38 +00:00