Commit Graph

175295 Commits

Author SHA1 Message Date
Dmitry Vyukov ef5f26bf19 tsan: allow to write memory profile to stdout/stderr
llvm-svn: 209811
2014-05-29 14:02:06 +00:00
Dmitry Vyukov bde4c9c773 tsan: refactor storage of meta information for heap blocks and sync objects
The new storage (MetaMap) is based on direct shadow (instead of a hashmap + per-block lists).
This solves a number of problems:
 - eliminates quadratic behaviour in SyncTab::GetAndLock (https://code.google.com/p/thread-sanitizer/issues/detail?id=26)
 - eliminates contention in SyncTab
 - eliminates contention in internal allocator during allocation of sync objects
 - removes a bunch of ad-hoc code in java interface
 - reduces java shadow from 2x to 1/2x
 - allows to memorize heap block meta info for Java and Go
 - allows to cleanup sync object meta info for Go
 - which in turn enabled deadlock detector for Go

llvm-svn: 209810
2014-05-29 13:50:54 +00:00
Arnaud A. de Grandmaison 53ae251a17 Fix r209807 which inadvertently removed things
llvm-svn: 209809
2014-05-29 13:42:17 +00:00
Aaron Ballman 8ee4126ae1 Fixing a test case which was failing the MSVC build bots. When -std isn't specified with an MSVC build, it defaults to -std=c++11, which overrides the -x cuda option. In turn, this causes all CUDA language option checks to fail.
This fix is possibly temporary while we determine whether -x cuda should be considered along with -std=c++11 when setting language options.

llvm-svn: 209808
2014-05-29 12:59:11 +00:00
Nikola Smiljanic 2882a12337 Fix build. Method was renamed in r209800.
llvm-svn: 209807
2014-05-29 12:38:17 +00:00
Timur Iskhodzhanov 9e44e590d5 [ASan Win tests] Add a couple more memcpy/memset tests
llvm-svn: 209806
2014-05-29 12:15:17 +00:00
Viktor Kutuzov 9cd9b4ce0c Support getting executable's name for sanitizers needs on FreeBSD
llvm-svn: 209805
2014-05-29 12:12:42 +00:00
Viktor Kutuzov 76d35f47d3 Fix building 32-bit common sanitizer tests on FreeBSD 9.2
llvm-svn: 209804
2014-05-29 11:35:05 +00:00
Artyom Skrobov 0d22e2afe7 Restore getInvertedCondCode() from the phased-out backend, fixing disassembly for NV
llvm-svn: 209803
2014-05-29 11:34:50 +00:00
Artyom Skrobov 7e9e31ebaf Add missing check when MatchInstructionImpl() reports failure
llvm-svn: 209802
2014-05-29 11:26:15 +00:00
Simon Atanasyan 8745993ec4 [elf2yaml][ELF] Move Info field to the RelocationSection structure. This
field represents ELF section header sh_info field and does not have any
sense for regular sections. Its interpretation depends on section type.

llvm-svn: 209801
2014-05-29 11:05:31 +00:00
Nikola Smiljanic 01a7598561 Refactoring. Remove release and take methods from ActionResult. Rename takeAs to getAs.
llvm-svn: 209800
2014-05-29 10:55:11 +00:00
Hao Liu d670c7eee0 Rename a test case to contain correct date info.
llvm-svn: 209799
2014-05-29 09:21:23 +00:00
Hao Liu 4091450181 Fix an assertion failure caused by v1i64 in DAGCombiner Shrink.
llvm-svn: 209798
2014-05-29 09:19:07 +00:00
Dinesh Dwivedi d266cb1a0b LCSSA should be performed on the outermost affected loop while unrolling loop.
During loop-unroll, loop exits from the current loop may end up in in different
outer loop. This requires to re-form LCSSA recursively for one level down from
the outer most loop where loop exits are landed during unroll. This fixes PR18861.

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

llvm-svn: 209796
2014-05-29 06:47:23 +00:00
David Majnemer 31234844ef Linux: Correctly identify valid error codes
[syserr.errcat.objects]p4 specifies that
system_category().default_error_condition(ev) map to
error_condition(posv, generic_category()) if ev could map to a POSIX
errno.

Linux reserves up to and including 4095 for errno values, use this as a
bound.

This fixes syserr.errcat.objects/system_category.pass.cpp on Linux.

llvm-svn: 209795
2014-05-29 05:02:22 +00:00
Richard Smith 195d8ef452 When merging functions across modules (and in particular, instantiations of
member functions), ensure that the redecl chain never transitions from 'inline'
to 'not inline', since that violates an AST invariant.

llvm-svn: 209794
2014-05-29 03:15:31 +00:00
Eli Bendersky 086e5816b0 Implement a convenience recursive walk method over a cursor and its descendants.
Before r160106 there was a way to recursively visit all descendants of a cursor
via Cursor_visit, but it was removed. Since then, every user needs to
reimplement the recursive descent into get_children.

Adding a walk_preorder() method to Cursor that conveniently implements recursive
walking in a Pythonic way. This also greatly simplifies get_cursor and
get_cursors in tests/cindex/util.py (walk_preorder is now tested through these
utility functions, since they are used in many tests).

llvm-svn: 209793
2014-05-29 02:35:27 +00:00
Michael J. Spencer f74aae2c2d [LoadCombine] Missed a file.
llvm-svn: 209792
2014-05-29 02:05:37 +00:00
Michael J. Spencer 289067cc3d Add LoadCombine pass.
This pass is disabled by default. Use -combine-loads to enable in -O[1-3]

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

llvm-svn: 209791
2014-05-29 01:55:07 +00:00
Alexey Samsonov dea76ee889 [ASan] Hoist blacklisting globals from init-order checking to Clang.
Clang knows about the sanitizer blacklist and it makes no sense to
add global to the list of llvm.asan.dynamically_initialized_globals if it
will be blacklisted in the instrumentation pass anyway. Instead, we should
do as much blacklisting as possible (if not all) in the frontend.

llvm-svn: 209790
2014-05-29 01:44:13 +00:00
Alexey Samsonov c054d9813c [ASan] Hoist blacklisting globals from init-order checking to Clang.
Clang knows about the sanitizer blacklist and it makes no sense to
add global to the list of llvm.asan.dynamically_initialized_globals if it
will be blacklisted in the instrumentation pass anyway. Instead, we should
do as much blacklisting as possible (if not all) in the frontend.

llvm-svn: 209789
2014-05-29 01:43:53 +00:00
Michael J. Spencer f375d80635 [x86] Fold extract_vector_elt of a load into the Load's address computation.
An address only use of an extract element of a load can be simplified to a
load. Without this the result of the extract element is spilled to the
stack so that an address is available.

llvm-svn: 209788
2014-05-29 01:42:45 +00:00
Matt Arsenault b5c4835502 R600/SI: Fix pattern variable names.
These are confusing enough since the order swaps,
so give them more useful names.

llvm-svn: 209787
2014-05-29 01:18:01 +00:00
Richard Smith 0a80d572b1 PR19878: If a pack expansion appears within another pack expansion, correctly
deduce any packs that are expanded by both expansions.

llvm-svn: 209786
2014-05-29 01:12:14 +00:00
Marshall Clow 2de60eb213 Fix a problem exposed by r208825, which caused bind (and other bits of libc++) to stop working. And tests
llvm-svn: 209785
2014-05-29 01:10:28 +00:00
Alexey Samsonov 1f64750258 Fix typo in variable name
llvm-svn: 209784
2014-05-29 01:10:14 +00:00
Joerg Sonnenberger fee19280b8 Add __extenddftf2 and __extendsftf2 for IEEE quad precision.
Patch by: GuanHong Liu
Differential Revision: http://reviews.llvm.org/D2802

llvm-svn: 209783
2014-05-29 01:00:39 +00:00
Joerg Sonnenberger 5038cb2963 Implement __trunctfdf2 and __trunctfsf2 for IEEE quad precision.
Patch by: GuanHong Liu
Differential Revision: http://reviews.llvm.org/D2803

llvm-svn: 209782
2014-05-29 00:58:27 +00:00
Joerg Sonnenberger 7610e8c822 Refactor extendsfdf2.
Patch by: GuanHong Liu
Differential Revision: http://reviews.llvm.org/D3887

llvm-svn: 209781
2014-05-29 00:54:26 +00:00
Alexey Samsonov 96e239f564 [ASan] Use llvm.global_ctors to insert init-order checking calls into ASan runtime.
Don't assume that dynamically initialized globals are all initialized from
_GLOBAL__<module_name>I_ function. Instead, scan the llvm.global_ctors and
insert poison/unpoison calls to each function there.

Patch by Nico Weber!

llvm-svn: 209780
2014-05-29 00:51:15 +00:00
Joerg Sonnenberger 304a36b5fc Refactor truncdfsf2.
Patch by: GuanHong Liu
Differential Revision: http://reviews.llvm.org/D3888

llvm-svn: 209779
2014-05-29 00:49:57 +00:00
Greg Fitzgerald cd1a131c61 Moved the builtins documentation to lib/builtins/
And fixed typos in the ASan readme.

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

llvm-svn: 209778
2014-05-28 23:09:45 +00:00
Reid Kleckner c316e0fc25 Add a simple helper function to create a 64-bit integer.
Add a function to combine two 32-bit integers into a 64-bit integer.
There are no calls to this function yet, although a subsequent change
will add some in LLDB.

Reviewers: rnk

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

llvm-svn: 209777
2014-05-28 22:49:12 +00:00
Rafael Espindola 6196b7430e Revert "Revert "InstCombine: Improvement to check if signed addition overflows.""
This reverts commit r209762, bringing back r209746. It was not responsible for the libc++ build failure

llvm-svn: 209776
2014-05-28 21:43:52 +00:00
Rafael Espindola 910528a3eb Revert "Add support for combining GEPs across PHI nodes"
This reverts commit r209755.

it was the real cause of the libc++ build failure.

llvm-svn: 209775
2014-05-28 21:41:21 +00:00
DeLesley Hutchins 44be81b5a9 Thread Safety Analysis: update TIL traversal mechanism to allow arbitrary
local contexts.  Also includes some minor refactoring.

llvm-svn: 209774
2014-05-28 21:28:13 +00:00
Alexey Samsonov 5bcd1d8a8f [Sanitizer] Always prefer cached contents of /proc/self/exe if it's available
llvm-svn: 209773
2014-05-28 21:23:53 +00:00
Matt Arsenault 3ee3746374 Fix wrong setcc result type when legalizing uaddo/usubo
No test because no in-tree targets change the bitwidth of the
setcc type depending on the bitwidth of the compared type.

Patch by Ke Bai

llvm-svn: 209771
2014-05-28 20:51:42 +00:00
Jim Grosbach 92f11f44c8 Update CREDITS to be at least moderately more current.
llvm-svn: 209770
2014-05-28 20:31:52 +00:00
Sanjay Patel 1585fb94ab added Intel's BMI intrinsic variants
(fixes PR19431 - http://llvm.org/bugs/show_bug.cgi?id=19431)

llvm-svn: 209769
2014-05-28 20:26:57 +00:00
Sanjay Patel 8cf3bb4fcb fixed a few typos
llvm-svn: 209768
2014-05-28 20:07:37 +00:00
Eli Bendersky 2581e66e7a Expose CUDA function attributes to the C interface.
Until now all CUDA-specific attributes were represented with
CXCursor_UnexposedAttr; now they are actually implemented, including the Python
bindings.

llvm-svn: 209767
2014-05-28 19:29:58 +00:00
Warren Hunt 583db1979c Reverting 209503 - Breaks asan blacklists
I opened a discussion on cfe-commits.  Ideally we've got a few things 
that need to happen.  CompilerRT should probably have blacklists tests.  
Asan should probably not depend on that specific field.

llvm-svn: 209766
2014-05-28 19:17:45 +00:00
Adrian Prantl 328f88add9 Debug Info: Fix the source range for IfStmt's ConditionScope.
Since the continuation block of the if statement is emitted within the
condition scope this had the undesirable effect of creating a line table
entry at the end of the then or else statement, a line that may have never
been executed.
PR19864 / rdar://problem/17052973

llvm-svn: 209764
2014-05-28 19:10:59 +00:00
Sanjay Patel 26b6edcf44 test check-in: added missing parenthesis in comment
llvm-svn: 209763
2014-05-28 19:03:33 +00:00
Rafael Espindola fb59b05ca4 Revert "InstCombine: Improvement to check if signed addition overflows."
This reverts commit r209746.

It looks it is causing a crash while building libcxx. I am trying to get a
reduced testcase.

llvm-svn: 209762
2014-05-28 18:48:10 +00:00
Reid Kleckner d58c978a36 Move misplaced Documentation note in Attr.td
llvm-svn: 209761
2014-05-28 18:43:46 +00:00
Reid Kleckner 8a03f53ce2 Fix standard integer definitions for MSVC in DataTypes.h
Previously, DataTypes.h would #define a variety of symbols any time
they weren't already defined.  However, some versions of Visual
Studio do provide the appropriate headers, so if those headers are
included after DataTypes.h, it can lead to macro redefinition
warnings.

The fix is to include the appropriate headers if they exist, and
only #define the symbols if the required header does not exist.

Patch by Zachary Turner!

---

The big change here is that we no longer have our own stdint.h
typedefs because now all supported toolchains have stdint.h.
Hooray!

llvm-svn: 209760
2014-05-28 18:19:55 +00:00
Rafael Espindola 59f7eba2b5 [pr19844] Add thread local mode to aliases.
This matches gcc's behavior. It also seems natural given that aliases
contain other properties that govern how it is accessed (linkage,
visibility, dll storage).

Clang still has to be updated to expose this feature to C.

llvm-svn: 209759
2014-05-28 18:15:43 +00:00