Commit Graph

59107 Commits

Author SHA1 Message Date
Daniel Dunbar 0cec95f86a Coalesce the ivar offset calculation further.
llvm-svn: 70683
2009-05-03 08:55:17 +00:00
Argyrios Kyrtzidis 97324cec99 -Move the DwarfWriter::ValidDebugInfo check to a static DIDescriptor::ValidDebugInfo
-Create DebugLocs without the need to have a DwarfWriter around

llvm-svn: 70682
2009-05-03 08:50:41 +00:00
Chris Lattner abf843db36 temporary hack to work around PR4128
llvm-svn: 70681
2009-05-03 08:42:09 +00:00
Chris Lattner 99837deeaf don't shadow 'i'
llvm-svn: 70680
2009-05-03 08:38:58 +00:00
Chris Lattner cc1cde9c57 allow references to the larger value in a tied constraint
from the asm string, but reject references to the smaller one.

llvm-svn: 70679
2009-05-03 08:32:32 +00:00
Chris Lattner 97de21f754 code cleanup, avoid shadowing i.
llvm-svn: 70678
2009-05-03 08:24:16 +00:00
Chris Lattner 59c3a9cd54 add support for tying asm operands where the result is smaller than
the input.  This is part of PR3373.

llvm-svn: 70677
2009-05-03 08:21:20 +00:00
Daniel Dunbar c7121faa71 Remove typo
llvm-svn: 70676
2009-05-03 08:00:14 +00:00
Chris Lattner 10f221f321 implement support for asm outputs targetting non-simple lvalue destinations
like bitfields.  incidentally llvm-gcc crashes on this sort of thing also. :)

llvm-svn: 70675
2009-05-03 07:53:25 +00:00
Daniel Dunbar d09551a376 Use type from ivar instead of from shadow struct field.
- No functionality change.

llvm-svn: 70674
2009-05-03 07:52:00 +00:00
Eli Friedman 47e785783c Don't insert an extra ParenExpr around asm operands.
llvm-svn: 70673
2009-05-03 07:49:42 +00:00
Chris Lattner b65933eaa2 handle codegen of asms where a small input is tied to a large output.
llvm-svn: 70672
2009-05-03 07:27:51 +00:00
Chris Lattner 17769a34da refactor some code to get the input/output constraint info before
processing the outputs, no functionality change.

llvm-svn: 70671
2009-05-03 07:05:00 +00:00
Chris Lattner cb66c73a48 If we have mismatched integer tied operands, but the operand
number is not mentioned in the asm string, let it past sema. 
Right now these are currently rejected by the llvm code generator
but this will be fixed next.

llvm-svn: 70670
2009-05-03 07:04:21 +00:00
Chris Lattner 7d1644a151 add a flag to output asm constraints so that we efficiently know
if there is an input constraint that is tied to it.

llvm-svn: 70669
2009-05-03 06:59:37 +00:00
Chris Lattner 28b05c8249 avoid a crash when we encounter a implicit cast of the paren expr due to
promotions.  This should be fixed by not modeling asm operands (which 
require the ()'s according to the grammar) as not being paren exprs.

llvm-svn: 70668
2009-05-03 06:50:40 +00:00
Ted Kremenek 4b59ccb563 Fix: <rdar://problem/6850275> CF objects returned from methods with "new" or "copy" in their name should be treated as owned
For methods that follow the "fundamental rule" and return Core
Foundation objects, treat those objects as owned by the caller.

llvm-svn: 70665
2009-05-03 06:08:32 +00:00
Eli Friedman c97d014a9a Fix silly mistake that was breaking tests. Sorry for any inconvenience.
llvm-svn: 70664
2009-05-03 06:04:26 +00:00
Chris Lattner 2c295cfee8 rename some variables, improve comments.
llvm-svn: 70663
2009-05-03 05:59:17 +00:00
Chris Lattner 34b51e88ec refactor matched operand type checking to happen after the AsmStmt is created,
no functionality change.

llvm-svn: 70662
2009-05-03 05:55:43 +00:00
Dan Gohman 5036695c32 Revert r70645 for now; it's causing a variety of regressions.
llvm-svn: 70661
2009-05-03 05:46:20 +00:00
Ted Kremenek 7d79a5f87d Convert ArgEffects from an std::vector to an ImmutableMap. This will make it much easier to clean up the summary generation logic with annotations.
llvm-svn: 70660
2009-05-03 05:20:50 +00:00
Eli Friedman 7903ca0993 Add diagnostic for r70658.
llvm-svn: 70659
2009-05-03 05:02:08 +00:00
Eli Friedman eed8ad2057 Add Sema support for __builtin_setjmp/__builtin_longjmp. The primary
reason for adding these is to error out in CodeGen when trying to generate
them instead of silently emitting a call to a non-existent function.

(Note that it is not valid to lower these to setjmp/longjmp; in addition 
to that lowering being different from the intent, setjmp and longjmp 
require a larger buffer.)

llvm-svn: 70658
2009-05-03 04:46:36 +00:00
Ted Kremenek b4cf4a52ab Rename isTrackedObjectType() -> isTrackedObjCObjectType().
llvm-svn: 70657
2009-05-03 04:42:10 +00:00
Douglas Gregor b8c6d5dca5 When a fix-it hint would span multiple lines, don't print it; half a
fix-it hint is much worse than no fix-it hint. (Fixes PR4084).

When we need to truncate a source line to fix in the terminal, make
sure to take the width of the fix-it information into account, too.

llvm-svn: 70656
2009-05-03 04:33:32 +00:00
Douglas Gregor 54c6a3bf66 When we truncate a source line to fit it within the terminal width,
show an ellipsis where we have removed text. An example:

/Users/dgregor/Projects/llvm/tools/clang/test/Misc/message-length.c:18:120:
warning: 
      comparison of distinct pointer types ('int *' and 'float *')
  ...a_func_to_call(ip == FloatPointer, ip[ALongIndexName], ...
                    ~~ ^  ~~~~~~~~~~~~

llvm-svn: 70655
2009-05-03 04:12:51 +00:00
Douglas Gregor 6f5a38bcc5 Respect the COLUMNS environment variable for word-wrapping (so we get
word-wrapping by default in Emacs; yay!). Thanks, Daniel.

Use LLVM's System layer rather than calling isatty() directly.

Fix a thinko in printing the indentation string that was causing some
weird output.

llvm-svn: 70654
2009-05-03 03:52:38 +00:00
Nick Lewycky 431f97e4f0 Revert r70630. Go back to appending ".b" to internal globals when shrinking
them to bool.

llvm-svn: 70653
2009-05-03 03:49:08 +00:00
Daniel Dunbar bdb23a1f56 Fix invalid error about duplicate declaration of padding bit field in
an interface.

llvm-svn: 70652
2009-05-03 01:08:28 +00:00
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