lldb.git
9 years agoMatchers which correspond to CastExpr, IgnoreImpCasts, IgnoreParenCasts, and IgnorePa...
Sam Panzer [Thu, 16 Aug 2012 16:58:10 +0000 (16:58 +0000)]
Matchers which correspond to CastExpr, IgnoreImpCasts, IgnoreParenCasts, and IgnoreParenImpCasts

llvm-svn: 162025

9 years agotsan: add flag to disable reporting of destruction of locked mutexes (some programs...
Dmitry Vyukov [Thu, 16 Aug 2012 15:12:35 +0000 (15:12 +0000)]
tsan: add flag to disable reporting of destruction of locked mutexes (some programs use that on a regular basis)

llvm-svn: 162024

9 years agoTeach GVN to reason about edges dominating uses. This allows it to handle cases
Rafael Espindola [Thu, 16 Aug 2012 15:09:43 +0000 (15:09 +0000)]
Teach GVN to reason about edges dominating uses. This allows it to handle cases
where some fact lake a=b dominates a use in a phi, but doesn't dominate the
basic block itself.

This feature could also be implemented by splitting critical edges, but at least
with the current algorithm reasoning about the dominance directly is faster.

The time for running "opt -O2" in the testcase in pr10584 is 1.003 times slower
and on gcc as a single file it is 1.0007 times faster.

llvm-svn: 162023

9 years agotsan: better diagnostics for destroy of a locked mutex + a test
Dmitry Vyukov [Thu, 16 Aug 2012 15:08:49 +0000 (15:08 +0000)]
tsan: better diagnostics for destroy of a locked mutex + a test

llvm-svn: 162022

9 years agotsan: support for linker initializer mutexes with static storage duration
Dmitry Vyukov [Thu, 16 Aug 2012 14:21:09 +0000 (14:21 +0000)]
tsan: support for linker initializer mutexes with static storage duration

llvm-svn: 162021

9 years agotsan: fix COMPAT shadow mapping once again
Dmitry Vyukov [Thu, 16 Aug 2012 14:20:45 +0000 (14:20 +0000)]
tsan: fix COMPAT shadow mapping once again

llvm-svn: 162020

9 years agotsan: implement RWLOCK annotations
Dmitry Vyukov [Thu, 16 Aug 2012 13:29:41 +0000 (13:29 +0000)]
tsan: implement RWLOCK annotations

llvm-svn: 162019

9 years agotsan: fix COMPAT shadow mapping for new memory allocator
Dmitry Vyukov [Thu, 16 Aug 2012 13:27:25 +0000 (13:27 +0000)]
tsan: fix COMPAT shadow mapping for new memory allocator

llvm-svn: 162018

9 years agotsan: refactor cur_thread() -> thr
Dmitry Vyukov [Thu, 16 Aug 2012 13:26:54 +0000 (13:26 +0000)]
tsan: refactor cur_thread() -> thr

llvm-svn: 162017

9 years agoAdd dump/dumpr methods to SDValue.
Nadav Rotem [Thu, 16 Aug 2012 07:39:52 +0000 (07:39 +0000)]
Add dump/dumpr methods to SDValue.

llvm-svn: 162014

9 years ago[arm-fast-isel] Add support for fastcc.
Jush Lu [Thu, 16 Aug 2012 05:15:53 +0000 (05:15 +0000)]
[arm-fast-isel] Add support for fastcc.

Without fastcc support, the caller just falls through to CallingConv::C
for fastcc, but callee still uses fastcc, this inconsistency of calling
convention is a problem, and fastcc support can fix it.

llvm-svn: 162013

9 years agoPatch to enable FMA on bdver2 target. Make XOP feature enable FMA4 as well.
Anitha Boyapati [Thu, 16 Aug 2012 04:04:02 +0000 (04:04 +0000)]
Patch to enable FMA on bdver2 target. Make XOP feature enable FMA4 as well.

llvm-svn: 162012

9 years agoStore SourceManager pointer on PrintingPolicy in the case where we're dumping,
Richard Smith [Thu, 16 Aug 2012 03:56:14 +0000 (03:56 +0000)]
Store SourceManager pointer on PrintingPolicy in the case where we're dumping,
and remove ASTContext reference (which was frequently bound to a dereferenced
null pointer) from the recursive lump of printPretty functions. In so doing,
fix (at least) one case where we intended to use the 'dump' mode, but that
failed because a null ASTContext reference had been passed in.

llvm-svn: 162011

9 years ago(no commit message)
Anitha Boyapati [Thu, 16 Aug 2012 03:50:04 +0000 (03:50 +0000)]
(no commit message)

llvm-svn: 162010

9 years agoTest case for r162008.
Akira Hatanaka [Thu, 16 Aug 2012 03:48:41 +0000 (03:48 +0000)]
Test case for r162008.

llvm-svn: 162009

9 years agoAdd Android ABI to Mips backend to handle functions returning vectors of four
Akira Hatanaka [Thu, 16 Aug 2012 03:48:05 +0000 (03:48 +0000)]
Add Android ABI to Mips backend to handle functions returning vectors of four
floats.

llvm-svn: 162008

9 years agoDon't constant-fold when pretty-printing alignment attribute. This fixes a
Richard Smith [Thu, 16 Aug 2012 02:43:29 +0000 (02:43 +0000)]
Don't constant-fold when pretty-printing alignment attribute. This fixes a
potential crasher -- Context is sometimes a null reference (!!) here.

llvm-svn: 162007

9 years agoTest commit: deleted whitespace on blank line
Sam Panzer [Thu, 16 Aug 2012 02:38:47 +0000 (02:38 +0000)]
Test commit: deleted whitespace on blank line

llvm-svn: 162006

9 years agoFix misaligned allocation of QualifiedTempateName and DependentTemplateName.
Richard Smith [Thu, 16 Aug 2012 01:19:31 +0000 (01:19 +0000)]
Fix misaligned allocation of QualifiedTempateName and DependentTemplateName.

llvm-svn: 162005

9 years agoRemove names from the CHECK lines.
Tanya Lattner [Thu, 16 Aug 2012 00:22:16 +0000 (00:22 +0000)]
Remove names from the CHECK lines.

llvm-svn: 162003

9 years agoConvert loads and stores of vec3 to vec4 to achieve better code generation. Add test...
Tanya Lattner [Thu, 16 Aug 2012 00:10:13 +0000 (00:10 +0000)]
Convert loads and stores of vec3 to vec4 to achieve better code generation. Add test case.

llvm-svn: 162002

9 years agoUpdate build instructions. Patch from "Kopec, Matt" <matt.kopec@intel.com>!
Johnny Chen [Thu, 16 Aug 2012 00:08:21 +0000 (00:08 +0000)]
Update build instructions.  Patch from "Kopec, Matt" <matt.kopec@intel.com>!

llvm-svn: 162001

9 years ago[ms-inline asm] Add inputs and outputs to AST. No functional change.
Chad Rosier [Thu, 16 Aug 2012 00:06:53 +0000 (00:06 +0000)]
[ms-inline asm] Add inputs and outputs to AST.  No functional change.

llvm-svn: 162000

9 years ago[analyzer] Look through all casts when trying to track constraints.
Jordan Rose [Thu, 16 Aug 2012 00:03:33 +0000 (00:03 +0000)]
[analyzer] Look through all casts when trying to track constraints.

Previously, we were losing path notes (in both text and plist form)
because the interesting DeclRefExpr was buried in a cast.

llvm-svn: 161999

9 years agoDevirtualize calls on glvalues produced by class member access expressions.
Richard Smith [Wed, 15 Aug 2012 22:59:28 +0000 (22:59 +0000)]
Devirtualize calls on glvalues produced by class member access expressions.
Based on a patch by Yin Ma!

llvm-svn: 161998

9 years agoThread safety analysis: prevent a compiler error in cases where a
DeLesley Hutchins [Wed, 15 Aug 2012 22:41:04 +0000 (22:41 +0000)]
Thread safety analysis:  prevent a compiler error in cases where a
late-parsed attribute is attached to an invalid declaration.

llvm-svn: 161997

9 years agobug in experimental targets
Victor Oliveira [Wed, 15 Aug 2012 22:35:36 +0000 (22:35 +0000)]
bug in experimental targets

llvm-svn: 161995

9 years agoFold predicable instructions into MOVCC / t2MOVCC.
Jakob Stoklund Olesen [Wed, 15 Aug 2012 22:16:39 +0000 (22:16 +0000)]
Fold predicable instructions into MOVCC / t2MOVCC.

The ARM select instructions are just predicated moves. If the select is
the only use of an operand, the instruction defining the operand can be
predicated instead, saving one instruction and decreasing register
pressure.

This implementation can turn AND/ORR/EOR instructions into their
corresponding ANDCC/ORRCC/EORCC variants. Ideally, we should be able to
predicate any instruction, but we don't yet support predicated
instructions in SSA form.

llvm-svn: 161994

9 years agordar://problem/12096295
Johnny Chen [Wed, 15 Aug 2012 22:10:42 +0000 (22:10 +0000)]
rdar://problem/12096295

Add an lldb command line option to specify a core file: --core/-c.
For consistency, change the "target create" command to also use --core.

llvm-svn: 161993

9 years ago[analyzer] If we call a C++ method on an object, assume it's non-null.
Jordan Rose [Wed, 15 Aug 2012 21:56:23 +0000 (21:56 +0000)]
[analyzer] If we call a C++ method on an object, assume it's non-null.

This is analogous to our handling of pointer dereferences: if we
dereference a pointer that may or may not be null, we assume it's non-null
from then on.

While some implementations of C++ (including ours) allow you to call a
non-virtual method through a null pointer of object type, it is technically
disallowed by the C++ standard, and should not prune out any real paths in
practice.

  [class.mfct.non-static]p1: A non-static member function may be called
    for an object of its class type, or for an object of a class derived
    from its class type...
  (a null pointer value does not refer to an object)

We can also make the same assumption about function pointers.

llvm-svn: 161992

9 years ago[ms-inline asm] Use a set container to remove redundant clobbers.
Chad Rosier [Wed, 15 Aug 2012 21:55:19 +0000 (21:55 +0000)]
[ms-inline asm] Use a set container to remove redundant clobbers.

llvm-svn: 161991

9 years agoRemove dead flag.
Bill Wendling [Wed, 15 Aug 2012 21:18:10 +0000 (21:18 +0000)]
Remove dead flag.

llvm-svn: 161990

9 years agoRework test so that it reproduces the error without the horrible flag.
Bill Wendling [Wed, 15 Aug 2012 21:10:18 +0000 (21:10 +0000)]
Rework test so that it reproduces the error without the horrible flag.

llvm-svn: 161989

9 years ago[ms-inline asm] Address a FIXME by computing the number of asm statements when
Chad Rosier [Wed, 15 Aug 2012 21:08:52 +0000 (21:08 +0000)]
[ms-inline asm] Address a FIXME by computing the number of asm statements when
building the AsmString.

llvm-svn: 161988

9 years ago[analyzer] Even if we are not inlining a virtual call, still invalidate!
Jordan Rose [Wed, 15 Aug 2012 21:05:15 +0000 (21:05 +0000)]
[analyzer] Even if we are not inlining a virtual call, still invalidate!

Fixes a mistake introduced in r161916.

llvm-svn: 161987

9 years ago[ms-inline asm] MSVC parses multiple __asm statements on a single line as one
Chad Rosier [Wed, 15 Aug 2012 21:03:27 +0000 (21:03 +0000)]
[ms-inline asm] MSVC parses multiple __asm statements on a single line as one
statement.  For example,

  if (x)
    __asm out dx, ax  __asm out dx, ax

results in a single inline asm statement (i.e., both "out dx, ax" statements are
predicated on if(x)).

llvm-svn: 161986

9 years agoRemove invalid test. This test requires that dead basic blocks be kept
Bill Wendling [Wed, 15 Aug 2012 20:54:09 +0000 (20:54 +0000)]
Remove invalid test. This test requires that dead basic blocks be kept
around. That's not how we do things. Besides, the commit message tells us that
it is covered by the GCC test suite.

------------------------------------------------------------------------
r127497 | zwarich | 2011-03-11 13:51:56 -0800 (Fri, 11 Mar 2011) | 3 lines

Fix the GCC test suite issue exposed by r127477, which was caused by stack
protector insertion not working correctly with unreachable code. Since that
revision was rolled out, this test doesn't actual fail before this fix.
------------------------------------------------------------------------

llvm-svn: 161985

9 years agoFixed a problem in the JIT memory allocator where
Sean Callanan [Wed, 15 Aug 2012 20:53:52 +0000 (20:53 +0000)]
Fixed a problem in the JIT memory allocator where
allocations of executable memory would not be padded
to account for the size of the allocation header.
This resulted in undersized allocations, meaning that
when the allocation was written to later the next
allocation's header would be corrupted.

llvm-svn: 161984

9 years agoAdd a CoveringSubRegIndices field to SubRegIndex records.
Jakob Stoklund Olesen [Wed, 15 Aug 2012 20:15:48 +0000 (20:15 +0000)]
Add a CoveringSubRegIndices field to SubRegIndex records.

This can be used to tell TableGen to use a specific SubRegIndex instead
of synthesizing one when discovering all sub-registers.

llvm-svn: 161982

9 years ago[analyzer] Correctly devirtualize virtual method calls in constructors.
Jordan Rose [Wed, 15 Aug 2012 20:07:17 +0000 (20:07 +0000)]
[analyzer] Correctly devirtualize virtual method calls in constructors.

This is the other half of C++11 [class.cdtor]p4 (the destructor side
was added in r161915). This also fixes an issue with post-call checks
where the 'this' value was already being cleaned out of the state, thus
being omitted from a reconstructed CXXConstructorCall.

llvm-svn: 161981

9 years agoAllow 'static' and type qualifiers in K&R parameter type lists.
Matt Beaumont-Gay [Wed, 15 Aug 2012 19:53:19 +0000 (19:53 +0000)]
Allow 'static' and type qualifiers in K&R parameter type lists.

llvm-svn: 161980

9 years agoProperly test the LLVM_USE_RVALUE_REFERENCES macro.
Michael J. Spencer [Wed, 15 Aug 2012 19:21:42 +0000 (19:21 +0000)]
Properly test the LLVM_USE_RVALUE_REFERENCES macro.

llvm-svn: 161979

9 years agoProperly test the LLVM_USE_RVALUE_REFERENCES macro.
Michael J. Spencer [Wed, 15 Aug 2012 19:16:27 +0000 (19:16 +0000)]
Properly test the LLVM_USE_RVALUE_REFERENCES macro.

llvm-svn: 161978

9 years ago[ms-inline asm] Don't emit newlines as these are ignored by the AsmParser
Chad Rosier [Wed, 15 Aug 2012 19:12:42 +0000 (19:12 +0000)]
[ms-inline asm] Don't emit newlines as these are ignored by the AsmParser
anyways.  Also, simplify some conditional logic.

llvm-svn: 161977

9 years ago[PathV2] Add mapped_file_region. Implementation for Windows and POSIX.
Michael J. Spencer [Wed, 15 Aug 2012 19:05:47 +0000 (19:05 +0000)]
[PathV2] Add mapped_file_region. Implementation for Windows and POSIX.

llvm-svn: 161976

9 years agoAdd LLVM_DELETED_FUNCTION compatibility macro.
Michael J. Spencer [Wed, 15 Aug 2012 18:54:36 +0000 (18:54 +0000)]
Add LLVM_DELETED_FUNCTION compatibility macro.

This should replace uses of:

class A {
  A(const &A); // DO NOT IMPLEMENT
public:
  ...
};

llvm-svn: 161975

9 years agoAdd ASTMatcher for matching extern "C" function declarations.
Daniel Jasper [Wed, 15 Aug 2012 18:52:19 +0000 (18:52 +0000)]
Add ASTMatcher for matching extern "C" function declarations.

llvm-svn: 161974

9 years agoFix a typo in VariadicFunction.h that leads to invalid code in macro expansion.
Chad Rosier [Wed, 15 Aug 2012 18:48:14 +0000 (18:48 +0000)]
Fix a typo in VariadicFunction.h that leads to invalid code in macro expansion.
Patch by Andy Gibbs <andyg1001@hotmail.co.uk>

llvm-svn: 161973

9 years agoPatch to warn about __private_extern__ on tentative definitions
Fariborz Jahanian [Wed, 15 Aug 2012 18:42:26 +0000 (18:42 +0000)]
Patch to warn about __private_extern__ on tentative definitions
as it does something unexpected (but gcc compatible).
Suggest use of __attribute__((visibility("hidden")))
on declaration instead. // rdar://7703982

llvm-svn: 161972

9 years agoFix for PR#13606: http://llvm.org/bugs/show_bug.cgi?id=13606
John Criswell [Wed, 15 Aug 2012 18:40:30 +0000 (18:40 +0000)]
Fix for PR#13606: llvm.org/bugs/show_bug.cgi?id=13606
Changed the alignment of an LValue to be 64 bits so that we can handle
alignment values up to half of a 64-bit address space.

llvm-svn: 161971

9 years agoFix another roundToIntegral bug where very large values could become infinity. Probl...
Owen Anderson [Wed, 15 Aug 2012 18:28:45 +0000 (18:28 +0000)]
Fix another roundToIntegral bug where very large values could become infinity.  Problem and solution identified by Steve Canon.

llvm-svn: 161969

9 years ago[ms-inline asm] Add support for clobbers in CodeGen.
Chad Rosier [Wed, 15 Aug 2012 18:12:36 +0000 (18:12 +0000)]
[ms-inline asm]  Add support for clobbers in CodeGen.

This is a reapplication of r161914 now that the scoping issue has been resolved
in r161966.

llvm-svn: 161967

9 years ago[ms-inline asm] Capturing loop-scoped (std::string)Reg with a StringRef is bad.
Chad Rosier [Wed, 15 Aug 2012 18:09:18 +0000 (18:09 +0000)]
[ms-inline asm] Capturing loop-scoped (std::string)Reg with a StringRef is bad.

llvm-svn: 161966

9 years agoMake synthesized sub-register indexes available in the target namespace.
Jakob Stoklund Olesen [Wed, 15 Aug 2012 18:00:55 +0000 (18:00 +0000)]
Make synthesized sub-register indexes available in the target namespace.

TableGen sometimes synthesizes missing sub-register indexes. Emit these
indexes as enumerators in the target namespace along with the
user-defined ones.

Also take this opportunity to stop creating new Record objects for
synthetic indexes.

llvm-svn: 161964

9 years agoFix base type of ASTDeclNodeLister.
Michael Han [Wed, 15 Aug 2012 17:56:58 +0000 (17:56 +0000)]
Fix base type of ASTDeclNodeLister.

llvm-svn: 161963

9 years agoUse vld1/vst1 to load/store f64 if alignment is < 4 and the target allows unaligned...
Evan Cheng [Wed, 15 Aug 2012 17:44:53 +0000 (17:44 +0000)]
Use vld1/vst1 to load/store f64 if alignment is < 4 and the target allows unaligned access. rdar://12091029

llvm-svn: 161962

9 years ago[analyzer] Don't try to devirtualize if the class is incomplete.
Jordan Rose [Wed, 15 Aug 2012 17:33:37 +0000 (17:33 +0000)]
[analyzer] Don't try to devirtualize if the class is incomplete.

A similar issue to the previous commit, introduced by r161915.

llvm-svn: 161961

9 years ago[analyzer] Only adjust the type of 'this' when we devirtualize a method call.
Jordan Rose [Wed, 15 Aug 2012 17:33:34 +0000 (17:33 +0000)]
[analyzer] Only adjust the type of 'this' when we devirtualize a method call.

With reinterpret_cast, we can get completely unrelated types in a region
hierarchy together; this was resulting in CXXBaseObjectRegions being layered
directly on an (untyped) SymbolicRegion, whose symbol was from a completely
different type hierarchy. This was what was causing the internal buildbot to
fail.

Reverts r161911, which merely masked the problem.

llvm-svn: 161960

9 years agotsan: store sync objects in memory block headers + delete them when the block is...
Dmitry Vyukov [Wed, 15 Aug 2012 17:27:20 +0000 (17:27 +0000)]
tsan: store sync objects in memory block headers + delete them when the block is freed

llvm-svn: 161959

9 years ago[ms-inline asm] Add the left brace source location and improve the pretty
Chad Rosier [Wed, 15 Aug 2012 16:53:30 +0000 (16:53 +0000)]
[ms-inline asm] Add the left brace source location and improve the pretty
printer.  Patch by Enea Zaffanella <zaffanella@cs.unipr.it>.

llvm-svn: 161958

9 years agotsan: provide function that imitates write to a region but does not detect races
Dmitry Vyukov [Wed, 15 Aug 2012 16:52:19 +0000 (16:52 +0000)]
tsan: provide function that imitates write to a region but does not detect races

llvm-svn: 161957

9 years agoFix typo in comment.
Owen Anderson [Wed, 15 Aug 2012 16:42:53 +0000 (16:42 +0000)]
Fix typo in comment.

llvm-svn: 161956

9 years agoAdd missing Rfalse operand to the predicated pseudo-instructions.
Jakob Stoklund Olesen [Wed, 15 Aug 2012 16:17:24 +0000 (16:17 +0000)]
Add missing Rfalse operand to the predicated pseudo-instructions.

When predicating this instruction:

  Rd = ADD Rn, Rm

We need an extra operand to represent the value given to Rd when the
predicate is false:

  Rd = ADDCC Rfalse, Rn, Rm, pred

The Rd and Rfalse operands are different registers while in SSA form.
Rfalse is tied to Rd to make sure they get the same register during
register allocation.

Previously, Rd and Rn were tied, but that is not required.

Compare to MOVCC:

  Rd = MOVCC Rfalse, Rtrue, pred

llvm-svn: 161955

9 years agoRemove the extra semicolon reported by the buildbot.
Alexander Potapenko [Wed, 15 Aug 2012 15:59:18 +0000 (15:59 +0000)]
Remove the extra semicolon reported by the buildbot.

llvm-svn: 161954

9 years agotsan: switch to new allocator
Dmitry Vyukov [Wed, 15 Aug 2012 15:35:15 +0000 (15:35 +0000)]
tsan: switch to new allocator

llvm-svn: 161953

9 years agoIntroduce asan_intercepted_functions.h which contains the declarations wrapped functi...
Alexander Potapenko [Wed, 15 Aug 2012 15:24:48 +0000 (15:24 +0000)]
Introduce asan_intercepted_functions.h which contains the declarations wrapped functions and their wrappers.
Those declarations are going to be shared between asan_interceptors.cc and the dynamic runtime library on Mac OS.

llvm-svn: 161952

9 years ago[ASan] lit tests: use nm instead of llvm-nm, until llvm-nm becomes usable on Mac...
Alexey Samsonov [Wed, 15 Aug 2012 14:33:30 +0000 (14:33 +0000)]
[ASan] lit tests: use nm instead of llvm-nm, until llvm-nm becomes usable on Mac. Port output test change in r161948 to lit

llvm-svn: 161951

9 years agotsan: add some more tests for memory allocator
Dmitry Vyukov [Wed, 15 Aug 2012 14:25:33 +0000 (14:25 +0000)]
tsan: add some more tests for memory allocator

llvm-svn: 161950

9 years agotsan: fix several integer overflows
Dmitry Vyukov [Wed, 15 Aug 2012 14:25:08 +0000 (14:25 +0000)]
tsan: fix several integer overflows

llvm-svn: 161949

9 years agoCheck for filenames and numbers to detect possible problems with asan_symbolize.py...
Alexander Potapenko [Wed, 15 Aug 2012 14:00:09 +0000 (14:00 +0000)]
Check for filenames and numbers to detect possible problems with asan_symbolize.py on -fPIE binaries.

llvm-svn: 161948

9 years agoPass offset of the frame address within the binary to addr2line instead of the absolu...
Alexander Potapenko [Wed, 15 Aug 2012 13:58:24 +0000 (13:58 +0000)]
Pass offset of the frame address within the binary to addr2line instead of the absolute address.
Fixes the problem with -PIE binaries.

llvm-svn: 161947

9 years agoPatch the frame address regardless of the frame number.
Alexander Potapenko [Wed, 15 Aug 2012 13:23:03 +0000 (13:23 +0000)]
Patch the frame address regardless of the frame number.

llvm-svn: 161946

9 years agoMove the prototype of __CFInitialize to asan_mac.h so that asan_malloc_mac.cc may...
Alexander Potapenko [Wed, 15 Aug 2012 12:23:36 +0000 (12:23 +0000)]
Move the prototype of __CFInitialize to asan_mac.h so that asan_malloc_mac.cc may use it in the dynamic library mode.

llvm-svn: 161945

9 years agoSet the branch probability of branching to the 'normal' destination of an invoke
Bill Wendling [Wed, 15 Aug 2012 12:22:35 +0000 (12:22 +0000)]
Set the branch probability of branching to the 'normal' destination of an invoke
instruction to something absurdly high, while setting the probability of
branching to the 'unwind' destination to the bare minimum. This should set cause
the normal destination's invoke blocks to be moved closer to the invoke.

PR13612

llvm-svn: 161944

9 years agoUse SANITIZER_INTERFACE_ATTRIBUTE instead of __attribute__((visibility("default")))
Alexander Potapenko [Wed, 15 Aug 2012 11:57:52 +0000 (11:57 +0000)]
Use SANITIZER_INTERFACE_ATTRIBUTE instead of __attribute__((visibility("default")))
Export CheckFailed, asan_malloc, asan_free, asan_memalign, AsanStackTrace::CompressStack, AsanStackTrace::UncompressStack from the dynamic runtime library.

llvm-svn: 161943

9 years agoMake __asan::asan_{malloc,free,memalign} globally visible, so that the dynamic versio...
Alexander Potapenko [Wed, 15 Aug 2012 11:32:15 +0000 (11:32 +0000)]
Make __asan::asan_{malloc,free,memalign} globally visible, so that the dynamic version of the runtime will export them.

llvm-svn: 161942

9 years ago[ASan] Port (the last one) tricky interface_test to lit, and a *huge* chunks of boile...
Alexey Samsonov [Wed, 15 Aug 2012 11:26:57 +0000 (11:26 +0000)]
[ASan] Port (the last one) tricky interface_test to lit, and a *huge* chunks of boilerplate to run tests for 32/64 bits and all optimization levels. Alas, lit doesn't support for loops in RUN-lines...

llvm-svn: 161941

9 years agoFix a const violation in the generated disassembler.
Benjamin Kramer [Wed, 15 Aug 2012 10:26:44 +0000 (10:26 +0000)]
Fix a const violation in the generated disassembler.

llvm-svn: 161940

9 years agoDo not attempt to intercept mlock and friends on Windows.
Alexander Potapenko [Wed, 15 Aug 2012 09:46:45 +0000 (09:46 +0000)]
Do not attempt to intercept mlock and friends on Windows.

llvm-svn: 161939

9 years agoUse the common interception machinery for mlock/munlock/mlockall/munlockall.
Alexander Potapenko [Wed, 15 Aug 2012 09:22:57 +0000 (09:22 +0000)]
Use the common interception machinery for mlock/munlock/mlockall/munlockall.

llvm-svn: 161938

9 years ago[asan] implement --asan-always-slow-path, which is a part of the improvement to handl...
Kostya Serebryany [Wed, 15 Aug 2012 08:58:58 +0000 (08:58 +0000)]
[asan] implement --asan-always-slow-path, which is a part of the improvement to handle unaligned partially OOB accesses. See code.google.com/p/address-sanitizer/issues/detail?id=100

llvm-svn: 161937

9 years ago[ASan] use clangxx_asan instead of clang_asan for C++ lit tests
Alexey Samsonov [Wed, 15 Aug 2012 08:54:14 +0000 (08:54 +0000)]
[ASan] use clangxx_asan instead of clang_asan for C++ lit tests

llvm-svn: 161936

9 years ago[ASan] port remaining output and feature tests to lit. TODO: we should in fact run...
Alexey Samsonov [Wed, 15 Aug 2012 08:29:17 +0000 (08:29 +0000)]
[ASan] port remaining output and feature tests to lit. TODO: we should in fact run most of the tests for 32/64 bits and for all optimization levels

llvm-svn: 161935

9 years agoCheck for improper use of 'static' and type qualifiers in array
Hans Wennborg [Wed, 15 Aug 2012 07:42:30 +0000 (07:42 +0000)]
Check for improper use of 'static' and type qualifiers in array
declarators.

They are only allowed for function parameters, and then only on the
outermost array type derivation.

llvm-svn: 161934

9 years ago[ASan] port interception and shared library tests to lit
Alexey Samsonov [Wed, 15 Aug 2012 07:13:51 +0000 (07:13 +0000)]
[ASan] port interception and shared library tests to lit

llvm-svn: 161933

9 years ago[ASan] move declaration of __asan_default_options to interface header
Alexey Samsonov [Wed, 15 Aug 2012 07:11:14 +0000 (07:11 +0000)]
[ASan] move declaration of __asan_default_options to interface header

llvm-svn: 161932

9 years agoRevert this to try to bring the i386 bots back.
Eric Christopher [Wed, 15 Aug 2012 06:31:06 +0000 (06:31 +0000)]
Revert this to try to bring the i386 bots back.

llvm-svn: 161931

9 years agoRemove executable bits from html files
Tobias Grosser [Wed, 15 Aug 2012 05:50:24 +0000 (05:50 +0000)]
Remove executable bits from html files

llvm-svn: 161930

9 years agoFix a problem with APFloat::roundToIntegral where it would return incorrect results...
Owen Anderson [Wed, 15 Aug 2012 05:39:46 +0000 (05:39 +0000)]
Fix a problem with APFloat::roundToIntegral where it would return incorrect results for negative inputs to trunc.  Add unit tests to verify this behavior.

llvm-svn: 161929

9 years agowww documentation for using Polly with dragonegg.
Tobias Grosser [Wed, 15 Aug 2012 05:02:25 +0000 (05:02 +0000)]
www documentation for using Polly with dragonegg.

Added a file that explains how to load Polly in dragonegg.
Also fixed a typo in the document for clang.

Committed with a typo fix and a change to make this website available from
the documentation section.

Contributed by: Sameer Sahasrabuddhe  <Sameer.Sahasrabuddhe@amd.com>

llvm-svn: 161928

9 years agoclang/lib/Sema/SemaStmt.cpp: Include MCAsmLexer.h to appease msvc to define llvm...
NAKAMURA Takumi [Wed, 15 Aug 2012 04:19:08 +0000 (04:19 +0000)]
clang/lib/Sema/SemaStmt.cpp: Include MCAsmLexer.h to appease msvc to define llvm::AsmToken.

llvm-svn: 161927

9 years agofix infinite loop in instcombine with more than 4GB memcpy
Michael Liao [Wed, 15 Aug 2012 03:49:59 +0000 (03:49 +0000)]
fix infinite loop in instcombine with more than 4GB memcpy

- memcpy size is wrongly truncated into 32-bit and treat 8GB memcpy is
  0-sized memcpy
- as 0-sized memcpy/memset is already removed before SimplifyMemTransfer
  and SimplifyMemSet in visitCallInst, replace 0 checking with
  assertions.
- replace getZExtValue() with getLimitedValue() according to
  Eli Friedman

llvm-svn: 161923

9 years agoFix a typo that led to a failure to correctly verify bitcast instructions.
Nick Lewycky [Wed, 15 Aug 2012 02:37:07 +0000 (02:37 +0000)]
Fix a typo that led to a failure to correctly verify bitcast instructions.
Patch by Stephen Hines!

llvm-svn: 161921

9 years agoUse the right alignment when allocating NestedNameSpecifier objects.
Richard Smith [Wed, 15 Aug 2012 01:41:43 +0000 (01:41 +0000)]
Use the right alignment when allocating NestedNameSpecifier objects.

llvm-svn: 161920

9 years agoFix undefined behavior: don't perform array indexing through a potentially null
Richard Smith [Wed, 15 Aug 2012 01:39:31 +0000 (01:39 +0000)]
Fix undefined behavior: don't perform array indexing through a potentially null
pointer.

llvm-svn: 161919

9 years agoFix overallocation and underalignment of ASTTemplateArgumentListInfo objects.
Richard Smith [Wed, 15 Aug 2012 01:22:58 +0000 (01:22 +0000)]
Fix overallocation and underalignment of ASTTemplateArgumentListInfo objects.

llvm-svn: 161918

9 years ago[analyzer] Doxygen comments in ObjCMethodCall.
Jordan Rose [Wed, 15 Aug 2012 00:52:03 +0000 (00:52 +0000)]
[analyzer] Doxygen comments in ObjCMethodCall.

No functionality change.

llvm-svn: 161917

9 years ago[analyzer] Don't inline dynamic-dispatch methods unless -analyzer-ipa=dynamic.
Jordan Rose [Wed, 15 Aug 2012 00:52:00 +0000 (00:52 +0000)]
[analyzer] Don't inline dynamic-dispatch methods unless -analyzer-ipa=dynamic.

Previously we were checking -analyzer-ipa=dynamic-bifurcate only, and
unconditionally inlining everything else that had an available definition,
even under -analyzer-ipa=inlining (but not under -analyzer-ipa=none).

llvm-svn: 161916

9 years ago[analyzer] Correctly devirtualize virtual method calls in destructors.
Jordan Rose [Wed, 15 Aug 2012 00:51:56 +0000 (00:51 +0000)]
[analyzer] Correctly devirtualize virtual method calls in destructors.

C++11 [class.cdtor]p4: When a virtual function is called directly or
  indirectly from a constructor or from a destructor, including during
  the construction or destruction of the class’s non-static data members,
  and the object to which the call applies is the object under
  construction or destruction, the function called is the final overrider
  in the constructor's or destructor's class and not one overriding it in
  a more-derived class.

llvm-svn: 161915

9 years ago[ms-inline asm] Add support for clobbers in CodeGen.
Chad Rosier [Wed, 15 Aug 2012 00:43:09 +0000 (00:43 +0000)]
[ms-inline asm] Add support for clobbers in CodeGen.

llvm-svn: 161914