Commit Graph

40638 Commits

Author SHA1 Message Date
Duncan Sands f213e82bc5 Generalize getCopyFromParts and getCopyToParts to
handle arbitrary precision integers and any number
of parts.  For example, on a 32 bit machine an i50
corresponds to two i32 parts.  getCopyToParts will
extend the i50 to an i64 then write half of the i64
to each part; getCopyFromParts will combine the two
i32 parts into an i64 then truncate the result to
i50.

llvm-svn: 47024
2008-02-12 20:46:31 +00:00
Ted Kremenek 002bf74fbc Added transfer function logic for sizeof(expr)/sizeof(type). This currently
doesn't support VLAs.

Reordered some cases in the switch statement of GRConstant::Visit() so
that they are ordered alphabetically based on AST node type.

llvm-svn: 47021
2008-02-12 19:49:57 +00:00
Evan Cheng 83af1197ca Revert r46916 PPCTargetAsmInfo.cpp.
llvm-svn: 47020
2008-02-12 19:25:12 +00:00
Evan Cheng 8a25d6ac53 Only using x86-64 rip relative addressing in non-staic mode?
llvm-svn: 47019
2008-02-12 19:20:46 +00:00
Evan Cheng 724029151b Don't mask the isel bug.
llvm-svn: 47018
2008-02-12 19:11:29 +00:00
Evan Cheng 3069a26f63 This test assumes no SSE4.1.
llvm-svn: 47017
2008-02-12 19:11:08 +00:00
Ted Kremenek f225dffd4d Fixed misspelling in comment.
llvm-svn: 47016
2008-02-12 19:01:33 +00:00
Dan Gohman 282db37aff Add a doxygen comment for SrcValueSDNode, to make its purpose
clear and to clarify how it differs from MemOperandSDNode.

llvm-svn: 47015
2008-02-12 18:52:52 +00:00
Ted Kremenek fb9cc188af Renamed local variable.
Added transfer function support for CharacterLiteral.

llvm-svn: 47014
2008-02-12 18:50:32 +00:00
Ted Kremenek 07d65aa238 Moved class declaration for ObjCForCollectionStmt to be co-located with
the class declarations for the other ObjC***Stmt classes.

llvm-svn: 47013
2008-02-12 18:34:31 +00:00
Devang Patel ac562ab102 Remove dead code.
llvm-svn: 47012
2008-02-12 18:20:50 +00:00
Ted Kremenek 90ae68fe71 Added GRBlockCounter class, which tracks the number of times blocks
have been visited in a path.  Added GRBlockCounter as an item to be
enqueued to the worklist.

Modified "ProcessBranch" in GRConstants to prune branches with symbolic
conditions that have been already taken.

llvm-svn: 47010
2008-02-12 18:08:17 +00:00
Wojciech Matyjewicz ddb265b905 Now that ScalarEvolution::print writes to the correct stream, there is
no need to redirect stderr into stdout.

llvm-svn: 47009
2008-02-12 15:12:40 +00:00
Wojciech Matyjewicz 995624f44d Change negative grep into positive one in my yesterday's testcase.
llvm-svn: 47008
2008-02-12 15:10:35 +00:00
Wojciech Matyjewicz 1d2c27b23e Fix PR2002. Suppose n is the initial value for the induction
variable (with step 1) and m is its final value. Then, the correct trip 
count is SMAX(m,n)-n. Previously, we used SMAX(0,m-n), but m-n may 
overflow and can't in general be interpreted as signed.

Patch by Nick Lewycky.

llvm-svn: 47007
2008-02-12 15:09:36 +00:00
Eli Friedman 716c10c01e Fix for bug 1996: optimize out loads of undef. This code basically just
checks for a malloc/alloca immediately followed by a load.

llvm-svn: 47006
2008-02-12 12:08:14 +00:00
Eli Friedman a7bf7ed476 Make typechecking for enum+int compatibility stricter.
llvm-svn: 47005
2008-02-12 08:46:17 +00:00
Eli Friedman 2b90b0d09e Add wchar_t type to ASTContext. Will be needed for wide strings, since
they are of type wchar_t[].

llvm-svn: 47004
2008-02-12 08:29:21 +00:00
Eli Friedman 16f909670e Fix type compatibility between constant and variable arrays.
llvm-svn: 47003
2008-02-12 08:23:06 +00:00
Evan Cheng 352acec37e Update comment.
llvm-svn: 47002
2008-02-12 07:59:55 +00:00
Evan Cheng 4d8c98b8f9 Unbreak various insert_vector_elt and extract_vector_elt tests in presence of SSE4.
llvm-svn: 47001
2008-02-12 07:59:45 +00:00
Tanya Lattner 3716d023ab Test case for annotate builtin.
llvm-svn: 46999
2008-02-12 07:46:33 +00:00
Evan Cheng b21301fbe7 Fix some test cases.
llvm-svn: 46998
2008-02-12 07:22:46 +00:00
Bill Wendling f59af190a3 More violation fixes.
llvm-svn: 46997
2008-02-12 07:12:46 +00:00
Bill Wendling 8402d0270e Fix validation errors: di -> dt.
llvm-svn: 46996
2008-02-12 07:09:05 +00:00
Bill Wendling 1a19af9605 Reformatting. Adding "doc_code" divisions for code examples. Updated some
of the examples to reflect the current .TD files.

llvm-svn: 46995
2008-02-12 07:06:19 +00:00
Chris Lattner e38ac158fa rip out llvm 2.2 stuff in preparation for llvm 2.3
llvm-svn: 46993
2008-02-12 06:29:45 +00:00
Chris Lattner 8752bbf25f heavily refactor this to have less duplication between BUILD_FOR_WEBSITE mode and not.
llvm-svn: 46991
2008-02-12 06:07:47 +00:00
Chris Lattner 25624858f2 remove unknown details
llvm-svn: 46985
2008-02-12 05:07:12 +00:00
Steve Naroff ab468cb14b Allow the parser to detect invalid DeclSpec's. This fixes http://llvm.org/bugs/show_bug.cgi?id=1987.
This commit only "guards" the call to ParseDeclarationSpecifiers() in ParseDeclarationOrFunctionDefinition(). 

We could consider guarding all calls, however this is a bit radical (since it effectively stops parsing the declaration once we have a bad declspec). Will discuss with Chris tomorrow.

llvm-svn: 46984
2008-02-12 04:08:59 +00:00
Tanya Lattner 779593cd9d Add 2.2 release tag.
llvm-svn: 46981
2008-02-12 02:42:55 +00:00
Steve Naroff c1e22c7fa1 Fix unsafe static cast...
llvm-svn: 46980
2008-02-12 01:09:36 +00:00
Nate Begeman fd82c308e5 Stuff noticed while grepping code
llvm-svn: 46979
2008-02-11 23:47:56 +00:00
Dan Gohman 47ff55c41b Correct the order of the arguments in the examples in the comments
for APInt::getBitsSet. And fix an off-by-one bug in "wrapping" mode.

llvm-svn: 46978
2008-02-11 23:45:14 +00:00
Steve Naroff 69e8f9efab Several cleanups surrounding Parser::ParseAsmStatement() and Parser::FuzzyParseMicrosoftAsmStatement().
llvm-svn: 46977
2008-02-11 23:15:56 +00:00
Ted Kremenek 633654ffab Consolidated use of BumpPtrAllocator shared by various ImmutableSet/ImmutableMap
factories.

Fixed a horrible bug in lval:DeclVar::classof(RValue* V); we weren't checking
V was an LValue, allowing nonlval::ConcereteInts to match isa<lval::DeclVar>.

llvm-svn: 46976
2008-02-11 23:12:59 +00:00
Ted Kremenek 71941a99d1 The factories for ImutAVLTree/ImmutableSet/ImmutableMap now take an (optional)
BumpPtrAllocator argument to their constructors.  This BumpPtrAllocator
will be used to allocate trees.  If no BumpPtrAllocator is provided, one
is created (as before).

llvm-svn: 46975
2008-02-11 23:11:12 +00:00
Steve Naroff bff738543d Move policy on unnamed fields (a Microsoft extension) from Parser::ParseStructDeclaration() to the driver.
llvm-svn: 46974
2008-02-11 22:40:08 +00:00
Steve Naroff 5915777fca Move Microsoft __declspec hack from the parser to the preprocessor. Since we have no plans to actually implement this construct, it is cleaner to limit the change to the preprocessor.
llvm-svn: 46973
2008-02-11 22:29:58 +00:00
Steve Naroff 5a858df0b3 Fix http://llvm.org/bugs/show_bug.cgi?id=2013.
llvm-svn: 46972
2008-02-11 22:17:33 +00:00
Steve Naroff b5fc2551e4 After yesterday's discussion (http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-February/001044.html), decided not to change the semantics of Type::isIncompleteType().
This commit simply changes a couple comments to reflect this decision.

llvm-svn: 46970
2008-02-11 21:52:37 +00:00
Scott Michel 7c48a8f3d7 Added blurb for CellSPU progress
llvm-svn: 46968
2008-02-11 21:05:47 +00:00
Duncan Sands a6ab6e7adb Generalize the handling of call and return arguments,
in preparation for apint support.  These changes are
intended to have no functional effect.

llvm-svn: 46967
2008-02-11 20:58:28 +00:00
Ted Kremenek ed3be17b6f Separate bindings for subexpressions to be in a separate map for
bindings for block-level expressions.

Moved pretty-printing logic (DOT) for ValueStates to ValueState.cpp.

llvm-svn: 46965
2008-02-11 19:21:59 +00:00
Dan Gohman 11f6212bc0 From Chris' review: use isa instead of explicitly using classof.
llvm-svn: 46964
2008-02-11 19:00:34 +00:00
Dan Gohman 991056808b From Chris' review: minor corrections in comments.
llvm-svn: 46963
2008-02-11 19:00:03 +00:00
Dan Gohman 54d3b5a1f5 From Chris' review: use cast instead of dyn_cast with an assert.
llvm-svn: 46962
2008-02-11 18:58:42 +00:00
Dan Gohman 7b5d916c98 From Chris' review: fix 80 column violations
llvm-svn: 46961
2008-02-11 18:57:43 +00:00
Dan Gohman d96dd34637 From Chris' review: change MemOperandSDNode's constructor to pass its
argument by reference, rather than by value. 

llvm-svn: 46960
2008-02-11 18:56:50 +00:00
Wojciech Matyjewicz adae053b53 If the LHS of the comparison is a loop-invariant we also want to move it
to the RHS. This simple change allows to compute loop iteration count 
for loops with condition similar to the one in the testcase (which seems 
to be quite common).

llvm-svn: 46959
2008-02-11 18:37:34 +00:00