Commit Graph

115272 Commits

Author SHA1 Message Date
Chandler Carruth d27a7a947b Teach the BranchProbabilityInfo analysis pass to read any metadata
encoding of probabilities. In the absense of metadata, it continues to
fall back on static heuristics.

This allows __builtin_expect, after lowering through llvm.expect
a branch instruction's metadata, to actually enter the branch
probability model. This is one component of resolving PR2577.

llvm-svn: 142492
2011-10-19 10:30:30 +00:00
Chandler Carruth 343fad44ea Add pass printing support to BlockFrequencyInfo pass. The implementation
layer already had support for printing the results of this analysis, but
the wiring was missing.

Now that printing the analysis works, actually bring some of this
analysis, and the BranchProbabilityInfo analysis that it wraps, under
test! I'm planning on fixing some bugs and doing other work here, so
having a nice place to add regression tests and a way to observe the
results is really useful.

llvm-svn: 142491
2011-10-19 10:12:41 +00:00
Bill Wendling a96c00bf47 Duncan pointed out that sometimes CC and CXX are used to specify the compiler. Also that the configure script takes care of finding an appropriate compiler if one's not specified.
llvm-svn: 142489
2011-10-19 09:47:00 +00:00
Nadav Rotem 6652e22bad Add support for the vector-widening of vselect and vector-setcc
llvm-svn: 142488
2011-10-19 09:45:11 +00:00
Bill Wendling f96a5bc15b Use bash instead.
llvm-svn: 142486
2011-10-19 09:25:49 +00:00
Bill Wendling 2977a15ab1 Make sure we emit the 'movw' and 'movt' only if it's supported. Otherwise, use a constant pool.
llvm-svn: 142485
2011-10-19 09:24:02 +00:00
Bill Wendling 7c1634556d Remove some dead code.
llvm-svn: 142484
2011-10-19 09:04:11 +00:00
Bill Wendling cfe8232d23 Make changes so that this runs on FreeBSD.
llvm-svn: 142482
2011-10-19 08:42:07 +00:00
Hans Wennborg cc8ce7b1d7 Break out ssize_t test from Sema/format-strings-fixit.c
Move to a separate test that sets a specific target triple
so that the type of ssize_t is known.

llvm-svn: 142481
2011-10-19 07:55:50 +00:00
Craig Topper ef309c3384 Rename PEXTR to PEXT. Add intrinsics for BMI instructions.
llvm-svn: 142480
2011-10-19 07:48:35 +00:00
Douglas Gregor e248eea214 Improve the warning for cv-qualifiers on free functions, from Ahmed Charles!
llvm-svn: 142478
2011-10-19 06:04:55 +00:00
Douglas Gregor 5fdc4de718 Add support for constant arrays, from Anders Waldenborg!.
llvm-svn: 142477
2011-10-19 05:51:43 +00:00
Douglas Gregor 89861066ed Add TypeKind.CONSTANTARRAY, from Anders Waldenborg!
llvm-svn: 142476
2011-10-19 05:50:34 +00:00
Douglas Gregor d59d02cc38 Fix error message for unknown type kind, from Anders Waldenborg!
llvm-svn: 142475
2011-10-19 05:49:29 +00:00
Douglas Gregor 32df3664be This new field was introduced in clang-c in r141277
Python needs this in its structure definition so it allocates enough
memory. From Anders Waldenborg!

llvm-svn: 142474
2011-10-19 05:47:46 +00:00
David Blaikie 651c73ce78 Fix pr9789, assert-on-invalid while instantiating an (invalid) class template with a non-final parameter pack. Also improve the warning for non-final parameter packs in this scenario so it only fires once, rather than once for every template parameter after the non-final parameter pack.
llvm-svn: 142473
2011-10-19 05:19:50 +00:00
Douglas Gregor dab63c1434 Tweak this test to test more directly what we want, and hopefully work around the brokenness of code completion under -fdelayed-template-parsing
llvm-svn: 142472
2011-10-19 04:17:22 +00:00
Argyrios Kyrtzidis 4e8b13613b Don't forget to complete the objc interface before asking for information,
otherwise lldb will suffer.

llvm-svn: 142471
2011-10-19 02:25:16 +00:00
Johnny Chen a737ba55af Extract the run hooks functionality into the base class lldbtest.Base.
llvm-svn: 142469
2011-10-19 01:06:21 +00:00
Richard Smith a066ccfcf1 Add a -Wc++98-compat warning for friend functions of class templates which would
be implicitly instantiated (resulting in a redefinition) in C++98.

llvm-svn: 142468
2011-10-19 00:54:10 +00:00
Eric Christopher 7ec8ec8581 Add block information for ObjC @catch blocks.
Fixes rdar://10282889

llvm-svn: 142467
2011-10-19 00:44:01 +00:00
Eric Christopher a9d3497b5e Add a new subclass of RunCleanupScopes that also handles creating new
lexical blocks for debug info.

llvm-svn: 142466
2011-10-19 00:43:52 +00:00
Peter Collingbourne a48f33f951 Move static array parameter checks to SemaExpr, per Doug's request
llvm-svn: 142465
2011-10-19 00:16:45 +00:00
Joe Abbey c39977d01b Adding dependencies to allow -DBUILD_SHARED_LIBS=true to complete.
llvm-svn: 142464
2011-10-19 00:13:13 +00:00
Richard Smith 38c0e0417c -Wc++98-compat: warn if a SFINAE substitution in C++11 suppresses an access
control diagnostic.

llvm-svn: 142463
2011-10-19 00:07:01 +00:00
Lang Hames 20a04e74e3 Added testcase for <rdar://problem/10215997>
llvm-svn: 142462
2011-10-18 23:50:52 +00:00
Greg Clayton 85ae2e1349 Changed lldb_private::Type over to use the intrusive ref counted pointers
so we don't have to lookup types in a type list by ID.

Changed the DWARF parser to remove the "can externally complete myself" bits
from the type when we are in the process of completing the type itself to
avoid an onslaught of external visible decl requests from the 
clang::ExternalASTSource.

llvm-svn: 142461
2011-10-18 23:36:41 +00:00
Bill Wendling 94f60018e0 Emit the MOVT instruction only if the # LPads is > 64K.
llvm-svn: 142460
2011-10-18 23:19:55 +00:00
Fariborz Jahanian 7f73302b4f objc: allow class name qualified with protocols in
iboutletcollection attribute. But ignore protocol
list. // rdar://10296078

llvm-svn: 142459
2011-10-18 23:13:50 +00:00
Bill Wendling 64e6bfc16c For Thumb mode, we need to use a constant pool if the value is too large to be
used with the CMP instruction.

llvm-svn: 142458
2011-10-18 23:11:05 +00:00
Daniel Dunbar 28435a668c Regenerate projects/sample/configure.
llvm-svn: 142457
2011-10-18 23:10:58 +00:00
Daniel Dunbar 1e5e5011ab projects/sample: Import adapted form of current LLVM autoconf/Makefile setup so that projects/sample is standalone and not tied to the LLVM build setup.
- This currently just moves over all of the behavior from LLVM. Eventually all of the configure checks that are directly needed by the LLVM build setup should probably go away, and the project should manage their own configuration checks if necessary.

 - This is the 1st half of this work, the actual Makefile.common hasn't moved over yet. I've tried to stage this in such a way that incremental builds will properly reconfigure for most active developers (the Makefiles don't handle reconfiguring in a perfectly reliable way, and I haven't found an easy way to make them do so).

llvm-svn: 142456
2011-10-18 23:10:47 +00:00
Eric Christopher 16ec8c103a Revert "Turn on the vzeroupper pass by default."
This reverts commit 494f7ac3e8d2ab3d94e52317abf9c42a949fe1f3.

llvm-svn: 142455
2011-10-18 23:10:11 +00:00
Anna Zaks d009bfac0c [analyzer] Move predecessor into the NodeBuilder context.
llvm-svn: 142454
2011-10-18 23:06:48 +00:00
Anna Zaks a99b41f37f [analyzer] Make NodeBuilder and Pred node loosely coupled
NodeBuilder should not assume it's dealing with a single predecessor. Remove predecessor getters. Modify the BranchNodeBuilder to not be responsible for doing auto-transitions (which depend on a predecessor).

llvm-svn: 142453
2011-10-18 23:06:44 +00:00
Anna Zaks 1dd965eaa5 [analyzer] Remove StmtNodeBuilder from CheckerContext
It now only depends on a generic NodeBuilder instead. As part of this change, make the generic node builder results finalized by default.

llvm-svn: 142452
2011-10-18 23:06:38 +00:00
Anna Zaks 88d9462b73 [analyzer] Subclassing StmtBuilder from the NodeBuilder
llvm-svn: 142451
2011-10-18 23:06:33 +00:00
Anna Zaks e83ddcc4ec [analyzer] Remove dead code.
ExprEngineBuilders is not used.

llvm-svn: 142450
2011-10-18 23:06:29 +00:00
Anna Zaks ea96f5b852 [analyzer] Remove redundant method + whitespace.
llvm-svn: 142449
2011-10-18 23:06:25 +00:00
Anna Zaks 6d285c58ec [analyzer] Modularize builder use in processBranch.
Take advantage of the new builders for branch processing. As part of this change pass generic NodeBuilder (instead of BranchNodeBuilder) to the BranchCondition callback and remove the unused methods form BranchBuilder.

llvm-svn: 142448
2011-10-18 23:06:21 +00:00
Anna Zaks eebbbc7253 [analyzer] Pull Pred out of NodeBuilderContext.
Each builder will have a different one, so it doesn't make sense to keep it in the context.

llvm-svn: 142447
2011-10-18 23:06:16 +00:00
Anna Zaks 2e2eb49f7f [analyzer] Rely only on NodeBuilder inside CheckerContext.
llvm-svn: 142446
2011-10-18 23:06:11 +00:00
Anna Zaks 1ee9f11631 [analyzer] Remove redundant assignment operator.
llvm-svn: 142445
2011-10-18 23:06:08 +00:00
Anna Zaks ce5e97efdd [analyzer] NodeBuilder Refactoring: Subclass BranchNodeBuilder from NodeBuilder.
llvm-svn: 142444
2011-10-18 23:06:04 +00:00
Anna Zaks fc0189aadc [analyzer] Node Builder refactoring: Introduce a simple Node Builder responsible for generating the node frontier.
Currently we have a bunch of different node builders which provide some common
functionality but are difficult to refactor. Each builder generates nodes of
different kinds and calculates the frontier nodes, which should be propagated
to the next step (after the builder dies).

Introduce a new NodeBuilder which provides very basic node generation facilities
but takes care of the second problem. The idea is that all the other builders
will eventually use it. Use this builder in CheckerContext instead of
StmtNodeBuilder (the way the frontier is propagated to the StmtBuilder
is a hack and will be removed later on).

llvm-svn: 142443
2011-10-18 23:05:58 +00:00
Nadav Rotem 0d3393356b Add additional element-promotion tests.
llvm-svn: 142442
2011-10-18 23:05:33 +00:00
Jim Grosbach ad47cfcef9 ARM VTBL (one register) assembly parsing and encoding.
llvm-svn: 142441
2011-10-18 23:02:30 +00:00
Bill Wendling 4969dcdef9 Use the integer compare when the value is small enough. Use the "move into a
register and then compare against that" method when it's too large. We have to
move the value into the register in the "movw, movt" pair of instructions.

llvm-svn: 142440
2011-10-18 22:52:20 +00:00
Eric Christopher 9bede2dd92 Turn on the vzeroupper pass by default.
I'll remove/rename the option in a few days.

llvm-svn: 142439
2011-10-18 22:50:17 +00:00
Eric Christopher 2797d6e660 Whitespace.
llvm-svn: 142438
2011-10-18 22:50:13 +00:00