Commit Graph

82392 Commits

Author SHA1 Message Date
Chris Lattner de023a3c1d building on the new CallGraphSCC abstraction, teach CallGraphSCCPassManager
to keep the node entries in scc_iterator up to date instead of dangling as
the SCC mutates.

This is a really terrible problem which was causing -g to affect codegen 
because it would permute the memory image of the compiler process.

Thanks to Dale for expertly hunting it down.

llvm-svn: 101565
2010-04-16 23:04:30 +00:00
Dan Gohman 9becdddc49 Add skeleton target-specific SelectionDAGInfo files.
llvm-svn: 101564
2010-04-16 23:04:22 +00:00
Johnny Chen ed9bee150b Fixed logic error. Should check Builder for validity before calling SetSession
on it.

llvm-svn: 101563
2010-04-16 23:02:25 +00:00
Chris Lattner 5518b81a98 move ReplaceNode out of line, rename scc_iterator::fini -> isAtEnd().
No functionality change.

llvm-svn: 101562
2010-04-16 22:59:24 +00:00
Dan Gohman fe051a525f Regenerate configure script.
llvm-svn: 101561
2010-04-16 22:59:06 +00:00
Dan Gohman 91f8ad7bd3 Add an autoconf check for -retain-symbols-file and conditionalize
use of that option with it. This eliminates an imprecise "Linux"
test, and should help support old versions of gold.

llvm-svn: 101560
2010-04-16 22:58:15 +00:00
Johnny Chen 034e0b1e68 Minor change to make the test case comply with Vd<0> == '0' when Q == '1'.
llvm-svn: 101559
2010-04-16 22:48:31 +00:00
Chris Lattner 4422d31b84 introduce a new CallGraphSCC class, and pass it around
to CallGraphSCCPass's instead of passing around a
std::vector<CallGraphNode*>.  No functionality change,
but now we have a much tidier interface.

llvm-svn: 101558
2010-04-16 22:42:17 +00:00
Johnny Chen b90b6f1a35 Fixed a bug in DisassembleN1RegModImmFrm() where a break stmt was missing for a
case.  Also, the 0xFF hex literal involved in the shift for ESize64 should be
suffixed "ul" to preserve the shift result.

Implemented printHex*ImmOperand() by copying from ARMAsmPrinter.cpp and added a
test case for DisassembleN1RegModImmFrm()/printHex64ImmOperand().

llvm-svn: 101557
2010-04-16 22:40:20 +00:00
Douglas Gregor ae4b5df817 Move Sema::PerformImplicitConversion over to where Sema::TryImplicitConversion is, for my own sanity. No functionality change
llvm-svn: 101554
2010-04-16 22:27:05 +00:00
Evan Cheng f037f87bde (i32 sext_in_reg (i32 aext (i16 x)), i16) -> (i32 sext x). No known test case until -promote-16bit is enabled.
llvm-svn: 101551
2010-04-16 22:26:19 +00:00
Douglas Gregor a425392cdf Make Sema::BuildCXXCastArgument static, since it now only has one caller. No functionality change
llvm-svn: 101550
2010-04-16 22:17:36 +00:00
Douglas Gregor b33eed0ced Collapse the three separate initialization paths in
TryStaticImplicitCast (for references, class types, and everything
else, respectively) into a single invocation of
InitializationSequence.

One of the paths (for class types) was the only client of
Sema::TryInitializationByConstructor, which I have eliminated. This
also simplified the interface for much of the cast-checking logic,
eliminating yet more code.

I've kept the representation of C++ functional casts with <> 1
arguments the same, despite the fact that I hate it. That fix will
come soon. To satisfy my paranoia, I've bootstrapped + tested Clang
with these changes.

llvm-svn: 101549
2010-04-16 22:09:46 +00:00
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