Commit Graph

36647 Commits

Author SHA1 Message Date
Ted Kremenek a6ef56e6d2 DeadStores no longer reports warnings for stores to non-local variables.
llvm-svn: 42447
2007-09-28 20:48:41 +00:00
Ted Kremenek 0064ff47e6 Significant cleanups and bug-fixes to LiveVariables. Uses new refactored
ExprDeclBitVector class for defining dataflow state.

llvm-svn: 42446
2007-09-28 20:38:59 +00:00
Ted Kremenek 254c126c15 Refactored ExprDeclBitVector into two classes:
DeclBitVector
 ExprDeclBitVector (which subclasses the former)

DeclBitVector is for analyses that just want to track bitvector state
for declarations.

ExprDeclBitVector is for analyses that want to track bitvector state
for both both declarations and CFGBlock-level expressions.

llvm-svn: 42445
2007-09-28 20:12:10 +00:00
Chris Lattner 2be9ec5c91 Make Value::getNameLen not crash on an empty name, fixing PR1712.
llvm-svn: 42444
2007-09-28 20:09:40 +00:00
Evan Cheng f72693f36e Remove a poor scheduling heuristic.
llvm-svn: 42443
2007-09-28 19:37:35 +00:00
Evan Cheng 038dcc5136 Trim some unneeded fields.
llvm-svn: 42442
2007-09-28 19:24:24 +00:00
Dale Johannesen 03d4ad9f03 Record latest work.
llvm-svn: 42441
2007-09-28 18:46:28 +00:00
Dale Johannesen 789b5a505b Fix long double -> uint64 conversion.
llvm-svn: 42440
2007-09-28 18:44:17 +00:00
Dale Johannesen 6bf69ed3cc minor long double related changes
llvm-svn: 42439
2007-09-28 18:06:58 +00:00
Ted Kremenek 483e305210 Fixed bug where declaration initializer expressions were not
traversed by the visitor.

llvm-svn: 42438
2007-09-28 17:55:50 +00:00
Ted Kremenek 07eff9a2fe Added iterator mechanism to iterator over the decls and expressions
tracked by an ExprDeclBitVector analysis.

llvm-svn: 42437
2007-09-28 17:55:22 +00:00
Fariborz Jahanian b75db4cc8c Patch to warn on umimplemented methods coming from class's
protocols.

llvm-svn: 42436
2007-09-28 17:40:07 +00:00
Dan Gohman 25d506c41b Make the checks for DW_FORM_data4 consistent with the others, and
add more such code for DIEDwarfLabel::SizeOf and DIEObjectLabel::SizeOf.

llvm-svn: 42435
2007-09-28 16:50:28 +00:00
Dan Gohman 0d23d63b9e Use 32-bit data directives for DW_FORM_data4 format data, even on
targets with 64-bit addresses.

llvm-svn: 42434
2007-09-28 15:43:33 +00:00
Rafael Espindola 6c04ac1db0 Refactor the memcpy lowering for the x86 target.
The only generated code difference is that now we call memcpy when
the size of the array is unknown. This matches GCC behavior and is
better since the run time value can be arbitrarily large.

llvm-svn: 42433
2007-09-28 12:53:01 +00:00
Evan Cheng 1f516560d1 Stop inventing new words. :-)
llvm-svn: 42429
2007-09-28 01:35:02 +00:00
Owen Anderson d0d5c11d18 Remove unneeded #include.
llvm-svn: 42428
2007-09-28 01:25:07 +00:00
Owen Anderson 0fbef94cd0 Have PostDomTree use the newly templated DFSPass.
llvm-svn: 42427
2007-09-28 01:23:47 +00:00
Evan Cheng edfc5b2204 Pessimisively assume ADJCALLSTACKDOWN / ADJCALLSTACKUP (which becomes sub / add) clobbers EFLAGS.
llvm-svn: 42426
2007-09-28 01:19:48 +00:00
Dale Johannesen 25a00a63eb Add sqrt and powi intrinsics for long double.
llvm-svn: 42423
2007-09-28 01:08:20 +00:00
Dale Johannesen 1d1d0e7735 Don't do SRA for unions with long double fields.
Fixes a SWB crash.

llvm-svn: 42422
2007-09-28 00:21:38 +00:00
Ted Kremenek f91d1c92ba Fixed several bugs in the propagation of "uninitialized value"
taintness across expressions.

Made "smart-culling" of taint propagation (for error reporting)
correctly handle conditional expressions and a few other edge cases.

llvm-svn: 42421
2007-09-28 00:09:38 +00:00
Owen Anderson ee73e0b8cb Convert DFSPass into a templated friend function, in preparation for making it common to DomTree and PostDomTree.
llvm-svn: 42420
2007-09-27 23:23:00 +00:00
Dan Gohman a1d46c7d0a TargetAsmInfo::getAddressSize() was incorrect for x86-64 and 64-bit targets
other than PPC64. Instead of fixing it, just remove it and fix all the
places that use it to use TargetData::getPointerSize() instead, as there
aren't very many. Most of the references were in DwarfWriter.cpp.

llvm-svn: 42419
2007-09-27 23:12:31 +00:00
Gordon Henriksen 613afce430 CollectorMetadata abstractly describes stack maps for a function.
It includes:

 - location and of each safe point in machine code (identified by a
   label)
 - location of each root within the stack frame (identified by an
   offset), including the metadata tag provided to llvm.gcroot in
   the user program
 - size of the stack frame (for collectors which want to cheat on
   stack crawling :)
 - and eventually will include liveness

It is to be populated by back-ends during code-generation.

CollectorModuleMetadata aggregates this information across the
entire module.

llvm-svn: 42418
2007-09-27 22:18:46 +00:00
Evan Cheng 99dc695da5 Use GR64 in 64-bit mode.
llvm-svn: 42417
2007-09-27 21:50:05 +00:00
Fariborz Jahanian fa80e80da9 Patch to use case-stmt for keywords used as selectgor names.
llvm-svn: 42416
2007-09-27 19:52:15 +00:00
Gordon Henriksen 658c57eb66 My previous Registry.h header, as well as Collectors.h, which is the
registry for dynamically-loaded garbage collection compiler plugins.

llvm-svn: 42415
2007-09-27 19:34:27 +00:00
Gordon Henriksen 0076a6727e GarbageCollection.html is expanded to encompass the coming
capabilities. This is a major rewrite and is easier to read en toto
rather than patchwise.

llvm-svn: 42414
2007-09-27 19:31:36 +00:00
Evan Cheng 5a71402be6 Doh. Calls clobber EFLAGS.
llvm-svn: 42413
2007-09-27 19:01:55 +00:00
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