platform/upstream/llvm.git
12 years agoWhitespace.
NAKAMURA Takumi [Sat, 22 Sep 2012 13:12:22 +0000 (13:12 +0000)]
Whitespace.

llvm-svn: 164458

12 years agoFix edge cases of ARM shift operands in arith instructions.
Tim Northover [Sat, 22 Sep 2012 11:18:19 +0000 (11:18 +0000)]
Fix edge cases of ARM shift operands in arith instructions.

As before with load instructions, oddities like "asr #32", "rrx" could
be printed incorrectly.

Patch by Chris Lidbury.

llvm-svn: 164456

12 years agoFix the handling of edge cases in ARM shifted operands.
Tim Northover [Sat, 22 Sep 2012 11:18:12 +0000 (11:18 +0000)]
Fix the handling of edge cases in ARM shifted operands.

This patch fixes load/store instructions to handle less common cases
like "asr #32", "rrx" properly throughout the MC layer.

Patch by Chris Lidbury.

llvm-svn: 164455

12 years agoAvoid multiple atomic builtin declaration.
Abramo Bagnara [Sat, 22 Sep 2012 09:05:22 +0000 (09:05 +0000)]
Avoid multiple atomic builtin declaration.

llvm-svn: 164454

12 years agoFix 16-bit atomic inst encoding and keep pseudo-inst starting with '#'
Michael Liao [Sat, 22 Sep 2012 05:41:15 +0000 (05:41 +0000)]
Fix 16-bit atomic inst encoding and keep pseudo-inst starting with '#'

llvm-svn: 164453

12 years agoFix typo in r164357
Michael Liao [Sat, 22 Sep 2012 03:39:42 +0000 (03:39 +0000)]
Fix typo in r164357

llvm-svn: 164452

12 years agoMachine Model (-schedmodel only). Added SchedAliases.
Andrew Trick [Sat, 22 Sep 2012 02:24:21 +0000 (02:24 +0000)]
Machine Model (-schedmodel only). Added SchedAliases.

Allow subtargets to tie SchedReadWrite types to processor specific
sequences or variants.

llvm-svn: 164451

12 years agoWhen importing a FunctionProtoType::ExtProtoInfo, its ExceptionSpecDecl can point...
Argyrios Kyrtzidis [Sat, 22 Sep 2012 01:58:06 +0000 (01:58 +0000)]
When importing a FunctionProtoType::ExtProtoInfo, its ExceptionSpecDecl can point to the
FunctionDecl that we are importing the FunctionProtoType for, in which case we'll have
infinite recursion when importing.

Initially create a FunctionProtoType with null ExceptionSpecDecl/ExceptionSpecTemplate and
update the type in ASTNodeImporter::VisitFunctionDecl after the FunctionDecl has been created.

llvm-svn: 164450

12 years ago[analyzer] Suppress bugs whose paths go through the return of a null pointer.
Jordan Rose [Sat, 22 Sep 2012 01:25:06 +0000 (01:25 +0000)]
[analyzer] Suppress bugs whose paths go through the return of a null pointer.

This is a heuristic intended to greatly reduce the number of false
positives resulting from inlining, particularly inlining of generic,
defensive C++ methods that live in header files. The suppression is
triggered in the cases where we ask to track where a null pointer came
from, and it turns out that the source of the null pointer was an inlined
function call.

This change brings the number of bug reports in LLVM from ~1500 down to
around ~300, a much more manageable number. Yes, some true positives may
be hidden as well, but from what I looked at the vast majority of silenced
reports are false positives, and many of the true issues found by the
analyzer are still reported.

I'm hoping to improve this heuristic further by adding some exceptions
next week (cases in which a bug should still be reported).

llvm-svn: 164449

12 years ago[analyzer] Track a null value back through FindLastStoreBRVisitor.
Jordan Rose [Sat, 22 Sep 2012 01:25:00 +0000 (01:25 +0000)]
[analyzer] Track a null value back through FindLastStoreBRVisitor.

Also, tidy up the other tracking visitors so that they mark the right
things as interesting and don't do extra work.

llvm-svn: 164448

12 years ago[analyzer] Always allow BugReporterVisitors to see the bug path.
Jordan Rose [Sat, 22 Sep 2012 01:24:56 +0000 (01:24 +0000)]
[analyzer] Always allow BugReporterVisitors to see the bug path.

Before, PathDiagnosticConsumers that did not support actual path output
would (sensibly) cause the generation of the full path to be skipped.
However, BugReporterVisitors may want to see the path in order to mark a
BugReport as invalid.

Now, even for a path generation scheme of 'None' we will still create a
trimmed graph and walk backwards through the bug path, doing no work other
than passing the nodes to the BugReporterVisitors. This isn't cheap, but
it's necessary to properly do suppression when the first path consumer does
not support path notes.

In the future, we should try only generating the path and visitor-provided
path notes once, or at least only creating the trimmed graph once.

llvm-svn: 164447

12 years ago[analyzer] Allow a BugReport to be marked "invalid" during path generation.
Jordan Rose [Sat, 22 Sep 2012 01:24:53 +0000 (01:24 +0000)]
[analyzer] Allow a BugReport to be marked "invalid" during path generation.

This is intended to allow visitors to make decisions about whether a
BugReport is likely a false positive. Currently there are no visitors
making use of this feature, so there are no tests.

When a BugReport is marked invalid, the invalidator must provide a key
that identifies the invaliation (intended to be the visitor type and a
context pointer of some kind). This allows us to reverse the decision
later on. Being able to reverse a decision about invalidation gives us more
flexibility, and allows us to formulate conditions like "this report is
invalid UNLESS the original argument is 'foo'". We can use this to
fine-tune our false-positive suppression (coming soon).

llvm-svn: 164446

12 years ago[analyzer] Look through OpaqueValueExprs when tracking a nil value.
Jordan Rose [Sat, 22 Sep 2012 01:24:49 +0000 (01:24 +0000)]
[analyzer] Look through OpaqueValueExprs when tracking a nil value.

This allows us to show /why/ a particular object is nil, even when it is
wrapped in an OpaqueValueExpr.

llvm-svn: 164445

12 years ago[analyzer] Better path notes for null pointers passed as arguments.
Jordan Rose [Sat, 22 Sep 2012 01:24:46 +0000 (01:24 +0000)]
[analyzer] Better path notes for null pointers passed as arguments.

Rather than saying "Null pointer value stored to 'foo'", we now say
"Passing null pointer value via Nth parameter 'foo'", which is much better.
The note is also now on the argument expression as well, rather than the
entire call.

This paves the way for continuing to track arguments back to their sources.

<rdar://problem/12211490>

llvm-svn: 164444

12 years agoUse llvm::getOrdinalSuffix to print ordinal numbers in diagnostics.
Jordan Rose [Sat, 22 Sep 2012 01:24:42 +0000 (01:24 +0000)]
Use llvm::getOrdinalSuffix to print ordinal numbers in diagnostics.

Just a refactoring of common infrastructure. No intended functionality change.

llvm-svn: 164443

12 years ago[analyzer] Check that an ObjCIvarRefExpr's base is non-null even as an lvalue.
Jordan Rose [Sat, 22 Sep 2012 01:24:38 +0000 (01:24 +0000)]
[analyzer] Check that an ObjCIvarRefExpr's base is non-null even as an lvalue.

Like with struct fields, we want to catch cases like this early,
so that we can produce better diagnostics and path notes:

  PointObj *p = nil;
  int *px = &p->_x; // should warn here
  *px = 1;

llvm-svn: 164442

12 years ago[analyzer] Check that a member expr is valid even when the result is an lvalue.
Jordan Rose [Sat, 22 Sep 2012 01:24:33 +0000 (01:24 +0000)]
[analyzer] Check that a member expr is valid even when the result is an lvalue.

We want to catch cases like this early, so that we can produce better
diagnostics and path notes:

  Point *p = 0;
  int *px = &p->x; // should warn here
  *px = 1;

llvm-svn: 164441

12 years agoAdd llvm::getOrdinalSuffix to get the appropriate -st, -nd, -rd, -th suffix.
Jordan Rose [Sat, 22 Sep 2012 01:24:21 +0000 (01:24 +0000)]
Add llvm::getOrdinalSuffix to get the appropriate -st, -nd, -rd, -th suffix.

Used by clang to print parameter indexes.

llvm-svn: 164440

12 years agoCasting: assert that pointer arguments to isa<> are non-null.
Jordan Rose [Sat, 22 Sep 2012 01:24:18 +0000 (01:24 +0000)]
Casting: assert that pointer arguments to isa<> are non-null.

This silences several analyzer warnings within LLVM, and provides a slightly
nicer crash experience when someone calls isa<>, cast<>, or dyn_cast<> with
a null pointer.

llvm-svn: 164439

12 years agoDenseMap: assert that we have found a bucket before we try to insert into it.
Jordan Rose [Sat, 22 Sep 2012 01:24:16 +0000 (01:24 +0000)]
DenseMap: assert that we have found a bucket before we try to insert into it.

This silences literally dozens of analyzer warnings on LLVM (since DenseMap
is such a commonly-used class).

llvm-svn: 164438

12 years agoFix bug which sometimes resulted in further diagnostics being produced after a
Richard Smith [Sat, 22 Sep 2012 00:53:56 +0000 (00:53 +0000)]
Fix bug which sometimes resulted in further diagnostics being produced after a
fatal error. Previously, if a fatal error was followed by a diagnostic which
was suppressed due to a SFINAETrap, we'd forget that we'd seen a fatal error.

llvm-svn: 164437

12 years agoMissed a few places where I didn't delete the obsolete (commented out) version of...
Jim Ingham [Sat, 22 Sep 2012 00:14:47 +0000 (00:14 +0000)]
Missed a few places where I didn't delete the obsolete (commented out) version of the breakpoint creation.

llvm-svn: 164436

12 years agoMIPS DSP: Add immediate leaves.
Akira Hatanaka [Sat, 22 Sep 2012 00:07:12 +0000 (00:07 +0000)]
MIPS DSP: Add immediate leaves.

llvm-svn: 164435

12 years agoMIPS DSP: Add predicates and instruction template.
Akira Hatanaka [Sat, 22 Sep 2012 00:06:06 +0000 (00:06 +0000)]
MIPS DSP: Add predicates and instruction template.

llvm-svn: 164434

12 years agoFix all the test case breakages caused by folks writing tests all over the place...
Jim Ingham [Sat, 22 Sep 2012 00:05:11 +0000 (00:05 +0000)]
Fix all the test case breakages caused by folks writing tests all over the place that depended explicitly
on the output of "break set".  Please don't do this sort of thing!!!!!

llvm-svn: 164433

12 years agoChange the new breakpoint creation output (primarily from "break set") to something...
Jim Ingham [Sat, 22 Sep 2012 00:04:04 +0000 (00:04 +0000)]
Change the new breakpoint creation output (primarily from "break set") to something more useful.

<rdar://problem/11333623>

llvm-svn: 164432

12 years agoAdd MIPS DSP register classes. Set actions of DSP vector operations and override
Akira Hatanaka [Fri, 21 Sep 2012 23:58:31 +0000 (23:58 +0000)]
Add MIPS DSP register classes. Set actions of DSP vector operations and override
TargetLowering's callback functions.

llvm-svn: 164431

12 years agoSelectionDAG node enums for MIPS DSP nodes.
Akira Hatanaka [Fri, 21 Sep 2012 23:52:47 +0000 (23:52 +0000)]
SelectionDAG node enums for MIPS DSP nodes.

llvm-svn: 164430

12 years agoAdd MIPS accumulator and DSP control registers.
Akira Hatanaka [Fri, 21 Sep 2012 23:48:37 +0000 (23:48 +0000)]
Add MIPS accumulator and DSP control registers.

llvm-svn: 164429

12 years agoAdd flags and feature bits for mips dsp.
Akira Hatanaka [Fri, 21 Sep 2012 23:41:49 +0000 (23:41 +0000)]
Add flags and feature bits for mips dsp.

llvm-svn: 164428

12 years agoFix a case where the new SROA pass failed to zap dead operands to
Chandler Carruth [Fri, 21 Sep 2012 23:36:40 +0000 (23:36 +0000)]
Fix a case where the new SROA pass failed to zap dead operands to
selects with a constant condition. This resulted in the operands
remaining live through the SROA rewriter. Most of the time, this just
caused some dead allocas to persist and get zapped by later passes, but
in one case found by Joerg, it caused a crash when we tried to *promote*
the alloca despite it having this dead use. We already have the
mechanisms in place to handle this, just wire select up to them.

llvm-svn: 164427

12 years agoAdd an --enable-backtraces option to configure to determine
Eric Christopher [Fri, 21 Sep 2012 23:03:29 +0000 (23:03 +0000)]
Add an --enable-backtraces option to configure to determine
whether or not we want to print out backtrace information. Useful
for libraries that don't need backtrace information on a crash.

rdar://11844710

llvm-svn: 164426

12 years agoAdd an MDBuilder utility for creating !tbaa.struct nodes.
Dan Gohman [Fri, 21 Sep 2012 23:00:37 +0000 (23:00 +0000)]
Add an MDBuilder utility for creating !tbaa.struct nodes.

llvm-svn: 164425

12 years ago[CMake] Respect LLVM_BUILD_RUNTIME.
Michael J. Spencer [Fri, 21 Sep 2012 22:49:06 +0000 (22:49 +0000)]
[CMake] Respect LLVM_BUILD_RUNTIME.

llvm-svn: 164424

12 years ago[CMake][tsan] Compile .S files for tsan as C instead of CXX.
Michael J. Spencer [Fri, 21 Sep 2012 22:39:39 +0000 (22:39 +0000)]
[CMake][tsan] Compile .S files for tsan as C instead of CXX.

Using CXX breaks if you add -stdlib=libc++ to CMAKE_CXX_FLAGS.

llvm-svn: 164422

12 years ago[ms-inline asm] Use mnemonicIsValid() in a helpful assert.
Chad Rosier [Fri, 21 Sep 2012 22:22:39 +0000 (22:22 +0000)]
[ms-inline asm] Use mnemonicIsValid() in a helpful assert.

llvm-svn: 164421

12 years ago[ms-inline asm] Expose the mnemonicIsValid() function in the AsmParser.
Chad Rosier [Fri, 21 Sep 2012 22:21:26 +0000 (22:21 +0000)]
[ms-inline asm] Expose the mnemonicIsValid() function in the AsmParser.

llvm-svn: 164420

12 years agoHave the DbgVariable "isArtificial" and "isObjectPointer" not
Eric Christopher [Fri, 21 Sep 2012 22:18:52 +0000 (22:18 +0000)]
Have the DbgVariable "isArtificial" and "isObjectPointer" not
care about it being an argument variable so that we can decide
that captured block and lambda vars that don't happen to
be arguments could be an argument pointer.

Add the object pointer for one case onto the subprogram die.

rdar://12001329

llvm-svn: 164419

12 years agoMark the passed in "self" for a block as an object pointer so
Eric Christopher [Fri, 21 Sep 2012 22:18:42 +0000 (22:18 +0000)]
Mark the passed in "self" for a block as an object pointer so
that the backend can mark it as the representative pointer for
the block.

rdar://12001329

llvm-svn: 164418

12 years agoFix build errors.
Argyrios Kyrtzidis [Fri, 21 Sep 2012 22:17:13 +0000 (22:17 +0000)]
Fix build errors.

llvm-svn: 164417

12 years ago[AST importer] Do a correct import of a FunctionProtoType::ExtProtoInfo, don't pass
Argyrios Kyrtzidis [Fri, 21 Sep 2012 22:04:02 +0000 (22:04 +0000)]
[AST importer] Do a correct import of a FunctionProtoType::ExtProtoInfo, don't pass
nodes from the imported ASTContext.

rdar://12348924

llvm-svn: 164416

12 years agoAdd comment.
Chad Rosier [Fri, 21 Sep 2012 21:08:46 +0000 (21:08 +0000)]
Add comment.

llvm-svn: 164415

12 years agoAdd comment.
Chad Rosier [Fri, 21 Sep 2012 20:51:43 +0000 (20:51 +0000)]
Add comment.

llvm-svn: 164414

12 years agoFix installheaders target to do what it did prior to r161760. rdar://12348765
Bob Wilson [Fri, 21 Sep 2012 20:49:54 +0000 (20:49 +0000)]
Fix installheaders target to do what it did prior to r161760. rdar://12348765

llvm-svn: 164413

12 years agoobjective-C: when diagnosing deprecated/unavailable usage of
Fariborz Jahanian [Fri, 21 Sep 2012 20:46:37 +0000 (20:46 +0000)]
objective-C: when diagnosing deprecated/unavailable usage of
setter or getter backing a deprecated/unavailable property,
also not location of the property. // rdar://12324295

llvm-svn: 164412

12 years agoCall CGM.SetLLVMFunctionAttributesForDefinition on thunks so that they get
Rafael Espindola [Fri, 21 Sep 2012 20:39:32 +0000 (20:39 +0000)]
Call CGM.SetLLVMFunctionAttributesForDefinition on thunks so that they get
attributes like uwtable. Without uwtable a stack unwinder would be unable
to go past the thunks.

llvm-svn: 164411

12 years agoAdd four new command line options for MIPS CPU selection:
Simon Atanasyan [Fri, 21 Sep 2012 20:19:32 +0000 (20:19 +0000)]
Add four new command line options for MIPS CPU selection:
-mips32, -mips32r2, -mips64, -mips64r2.

The patch reviewed by Eric Christopher.

llvm-svn: 164410

12 years agoFix a typo in the PCH internals documentation
Douglas Gregor [Fri, 21 Sep 2012 20:16:09 +0000 (20:16 +0000)]
Fix a typo in the PCH internals documentation

llvm-svn: 164409

12 years agoFix a significant recent(?) regression. StackSlotColoring no longer did anything
Evan Cheng [Fri, 21 Sep 2012 20:04:28 +0000 (20:04 +0000)]
Fix a significant recent(?) regression. StackSlotColoring no longer did anything
because LiveStackAnalysis was not preserved by VirtRegWriter. This caused
big stack usage regression in some cases.

rdar://12340383

llvm-svn: 164408

12 years agodocs: Fix long-standing typo in yaml2obj.rst.
Sean Silva [Fri, 21 Sep 2012 19:48:16 +0000 (19:48 +0000)]
docs: Fix long-standing typo in yaml2obj.rst.

llvm-svn: 164407

12 years agoWhitespace.
Chad Rosier [Fri, 21 Sep 2012 19:25:59 +0000 (19:25 +0000)]
Whitespace.

llvm-svn: 164406

12 years agoRename class __lambda to __lambda_node to avoid clash with gcc. This fixes http...
Howard Hinnant [Fri, 21 Sep 2012 19:21:37 +0000 (19:21 +0000)]
Rename class __lambda to __lambda_node to avoid clash with gcc.  This fixes llvm.org/bugs/show_bug.cgi?id=13889

llvm-svn: 164405

12 years agoTweak use of dlopen to be a little more correct and higher performing.
Howard Hinnant [Fri, 21 Sep 2012 19:12:56 +0000 (19:12 +0000)]
Tweak use of dlopen to be a little more correct and higher performing.

llvm-svn: 164404

12 years agoInitial commit of a new testsuite feature: test categories.
Enrico Granata [Fri, 21 Sep 2012 19:10:53 +0000 (19:10 +0000)]
Initial commit of a new testsuite feature: test categories.

This feature allows us to group test cases into logical groups (categories), and to only run a subset of test cases based on these categories.

Each test-case can have a new method getCategories(self): which returns a list of strings that are the categories to which the test case belongs.
If a test-case does not provide its own categories, we will look for categories in the class that contains the test case.
If that fails too, the default implementation looks for a .category file, which contains a comma separated list of strings.
The test suite will recurse look for .categories up until the top level directory (which we guarantee will have an empty .category file).

The driver dotest.py has a new --category <foo> option, which can be repeated, and specifies which categories of tests you want to run.
(example: ./dotest.py --category objc --category expression)

All tests that do not belong to any specified category will be skipped. Other filtering options still exist and should not interfere with category filtering.
A few tests have been categorized. Feel free to categorize others, and to suggest new categories that we could want to use.

All categories need to be validly defined in dotest.py, or the test suite will refuse to run when you use them as arguments to --category.

In the end, failures will be reported on a per-category basis, as well as in the usual format.

This is the very first stage of this feature. Feel free to chime in with ideas for improvements!

llvm-svn: 164403

12 years agoSay "bytes" instead of "address units", since that's what the
Dan Gohman [Fri, 21 Sep 2012 18:41:30 +0000 (18:41 +0000)]
Say "bytes" instead of "address units", since that's what the
rest of LangRef uses.

llvm-svn: 164402

12 years agoExperiment in BodyFarm of structuring AST creation calls in a hierarchy,
Ted Kremenek [Fri, 21 Sep 2012 18:33:56 +0000 (18:33 +0000)]
Experiment in BodyFarm of structuring AST creation calls in a hierarchy,
so that they visually look like an AST dump.

llvm-svn: 164401

12 years agoCreate helper method in BodyFarm for creating simple assignments.
Ted Kremenek [Fri, 21 Sep 2012 18:33:54 +0000 (18:33 +0000)]
Create helper method in BodyFarm for creating simple assignments.

llvm-svn: 164400

12 years agoAdd helper method in BodyFarm to create unary dereferences.
Ted Kremenek [Fri, 21 Sep 2012 18:33:52 +0000 (18:33 +0000)]
Add helper method in BodyFarm to create unary dereferences.

llvm-svn: 164399

12 years agoDocument the new !tbaa.struct metadata.
Dan Gohman [Fri, 21 Sep 2012 18:21:48 +0000 (18:21 +0000)]
Document the new !tbaa.struct metadata.

llvm-svn: 164398

12 years agoAdd helper method to BodyFarm for creating lvalue-to-rvalue conversions.
Ted Kremenek [Fri, 21 Sep 2012 18:13:27 +0000 (18:13 +0000)]
Add helper method to BodyFarm for creating lvalue-to-rvalue conversions.

llvm-svn: 164397

12 years agoAdd helper method to BodyFarm for creatinging integral casts.
Ted Kremenek [Fri, 21 Sep 2012 18:13:23 +0000 (18:13 +0000)]
Add helper method to BodyFarm for creatinging integral casts.

llvm-svn: 164396

12 years agoAdd missing 'to' and rephrase an explanation of GCC's assumptions.
David Blaikie [Fri, 21 Sep 2012 18:03:02 +0000 (18:03 +0000)]
Add missing 'to' and rephrase an explanation of GCC's assumptions.

Wordsmithing by Matt Beaumont-Gay in response to r164389.

llvm-svn: 164395

12 years agoThread-safety analysis: better handling of unreachable blocks. Fixes a bug
DeLesley Hutchins [Fri, 21 Sep 2012 17:57:00 +0000 (17:57 +0000)]
Thread-safety analysis: better handling of unreachable blocks.  Fixes a bug
where a call to function marked 'noreturn' is followed by unreachable
implicit destructor calls.

llvm-svn: 164394

12 years agoRe-enable faux-bodies by default.
Ted Kremenek [Fri, 21 Sep 2012 17:55:34 +0000 (17:55 +0000)]
Re-enable faux-bodies by default.

Try this again, now that r164392 is in place.

llvm-svn: 164393

12 years agoUse helper method to create DeclRefExprs in BodyFarm, hopefully allevating
Ted Kremenek [Fri, 21 Sep 2012 17:54:35 +0000 (17:54 +0000)]
Use helper method to create DeclRefExprs in BodyFarm, hopefully allevating
them being correctly constructed.

llvm-svn: 164392

12 years agoAdd some structuring comments. No functionality change.
Ted Kremenek [Fri, 21 Sep 2012 17:54:32 +0000 (17:54 +0000)]
Add some structuring comments.  No functionality change.

llvm-svn: 164391

12 years agoUpdate comment.
Chad Rosier [Fri, 21 Sep 2012 17:50:09 +0000 (17:50 +0000)]
Update comment.

llvm-svn: 164390

12 years agoDocument "do not use defaults in covered switch-over-enum" coding standard.
David Blaikie [Fri, 21 Sep 2012 17:47:36 +0000 (17:47 +0000)]
Document "do not use defaults in covered switch-over-enum" coding standard.

llvm-svn: 164389

12 years agoLoopIdiom: Give up when the loop is not in canonical form.
Benjamin Kramer [Fri, 21 Sep 2012 17:27:23 +0000 (17:27 +0000)]
LoopIdiom: Give up when the loop is not in canonical form.

We rely on it when doing the transforms. This can happen when there is an
indirectbr in  the loop.

Fixes PR13892.

llvm-svn: 164383

12 years agoUse MapVectors to make the order we mark virtual functions used by a vtable
Rafael Espindola [Fri, 21 Sep 2012 17:15:24 +0000 (17:15 +0000)]
Use MapVectors to make the order we mark virtual functions used by a vtable
deterministic. Fixes pr13868.

llvm-svn: 164382

12 years ago[fast-isel] Fallback to SelectionDAG isel if we require strict alignment for
Chad Rosier [Fri, 21 Sep 2012 16:58:35 +0000 (16:58 +0000)]
[fast-isel] Fallback to SelectionDAG isel if we require strict alignment for
non-aligned i32 loads/stores.
rdar://12304911

llvm-svn: 164381

12 years agoFull KDP process control with per CPU resume and step.
Greg Clayton [Fri, 21 Sep 2012 16:31:20 +0000 (16:31 +0000)]
Full KDP process control with per CPU resume and step.

llvm-svn: 164378

12 years agoInstCombine: Make sure we use the pre-zext type when creating a constant of a value...
Benjamin Kramer [Fri, 21 Sep 2012 16:26:41 +0000 (16:26 +0000)]
InstCombine: Make sure we use the pre-zext type when creating a constant of a value that is zext'd.

Fixes PR13250.

llvm-svn: 164377

12 years agoBailout if libpluto finds no schedule
Tobias Grosser [Fri, 21 Sep 2012 16:24:13 +0000 (16:24 +0000)]
Bailout if libpluto finds no schedule

Older versions of libpluto crashed, if no schedule was found. Recent
versions return NULL. We detect this and keep the original schedule.

llvm-svn: 164376

12 years agoUpdate for encapsulating the "construct*AlignmentFromInt" methods.
Bill Wendling [Fri, 21 Sep 2012 16:07:49 +0000 (16:07 +0000)]
Update for encapsulating the "construct*AlignmentFromInt" methods.

llvm-svn: 164374

12 years agoEncapsulate the "construct*AlignmentFromInt" functions.
Bill Wendling [Fri, 21 Sep 2012 16:07:28 +0000 (16:07 +0000)]
Encapsulate the "construct*AlignmentFromInt" functions.

llvm-svn: 164373

12 years agoFix a typo in r164357
Michael Liao [Fri, 21 Sep 2012 16:03:03 +0000 (16:03 +0000)]
Fix a typo in r164357

llvm-svn: 164372

12 years agoClarify comment.
Dmitri Gribenko [Fri, 21 Sep 2012 15:26:34 +0000 (15:26 +0000)]
Clarify comment.

llvm-svn: 164371

12 years agoMake the 'get*AlignmentFromAttr' functions into member functions within the Attribute...
Bill Wendling [Fri, 21 Sep 2012 15:26:31 +0000 (15:26 +0000)]
Make the 'get*AlignmentFromAttr' functions into member functions within the Attributes class. Now with fix.

llvm-svn: 164370

12 years agoBitcodeReader: Correctly insert blockaddress constant referring to a already parsed...
Benjamin Kramer [Fri, 21 Sep 2012 14:34:31 +0000 (14:34 +0000)]
BitcodeReader: Correctly insert blockaddress constant referring to a already parsed function.

We inserted a placeholder that was never replaced because the function was
already visited. Assert that all placeholders have been resolved when tearing
down the bitcode reader.

Fixes PR13895.

llvm-svn: 164369

12 years agoRevert r164364, "Flip "faux-bodies" in the analyzer on by default to flush out bugs."
NAKAMURA Takumi [Fri, 21 Sep 2012 12:00:42 +0000 (12:00 +0000)]
Revert r164364, "Flip "faux-bodies" in the analyzer on by default to flush out bugs."

It crashed test/Analysis/Output/blocks.m on some hosts.

llvm-svn: 164368

12 years ago[Sanitizer] llvm-symbolizer: enable accessing symbol table (libObject is fixed in...
Alexey Samsonov [Fri, 21 Sep 2012 10:54:14 +0000 (10:54 +0000)]
[Sanitizer] llvm-symbolizer: enable accessing symbol table (libObject is fixed in r164365) and replace string with std::string

llvm-svn: 164367

12 years agoMake warnings about uninitialized fields include the field name.
Hans Wennborg [Fri, 21 Sep 2012 08:58:33 +0000 (08:58 +0000)]
Make warnings about uninitialized fields include the field name.

This makes the wording more informative, and consistent with the other
warnings about uninitialized variables.

Also, me and David who reviewed this couldn't figure out why we would
need to do a lookup to get the name of the variable; so just print the
name directly.

llvm-svn: 164366

12 years agoFix SymbolRef::getAddress implementation for ELF. The 'value' field in symbol table...
Alexey Samsonov [Fri, 21 Sep 2012 07:08:08 +0000 (07:08 +0000)]
Fix SymbolRef::getAddress implementation for ELF. The 'value' field in symbol table entry should be treated differently for relocatable and relocated files. This patch fixes symbol addresses printed by llvm-nm for executables and shared objects.

llvm-svn: 164365

12 years agoFlip "faux-bodies" in the analyzer on by default to flush out bugs.
Ted Kremenek [Fri, 21 Sep 2012 06:14:37 +0000 (06:14 +0000)]
Flip "faux-bodies" in the analyzer on by default to flush out bugs.

llvm-svn: 164364

12 years agoSimplify getRuntimeDefinition() back to taking no arguments.
Ted Kremenek [Fri, 21 Sep 2012 06:13:13 +0000 (06:13 +0000)]
Simplify getRuntimeDefinition() back to taking no arguments.

llvm-svn: 164363

12 years agollvm/test/CodeGen/X86/pr5145.ll: Tweak expressions to match for darwin target.
NAKAMURA Takumi [Fri, 21 Sep 2012 05:19:19 +0000 (05:19 +0000)]
llvm/test/CodeGen/X86/pr5145.ll: Tweak expressions to match for darwin target.

.LBB0_1: # Linux
LBB0_1:  # Darwin

llvm-svn: 164362

12 years agoCortex-A9 latency fixes (w/ -schedmodel only).
Andrew Trick [Fri, 21 Sep 2012 05:06:40 +0000 (05:06 +0000)]
Cortex-A9 latency fixes (w/ -schedmodel only).

Quick review against the manual revealed a few obvious mistakes.

llvm-svn: 164361

12 years agoDoxygen-ify a comment.
Craig Topper [Fri, 21 Sep 2012 04:33:26 +0000 (04:33 +0000)]
Doxygen-ify a comment.

llvm-svn: 164360

12 years agoPR13890: Warn on abstract final classes.
David Blaikie [Fri, 21 Sep 2012 03:21:07 +0000 (03:21 +0000)]
PR13890: Warn on abstract final classes.

llvm-svn: 164359

12 years agoAdd missing i8 max/min/umax/umin support
Michael Liao [Fri, 21 Sep 2012 03:18:52 +0000 (03:18 +0000)]
Add missing i8 max/min/umax/umin support

- Fix PR5145 and turn on test 8-bit atomic ops

llvm-svn: 164358

12 years agoRevise td of X86 atomic instructions
Michael Liao [Fri, 21 Sep 2012 03:00:17 +0000 (03:00 +0000)]
Revise td of X86 atomic instructions

- Rewirte most atomic instructions in templates for both better
  maintenance and future extensions, such as HLE in TSX.

llvm-svn: 164357

12 years agodocs: Fix Sphinx warning over Atomics.rst.
Sean Silva [Fri, 21 Sep 2012 02:46:32 +0000 (02:46 +0000)]
docs: Fix Sphinx warning over Atomics.rst.

Atomics.rst was not linked into the toctree.

Docs now build warning-free!

llvm-svn: 164356

12 years agodocs: Fix Sphinx warning over yaml2obj.rst.
Sean Silva [Fri, 21 Sep 2012 02:46:30 +0000 (02:46 +0000)]
docs: Fix Sphinx warning over yaml2obj.rst.

yaml2obj.rst was not included in the toctree

Input from Michael Spencer.

llvm-svn: 164355

12 years agoMips16FrameLowering.cpp: Remove unused TII introduced in r164349. [-Wunused-variable]
NAKAMURA Takumi [Fri, 21 Sep 2012 02:21:30 +0000 (02:21 +0000)]
Mips16FrameLowering.cpp: Remove unused TII introduced in r164349. [-Wunused-variable]

llvm-svn: 164354

12 years agoFixed an oddity in the Objective-C class descriptors
Sean Callanan [Fri, 21 Sep 2012 02:09:51 +0000 (02:09 +0000)]
Fixed an oddity in the Objective-C class descriptors
where the descriptor took a pointer to an object and
expected the Initialize function to dereference that
pointer and extract the isa value.  This caused one
of our tests to fail.

llvm-svn: 164353

12 years ago<rdar://problem/9959501>
Greg Clayton [Fri, 21 Sep 2012 01:55:30 +0000 (01:55 +0000)]
<rdar://problem/9959501>

KDP -- now with rudimentary process control (continue only) and read + write registers (which means we can see stack frames) for x86_64, i386 and ARM.

llvm-svn: 164352

12 years ago[PCH] After deserializing a DeclContext, if it has external lexical decls but not
Argyrios Kyrtzidis [Fri, 21 Sep 2012 01:30:00 +0000 (01:30 +0000)]
[PCH] After deserializing a DeclContext, if it has external lexical decls but not
external visible decls, call DeclContext::setMustBuildLookupTable so that the
"lazy decls" bit of the LookupPtr is set.

Previously, in non-C++, if there were no new declarations causing the "lazy decls" bit
to be set, then DeclContext::lookups_begin() would fail to return the decls from the PCH.

Fixes rdar://12316296.

llvm-svn: 164351

12 years agollvm/test/CodeGen/ARM/fast-isel.ll: Fix possible typos, s/@unaligned_i16_store/@unali...
NAKAMURA Takumi [Fri, 21 Sep 2012 01:15:05 +0000 (01:15 +0000)]
llvm/test/CodeGen/ARM/fast-isel.ll: Fix possible typos, s/@unaligned_i16_store/@unaligned_i16_load/g.

I guess this had apparently passed in +Asserts possibly due to verborsity.

llvm-svn: 164350

12 years agoProperly save and restore RA and Mips16 callee save registers S0,S1
Akira Hatanaka [Fri, 21 Sep 2012 01:08:16 +0000 (01:08 +0000)]
Properly save and restore RA and Mips16 callee save registers S0,S1

Patch by Reed Kotler.

llvm-svn: 164349