Commit Graph

59609 Commits

Author SHA1 Message Date
Fariborz Jahanian 0f44d81a4c Patch to implement ivar synthesis of properties declared in protocols
only and used in class imllementations (objc2 Nonfragile ABI specific).

llvm-svn: 71571
2009-05-12 18:14:29 +00:00
Ted Kremenek 3c2775f0b0 Make scan-build process of --use-cc and --html-title more robust.
llvm-svn: 71567
2009-05-12 18:04:43 +00:00
Douglas Gregor 5a4d12afbf Fill in more C++ status. We're now using the check mark to mean,
"complete, and we have tests for every paragraph".

llvm-svn: 71564
2009-05-12 17:55:28 +00:00
Bob Wilson ce8cfb41e8 Fix up a few minor typos in comments.
llvm-svn: 71563
2009-05-12 17:35:29 +00:00
Bob Wilson 2f4e56fd2e Fix 80-col violations and remove trailing whitespace. No functional changes.
llvm-svn: 71562
2009-05-12 17:09:30 +00:00
Dan Gohman 45b46687f4 Clarify a comment.
llvm-svn: 71561
2009-05-12 17:08:34 +00:00
Sanjiv Gupta 83adfb4a9f Iterate over globals once and sectionize them into appropriate sections.
Later in asmprinter, go over thsese sections and print them.
Do not print empty sections.

llvm-svn: 71560
2009-05-12 17:07:27 +00:00
Daniel Dunbar bbfd054746 Darwin x86-32 ABI: Now that structure passing is farther along, we
don't need special treatment for unions.

llvm-svn: 71559
2009-05-12 17:00:20 +00:00
Daniel Dunbar 203e2e8dd8 x86-64 ABI: clang incorrectly passes union { long double, float } in
register.
 - Merge algorithm was returning MEMORY as it should.

llvm-svn: 71556
2009-05-12 15:22:40 +00:00
Zhongxing Xu 08a2ede018 Add logic for invalidating array region to CFRefCount.cpp. When invalidating
array region, set its default value to conjured symbol. When retrieving its
element, create new region value symbol for the element.

Also fix some 80 columns violations.

llvm-svn: 71548
2009-05-12 10:10:00 +00:00
Daniel Dunbar 310511d429 Allow client Makefiles control over whether they want -pedantic by
defining NO_PEDANTIC.
  - Pedantic C89 is a painful language...

llvm-svn: 71545
2009-05-12 07:26:49 +00:00
Sanjiv Gupta 679e578c65 We do not need to create a label for external defs and decls,
just emit a comment for readability.

llvm-svn: 71544
2009-05-12 06:52:41 +00:00
Daniel Dunbar 6e8f8e899a Set svn:ignore on a slew of +Coverage directories
llvm-svn: 71543
2009-05-12 06:47:12 +00:00
Daniel Dunbar 8a28e011f4 Refactor dependency generation for .ll files.
- This matches the normal dependency generation code.

 - This also fixes the problem that when building a normal and bitcode
   archive from the same source, the dependency files would overwrite
   one another. Which was bad.

llvm-svn: 71542
2009-05-12 06:35:50 +00:00
Daniel Dunbar 583c5dcd76 Remove obsolete Makefile magic for calling llvm-upgrade
llvm-svn: 71540
2009-05-12 05:49:22 +00:00
Daniel Dunbar c25ba426bd Install bytecode libraries with a .bca suffix, otherwise it isn't
possible to build both a .a and a .bca.
 - My understanding is no one else is using this stuff, please let me
   know if I am wrong.

llvm-svn: 71539
2009-05-12 05:35:40 +00:00
Ted Kremenek 95d181936a Fix <rdar://problem/6877235> Classes typedef-ed to CF objects should get the same treatment as CF objects
This was accomplished by having	'isTypeRef' recursively walk the typedef stack.

llvm-svn: 71538
2009-05-12 04:53:03 +00:00
Sanjiv Gupta 63f5f68024 Mark mayLoad, mayStore for insns correctly and use them
to check if an insn is accessing memory during mem sel optimization.

llvm-svn: 71537
2009-05-12 04:30:38 +00:00
Bob Wilson 9e3d48f10d Fix pr4195: When iterating through predecessor blocks, break out of the loop
after finding the (unique) layout predecessor.  Sometimes a block may be listed
more than once, and processing it more than once in this loop can lead to
inconsistent values for FtTBB/FtFBB, since the AnalyzeBranch method does not
clear these values.  There's no point in continuing the loop regardless.
The testcase for this is reduced from the 2003-05-02-DependentPHI SingleSource
test.

llvm-svn: 71536
2009-05-12 03:48:10 +00:00
Dan Gohman d76d71a291 Factor the code for collecting IV users out of LSR into an IVUsers class,
and generalize it so that it can be used by IndVarSimplify. Implement the
base IndVarSimplify transformation code using IVUsers. This removes
TestOrigIVForWrap and associated code, as ScalarEvolution now has enough
builtin overflow detection and folding logic to handle all the same cases,
and more. Run "opt -iv-users -analyze -disable-output" on your favorite
loop for an example of what IVUsers does.

This lets IndVarSimplify eliminate IV casts and compute trip counts in
more cases. Also, this happens to finally fix the remaining testcases
in PR1301.

Now that IndVarSimplify is being more aggressive, it occasionally runs
into the problem where ScalarEvolutionExpander's code for avoiding
duplicate expansions makes it difficult to ensure that all expanded
instructions dominate all the instructions that will use them. As a
temporary measure, IndVarSimplify now uses a FixUsesBeforeDefs function
to fix up instructions inserted by SCEVExpander. Fortunately, this code
is contained, and can be easily removed once a more comprehensive
solution is available.

llvm-svn: 71535
2009-05-12 02:17:14 +00:00
Douglas Gregor 45fe0364aa Make precompiled headers work with -E. When we're only preprocessing
(with -E), we turn the PCH include into an implicit include of the
file from which the PCH file was generated.

llvm-svn: 71534
2009-05-12 01:31:05 +00:00
Dan Gohman ae451600fa When forgetting SCEVs for loop PHIs, don't forget SCEVUnknown values.
These values aren't analyzable, so they don't care if more information
about the loop trip count can be had. Also, SCEVUnknown is used for
a PHI while the PHI itself is being analyzed, so it needs to be left
in the Scalars map. This fixes a variety of subtle issues.

llvm-svn: 71533
2009-05-12 01:27:58 +00:00
Dan Gohman d6c04461a4 Fix GetMinTrailingZeros for SCEVSignExtend and SCEVZeroExtendExpr to
return the correct value when the cast operand is all zeros. This ought
to be pretty rare, because it would mean that the regular SCEV folding
routines missed a case, though there are cases they might legitimately
miss. Also, it's unlikely anything currently using GetMinTrailingZeros
cares about this case.

llvm-svn: 71532
2009-05-12 01:23:18 +00:00
Chris Lattner 32efff659c wrap up a version of the man page that is minimally helpful, but somewhat complete.
llvm-svn: 71524
2009-05-12 00:47:40 +00:00
Ted Kremenek df5a6b6070 Update checker build.
llvm-svn: 71523
2009-05-12 00:45:33 +00:00
Evan Cheng 55173b7646 Avoid unneeded SIB byte encoding. Patch by Zoltan Varga.
llvm-svn: 71520
2009-05-12 00:07:35 +00:00
Bill Wendling 6c60dbb3cb - Record that the debug info is actually used so that the label folder doesn't
blast it away.
- Move InlineInfo bookkeeping to bookkeep the correct debug info object.

llvm-svn: 71519
2009-05-12 00:06:59 +00:00
Chris Lattner 66c64f9ba4 add some more content.
llvm-svn: 71518
2009-05-12 00:01:32 +00:00
Douglas Gregor d002c7bc58 Encapsulate template arguments lists in a new class,
TemplateArgumentList. This avoids the need to pass around
pointer/length pairs of template arguments lists, and will eventually
make it easier to introduce member templates and variadic templates.

llvm-svn: 71517
2009-05-11 23:53:27 +00:00
Ted Kremenek 5fb7847fbf BugReport::getEndPath() - Only add a Stmt's range to the constructed PathDiagnosticEventPiece if the BugReport contained no explicit ranges.
llvm-svn: 71516
2009-05-11 23:50:59 +00:00
Anders Carlsson bd7d11f770 Factor code that's common to EmitCXXMemberCallExpr and EmitCXXConstructorCall out into a EmitCXXMemberCall function.
llvm-svn: 71514
2009-05-11 23:37:08 +00:00
Ted Kremenek 25421bb8f6 Use Text::ParseWords to make 'clang -###' parsing more robust.
llvm-svn: 71504
2009-05-11 23:29:51 +00:00
Lang Hames f094cbbcb9 Fixed PR4090.
llvm-svn: 71495
2009-05-11 23:14:13 +00:00
Daniel Dunbar a3bb6f2e5b Tweak this non-default test so it still works w/ x86 feature support.
llvm-svn: 71494
2009-05-11 23:11:21 +00:00
Daniel Dunbar e90fa18d6c Test for x86 target features, I forgot to commit this.
llvm-svn: 71492
2009-05-11 23:06:15 +00:00
Daniel Dunbar 097353cbb5 Darwin x86-32: Multi-dimensional arrays were not handled correctly,
spotted by Eli!

llvm-svn: 71490
2009-05-11 23:01:34 +00:00
Anders Carlsson 3881170898 Friend declarations are only valid inside class definitions.
llvm-svn: 71489
2009-05-11 22:55:49 +00:00
Ted Kremenek 97f75f8bda When stripping element regions for invalidating region values, treat FieldRegions and ObjCIvarRegions as "base" regions in addition to VarRegions.
llvm-svn: 71488
2009-05-11 22:55:17 +00:00
Chris Lattner e3c3f40404 pull a bunch of options out of clang-cc.cpp. This doesn't include
options that the driver swizzles.

llvm-svn: 71487
2009-05-11 22:45:37 +00:00
Anders Carlsson 076fc36419 Fix test case by always setting the type spec type, even for friend decls.
llvm-svn: 71486
2009-05-11 22:42:30 +00:00
Evan Cheng 78a4eb844b Teach LSR to optimize more loop exit compares, i.e. change them to use postinc iv value. Previously LSR would only optimize those which are in the loop latch block. However, if LSR can prove it is safe (and profitable), it's now possible to change those not in the latch blocks to use postinc values.
Also, if the compare is the only use, LSR would place the iv increment instruction before the compare instead in the latch.

llvm-svn: 71485
2009-05-11 22:33:01 +00:00
Daniel Dunbar e92449e4cc Make cleanup-stack.c test stronger, and work in release-asserts mode.
llvm-svn: 71484
2009-05-11 22:30:29 +00:00
Anders Carlsson f83c9faa2f Add an ActOnFriendDecl and call it for friend class decls.
llvm-svn: 71482
2009-05-11 22:27:47 +00:00
Anders Carlsson 22e3784c79 For friend class decls, always use TK_Reference so we'll try to look up existing class decls first.
llvm-svn: 71481
2009-05-11 22:25:03 +00:00
Ted Kremenek 2ee73b86c0 EdgeBuilder: DeclStmts and BinaryOperators are not the enclosing location context when they are used as initialization code for loops.
llvm-svn: 71480
2009-05-11 22:19:32 +00:00
Mike Stump b517f2c5e2 Add DW_AT_APPLE_isa and DW_AT_APPLE_block. Radar 6867696
llvm-svn: 71479
2009-05-11 21:58:01 +00:00
Dale Johannesen b571463363 Fix PR4188. TailMerging can't tolerate inexact
sucessor info.

llvm-svn: 71478
2009-05-11 21:54:13 +00:00
Ted Kremenek c0b879b4a7 EdgeBuilder::cleanUpLocation() should used the PathDiagnosticLocation constructor for a single point, not a range.
llvm-svn: 71477
2009-05-11 21:42:34 +00:00
Ted Kremenek dc99ec4ebd ccc-analyzer should only analyze C and Objective-C files.
llvm-svn: 71474
2009-05-11 21:08:34 +00:00
Evan Cheng 1988352fbd Apply patch review feedback.
llvm-svn: 71472
2009-05-11 20:53:52 +00:00