lldb.git
10 years agoRemoved unused LParenLoc parameter to ActOnCXXForRangeStmt
Sam Panzer [Thu, 16 Aug 2012 21:47:25 +0000 (21:47 +0000)]
Removed unused LParenLoc parameter to ActOnCXXForRangeStmt

llvm-svn: 162048

10 years agoFixed some small formatting issues in the help for
Sean Callanan [Thu, 16 Aug 2012 21:46:58 +0000 (21:46 +0000)]
Fixed some small formatting issues in the help for
"command regex."  It's now more readable and
grammatically correct.

<rdar://problem/12115962>

llvm-svn: 162047

10 years agoFixed a crash when incomplete expression variables
Sean Callanan [Thu, 16 Aug 2012 21:34:44 +0000 (21:34 +0000)]
Fixed a crash when incomplete expression variables
are materialized.

<rdar://problem/12105013>

llvm-svn: 162046

10 years agoobjective-C: make -Wcast-of-sel-type the default.
Fariborz Jahanian [Thu, 16 Aug 2012 20:16:46 +0000 (20:16 +0000)]
objective-C: make  -Wcast-of-sel-type the default.
// rdar://12107381

llvm-svn: 162045

10 years agoCommentCommandTraits: rename BeginName -> StartName for consistency.
Dmitri Gribenko [Thu, 16 Aug 2012 20:16:11 +0000 (20:16 +0000)]
CommentCommandTraits: rename BeginName -> StartName for consistency.

llvm-svn: 162044

10 years ago[ms-inline asm] Perform symbol table lookup on variables. The idea is to use
Chad Rosier [Thu, 16 Aug 2012 19:52:25 +0000 (19:52 +0000)]
[ms-inline asm] Perform symbol table lookup on variables.  The idea is to use
this information to determine valid MC operands.  This will also be used for
semantic analysis.

llvm-svn: 162043

10 years agotsan: improve Go report format + fix build
Dmitry Vyukov [Thu, 16 Aug 2012 19:36:45 +0000 (19:36 +0000)]
tsan: improve Go report format + fix build

llvm-svn: 162042

10 years agoCatch timestamps for the beginning and end of the test suite run.
Johnny Chen [Thu, 16 Aug 2012 19:15:21 +0000 (19:15 +0000)]
Catch timestamps for the beginning and end of the test suite run.

llvm-svn: 162040

10 years agoRevert r162034, r162035 and r162037.
Roman Divacky [Thu, 16 Aug 2012 19:07:59 +0000 (19:07 +0000)]
Revert r162034, r162035 and r162037.

llvm-svn: 162039

10 years agoFixup test case for Release builds.
Chad Rosier [Thu, 16 Aug 2012 18:47:29 +0000 (18:47 +0000)]
Fixup test case for Release builds.

llvm-svn: 162038

10 years agoDefine and handle additional fixup kinds. By Adhemerval Zanella.
Roman Divacky [Thu, 16 Aug 2012 18:37:52 +0000 (18:37 +0000)]
Define and handle additional fixup kinds. By Adhemerval Zanella.

llvm-svn: 162037

10 years agoobjective-C: deprecate casts of ObjC's SEL
Fariborz Jahanian [Thu, 16 Aug 2012 18:33:47 +0000 (18:33 +0000)]
objective-C: deprecate casts of ObjC's SEL
expressions except to void, void * and their
qualified versions. // rdar://12107381

llvm-svn: 162036

10 years agoAdd PPC64 relocations definitions, by Adhemerval Zanella.
Roman Divacky [Thu, 16 Aug 2012 18:31:29 +0000 (18:31 +0000)]
Add PPC64 relocations definitions, by Adhemerval Zanella.

llvm-svn: 162035

10 years agoHandle PowerPC.
Roman Divacky [Thu, 16 Aug 2012 18:30:03 +0000 (18:30 +0000)]
Handle PowerPC.

llvm-svn: 162034

10 years agoAttaching comments to declarations: parse the comment in context of the
Dmitri Gribenko [Thu, 16 Aug 2012 18:19:43 +0000 (18:19 +0000)]
Attaching comments to declarations: parse the comment in context of the
declaration it was attached to.

llvm-svn: 162033

10 years agoFix typo and grammar. By Adhemerval Zanella.
Roman Divacky [Thu, 16 Aug 2012 18:19:29 +0000 (18:19 +0000)]
Fix typo and grammar. By Adhemerval Zanella.

llvm-svn: 162032

10 years agoFixed some renaming detritus in the comments, and an unused variable warning. Thanks...
Marshall Clow [Thu, 16 Aug 2012 17:47:06 +0000 (17:47 +0000)]
Fixed some renaming detritus in the comments, and an unused variable warning. Thanks to David Blaikie and Manuel Klimek for the comments

llvm-svn: 162031

10 years agoRemove #if 0 that has been around for a long time.
Ted Kremenek [Thu, 16 Aug 2012 17:45:32 +0000 (17:45 +0000)]
Remove #if 0 that has been around for a long time.

llvm-svn: 162030

10 years agoRemove "range_iterator" from PathDiagnosticPiece and just use ArrayRef<SourceRange...
Ted Kremenek [Thu, 16 Aug 2012 17:45:29 +0000 (17:45 +0000)]
Remove "range_iterator" from PathDiagnosticPiece and just use ArrayRef<SourceRange> for ranges.  This
removes conceptual clutter, and can allow us to easy migrate to C++11 style for-range loops if we
ever move to using C++11 in Clang.

llvm-svn: 162029

10 years agoAllow multiple PathDiagnosticConsumers to be used with a BugReporter at the same...
Ted Kremenek [Thu, 16 Aug 2012 17:45:23 +0000 (17:45 +0000)]
Allow multiple PathDiagnosticConsumers to be used with a BugReporter at the same time.

This fixes several issues:

- removes egregious hack where PlistDiagnosticConsumer would forward to HTMLDiagnosticConsumer,
but diagnostics wouldn't be generated consistently in the same way if PlistDiagnosticConsumer
was used by itself.

- emitting diagnostics to the terminal (using clang's diagnostic machinery) is no longer a special
case, just another PathDiagnosticConsumer.  This also magically resolved some duplicate warnings,
as we now use PathDiagnosticConsumer's diagnostic pruning, which has scope for the entire translation
unit, not just the scope of a BugReporter (which is limited to a particular ExprEngine).

As an interesting side-effect, diagnostics emitted to the terminal also have their trailing "." stripped,
just like with diagnostics emitted to plists and HTML.  This required some tests to be updated, but now
the tests have higher fidelity with what users will see.

There are some inefficiencies in this patch.  We currently generate the report graph (from the ExplodedGraph)
once per PathDiagnosticConsumer, which is a bit wasteful, but that could be pulled up higher in the
logic stack.  There is some intended duplication, however, as we now generate different PathDiagnostics (for the same issue)
for different PathDiagnosticConsumers.  This is necessary to produce the diagnostics that a particular
consumer expects.

llvm-svn: 162028

10 years agoMatchers related to DeclStmt for matching the count of declarations, a particular...
Sam Panzer [Thu, 16 Aug 2012 17:20:59 +0000 (17:20 +0000)]
Matchers related to DeclStmt for matching the count of declarations, a particular declaration within the statement, and single-Decl DeclStmts.

llvm-svn: 162027

10 years ago[ms-inline asm] Start tracking which tokens are registers and which are
Chad Rosier [Thu, 16 Aug 2012 17:10:59 +0000 (17:10 +0000)]
[ms-inline asm] Start tracking which tokens are registers and which are
variables, function or label references.  The former is a potential clobber.
The latter is either an input or an output.  Unfortunately, it's difficult to
test this patch at the moment, but the added test case will eventually do so.

llvm-svn: 162026

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

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

llvm-svn: 162010

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

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

llvm-svn: 161990

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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