Commit Graph

66946 Commits

Author SHA1 Message Date
Anders Carlsson 0d2a51b61f Improve missing error messages as suggested by Doug.
llvm-svn: 80489
2009-08-30 06:49:43 +00:00
Chris Lattner a0c89ee1da add a new InstCombineWorklist::AddValue method that works even
if the operand is not an instruction.

Simplify most uses of AddOperandsToWorkList to use AddValue and
inline it into the one remaining callsite.

llvm-svn: 80488
2009-08-30 06:27:41 +00:00
Chris Lattner bacd05c2eb move AddUsersToWorkList to the worklist processing class, make the
argument stronger typed.

llvm-svn: 80487
2009-08-30 06:22:51 +00:00
Chris Lattner 795bfdbb55 rename AddUsesToWorkList -> AddOperandsToWorkList. The
former looks too much like AddUsersToWorkList and keeps
confusing me.

Remove AddSoonDeadInstToWorklist and change its two callers
to do the same thing in a simpler way.

llvm-svn: 80486
2009-08-30 06:20:05 +00:00
Daniel Dunbar 6e8b1a2530 llvm-mc/X86: Encode constant MCValue's correctly.
llvm-svn: 80485
2009-08-30 06:17:49 +00:00
Daniel Dunbar 6a715dccdf llvm-mc: MCStreamer cleanups. - Remove EmitLocalSymbol, this is unsupported for now.
- Switch Emit{CommonSymbol,Zerofill} to take alignment in bytes (for consistency).

llvm-svn: 80484
2009-08-30 06:17:16 +00:00
Chris Lattner 905976b1db inline the trivial AddToWorkList/RemoveFromWorkList methods
into their callers.  simplify ReplaceInstUsesWith.  Make
EraseInstFromFunction only add operands to the worklist if
there aren't too many of them (this was a scalability win
for crazy programs that was only infrequently enforced).
Switch more code to using EraseInstFromFunction instead of
duplicating it inline.  Change some fcmp/icmp optimizations
to modify fcmp/icmp in place instead of creating a new one
and deleting the old one just to change the predicate.

llvm-svn: 80483
2009-08-30 06:13:40 +00:00
Chris Lattner 93ad6170fd fix a bug I introduced in r80478 found by the build bot.
llvm-svn: 80482
2009-08-30 05:56:44 +00:00
Chris Lattner 97fd3599e1 refactor instcombine's worklist processing stuff out to its own class.
llvm-svn: 80481
2009-08-30 05:55:36 +00:00
Chris Lattner e08503cd28 make DenseMap::clear() early exit if there is nothing to do.
llvm-svn: 80480
2009-08-30 05:55:04 +00:00
Chris Lattner 520bd0e689 some minor cleanups to IRBuilder, factor the insertion
hook out of the main IRBuilder class to allow clients to
override it.

llvm-svn: 80479
2009-08-30 05:42:59 +00:00
Chris Lattner b2995e1eb1 more cleanups: remove some redundant code, and simplify some
other places.

llvm-svn: 80478
2009-08-30 05:30:55 +00:00
Chris Lattner 06c687b59e eliminate the temporary SrcGEPOperands smallvector.
llvm-svn: 80477
2009-08-30 05:08:50 +00:00
Chris Lattner e26bf17423 simplify/detangle some control flow.
llvm-svn: 80476
2009-08-30 05:00:50 +00:00
Chris Lattner d7b6e913fe simplify and cleanup some code, remove some code that just
does constant folding of gep's: this is already handled in
a more general way.

No functionality change.

llvm-svn: 80475
2009-08-30 04:49:01 +00:00
Chris Lattner 65c6a85cfd default count-aa to -print-all. The whole reason to use count-aa is
to see what queries are being made by a transformation, we might as well
default to printing them.

llvm-svn: 80474
2009-08-30 04:25:40 +00:00
Anders Carlsson 5167a4644d Use DiagnoseMissingMember for UsingDecls.
llvm-svn: 80470
2009-08-30 00:58:45 +00:00
Anders Carlsson 896c230a19 Improve diagnostics for missing members. This renames the err_typecheck_no_member to err_typecheck_no_member_deprecated. The idea is that err_typecheck_no_member_deprecated should be phased out and any call sites that reference it should call DiagnoseMissingMember instead.
llvm-svn: 80469
2009-08-30 00:54:35 +00:00
Eli Friedman 744a249493 Unbreak tests. I'll look into why this is necessary later.
llvm-svn: 80468
2009-08-30 00:53:54 +00:00
Bill Wendling dc09af3ef5 Nuke moribund "std::string" version of EOL(..., Encoding).
llvm-svn: 80466
2009-08-30 00:28:57 +00:00
Dan Gohman 5ed4adffa7 Add AutoGenerated.inc to svn:ignore.
llvm-svn: 80455
2009-08-29 23:54:26 +00:00
Dan Gohman 0dfe73ac9e Remove an unnecessary Context argument.
llvm-svn: 80454
2009-08-29 23:39:38 +00:00
Dan Gohman 399d6ae4f7 Minor logic simplification.
llvm-svn: 80453
2009-08-29 23:37:49 +00:00
Dan Gohman 311d06902a Add some comments.
llvm-svn: 80452
2009-08-29 23:36:57 +00:00
Dan Gohman 062d378603 Cleanup whitespace and indentation.
llvm-svn: 80451
2009-08-29 23:35:16 +00:00
Dan Gohman 07d0a55a9b Remove some unused fields.
llvm-svn: 80450
2009-08-29 23:34:14 +00:00
Argyrios Kyrtzidis 321995b5e5 Fix the start source location for type-specs like long, short, etc.
llvm-svn: 80448
2009-08-29 22:39:34 +00:00
Argyrios Kyrtzidis 9d7ab42eb6 Fix TypeLoc::operator bool().
llvm-svn: 80447
2009-08-29 22:39:19 +00:00
Eli Friedman 15e05261d4 Make instantiating initializers for classes with a dependent base type
work correctly.

The change in lib/AST/DeclCXX.cpp is mostly a large reindentation; I 
couldn't figure out a good way to avoid it.

llvm-svn: 80446
2009-08-29 22:22:07 +00:00
Dan Gohman ca73326f56 CMOV_GR8 clobbers EFLAGS when its expansion involves an xor to set
a register to 0. This fixes PR4814.

llvm-svn: 80445
2009-08-29 22:19:15 +00:00
Eli Friedman 033e8d4ae6 Make IRGen for initializing a member reference work correctly.
llvm-svn: 80439
2009-08-29 20:58:20 +00:00
Anders Carlsson adf36b2379 Add a workaround for decls that come from friend decls pointing to undeclared classes.
llvm-svn: 80438
2009-08-29 20:47:47 +00:00
Anders Carlsson 6df9e076ea In DeclPrinter, assert when asked to print AS_None.
llvm-svn: 80437
2009-08-29 20:36:12 +00:00
Fariborz Jahanian 0a484d007b Patch to ir-gen user-defined conversions used in expressions
[12.3.2-p3]

llvm-svn: 80436
2009-08-29 20:33:32 +00:00
Anders Carlsson 7b194b780d Set the access specifier for using decls.
llvm-svn: 80435
2009-08-29 19:54:19 +00:00
Anders Carlsson 4bb87ce33e Improve instantiation of UnresolvedUsingDecls.
llvm-svn: 80434
2009-08-29 19:37:28 +00:00
Fariborz Jahanian 3df8767869 Patch for code gen. for c-style cast which ends in
using class's conversion functions [12.3.2-p2]

llvm-svn: 80433
2009-08-29 19:15:16 +00:00
Eli Friedman 9ab0319b2b Get rid of mostly-unused, buggy method.
llvm-svn: 80432
2009-08-29 19:09:59 +00:00
Benjamin Kramer b83f691931 Inline empty destructor.
llvm-svn: 80431
2009-08-29 13:38:21 +00:00
Benjamin Kramer 8b83f5dfb8 gcc 4.4 needs cstdio for printf. Reorder includes while at it.
llvm-svn: 80430
2009-08-29 12:56:35 +00:00
Bill Wendling 06a6057bbe Fix warning about non-virtual destructor.
llvm-svn: 80429
2009-08-29 12:31:38 +00:00
Bill Wendling 39bb29f7fe - Add target lowering methods to get the preferred format for the FDE and LSDA
encodings.
- Make some of the values emitted by the FDEs dependent upon the pointer
  size. This is in line with how GCC does things. And it has the benefit of
  working for Darwin in 64-bit mode now.

llvm-svn: 80428
2009-08-29 12:20:54 +00:00
Bill Wendling f8b28e4327 Add a form of EOL which emits the text version of a DWARF format encoding. This
doesn't handle all values of the formatting. Those can be added as needed.

llvm-svn: 80427
2009-08-29 12:17:53 +00:00
John McCall 9dc2aa0c45 Test case.
llvm-svn: 80426
2009-08-29 08:20:44 +00:00
John McCall 5966088621 Fix the breakage by handling indirect instantiations. This would be much
improved if there were a consistent name for getInstantiatedFromMemberX()
across all classes.  Cheap refactor if someone wants to do it, but let's get the
buildbots happy first.

llvm-svn: 80425
2009-08-29 08:11:13 +00:00
Bob Wilson 57b946c94b PR4795: Remove EEVT::isFP, isInt and isVec types used by TableGen's type
inferencing.  As far as I can tell, these are equivalent to the existing
MVT::fAny, iAny and vAny types, and having both of them makes it harder
to reason about and modify the type inferencing code.

The specific problem in PR4795 occurs when updating a vAny type to be fAny
or iAny, or vice versa.  Both iAny and fAny include vector types -- they
intersect with the set of types represented by vAny.  When merging them,
choose fAny/iAny to represent the intersection.  This is not perfect, since
fAny/iAny also include scalar types, but it is good enough for TableGen's
type inferencing.

llvm-svn: 80423
2009-08-29 05:53:25 +00:00
Anders Carlsson 705539441b Instantiate member and base initializers. Patch by Anders Johnsen! (tweaked slightly by me)
llvm-svn: 80422
2009-08-29 05:16:22 +00:00
Eli Friedman 2624be4fd4 Fix a couple issues with parsing invalid nested-name-specifiers.
llvm-svn: 80421
2009-08-29 04:08:08 +00:00
John McCall 75c03bbb0c For consistency, just make friend declarations AS_public.
llvm-svn: 80420
2009-08-29 03:50:18 +00:00
John McCall e3e2047873 Fix a last-minute typo and make the test not emit temporaries.
llvm-svn: 80419
2009-08-29 03:28:20 +00:00