Commit Graph

36567 Commits

Author SHA1 Message Date
Fariborz Jahanian f6546b38b2 Patch for method implementation. It populates ObjcImplementationDecl object with method implementation declarations .
It checks and warns on those methods declared in class interface and not implemented.

llvm-svn: 42412
2007-09-27 18:57:03 +00:00
Steve Naroff 65ca537b55 Fix bug in SelectorInfo::getName() - method buffer needs to be passed by reference.
llvm-svn: 42411
2007-09-27 18:52:21 +00:00
Evan Cheng e6f92253f5 Avoid inserting a live register more than once.
llvm-svn: 42410
2007-09-27 18:46:06 +00:00
Ted Kremenek b9ce295b0a Created new "ExprDeclBitVector" type bundle for dataflow analyses that need boolean
values associated with ScopedDecls and CFGBlock-level Exprs.  This is the common
boilerplate needed by UninitializedValues and LiveVariables.

Refactored UninitializedValues to use ExprDeclBitVector.

Shortened the string diagnostic for UninitializedValues.

llvm-svn: 42408
2007-09-27 18:20:22 +00:00
Tanya Lattner 0d675ee06e Couple of fixes to mention bunzip2 and make instructions more clear.
llvm-svn: 42407
2007-09-27 18:14:33 +00:00
Devang Patel f68d3e1a0d While searching for appropriate place for temporaries, do not over-incerement iterator.
llvm-svn: 42406
2007-09-27 18:02:47 +00:00
Devang Patel 11611f876e Mention Loop Index Split
llvm-svn: 42405
2007-09-27 17:32:04 +00:00
Chris Lattner d2bc9d8c77 new testcase for PR1708
llvm-svn: 42398
2007-09-27 15:47:16 +00:00
Daniel Berlin a447de7065 Ignore redundant constraints
llvm-svn: 42397
2007-09-27 15:42:23 +00:00
Chris Lattner cc61bf5e0c Fix some use of uninit variables issues, reported by Anton.
llvm-svn: 42396
2007-09-27 15:15:46 +00:00
Steve Naroff f73590dbb1 Add SelectorInfo (similar in spirit to IdentifierInfo). The key difference is SelectorInfo is not string-oriented, it is a unique aggregate of IdentifierInfo's (using a folding set). SelectorInfo also has a richer API that simplifies the parser/action interface. 3 noteworthy benefits:
#1: It is cleaner. I never "liked" storing keyword selectors (i.e. foo:bar:baz) in the IdentifierTable.

#2: It is more space efficient. Since Cocoa keyword selectors can be quite long, this technique is space saving. For Cocoa.h, pulling the keyword selectors out saves ~180k. The cost of the SelectorInfo data is ~100k. Saves ~80k, or 43%.

#3: It results in many API simplifications. Here are some highlights:

- Removed 3 actions (ActOnKeywordMessage, ActOnUnaryMessage, & one flavor of ObjcBuildMethodDeclaration that was specific to unary messages).
- Removed 3 funky structs from DeclSpec.h (ObjcKeywordMessage, ObjcKeywordDecl, and ObjcKeywordInfo).
- Removed 2 ivars and 2 constructors from ObjCMessageExpr (fyi, this space savings has not been measured).

I am happy with the way it turned out (though it took a bit more hacking than I expected). Given the central role of selectors in ObjC, making sure this is "right" will pay dividends later.

Thanks to Chris for talking this through with me and suggesting this approach. 

llvm-svn: 42395
2007-09-27 14:38:14 +00:00
Nick Lewycky 3934961878 Build the correct range for loops with unusual bounds. Fix from Jay Foad.
llvm-svn: 42394
2007-09-27 14:12:54 +00:00
Bill Wendling c9a8c74d28 No, really, it *is* SSSE3. ;-)
llvm-svn: 42393
2007-09-27 08:47:31 +00:00
Duncan Sands a1779909ff SSSE3 -> SSE3. Reported by Alex Kellett.
llvm-svn: 42392
2007-09-27 08:24:36 +00:00
Duncan Sands 2f060736e2 Grammer fix reported by Alex Kellett.
llvm-svn: 42391
2007-09-27 08:24:02 +00:00
Evan Cheng 75439b3b78 Silence a compiler warning.
llvm-svn: 42389
2007-09-27 07:35:39 +00:00
Evan Cheng bde499be60 Boogs.
llvm-svn: 42388
2007-09-27 07:29:27 +00:00
Evan Cheng 1ec79b41db Be smarter about which node to force schedule. Reduce # of duplications + copies; Added statistics.
llvm-svn: 42387
2007-09-27 07:09:03 +00:00
Gordon Henriksen eb42c4e221 Remove debugging.
llvm-svn: 42385
2007-09-27 02:47:27 +00:00
Evan Cheng cfd5f82890 Backtracking only when it won't create a cycle.
llvm-svn: 42384
2007-09-27 00:25:29 +00:00
Dale Johannesen 34aa41c475 Make temporaries explicit to avoid premature
destruction of compiler-created ones.

llvm-svn: 42383
2007-09-26 23:20:33 +00:00
Gordon Henriksen 43b66447f4 Updating LLVM.xcodeproj.
llvm-svn: 42382
2007-09-26 22:44:45 +00:00
Chris Lattner e6d9ca5443 objc messages have side effects, return true from hasLocalSideEffect,
fixing:

VoidMethod.m:14:5: warning: expression result unused
    [Greeter hello];
    ^~~~~~~~~~~~~~~

llvm-svn: 42380
2007-09-26 22:06:30 +00:00
Evan Cheng 478134e5f4 Oops. Forgot this.
llvm-svn: 42377
2007-09-26 21:38:03 +00:00
Ted Kremenek d80ee7d287 Added extra guard for null Stmt* when traversing the AST using VisitChildren.
Added assertion that Block-level statements should not be NULL.

llvm-svn: 42376
2007-09-26 21:36:20 +00:00
Evan Cheng 8e136a9dc4 - Move getPhysicalRegisterRegClass() from ScheduleDAG to MRegisterInfo.
- Added ability to emit cross class register copies to the BBRU scheduler.
- More aggressive backtracking.

llvm-svn: 42375
2007-09-26 21:36:17 +00:00
Neil Booth 0fa3ea79ac Whitespace cleanup.
llvm-svn: 42374
2007-09-26 21:35:05 +00:00
Neil Booth 9acbf5aaf9 Whitespace and compiler warning cleanup.
llvm-svn: 42373
2007-09-26 21:33:42 +00:00
Evan Cheng 8728c3376a - Added MRegisterInfo::getCrossCopyRegClass() hook. For register classes where reg to reg copies are not possible, this returns another register class which registers in the specified register class can be copied to (and copy back from).
- X86 copyRegToReg() now supports copying between EFLAGS and GR32 / GR64 registers.

llvm-svn: 42372
2007-09-26 21:31:07 +00:00
Evan Cheng b93de587cb Some assemblers do not recognize aliases pushfd, pushfq, popfd, and popfq. Just emit them as pushf and popf.
llvm-svn: 42371
2007-09-26 21:28:00 +00:00
Ted Kremenek 5c50fd1add Fixed two bugs in CFG construction:
BUG 1) 

CFG failed to build for empty functions, or functions containing only
NullStmts or empty compound statements.

We now handle such cases, although now we cannot test for CFG
construction failure by asserting that the last block constructed is
not NULL (since it now may be).

BUG 2)

CFG construction segfaulted on some cases when walking the AST and not
taking into account that some children of a statement may be NULL.

llvm-svn: 42370
2007-09-26 21:23:31 +00:00
Dale Johannesen b805d35d16 Modernize fabs.ll, add long double. Add tests
for direct codegen of fsin/fcos.

llvm-svn: 42369
2007-09-26 21:12:10 +00:00
Dale Johannesen b6d56401aa Enable codegen for long double abs, sin, cos
llvm-svn: 42368
2007-09-26 21:10:55 +00:00
Gordon Henriksen c23b66c58b Added C and Ocaml bindings for functions, basic blocks, and
instruction creation. No support yet for instruction introspection.

Also eliminated allocas from the Ocaml bindings for portability,
and avoided unnecessary casts.

llvm-svn: 42367
2007-09-26 20:56:12 +00:00
Ted Kremenek 0883fd5817 Removed option "-parse-ast-check" from clang driver. This is now implemented
using "-parse-ast -verify".

Updated all test cases (using a sed script) that invoked -parse-ast-check to
now use -parse-ast -verify.

Fixed a bug where using "-verify" instead of "-parse-ast-check" would not
correctly create the DiagClient needed to accumulate diagnostics.

llvm-svn: 42365
2007-09-26 20:14:22 +00:00
Ted Kremenek a054c5bedd Moved "VerifyDiagnostics" variable declaration to right below ProgAction
declaration.  This is because this option is logically tightly connected
to the actions defined in ProgAction.

llvm-svn: 42364
2007-09-26 19:42:19 +00:00
Ted Kremenek cbd2af8a0a Removed inclusion of <memory>, which is no longer needed since we
aren't used auto_ptr's anymore.

llvm-svn: 42363
2007-09-26 19:41:07 +00:00
Ted Kremenek 8742a45565 Refactored driver so that any action that is implemented using an
ASTConsumer can also be verified using the diagnostics checker.  From
the command line, users may activate diagnostic checking using the
"-verify" option.  For example, "clang -verify -warn-dead-stores"
checks if the warnings flagged by the dead store checker match those
in the comments.

Note that we still have the option "-parse-ast-check" for backwards
comptability with existing test cases.  This option is now equivalent to 
"-parse-ast -verify".

llvm-svn: 42362
2007-09-26 18:39:29 +00:00
Fariborz Jahanian 2a4dd316a0 This patch inserts ivars declared in @implementation in its object and verifies
that they conform(in type, name and numbers) to those declared in @interface. 
Test case highlights kind of checking we do here.

llvm-svn: 42360
2007-09-26 18:27:25 +00:00
Dale Johannesen f04d37d3a9 Fix f80 UNDEF.
llvm-svn: 42359
2007-09-26 17:26:49 +00:00
Fariborz Jahanian 19529eec8a Removed a few TODOs on things which are done.
llvm-svn: 42358
2007-09-26 17:03:44 +00:00
Duncan Sands 755d9306a3 X86 -> X86-32 in appropriate places.
llvm-svn: 42357
2007-09-26 16:24:52 +00:00
Duncan Sands 47fc0a2a5f Various cleanups. Especially, EH is turned on by default!
llvm-svn: 42356
2007-09-26 15:59:54 +00:00
Chris Lattner f13af33221 ok ok we get it. CBE and vectors don't like each other yet.
llvm-svn: 42355
2007-09-26 15:50:21 +00:00
Chris Lattner 4480f42166 be less redundantly redundant.
llvm-svn: 42354
2007-09-26 15:48:33 +00:00
Duncan Sands 0bcbceb647 Test the C front-end, not the C++ front-end.
llvm-svn: 42350
2007-09-26 07:28:20 +00:00
Chris Lattner 31d319dce7 make old crappy browsers produce less crappy output :)
llvm-svn: 42349
2007-09-26 06:38:59 +00:00
Evan Cheng b4b352656a Typos: POPQ -> POPFQ, POPD -> POPFD.
llvm-svn: 42348
2007-09-26 06:38:29 +00:00
Chris Lattner c9e7b8ec50 move PR1160 here.
llvm-svn: 42347
2007-09-26 06:29:31 +00:00
Evan Cheng c1e4e3743b Allow copyRegToReg to emit cross register classes copies.
Tested with "make check"!

llvm-svn: 42346
2007-09-26 06:25:56 +00:00