Commit Graph

136777 Commits

Author SHA1 Message Date
Alexey Samsonov 33bfe09c34 Use -fsanitize= flag in docs for ASan/TSan
llvm-svn: 167465
2012-11-06 16:19:11 +00:00
Dmitry Vyukov c015712992 tsan: lazily allocate shadow for Go
llvm-svn: 167464
2012-11-06 16:00:16 +00:00
Dmitry Vyukov e86c632015 tsan: fix debug output
llvm-svn: 167463
2012-11-06 15:54:34 +00:00
Dmitry Vyukov a0be3e2c68 tsan: better diagnostics for failed mmap()
llvm-svn: 167462
2012-11-06 15:39:16 +00:00
Alexey Samsonov 627b10f712 Follow-up for r167411 to un-break ASan on Mac. Move SanitizerArgs to a header file and use it on Darwin toolchain.
llvm-svn: 167460
2012-11-06 15:09:03 +00:00
Alexey Samsonov bdb2594cb3 docs: use code font for console commands in phabricator manual
llvm-svn: 167459
2012-11-06 15:04:37 +00:00
Dmitry Vyukov 95b9a362ff tsan: fix compiler warning
llvm-svn: 167458
2012-11-06 14:05:20 +00:00
Dmitry Vyukov e4c2fd4c2f tsan: windows platform support
llvm-svn: 167457
2012-11-06 13:35:02 +00:00
Dmitry Vyukov 7234a5b54d tsan: update script to support windows
llvm-svn: 167456
2012-11-06 13:32:53 +00:00
Dmitry Vyukov 5f93416c94 tsan: add shadow mapping for windows
llvm-svn: 167455
2012-11-06 13:26:57 +00:00
Dmitry Vyukov ee563c10c6 tsan: add missing function for windows
llvm-svn: 167454
2012-11-06 13:25:05 +00:00
Dmitry Vyukov 1d4120b210 tsan: fix constant types
llvm-svn: 167453
2012-11-06 13:21:06 +00:00
Dmitry Vyukov 0ff6d2dd6c tsan: windows: less includes, better diagnostics for failed VirtualAlloc(), implement sched_yield()
llvm-svn: 167452
2012-11-06 13:19:59 +00:00
Dmitry Vyukov ba827dfdae tsan: don't release disabled clocks
llvm-svn: 167451
2012-11-06 13:16:25 +00:00
Dmitry Vyukov 2817639411 tsan: define missing compier macros for windows
llvm-svn: 167450
2012-11-06 12:54:16 +00:00
Dmitry Vyukov e9bafdf5b8 tsan: fix non-msvc windows build
llvm-svn: 167449
2012-11-06 12:50:13 +00:00
Dmitry Vyukov 04dd4b7349 tasn: improve sanitizer_internal_defs.h
The file uses namespaces and extern "LANG", so it's kinda senseless to use #ifdef __cplusplus

llvm-svn: 167448
2012-11-06 12:49:22 +00:00
Dmitry Vyukov e6b5a696e3 tsan: fix windows build
__declspec is not _WIN32, it's _MSC_VER

llvm-svn: 167447
2012-11-06 12:47:42 +00:00
Dmitry Vyukov 1ec08f3627 tsan: fix Go build
llvm-svn: 167446
2012-11-06 12:46:26 +00:00
Michael Liao ec47090b1e Remove tailing whitespaces
llvm-svn: 167445
2012-11-06 08:06:35 +00:00
Andrew Trick e96390ea96 misched: TargetSchedule interface for machine resources.
Expose the processor resources defined by the machine model to the
scheduler and other clients through the TargetSchedule interface.

Normalize each resource count with respect to other kinds of
resources. This allows scheduling heuristics to balance resources
against other kinds of resources and latency.

llvm-svn: 167444
2012-11-06 07:10:38 +00:00
Andrew Trick 4d1fa712ac misched: Rename RemainingCount to avoid confusion with remaining resources.
llvm-svn: 167443
2012-11-06 07:10:34 +00:00
Ted Kremenek ccf3b4299d Remove completely irrelevant code from USR generation.
Thanks to Richard Smith for pointing this out.  This code stopped
serving its purpose during r103212 in a refactoring.  My initial
fix was to add back the logic to abort the USR generation for
InternalLinkage, but enough tests broke suspiciously that I fear
that USR generation for cursors with InternalLinkage is now expected
by some clients (where it wasn't the case when the refactoring
took place).  I don't own this code anymore and have not looked
at it for some time, but clearly this code is dead and can be removed
pending further review on the proper logic here.

llvm-svn: 167442
2012-11-06 06:36:45 +00:00
Nico Weber 00420eddc3 Delete an outdated comment.
llvm-svn: 167441
2012-11-06 05:20:23 +00:00
Manman Ren 8cd99817f9 ARM byval: when type alignment is bigger than ABI alignment, instead of
disabling byval, we set realign to true.

It will perform an aligned alloca, and call memcpy to copy the byval
argument to the local variable.
Change the size threshold back to 64 bytes.

rdar://12596507

llvm-svn: 167440
2012-11-06 04:58:01 +00:00
Anna Zaks 2ed5125502 [analyzer] Add symbol escapes logic to the SimpleStreamChecker.
llvm-svn: 167439
2012-11-06 04:20:57 +00:00
Anna Zaks 49bb65024c [analyzer] Remove isWithinInlined. It's been replaced with inTopFrame().
Thanks Jordan.

llvm-svn: 167438
2012-11-06 04:20:54 +00:00
Eli Friedman 70459fc5b6 Propagate CharUnits through CGObjCMac.cpp.
llvm-svn: 167437
2012-11-06 03:41:04 +00:00
Eli Friedman b201e4d6ab Minor fix to ObjC layout bitmap metadata. Found while I was trying to
refactor the code.

llvm-svn: 167436
2012-11-06 03:38:02 +00:00
Andrew Trick baeaabb2d0 ScheduleDAG interface. Added OrderKind to distinguish nonregister dependencies.
This is in preparation for adding "weak" DAG edges, but generally
simplifies the design.

llvm-svn: 167435
2012-11-06 03:13:46 +00:00
Richard Smith 77930919ad Update compiler-rt tests to match flag renaming/deprecation in Clang.
llvm-svn: 167434
2012-11-06 02:31:42 +00:00
Richard Smith c86a114409 Classify the INT_MIN/-1 check as -fsanitize=signed-integer-overflow, not as -fsanitize=divide-by-zero.
llvm-svn: 167433
2012-11-06 02:30:30 +00:00
Argyrios Kyrtzidis 58a1d90d6a [c-index-test] Do install c-index-test because it's not just for tests,
it's also setup as 'INTERNAL_TOOL'.

llvm-svn: 167432
2012-11-06 02:12:21 +00:00
Eli Friedman 5a56bb83cc Propagate CharUnits into ObjC CodeGen. No intended functional change.
llvm-svn: 167431
2012-11-06 01:51:20 +00:00
Jim Ingham 3bfa753fa1 Add a workaround to problems with the clang debug info for
inlined subroutine ranges.

<rdar://problem/12588579>

llvm-svn: 167430
2012-11-06 01:14:52 +00:00
Richard Smith aa71657749 Per discussion on cfe-commits, treat -faddress-sanitizer,
-fno-address-sanitizer, -fthread-sanitizer, -fno-thread-sanitizer, and
-fcatch-undefined-behavior as deprecated: produce a warning if they are used
pointing to the corresponding -fsanitize= option. In passing add the missing
'-' to some diagnostics.

llvm-svn: 167429
2012-11-06 01:12:02 +00:00
Argyrios Kyrtzidis 2969e124a6 [PCH] Take into account the 'include' source location of a SM_SLOC_BUFFER_ENTRY.
llvm-svn: 167426
2012-11-06 00:35:04 +00:00
Argyrios Kyrtzidis a1c27eb8dd [PCH] Write out the ClassTemplateDecl::Common::InjectedClassNameType type
reference instead of relying on computing it.

In general, if storage is no issue, it is preferable to deserialize info from
the PCH instead of trying to recompute it after the PCH was loaded.

The incentive to change this now was due to r155303 changing how friend template
classes in dependent contexts are handled; such classes can now be chained to
a previous template class but the computed InjectedClassNameType may be different
due to the extra template parameters from the dependent context.

The new handling requires more investigation but, in the meantime, writing out
InjectedClassNameType fixes PCH issue in rdar://12627738.

llvm-svn: 167425
2012-11-06 00:35:02 +00:00
Greg Clayton 88bc7f35b8 <rdar://problem/12582031>
Unnamed bitfields cause struct layout problems

Synthesize unnamed bitfields when required. Most compilers don't mention unnamed bitfields in the DWARF, so we need to create them to keep clang happy with the types we create from the DWARF. We currently can't do this for ObjC since the DW_AT_bit_offset value for any direct ivars of ObjC classes as the values for these attributes are bogus. A bug has been filed on Clang to fix this, and another bug has been filed on LLDB to make sure we fix the DWARF parser once the clang fix is in by looking the the DW_AT_producer in the compile unit attributes and finding the compiler version and only enabling it for newer versions of clang.

llvm-svn: 167424
2012-11-06 00:20:41 +00:00
Douglas Gregor d612566385 Have the parser initialize Sema before it consumes the first
token. This is important because the first token could actually be
after an #include that triggers a module import, which might use
either Sema or the AST consumer before it would have been initialized.

llvm-svn: 167423
2012-11-05 23:58:27 +00:00
Nadav Rotem 48c5b8e659 Refactor the getTypeLegalizationCost interface. No functionality change.
llvm-svn: 167422
2012-11-05 23:57:45 +00:00
Nadav Rotem c378a8067d CostModel: Add tables for the common x86 compares.
llvm-svn: 167421
2012-11-05 23:48:20 +00:00
Douglas Gregor dc779abb8b Split the instrinsic header wmmintrin.h into AES and PCLMUL parts, so
that we can model them as separate submodules.

llvm-svn: 167420
2012-11-05 23:30:26 +00:00
Daniel Dunbar e2951f48bf Frontend: Add support for reading named pipes as the main file.
- The whole {File,Source}Manager is built around wanting to pre-determine the
   size of files, so we can't fit this in naturally. Instead, we handle it like
   we do STDIN, where we just replace the main file contents upfront.

llvm-svn: 167419
2012-11-05 22:53:33 +00:00
Nico Weber 2b868e2486 Delete comment I forgot to delete in my last change.
llvm-svn: 167418
2012-11-05 22:50:26 +00:00
Nico Weber 2134387764 Use Richard's BE_THE_HEADER trick to simplify a test. No intended behavior change.
llvm-svn: 167417
2012-11-05 22:49:03 +00:00
Manman Ren 505d68ffb8 ARM byval: when type alignment is bigger than ABI alignment, we can't guarantee
the type alignment of the byval argument. This patch will disable byval in this case,
it also increases the size threshold for turning on byval.

A backend fix will be attempted.

rdar://12596507

llvm-svn: 167416
2012-11-05 22:42:46 +00:00
Richard Smith b1b0ab41e7 Use the individual -fsanitize=<...> arguments to control which of the UBSan
checks to enable. Remove frontend support for -fcatch-undefined-behavior,
-faddress-sanitizer and -fthread-sanitizer now that they don't do anything.

llvm-svn: 167413
2012-11-05 22:21:05 +00:00
Nadav Rotem ae79765676 Code Model: Improve the accuracy of the zext/sext/trunc vector cost estimation.
llvm-svn: 167412
2012-11-05 22:20:53 +00:00
Richard Smith 52be619c84 Add -fsanitize=<sanitizers> argument to driver and frontend, and add
-fno-sanitize=<sanitizers> argument to driver. These allow ASan, TSan, and the
various UBSan checks to be enabled and disabled separately. Right now, the
different modes can't be combined, but the intention is that combining UBSan
and the other sanitizers will be permitted in the near future.

Currently, the UBSan checks will all be enabled if any of them is; that will be
fixed by the next patch.

llvm-svn: 167411
2012-11-05 22:04:41 +00:00