Commit Graph

50285 Commits

Author SHA1 Message Date
Bill Wendling 9dc0f61a5e Match an element of the return type if it returns a structure.
llvm-svn: 59576
2008-11-19 01:15:05 +00:00
Fariborz Jahanian d7db964495 Generate strong write barriers for __strong objects.
Also, took care of Daniel's commments.

llvm-svn: 59575
2008-11-19 00:59:10 +00:00
Ted Kremenek 1b167108bb - Move static function IsNonPragmaNonMacroLexer into Preprocessor.h.
- Add variants of IsNonPragmaNonMacroLexer to accept an IncludeMacroStack entry
  (simplifies some uses).
- Use IsNonPragmaNonMacroLexer in Preprocessor::LookupFile.

Performance testing of -Eonly on Cocoa.h shows no performance regression because
of this patch.

llvm-svn: 59574
2008-11-19 00:46:18 +00:00
Ted Kremenek c7a366309d Initialize CurPPLexer in Preprocessor's constructor.
llvm-svn: 59573
2008-11-19 00:44:06 +00:00
Ted Kremenek c0145fd0bf Fix warning about RegionStoreManager::Retrieve() not always returning a value.
llvm-svn: 59571
2008-11-19 00:27:37 +00:00
Devang Patel 25662f3e4a Remove unused variables.
llvm-svn: 59570
2008-11-19 00:22:02 +00:00
Devang Patel ebd2363339 Fix typo.
llvm-svn: 59569
2008-11-19 00:19:18 +00:00
Oscar Fuentes 325814957e CMake: Support for building 32 bits shared libraries on 64 bits GNU
systems. BUILD_32_BITS option renamed to LLVM_BUILD_32_BITS.

llvm-svn: 59568
2008-11-19 00:10:39 +00:00
Dan Gohman eb87975384 Fix debug printing of flagged SDNodes in SUnits so that they
print in the correct order.

llvm-svn: 59567
2008-11-19 00:04:44 +00:00
Evan Cheng cdbbc00a4f Make the same change to RegScavenger::backward.
llvm-svn: 59566
2008-11-18 23:54:01 +00:00
Oscar Fuentes 366fbb79f5 CMake: Option for enabling/disabling threads.
llvm-svn: 59565
2008-11-18 23:45:21 +00:00
Douglas Gregor 436424cfa5 Partial expansion of C++ operator overloading (for binary operators)
to support operators defined as member functions, e.g.,

  struct X { 
    bool operator==(X&);
  };

Overloading with non-member operators is supported, and the special
rules for the implicit object parameter (e.g., the ability for a
non-const *this to bind to an rvalue) are implemented.

This change also refactors and generalizes the code for adding
overload candidates for overloaded operator calls (C++ [over.match.expr]),
both to match the rules more exactly (name lookup of non-member
operators actually ignores member operators) and to make this routine
more reusable for the other overloaded operators.

Testing for the initialization of the implicit object parameter is
very light. More tests will come when we get support for calling
member functions directly (e.g., o.m(a1, a2)).

llvm-svn: 59564
2008-11-18 23:14:02 +00:00
Bill Wendling d8e312d11f Verify that the second parameter of the stacprotector intrinsic is an alloca
instruction.

llvm-svn: 59563
2008-11-18 23:09:31 +00:00
Evan Cheng 6cea453271 We also need to keep the operand index for two address check.
llvm-svn: 59562
2008-11-18 22:56:19 +00:00
Chris Lattner 377d1f8eae start converting Sema over to using its canonical Diag method.
llvm-svn: 59561
2008-11-18 22:52:51 +00:00
Fariborz Jahanian 83f45b55f8 Patch for generation of weak write barriers for objc
__weak objects.

llvm-svn: 59560
2008-11-18 22:37:34 +00:00
Evan Cheng 3095c32c89 Register scavenger should process early clobber defs first. A dead early clobber def should not interfere with a normal def which happens one slot later.
llvm-svn: 59559
2008-11-18 22:28:38 +00:00
Evan Cheng 2352226682 Fix indentation.
llvm-svn: 59558
2008-11-18 22:27:13 +00:00
Bill Wendling f85850f89e Documentation for the llvm.stackprotector intrinsic.
llvm-svn: 59557
2008-11-18 22:10:53 +00:00
Chris Lattner 84f1ee3001 introduce the one true Diag method for Sema. Next up: kill all the others off.
llvm-svn: 59556
2008-11-18 21:53:24 +00:00
Chris Lattner a7fc74fdc1 Allow diagnostics to be used in bool context, like:
return Diag(...);

when the function returns bool.  This always evaluates to true.

llvm-svn: 59555
2008-11-18 21:53:02 +00:00
Chris Lattner e05c4dfc42 Remove the last of the old-style Preprocessor::Diag methods.
llvm-svn: 59554
2008-11-18 21:48:13 +00:00
Fariborz Jahanian f5125d19e7 Generate objc_read_weak for __weak objc loads.
llvm-svn: 59553
2008-11-18 21:45:40 +00:00
Devang Patel b5e867acff Add new helper pass that strips all symbol names except debugging information.
This pass makes it easier to test wheter debugging info. influences optimization passes or not.

llvm-svn: 59552
2008-11-18 21:34:39 +00:00
Dan Gohman c8d2b0135a Don't set neverHasSideEffects on x86's divide instructions, since
they trap on divide-by-zero, and this side effect is otherwise
unmodeled.

llvm-svn: 59551
2008-11-18 21:29:14 +00:00
Dan Gohman 6e58726416 Tidy up ScheduleNodeBottomUp methods, and make them more
consistent with ScheduleNodeTopDown methods.

llvm-svn: 59550
2008-11-18 21:22:20 +00:00
Dan Gohman 71b632f905 Update a comment to reflect the current code.
llvm-svn: 59549
2008-11-18 21:14:44 +00:00
Duncan Sands 3ca78c675e Remove integer promotion support for FP_EXTEND
and FP_ROUND.  Not sure what these were doing
here - probably they were sometimes (wrongly)
created with integer operands somewhere that
has since been fixed.

llvm-svn: 59548
2008-11-18 21:13:59 +00:00
Devang Patel 3b7a2be88e Remove even more llvm.dbg variables.
Remove all dead globals from llvm.metadata.
Ignore linkonce linkage for selected llvm.dbg values.

llvm-svn: 59547
2008-11-18 21:13:41 +00:00
Oscar Fuentes 724e5f8f49 CMake: Remove HAVE_LT_DLOPEN from config.h.cmake because it was
removed from config.h.in.

llvm-svn: 59546
2008-11-18 21:12:01 +00:00
Duncan Sands 97933c3990 Simplify code using helper routines. There is not
supposed to be any functionality change.

llvm-svn: 59545
2008-11-18 20:56:22 +00:00
Owen Anderson 896512af94 Fix a bug introduced by my previous patch. With this change, SPEC is now clean with prealloc splitting enabled.
llvm-svn: 59544
2008-11-18 20:53:59 +00:00
Fariborz Jahanian 406b117eea Some basic support toward objective-c's GC code gen.
llvm-svn: 59543
2008-11-18 20:18:11 +00:00
Dan Gohman 0b2732598c Add more const qualifiers. This fixes build breakage from r59540.
llvm-svn: 59542
2008-11-18 19:49:32 +00:00
Steve Naroff 119f60e12a Fix <rdar://problem/6329769> [sema] crash on duplication definition of interface with protocols.
As soon as we detect duplicate interfaces, discontinue further semantic checks (returning the original interface).

This is now consistent with how we handle protocols (and less error prone in general).

llvm-svn: 59541
2008-11-18 19:15:30 +00:00
Dan Gohman 0d9d8ae487 Make some methods const.
llvm-svn: 59540
2008-11-18 19:04:29 +00:00
Torok Edwin c63831dd6a remove this testcase, it fails with -verify still
llvm-svn: 59539
2008-11-18 18:48:14 +00:00
Devang Patel a13f1f38fa Initialize MallocFunc and FreeFunc properly.
llvm-svn: 59538
2008-11-18 18:43:07 +00:00
Nuno Lopes b4e7e859e2 fix test. it now crashes, but thats another problem..
llvm-svn: 59537
2008-11-18 17:57:01 +00:00
Daniel Dunbar bf45c9a4e4 Add some quick notes on the clang tests and running the LLVM test
suite with clang.

llvm-svn: 59536
2008-11-18 17:56:21 +00:00
Daniel Dunbar ad90855730 Input files should be before link options.
- PR3094.
 - No test case, ccc is not really a supported product (llvmc2 already
   got this right).

llvm-svn: 59535
2008-11-18 17:38:30 +00:00
Torok Edwin 1403f404da add testcase for PR3093
llvm-svn: 59534
2008-11-18 17:31:32 +00:00
Chris Lattner 2b387c487e don't dereference a null pointer
llvm-svn: 59533
2008-11-18 17:18:16 +00:00
Dan Gohman 1132313e71 Whitespace cleanups.
llvm-svn: 59532
2008-11-18 17:05:42 +00:00
Dan Gohman ae7f0a715b Add svn:ignore for build directories.
llvm-svn: 59531
2008-11-18 17:03:06 +00:00
Duncan Sands 789dbb906d LegalizeTypes support for splitting and scalarizing
SCALAR_TO_VECTOR.  I didn't add the testcase, because
once llc gets past scalar-to-vector it hits a SPU target
lowering bug and explodes.

llvm-svn: 59530
2008-11-18 16:40:48 +00:00
Nick Lewycky 1c451ae43e Add a utility function that detects whether a loop is guaranteed to be finite.
Use it to safely handle less-than-or-equals-to exit conditions in loops. These
also occur when the loop exit branch is exit on true because SCEV inverses the
icmp predicate.

Use it again to handle non-zero strides, but only with an unsigned comparison
in the exit condition.

llvm-svn: 59528
2008-11-18 15:10:54 +00:00
Douglas Gregor 4ea8043d6f As threatened previously: consolidate name lookup and the creation of
DeclRefExprs and BlockDeclRefExprs into a single function
Sema::ActOnDeclarationNameExpr, eliminating a bunch of duplicate
lookup-name-and-check-the-result code.

Note that we still have the three parser entry points for identifiers,
operator-function-ids, and conversion-function-ids, since the parser
doesn't (and shouldn't) know about DeclarationNames. This is a Good
Thing (TM), and there will be more entrypoints coming (e.g., for C++
pseudo-destructor expressions).

llvm-svn: 59527
2008-11-18 15:03:34 +00:00
Douglas Gregor 163c58502a Extend DeclarationName to support C++ overloaded operators, e.g.,
operator+, directly, using the same mechanism as all other special
names.

Removed the "special" identifiers for the overloaded operators from
the identifier table and IdentifierInfo data structure. IdentifierInfo
is back to representing only real identifiers.

Added a new Action, ActOnOperatorFunctionIdExpr, that builds an
expression from an parsed operator-function-id (e.g., "operator
+"). ActOnIdentifierExpr used to do this job, but
operator-function-ids are no longer represented by IdentifierInfo's.

Extended Declarator to store overloaded operator names. 
Sema::GetNameForDeclarator now knows how to turn the operator
name into a DeclarationName for the overloaded operator. 

Except for (perhaps) consolidating the functionality of
ActOnIdentifier, ActOnOperatorFunctionIdExpr, and
ActOnConversionFunctionExpr into a common routine that builds an
appropriate DeclRefExpr by looking up a DeclarationName, all of the
work on normalizing declaration names should be complete with this
commit.

llvm-svn: 59526
2008-11-18 14:39:36 +00:00
Zhongxing Xu 383ccc1e75 Fix 80-col violation.
llvm-svn: 59523
2008-11-18 13:35:51 +00:00