Commit Graph

59027 Commits

Author SHA1 Message Date
Zhongxing Xu 3e3e69bbe7 region store: make Retrieve() can retrieve embedded array correctly. Also
simplify the retrieve logic.

llvm-svn: 70651
2009-05-03 00:27:40 +00:00
Daniel Dunbar b7126db9b0 Remove ccc from the makefile as well.
llvm-svn: 70650
2009-05-02 23:50:24 +00:00
Daniel Dunbar 49aff46fed ccc is dead.
llvm-svn: 70649
2009-05-02 22:13:56 +00:00
Daniel Dunbar 82f61f96ba Driver: Treat -m32 and -m64 as "driver-only" arguments.
- In particular, don't forward them to gcc; these participate in the
   selection of the tool chain, which should know how to talk to gcc
   and be fixed if it doesn't.

llvm-svn: 70648
2009-05-02 22:09:19 +00:00
Daniel Dunbar 5716d87ed1 Driver: When using the generic gcc tool, pass -m32 or -m64 if we
recognize the architecture.
 - This is an attempt to force gcc to the write target.

 - PR4094.

llvm-svn: 70647
2009-05-02 21:41:52 +00:00
Dan Gohman afd2c44e72 Add an svn:ignore for unittests/VMCore.
llvm-svn: 70646
2009-05-02 21:20:51 +00:00
Dan Gohman e9a38d16fe Convert ScalarEvolution to use CallbackVH for its internal map. This
makes ScalarEvolution::deleteValueFromRecords, and it's code that
subtly needed to be called before ReplaceAllUsesWith, unnecessary.

It also makes ValueDeletionListener unnecessary.

llvm-svn: 70645
2009-05-02 21:19:20 +00:00
Dan Gohman 745ad4486e Apply Jeffrey Yasskin's CallbackVH patch, with minor tweaks from me
to make the copy constructor and destructor protected, and corresponding
adjustments to the unittests.

llvm-svn: 70644
2009-05-02 21:10:48 +00:00
Dan Gohman ec42f369ee Include <limits.h> to get the definition of CHAR_BIT.
llvm-svn: 70643
2009-05-02 21:03:21 +00:00
Dan Gohman b17dcbdadc The second argument to RecursivelyDeleteTriviallyDeadInstructions has
a default value, and will hopefully be going away soon.

llvm-svn: 70642
2009-05-02 20:22:10 +00:00
Daniel Dunbar e3e263fb71 Driver: Generate an error when trying to pass an LLVM bc input to a
non-Darwin linker (sorry Gold + LTO-plugin users).

llvm-svn: 70641
2009-05-02 20:14:53 +00:00
Daniel Dunbar 10c6ee968f Use clang to find clang-cc, if it isn't in path.
llvm-svn: 70640
2009-05-02 20:08:07 +00:00
Chris Lattner 195f88386c when creating custom warning diagnostics, do not attempt to map
them with -Werror.  Custom diags cannot be mapped, and this makes
-Werror cause a determinstic crash for the checker and other
clients of the custom diagnostics machinery.  rdar://6816191

llvm-svn: 70639
2009-05-02 19:34:21 +00:00
Ted Kremenek f1e7667099 retain/release checker: Enhance leak description to say that the bug
occurs in GC mode.

llvm-svn: 70638
2009-05-02 19:05:19 +00:00
Anders Carlsson 38ebcaa8c8 Fix a thinko and a test.
llvm-svn: 70637
2009-05-02 18:36:10 +00:00
Dan Gohman ff08995589 Previously, RecursivelyDeleteDeadInstructions provided an option
of returning a list of pointers to Values that are deleted. This was
unsafe, because the pointers in the list are, by nature of what
RecursivelyDeleteDeadInstructions does, always dangling. Replace this
with a simple callback mechanism. This may eventually be removed if
all clients can reasonably be expected to use CallbackVH.

Use this to factor out the dead-phi-cycle-elimination code from LSR
utility function, and generalize it to use the
RecursivelyDeleteTriviallyDeadInstructions utility function.

This makes LSR more aggressive about eliminating dead PHI cycles;
adjust tests to either be less trivial or to simply expect fewer
instructions.

llvm-svn: 70636
2009-05-02 18:29:22 +00:00
Daniel Dunbar cc9123424f DragonFly ToolChain definition for driver.
- Patch by Alex Hornung!

llvm-svn: 70635
2009-05-02 18:28:39 +00:00
Anders Carlsson 8b98d02976 Downgrade the invalid offsetof error to a warning.
llvm-svn: 70634
2009-05-02 17:45:47 +00:00
Dan Gohman f150572af7 When ScalarEvolution is told to forget the trip count for a loop, have
it also forget any SCEVs associated with loop-header PHIs in the loop,
as they may be dependent on trip count information.

llvm-svn: 70633
2009-05-02 17:43:35 +00:00
Dan Gohman c27345f0b4 Tell ScalarEvolution that the loop is being deleted before actually
deleting it.  This will let ScalarEvolution be more complete about
updating its records.

llvm-svn: 70632
2009-05-02 17:29:26 +00:00
Nick Lewycky 462cd34332 Don't append ".b" to the names of globals that are being shrunk to booleans.
llvm-svn: 70630
2009-05-02 16:21:50 +00:00
Dan Gohman 6409e7d4e9 Don't split critical edges during the AddUsersIfInteresting phase
of LSR. This makes the AddUsersIfInteresting phase of LSR a pure
analysis instead of a phase that potentially does CFG modifications.

The conditions where this code would actually perform a split are
rare, and in the cases where it actually would do a split the split
is usually undone by CodeGenPrepare, and in cases where splits
actually survive into codegen, they appear to hurt more often than
they help.

llvm-svn: 70625
2009-05-02 05:36:01 +00:00
Douglas Gregor 71235ecb7f When determining whether an expression refers to a bit-field, look
into the left-hand side of an assignment expression. This completes
most of PR3500; the only remaining part is to deal with the
GCC-specific implementation-defined behavior for "unsigned long" (and
other) bit-fields.

llvm-svn: 70623
2009-05-02 02:18:30 +00:00
Ted Kremenek 49805454e6 Add CFG support for @synchronized. This fixes <rdar://problem/6848820>.
llvm-svn: 70620
2009-05-02 01:49:13 +00:00
Dan Gohman e6b424e53a Add Base.td to svn:ignore.
llvm-svn: 70619
2009-05-02 01:29:12 +00:00
Chris Lattner c6ad258a6b When creating a dwarf record type for an objc interface, make sure to propagate
the runtime version number onto it, so that the debugger knows it's an objc
interface, not a C struct.  rdar://6848435

llvm-svn: 70618
2009-05-02 01:13:16 +00:00
Chris Lattner 44f3ea7339 capture whether optimizations are enabled or not in debug info
llvm-svn: 70617
2009-05-02 01:04:13 +00:00
Chris Lattner 5912de15d0 encode the version of the objc runtime into the dwarf compile unit. rdar://6848435,
several other fixes coming.

llvm-svn: 70616
2009-05-02 01:00:04 +00:00
Ted Kremenek f520136939 Update checker build.
llvm-svn: 70615
2009-05-02 00:42:33 +00:00
Ted Kremenek 2bfed98b0a Add another null pointer check test case.
llvm-svn: 70614
2009-05-02 00:41:02 +00:00
Douglas Gregor d2c2d172da Fix bitfield promotions in several more cases. We don't seem to work hard enough at determining whether an expression is a bitfield or not, yet.
llvm-svn: 70613
2009-05-02 00:36:19 +00:00
Ted Kremenek 55957a8490 Fix crasher in CFG construction when not properly handling ASTs that contain
expressions not yet properly handled by the CFGBuilder. This failure resulted in
a null CFGBlock* being used in rare cases (causing a crash).

llvm-svn: 70612
2009-05-02 00:13:27 +00:00
Douglas Gregor 637f5f71e1 When -fmessage-length=N is not specified, and if standard error is
going to a terminal, word-wrap to the length of the terminal.

llvm-svn: 70611
2009-05-02 00:03:46 +00:00
Chris Lattner e01821edbd 'The attached patch fixes an issue where llc -march=cpp fails with
"Invalid primitive type" on input containing the x86_fp80 type.'
Patch by Collin Winter!

llvm-svn: 70610
2009-05-01 23:54:26 +00:00
Chris Lattner 82c1512ce4 Drop the default assumption about alignment down to 2 bits from 3. This apparently
helps some problems on win32 platforms (PR4119)

llvm-svn: 70603
2009-05-01 23:48:33 +00:00
Chris Lattner a305422bf5 explicitly know that the alignment of Type* is 3 bits.
llvm-svn: 70602
2009-05-01 23:47:59 +00:00
Mike Stump a71286315f Add Sema checking for __block on vm declarations. Radar 6441502
llvm-svn: 70601
2009-05-01 23:41:47 +00:00
Ted Kremenek 407d81b2cd Add another test case found due to an analyzer regression.
llvm-svn: 70600
2009-05-01 23:35:18 +00:00
Daniel Dunbar 6d0eecad6c Make install target actually work, dependencies FTW.
llvm-svn: 70599
2009-05-01 23:34:58 +00:00
Douglas Gregor cf7b2afc62 When printing a source line as part of a diagnostic, the source line
might be wider than we're supposed to print. In this case, we try to
select the "important" subregion of the source line, which contains
everything that we want to show (e.g., with underlining and the caret
itself) and tries to also contain some of the context. 

From the fantastically long line in the test case, we get an error
message that slices down to this:

message-length.c:18:120: warning: comparison of distinct pointer types
      ('int *' and 'float *')
  a_func_to_call(ip == FloatPointer, ip[ALongIndexName], 
                 ~~ ^  ~~~~~~~~~~~~

There are a bunch of gee-it-sounds-good heuristics in here, which seem
to do well on the various simple tests I've thrown at it. However,
we're going to need to look at a bunch more diagnostics to tweak these
heuristics.

This is the second part of <rdar://problem/6711348>. Almost there! 

llvm-svn: 70597
2009-05-01 23:32:58 +00:00
Anders Carlsson 2bbb86b02e It's an error to call offsetof on a non-POD type.
llvm-svn: 70595
2009-05-01 23:20:30 +00:00
Daniel Dunbar c52d01f8d9 Add ONLY_MAN_DOCS variable to only install the man page, not the html
and ps documentation.

llvm-svn: 70589
2009-05-01 23:11:42 +00:00
Anders Carlsson aa10d656b5 Get rid of CXXDestroyExpr.
llvm-svn: 70586
2009-05-01 22:21:22 +00:00
Ted Kremenek 2c32773fa2 Add a new BFS GRWorkList and make it the default worklist model for
GRCoreEngine. This tends to result in shorter paths for pathological cases.

llvm-svn: 70585
2009-05-01 22:18:46 +00:00
Anders Carlsson f58c243830 Rename CXXExprWithCleanup to CXXExprWithTemporaries.
llvm-svn: 70584
2009-05-01 22:18:43 +00:00
Dan Gohman 410b4fdceb Change the description string of the LoopInfo pass.
"Construction" makes it sound like a pass that might
modify the CFG to construct natural loops.

llvm-svn: 70580
2009-05-01 21:58:05 +00:00
Anders Carlsson 4ac533dc90 We can now call member functions where the base is a pointer.
llvm-svn: 70579
2009-05-01 21:55:16 +00:00
Douglas Gregor 4818553abd Implement -fmessage-length=N, which word-wraps diagnostics to N columns.
Also, put a line of whitespace between the diagnostic and the source
code/caret line when the start of the actual source code text lines up
(or nearly lines up) with the most recent line of the diagnostic. For
example, here it's okay for the last line of the diagnostic to be
(vertically) next to the source line, because there is horizontal
whitespace to separate them:

decl-expr-ambiguity.cpp:12:16: error: function-style cast to a builtin
      type can only take one argument
  typeof(int)(a,5)<<a;

However, here is a case where we need the vertical separation (since
there is no horizontal separation):

message-length.c:10:46: warning: incompatible pointer types initializing 'void
      (int, float, char, float)', expected 'int (*)(int, float, short,
      float)'

      int (*fp1)(int, float, short, float) = f;

This is part one of <rdar://problem/6711348>.

llvm-svn: 70578
2009-05-01 21:53:04 +00:00
Stuart Hastings e54523d56e Prevent looping when DenseSet is abused.
llvm-svn: 70572
2009-05-01 20:47:53 +00:00
Douglas Gregor 8d9c509975 Implement bit-field promotion rules for C99. Fixes PR3500.
llvm-svn: 70571
2009-05-01 20:41:21 +00:00