Commit Graph

82429 Commits

Author SHA1 Message Date
Chris Lattner d43a12df56 tidy up
llvm-svn: 101548
2010-04-16 21:57:10 +00:00
Chris Lattner 6d1208fd2b move PrintCallGraphPass out of the middle of CGPassManager.
llvm-svn: 101543
2010-04-16 21:43:55 +00:00
Ted Kremenek 7afa85b8fa Rework USR generation for symbols with no linkage. Many of the USRs are now shortened,
and we now include the file name that declares the symbol with no linkage in the USR.
USRs for such symbols are generated only in restructed cases, e.g., anonymous enum declarations,
typedefs, etc.

llvm-svn: 101542
2010-04-16 21:31:52 +00:00
Nuno Lopes 69ed4d5249 ignore Output folder
llvm-svn: 101541
2010-04-16 21:28:45 +00:00
Nuno Lopes 2a5f2de570 ignore Output folder
llvm-svn: 101540
2010-04-16 21:28:30 +00:00
Nuno Lopes 1c5c30fdd3 add another test for the undef patch just for to have peace of mind :)
this follows from C99 6.7.8p10: if it is a union, the first named member is initialized

llvm-svn: 101539
2010-04-16 21:19:39 +00:00
Chris Lattner d4758fc393 add a missing break back, patch by Nico Schmidt!
llvm-svn: 101538
2010-04-16 21:15:15 +00:00
Dan Gohman c4759a5b97 Create a new TargetSelectionDAGInfo class. This will eventually acquire
SelectionDAG-specific parts of TargetLowering.

llvm-svn: 101537
2010-04-16 21:12:11 +00:00
Chris Lattner 3cff64ab58 fix a bogus assertion exposed by a recent change: packing the
struct may cause it to shrink more than one byte.  Before
my recent changes we compiled the new test into:

%0 = type { [6 x i8] }
@x = global %0 { [6 x i8] undef }, align 2        ; <%0*> [#uses=0]

which is obviously bogus.  Now we compile it into:

%0 = type <{ i32, i8, i8 }>
@x = global %0 zeroinitializer, align 2           ; <%0*> [#uses=0]

Where the last byte only is tail padding.

llvm-svn: 101536
2010-04-16 21:02:32 +00:00
Nuno Lopes 5863c999e7 emit padding as undef values, take 2
merge also a few tests I had here for this feature, and FileCheck'ize one file

llvm-svn: 101535
2010-04-16 20:56:35 +00:00
Dan Gohman 4d273f4519 Commit this, which should have accompanied 101531.
llvm-svn: 101532
2010-04-16 20:22:43 +00:00
Dan Gohman 148c69a3f6 Eliminate an unnecessary SelectionDAG dependency in getOptimalMemOpType.
llvm-svn: 101531
2010-04-16 20:11:05 +00:00
Dan Gohman 9dbe61456a Fix this code to avoid implicit assumptions about the length of the array.
llvm-svn: 101530
2010-04-16 20:08:45 +00:00
Johnny Chen 2b7aba10c2 In the same spirit of r101524, which removed the assert() from printAddrMode2OffsetOperand(),
this patch removes the assert() from printAddrMode3OffsetOperand() and adds a test case.

llvm-svn: 101529
2010-04-16 19:57:21 +00:00
Dan Gohman 0591a050ff Revert 101520, which depended on 101503, which was reverted.
llvm-svn: 101528
2010-04-16 19:36:41 +00:00
Johnny Chen 807e1748fc Multiclass LdStCop was using pre-UAL syntax LDC<c>L for the L fragment. Changed
to the UAL syntax of LDCL<c>, instead.

Add a test case for this change which also tests the removal of assert() from
printAddrMode2OffsetOperand().

llvm-svn: 101527
2010-04-16 19:33:23 +00:00
Douglas Gregor 5c8ffab9fb Switch the checking of implicit casts for static_cast, C-style, and
functional casts over to InitializationSequence, eliminating a caller
of Sema::TryImplicitConversion. We also get access and ambiguity
checking "for free".

More cleanups to come in this routine.

llvm-svn: 101526
2010-04-16 19:30:02 +00:00
Duncan Sands 7fc8123b37 Revert commit 101503 (johannes), in the hope of fixing the dragonegg build,
see http://google1.osuosl.org:8011/builders/dragonegg-x86_64-linux/builds/693
Original commit text:
Use a ValueMap not a std::map for the reason indicated
in the comment.  This was causing nondeterministic changes
in inlining decisions.

llvm-svn: 101525
2010-04-16 19:28:59 +00:00
Johnny Chen 88599a42bb Remove the assert() from printAddrMode2OffsetOperand(). "#0 and #-0" are
considered legal instructions.

Refs: A8.6.51 LDC, LDC2 (immediate) -- page A8-107, A8.6.58 LDR (immediate, ARM)
-- page A8-121, and A8.6.194 STR (immediate, ARM) -- page A8-395.

llvm-svn: 101524
2010-04-16 19:10:52 +00:00
Nick Lewycky 40884c0520 Add a write(raw_ostream&) method to RewriteBuffer. This uses an inefficient
implementation today but is the right place if we want to make it faster some
day.

llvm-svn: 101521
2010-04-16 18:49:45 +00:00
Dan Gohman 076a3278a1 Trim a #include.
llvm-svn: 101520
2010-04-16 18:45:11 +00:00
Chris Lattner 4dcc6ddb43 allow mapping fatal errors to errors.
llvm-svn: 101516
2010-04-16 18:39:52 +00:00
Dan Gohman c1ce91603c Revert r101455, which fails on the llvm-arm-linux buildbot.
llvm-svn: 101515
2010-04-16 18:37:31 +00:00
Dale Johannesen 3104bf1618 Use a ValueMap not a std::map for the reason indicated
in the comment.  This was causing nondeterministic changes
in inlining decisions.

llvm-svn: 101503
2010-04-16 18:16:08 +00:00
Douglas Gregor e81335c85b Kill ForceRValue once and for all
llvm-svn: 101502
2010-04-16 18:00:29 +00:00
Evan Cheng 954bd598dd 80 col.
llvm-svn: 101501
2010-04-16 17:58:41 +00:00
Evan Cheng d6b0a7c075 80 col.
llvm-svn: 101500
2010-04-16 17:57:59 +00:00
Ted Kremenek ef55dd17ec Static analyzer: Don't crash when casting a symbolic region address to a float. Fixes PR 6854.
llvm-svn: 101499
2010-04-16 17:54:33 +00:00
Douglas Gregor dcd27fff43 Eliminate the ForceRValue parameter from TryCopyInitialization.
llvm-svn: 101498
2010-04-16 17:53:55 +00:00
Douglas Gregor cb13cfc878 Move Sema::TryCopyInitialization into a static function in
SemaOverload.cpp; no functionality change.

llvm-svn: 101497
2010-04-16 17:51:22 +00:00
Douglas Gregor adc7a704d2 Eliminate ForceRValue parameters from reference binding. Did I mention
that we aren't using ForceRValue any more? 

llvm-svn: 101496
2010-04-16 17:45:54 +00:00
Benjamin Kramer 659d7fc003 Silence warning.
llvm-svn: 101495
2010-04-16 17:43:15 +00:00
Douglas Gregor b05275ac47 Eliminate the ForceRValue parameter to Sema::AddOverloadCandidate
llvm-svn: 101494
2010-04-16 17:41:49 +00:00
Douglas Gregor f1e4669232 Eliminate the ForceRValue parameter from most of Sema's Add*Candidate
functions.

llvm-svn: 101492
2010-04-16 17:33:27 +00:00
Douglas Gregor 7b23e41774 Eliminate the ForceRValue parameter from Sema::IsUserDefinedConversion. It's not the way we're going to handle this.
llvm-svn: 101483
2010-04-16 17:25:05 +00:00
Douglas Gregor 73b0cd72ff Eliminate the default value for the UserCast parameter of Sema::IsUserDefinedConversion. No functionality change
llvm-svn: 101482
2010-04-16 17:21:50 +00:00
Douglas Gregor f149520464 Eliminate the Elidable parameter to PerformImplicitConversion; we
don't need it.

llvm-svn: 101481
2010-04-16 17:16:43 +00:00
Dan Gohman 3a7ee8eead Avoid creating virtual registers for unused values.
llvm-svn: 101480
2010-04-16 17:15:02 +00:00
Dan Gohman 5664b9f1a9 Fix an assertion string.
llvm-svn: 101478
2010-04-16 16:55:18 +00:00
Dan Gohman 4572a9f479 Fix a comment.
llvm-svn: 101477
2010-04-16 16:52:37 +00:00
Dan Gohman 6e8427e066 Remove this hard-coded buffer size. In some basic experiments preprocessing
large files, this doesn't seem significantly better than just letting
raw_ostream pick a buffer size.

This code predates raw-ostream's automatic buffer sizing; in fact, it
was introduced as part of the code which would eventually become
raw_ostream.

llvm-svn: 101473
2010-04-16 16:28:05 +00:00
Anders Carlsson be6f3181dd Make CGRecordLayoutBuilder deal with wide bit-fields. Will land tests shortly (Daniel, please review).
llvm-svn: 101472
2010-04-16 16:23:02 +00:00
Dan Gohman f13f69f296 Disable inlining of recursive calls. It can complicate tailcallelim and
dependent analyses, and increase code size, so doing it profitably would
require more complex heuristics.

llvm-svn: 101471
2010-04-16 16:01:18 +00:00
Anders Carlsson d9abbe56a5 Remove printfs.
llvm-svn: 101470
2010-04-16 15:59:41 +00:00
Dan Gohman 99e5327bfd Refine the detection of seemingly infinitely recursive calls where the
callee is expected to be expanded to something else by codegen, so that
normal infinitely recursive calls are still transformed.

llvm-svn: 101468
2010-04-16 15:57:50 +00:00
Anders Carlsson 5723516ce9 More work on wide bit-fields, WIP.
llvm-svn: 101467
2010-04-16 15:57:11 +00:00
Dan Gohman 74b3631d57 Add Debug+Coverage to svn:ignore.
llvm-svn: 101466
2010-04-16 15:44:09 +00:00
Gabor Greif f375520f7b reapply r101434
with a fix for self-hosting

rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary

llvm-svn: 101465
2010-04-16 15:33:14 +00:00
Anders Carlsson d5635feb1a Start working on handling wide bitfields in C++
llvm-svn: 101464
2010-04-16 15:16:32 +00:00
Dan Gohman b3862ecd48 Make callIsSmall accessible as a utility function.
llvm-svn: 101463
2010-04-16 15:14:50 +00:00