Commit Graph

142495 Commits

Author SHA1 Message Date
Nick Lewycky 60bd4be17a Fix grammar in comment.
llvm-svn: 174033
2013-01-31 03:15:20 +00:00
Richard Smith d202924db6 Clarify the diagnostic for -Wnested-anon-types.
llvm-svn: 174032
2013-01-31 03:11:12 +00:00
Jordan Rose 9a6d4f3644 [analyzer] If a lazy binding is undefined, pretend that it's unknown instead.
This is a hack to work around the fact that we don't track extents for our
default bindings:

  CGPoint p;
  p.x = 0.0;
  p.y = 0.0;
  rectParam.origin = p;
  use(rectParam.size); // warning: uninitialized value in rectParam.size.width

In this case, the default binding for 'p' gets copied into 'rectParam',
because the 'origin' field is at offset 0 within CGRect. From then on,
rectParam's old default binding (in this case a symbol) is lost.

This patch silences the warning by pretending that lazy bindings are never
made from uninitialized memory, but not only is that not true, the original
default binding is still getting overwritten (see FIXME test cases).
The long-term solution is tracked in <rdar://problem/12701038>

PR14765 and <rdar://problem/12875012>

llvm-svn: 174031
2013-01-31 02:57:06 +00:00
Dan Gohman 18c77a19ea Change stripAndComputeConstantOffsets to accept a NULL DataLayout pointer
as well.

llvm-svn: 174030
2013-01-31 02:50:36 +00:00
Richard Trieu e673d71a07 When comparing two template template arguments in the template differ, consider
them the same if they are actually the same; having the same name isn't enough.

Similar to r174013, template template arguments were also mistakenly considered
the same when they had the same name but were in different namespaces.
In addition, when printing template template arguments, use the qualified name
if the regular name is the same.

llvm-svn: 174029
2013-01-31 02:47:46 +00:00
Dan Gohman 36fa8398f5 Add a comment.
llvm-svn: 174028
2013-01-31 02:45:26 +00:00
Dan Gohman 1b0f79de0a Move isKnownNonNull out of AliasAnalysis.h and into ValueTracking.cpp since
it isn't really an AliasAnalysis concept, and ValueTracking has similar things
that it could plausibly share code with some day.

llvm-svn: 174027
2013-01-31 02:40:59 +00:00
Bill Wendling 3b4a02bf84 Remove Attribute::hasAttributes() and make Attribute::hasAttribute() private.
The Attribute::hasAttributes() is kind of meaningless since an Attribute can
have only one attribute. And we would rather people use the 'operator=='
instead of Attribute::hasAttribute().

llvm-svn: 174026
2013-01-31 02:18:19 +00:00
Richard Smith 56d1215b05 Fix -Wcovered-switch-default and -Wunused-private-field warnings.
llvm-svn: 174025
2013-01-31 02:04:38 +00:00
Dan Gohman 20a2ae9df5 Change GetPointerBaseWithConstantOffset's DataLayout argument from a
reference to a pointer, so that it can handle the case where DataLayout
is not available and behave conservatively.

llvm-svn: 174024
2013-01-31 02:00:45 +00:00
Bill Wendling 37f7e18705 Make the AttrBuilder creation method of Attribute private so that people won't use it.
llvm-svn: 174023
2013-01-31 01:51:27 +00:00
Richard Trieu de5cc7d3d8 Add indents to AST dumping and removed parenthesis from AST nodes.
Indents were given the color blue when outputting with color.
AST dumping now looks like this:

Node
|-Node
| `-Node
`-Node
  `-Node

Compared to the previous:

(Node
  (Node
    (Node))
  (Node
    (Node)))

llvm-svn: 174022
2013-01-31 01:44:26 +00:00
Saleem Abdulrasool 3ea7fc62ef build: @ENABLE_THREADS@ => @LLVM_ENABLE_THREADS@
Makefile.config does not have the value for ENABLE_THREADS substituted as the
variable is called LLVM_ENABLE_THREADS within configure.ac.  This was pointed
out by zygoloid over IRC.

llvm-svn: 174021
2013-01-31 01:34:59 +00:00
Nick Lewycky 35d2359b1c Fix ODR-use of a MemberExpr to check before marking a pure function used. Remove
a workaround for this bug from the -Wundefined-internals warning.

llvm-svn: 174020
2013-01-31 01:34:31 +00:00
Daniel Dunbar ae1f040d76 [lit] Move unittest adaptor code into discovery module.
- Also, add a test for it.

llvm-svn: 174019
2013-01-31 01:23:39 +00:00
Daniel Dunbar 25baa132f3 [lit] Run the ShUtil tests as part of the test suite.
llvm-svn: 174018
2013-01-31 01:23:26 +00:00
Daniel Dunbar 33d340e23b [lit] Set parallel mode for coverage tests.
llvm-svn: 174017
2013-01-31 01:23:18 +00:00
Anna Zaks 3a86267192 [analyzer] Fix a bug in region store that lead to undefined value false
positives.

The includeSuffix was only set on the first iteration through the
function, resulting in invalid regions being produced by getLazyBinding
(ex: zoomRegion.y).

llvm-svn: 174016
2013-01-31 01:19:52 +00:00
Matt Beaumont-Gay c7cd308274 Sometimes ld is just ld.
Don't expect a character between the double-quotes and 'ld'.

llvm-svn: 174015
2013-01-31 01:15:55 +00:00
Daniel Dunbar 151e231e82 [lit] Move discovery code into its own module.
llvm-svn: 174014
2013-01-31 01:14:01 +00:00
Douglas Gregor 8e9f55ff13 When comparing two templates in the template differ, consider them the
same if they are actually the same; having the same name isn't
enough. Fixes <rdar://problem/12931988>.

llvm-svn: 174013
2013-01-31 01:08:35 +00:00
Bill Wendling 82aa8d4926 Revert for now:
--- Reverse-merging r174010 into '.':
U    include/llvm/IR/Attributes.h
U    lib/IR/Verifier.cpp
U    lib/IR/Attributes.cpp

llvm-svn: 174012
2013-01-31 01:04:51 +00:00
Michael Gottesman 41e4ac4224 Filecheckized 2x tests in SimplifyCFG and removed their date prefix to fit with current llvm style for test names.
llvm-svn: 174011
2013-01-31 01:04:23 +00:00
Bill Wendling b8b16b567c Remove the AttrBuilder version of the Attribute::get function.
The AttrBuilder is there to build up multiple attributes. The Attribute class
represents only one attribute at a time. So remove this unnecessary builder
creator method.

llvm-svn: 174010
2013-01-31 00:53:21 +00:00
Eric Christopher 258c867c0b Whitespace.
llvm-svn: 174009
2013-01-31 00:50:48 +00:00
Eric Christopher 4e3e94c13d Check and allow floating point registers to select the size of the
register for inline asm. This conforms to how gcc allows for effective
casting of inputs into gprs (fprs is already handled).

llvm-svn: 174008
2013-01-31 00:50:46 +00:00
Andrew Trick 7e6f928a7a LangRef: Add a Rationale for volatile rules.
llvm-svn: 174007
2013-01-31 00:49:39 +00:00
Eli Bendersky 6c84b90b70 Replace some more greps with FileChecks in tests
llvm-svn: 174006
2013-01-31 00:44:12 +00:00
Dan Gohman 0838bf7f32 Minor code simplification.
llvm-svn: 174005
2013-01-31 00:32:11 +00:00
Bill Wendling 8594fcbd1a Make sure that the Attribute object represents one attribute only.
Several places were still treating the Attribute object as respresenting
multiple attributes. Those places now use the AttributeSet to represent
multiple attributes.

llvm-svn: 174004
2013-01-31 00:30:05 +00:00
Bill Wendling fe0021a2f9 Make sure that the Attribute object represents one attribute only.
Several places were still treating the Attribute object as respresenting
multiple attributes. Those places now use the AttributeSet to represent
multiple attributes.

llvm-svn: 174003
2013-01-31 00:29:54 +00:00
Daniel Dunbar b399246c91 [lit] Add a MANIFEST file and a script for sanity checking the source dist.
llvm-svn: 174002
2013-01-31 00:21:59 +00:00
Daniel Dunbar f74e41ab47 [lit] Add a basic discovery test.
llvm-svn: 174001
2013-01-31 00:21:51 +00:00
Daniel Dunbar d00a5e5455 [lit] Add a script for checking test coverage.
llvm-svn: 174000
2013-01-31 00:21:44 +00:00
Daniel Dunbar 40722cc9ff [lit] Add a test suite for lit itself.
llvm-svn: 173999
2013-01-31 00:21:39 +00:00
Dan Gohman ed4029bae8 stripAndComputeConstantOffsets is only called on pointers; check this
with an assert instead of failing and requiring callers to check for failure.

llvm-svn: 173998
2013-01-31 00:12:20 +00:00
Eli Bendersky a320e00e74 Rewrite this test properly with a FileCheck instead of greps
llvm-svn: 173997
2013-01-31 00:11:52 +00:00
Matt Beaumont-Gay efc270d5c6 Fix unused variable warnings in -asserts build
llvm-svn: 173996
2013-01-31 00:08:03 +00:00
Dan Gohman 6a61fccb96 Fix ConstantFold's folding of icmp instructions to recognize that,
for example, a one-past-the-end pointer from one global variable may
be equal to the base pointer of another global variable.

llvm-svn: 173995
2013-01-31 00:01:45 +00:00
Michael Gottesman 606acb7c85 Added a unit test for r173983 that verifies that Target.isiOS() works correctly.
As a bonus I put in some extra checks to make sure that we are identifying the
machine word of various Mac OS X/iOS targets appropriately.

llvm-svn: 173994
2013-01-30 23:48:13 +00:00
Hal Finkel e1df90958d PPC QPX requires a 32-byte aligned stack
On systems which support the QPX vector instructions, the stack must be
32-byte aligned.

llvm-svn: 173993
2013-01-30 23:43:27 +00:00
Bill Wendling 785afdf3a4 Remove addRetAttributes and addFnAttributes, which aren't useful abstractions.
llvm-svn: 173992
2013-01-30 23:40:31 +00:00
Douglas Gregor 1a347f76c2 Reinstate r173952, this time limiting it to exactly the form
#define X X

for which there is no point warning, ever.

llvm-svn: 173991
2013-01-30 23:10:17 +00:00
Bill Wendling d219675c2a Convert typeIncompatible to return an AttributeSet.
There are still places which treat the Attribute object as a collection of
attributes. I'm systematically removing them.

llvm-svn: 173990
2013-01-30 23:07:40 +00:00
Greg Clayton 85e62eca66 expressions + C++11 lambdas == cooooool!!!
C++11 lambdas that don't capture anything can be used as static callback functions!

Heavily modified this python module to be able to not require a dylib in order to traverse the heap allocations.

Re-implemented the ptr_refs, objc_refs, malloc_info and cstr_refs to use complex expressions that use lambdas to do all static callback function work.

llvm-svn: 173989
2013-01-30 22:57:34 +00:00
Evan Cheng 9449ec956f Forgot the test case before.
llvm-svn: 173988
2013-01-30 22:57:00 +00:00
Evan Cheng d2ca4e2ed9 Restrict sin/cos optimization to 64-bit only for now. 32-bit is a bit messy and less critical.
llvm-svn: 173987
2013-01-30 22:56:35 +00:00
Michael Gottesman 3980b8c4cc Doxygenified some comments in IRBuilder.h.
llvm-svn: 173986
2013-01-30 22:56:31 +00:00
Michael Gottesman 9656405684 Removed CreateFPExtOrFPTrunc for now until I have the time to get in my vector convert patch.
What I thought was going to be a quick thing has extended out a little bit in
time *sigh*. So after some thought in order to not cruft up the tree I am
removing this for now since it is the right thing to do.

llvm-svn: 173985
2013-01-30 22:53:21 +00:00
Hal Finkel b3fc509b23 Initialize hasQPX in PPCSubtarget
This should have gone in with r173973.

llvm-svn: 173984
2013-01-30 22:43:44 +00:00