Commit Graph

158951 Commits

Author SHA1 Message Date
Eric Christopher 3d78fe8fa0 Make this use -### instead of a temporary output.
llvm-svn: 191921
2013-10-03 18:23:29 +00:00
Matt Arsenault bfa37e546d Make gep i8* X, -(ptrtoint Y) transform work with address spaces
llvm-svn: 191920
2013-10-03 18:15:57 +00:00
Enrico Granata 245b3caa57 A more thorough fix for the newlines issue
llvm-svn: 191919
2013-10-03 18:11:24 +00:00
Tom Roeder 724143a752 Test commit. Fixed a copy-paste error in the Makefile for lib/LTO.
llvm-svn: 191918
2013-10-03 18:05:12 +00:00
Eric Christopher b511a72f92 Give this a temporary output so it is cleaned up.
llvm-svn: 191917
2013-10-03 18:02:14 +00:00
Quentin Colombet 76e5557981 [llvm-c][Disassembler] When printing latency information, fall back to the
itinerary model in case the target does not supply a scheduling model.

By doing this, targets like cortex-a8 can benefit from the latency printing
feature added in r191859.

This part of <rdar://problem/14687488>. 

llvm-svn: 191916
2013-10-03 17:51:49 +00:00
Eric Christopher c948b9df23 Make sure we emit a section for pubnames even if that section is
going to be empty. This is particularly important for the gnu
pubnames case since we're emitting a relocation to the section.

llvm-svn: 191915
2013-10-03 17:41:20 +00:00
Eric Christopher f976c77ed7 Fix cut and paste typo.
llvm-svn: 191914
2013-10-03 17:41:16 +00:00
Dmitry Vyukov 302ec7b9bc tsan: add memory_limit_mb flag
The flag allows to bound maximum process memory consumption (best effort).
If RSS reaches memory_limit_mb, tsan flushes all shadow memory.

llvm-svn: 191913
2013-10-03 17:14:35 +00:00
Rafael Espindola 72f55d46c8 Ignore -mieee-fp.
It looks like clang always produce code with the ieee comparisons, so it is
safe to ignore this flag (we still error on -mno-ieee-fp).

llvm-svn: 191912
2013-10-03 17:06:43 +00:00
Benjamin Kramer 8f5d425160 raw_fd_ostream: Be more verbose about the reason when opening a file fails.
llvm-svn: 191911
2013-10-03 16:59:14 +00:00
Jordan Rose 761ee868a5 [analyzer] Replace bug category magic strings with shared constants.
One small functionality change is to bring the sizeof-pointer checker in
line with the other checkers by making its category be "Logic error"
instead of just "Logic". There should be no other functionality changes.

Patch by Daniel Marjamäki!

llvm-svn: 191910
2013-10-03 16:57:20 +00:00
Jordan Rose 9db2d9adef [analyzer] Add new debug helper clang_analyzer_warnIfReached.
This will emit a warning if a call to clang_analyzer_warnIfReached is
executed, printing REACHABLE. This is a more explicit way to declare
expected reachability than using clang_analyzer_eval or triggering
a bug (divide-by-zero or null dereference), and unlike the former will
work the same in inlined functions and top-level functions. Like the
other debug helpers, it is part of the debug.ExprInspection checker.

Patch by Jared Grubb!

llvm-svn: 191909
2013-10-03 16:57:03 +00:00
Dmitry Vyukov c967d2f49c asan/msan/tsan: fix broken linux syscalls
Currently the following source code:

u64 NanoTime() {
  kernel_timeval tv = {};
  internal_syscall(__NR_gettimeofday, &tv, 0);
  return (u64)tv.tv_sec * 1000*1000*1000 + tv.tv_usec * 1000;
}

generates the following assembly:

Dump of assembler code for function __sanitizer::NanoTime():
=> 0x00007ff30657d380 <+0>:	lea    -0x10(%rsp),%rdi
   0x00007ff30657d385 <+5>:	xor    %esi,%esi
   0x00007ff30657d387 <+7>:	mov    $0x60,%eax
   0x00007ff30657d38c <+12>:	syscall 
   0x00007ff30657d38e <+14>:	mov    $0,%eax
   0x00007ff30657d393 <+19>:	retq   

with this change:

Dump of assembler code for function __sanitizer::NanoTime():
=> 0x00007faab834f380 <+0>:	movq   $0x0,-0x10(%rsp)
   0x00007faab834f389 <+9>:	movq   $0x0,-0x8(%rsp)
   0x00007faab834f392 <+18>:	lea    -0x10(%rsp),%rdi
   0x00007faab834f397 <+23>:	xor    %esi,%esi
   0x00007faab834f399 <+25>:	mov    $0x60,%eax
   0x00007faab834f39e <+30>:	syscall 
   0x00007faab834f3a0 <+32>:	mov    -0x8(%rsp),%rax
   0x00007faab834f3a5 <+37>:	mov    -0x10(%rsp),%rcx
   0x00007faab834f3aa <+42>:	imul   $0x3e8,%rax,%rdx
   0x00007faab834f3b1 <+49>:	imul   $0x3b9aca00,%rcx,%rax
   0x00007faab834f3b8 <+56>:	add    %rdx,%rax
   0x00007faab834f3bb <+59>:	retq   

llvm-svn: 191908
2013-10-03 16:53:50 +00:00
Argyrios Kyrtzidis 53f45c7d55 [libclang] python: expose a few functions, patch by Loïc Jaquemet!
llvm-svn: 191907
2013-10-03 16:19:27 +00:00
Argyrios Kyrtzidis 7a4253b685 [libclang] Introduce clang_Type_getClassType which returns the class type of a member pointer type.
Patch by Che-Liang Chiou!

llvm-svn: 191906
2013-10-03 16:19:23 +00:00
Jin-Gu Kang 0bf8241d4b Added checking code whehter target supports specific dag combining about rotate
or not. The corresponding dag patterns are as following:

"DAGCombier::MatchRotate" function in DAGCombiner.cpp
Pattern1
// fold (or (shl (*ext x), (*ext y)),
//          (srl (*ext x), (*ext (sub 32, y)))) ->
//   (*ext (rotl x, y))
// fold (or (shl (*ext x), (*ext y)),
//          (srl (*ext x), (*ext (sub 32, y)))) ->
//   (*ext (rotr x, (sub 32, y)))

pattern2
// fold (or (shl (*ext x), (*ext (sub 32, y))),
//          (srl (*ext x), (*ext y))) ->
//   (*ext (rotl x, y))
// fold (or (shl (*ext x), (*ext (sub 32, y))),
//          (srl (*ext x), (*ext y))) ->
//   (*ext (rotr x, (sub 32, y)))

llvm-svn: 191905
2013-10-03 15:58:48 +00:00
Dmitry Vyukov 19a1302046 asan/msan: fix "unused function 'OnExit'" warning
llvm-svn: 191904
2013-10-03 15:43:59 +00:00
Dmitry Vyukov fdfb2ade8f asan/msan/tsan: move _exit interceptor to common interceptors
llvm-svn: 191903
2013-10-03 15:22:29 +00:00
Dmitry Vyukov bfe7bb7034 tsan: include lsan into presubmit check
llvm-svn: 191902
2013-10-03 14:56:08 +00:00
Tim Northover 4599d9470a Fix test to work on Linux hosts by specifying triple.
Thought I'd checked that before

llvm-svn: 191901
2013-10-03 14:29:54 +00:00
Tim Northover e66c946ee4 ARM: *-*-darwin-eabi triples should use AAPCS.
llvm-svn: 191900
2013-10-03 14:23:28 +00:00
Dmitry Vyukov 83ebd022d7 tsan: fix false positive in localtime()
llvm-svn: 191899
2013-10-03 14:12:09 +00:00
Dmitry Vyukov e07dc7d1fe tsan: intercept _exit so that we can override exit status
llvm-svn: 191898
2013-10-03 14:00:46 +00:00
Dmitry Vyukov 5ba736457c tsan: ignore interceptors coming from specified libraries
LibIgnore allows to ignore all interceptors called from a particular set
of dynamic libraries. LibIgnore remembers all "called_from_lib" suppressions
from the provided SuppressionContext; finds code ranges for the libraries;
and checks whether the provided PC value belongs to the code ranges.

Also make malloc and friends interceptors use SCOPED_INTERCEPTOR_RAW instead of
SCOPED_TSAN_INTERCEPTOR, because if they are called from an ignored lib,
then must call our internal allocator instead of libc malloc.

llvm-svn: 191897
2013-10-03 13:37:17 +00:00
Benjamin Kramer d2757ba1be CaptureTracking: Plug a loophole in the "too many uses" heuristic.
The heuristic was added to avoid spending too much compile time A specially
crafted test case (PR17461, PR16474) with many uses on a select or bitcast
instruction can still trigger the slow case. Add a check for that case.

This only affects compile time, don't have a good way to test it.

llvm-svn: 191896
2013-10-03 13:24:02 +00:00
Tobias Grosser 0d17013cb7 clang-format
llvm-svn: 191895
2013-10-03 13:09:19 +00:00
Tobias Grosser 51b78752fe Use LLVM_DELETED_FUNCTION instead of a comment
Contributed-by:  Michael Kruse  <MichaelKruse@meinersbur.de>
llvm-svn: 191894
2013-10-03 13:09:14 +00:00
Tobias Grosser 1ff0be799d ScopInfo: Do not include "isl/int.h" any more
We already removed all uses of isl_int in ScopInfo.

Contributed-by:  Michael Kruse  <MichaelKruse@meinersbur.de>
llvm-svn: 191893
2013-10-03 13:09:07 +00:00
Tobias Grosser abe9193b6b ScopInfo: Fix typos
Contributed-by:  Michael Kruse  <MichaelKruse@meinersbur.de>
llvm-svn: 191892
2013-10-03 13:08:59 +00:00
Logan Chien b7ec8214bf [arm] Enhance the test case by checking .fpu directive.
llvm-svn: 191891
2013-10-03 12:18:56 +00:00
Matthew Curtis 274a9cc84b Gracefully (and correctly) handle init of multiple union members
We now emit warnings when doing so and code generation is consistent
with GCC. Note that the C99 spec is unclear as to the precise
behavior.

See also ...
Bug:
  http://llvm.org/bugs/show_bug.cgi?id=16644 and

cfe-dev discussion:
  http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-September/031918.html

llvm-svn: 191890
2013-10-03 12:14:24 +00:00
Elena Demikhovsky 85aeffaf5c AVX-512: Fixed encoding of VMOVQ instruction.
llvm-svn: 191889
2013-10-03 12:03:26 +00:00
Jim Cownie 885d7fa8a4 Update web pages to include style sheets and referenced documents missed before.
llvm-svn: 191888
2013-10-03 11:55:28 +00:00
Amara Emerson 52cfb6a99a [ARM] Warn on deprecated IT blocks in v8 AArch32 assembly.
Patch by Artyom Skrobov.

llvm-svn: 191885
2013-10-03 09:31:51 +00:00
Alexey Samsonov 4436bf03e9 Remove wild .debug_aranges entries generated from unimportant labels
r191052 added emitting .debug_aranges to Clang, but this
functionality is broken: it uses all MC labels added in DWARF Asm
printer, including the labels for build relocations between
different DWARF sections, like .Lsection_line or .Ldebug_loc0.

As a result, if any DIE .debug_info would contain "DW_AT_location=0x123"
attribute, .debug_aranges would also contain a range starting from 0x123,
breaking tools that rely on this section.

This patch fixes this by using only MC labels that corresponds to the
addresses in the user program.

llvm-svn: 191884
2013-10-03 08:54:43 +00:00
Evgeniy Stepanov 364f70c728 [asan] Don't require X86 to build Android runtime.
Patch by Greg Fitzgerald.

llvm-svn: 191883
2013-10-03 08:31:14 +00:00
Jason Molenda 82f5930db4 Change two new logging messages from verbose-only to non-verbose
in the unwinder - they're important to flag when debugging an
unwind problem.

llvm-svn: 191882
2013-10-03 07:58:37 +00:00
Andrey Churbanov cfda451d4f typo fixed as a test commit
llvm-svn: 191881
2013-10-03 07:27:25 +00:00
Craig Topper 9eb8837ffa Replace C++ style comment with a C style comment to satisfy some of the build bots.
llvm-svn: 191880
2013-10-03 06:29:59 +00:00
Faisal Vali 8ec4036669 Teach TreeTransform and family how to transform generic lambdas within templates and nested within themselves.
This does not yet include capturing (that is next).

Please see test file for examples.

This patch was LGTM'd by Doug:
http://llvm-reviews.chandlerc.com/D1784
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130930/090048.html

When I first committed this patch - a bunch of buildbots were unable to compile the code that VS2010 seemed to compile.  Seems like there was a dependency on Sema/Template.h which VS did not seem to need, but I have now added for the other compilers.  It still compiles on Visual Studio 2010 - lets hope the buildbots remain quiet (please!)

llvm-svn: 191879
2013-10-03 06:29:33 +00:00
Timur Iskhodzhanov 6745522f89 Extract ABI-specific parts of MangleContext into separate classes
Reviewed at http://llvm-reviews.chandlerc.com/D1807

llvm-svn: 191878
2013-10-03 06:26:13 +00:00
Craig Topper 42e8a63e4f Remove comma from the end of an enum.
llvm-svn: 191877
2013-10-03 06:18:26 +00:00
Faisal Vali 10a00ee485 Revert changes from the nested lambdas commit till i figure out
why the buildbots are failing.

llvm-svn: 191876
2013-10-03 05:58:37 +00:00
Faisal Vali ba78d34347 Teach TreeTransform and family how to transform generic lambdas within templates and nested within themselves.
This does not yet include capturing (that is next).

Please see test file for examples.

This patch was LGTM'd by Doug:
http://llvm-reviews.chandlerc.com/D1784

llvm-svn: 191875
2013-10-03 05:32:48 +00:00
Craig Topper 9e3e38ae3f Add XOP disassembler support. Fixes PR13933.
llvm-svn: 191874
2013-10-03 05:17:48 +00:00
Craig Topper af4b2eec9e Remove duplicated test cases that occurred when I applied the same patch file to my model twice.
llvm-svn: 191873
2013-10-03 04:27:14 +00:00
Craig Topper d867805739 Change __builtin_ia32_bextri_u64 to take an i64imm to match up with LLVM backend changes.
An explicit cast is still needed in tbmintrin.h to convert any big integer down to i32imm.

Patch from Yunzhong Gao.

llvm-svn: 191872
2013-10-03 04:21:19 +00:00
Craig Topper b01cd1aa74 Add patterns for selecting TBM instructions from logical operations. Patch from Yunzhong Gao.
llvm-svn: 191871
2013-10-03 04:16:45 +00:00
Pete Cooper d54381749d Add v4f16 to supported value types.
This is useful for some ARM intrinsics such as VCVTN which does a <4 x float> <-> <4 x half> conversion.

llvm-svn: 191870
2013-10-03 03:29:21 +00:00