Commit Graph

52149 Commits

Author SHA1 Message Date
Chris Lattner 8dca2e9a4e it is ok to insert empty source ranges into diagnostics, declare variable in an if.
llvm-svn: 61800
2009-01-06 07:24:29 +00:00
Chris Lattner a7c7095b42 simplify some code using 'continue' and the new 'isInIdentifierNamespace' predicate.
llvm-svn: 61799
2009-01-06 07:20:03 +00:00
Douglas Gregor d05cb418fd Minor tweaks to the transparent declcontext patch
llvm-svn: 61798
2009-01-06 07:17:58 +00:00
Chris Lattner 4f149f2611 add a helper method.
llvm-svn: 61797
2009-01-06 07:16:40 +00:00
Chris Lattner a448d75b2a rename MaybeParseCXXScopeSpecifier -> ParseOptionalCXXScopeSpecifier and
MaybeParseTypeSpecifier -> ParseOptionalTypeSpecifier.

llvm-svn: 61796
2009-01-06 06:59:53 +00:00
Chris Lattner 9b01ca1f5a minor code cleanups, reduce indentation since 'if' block can't fall through.
llvm-svn: 61795
2009-01-06 06:55:51 +00:00
Daniel Dunbar 697867dadd ccc: Remove ValueArg::setValue, this is no longer used.
llvm-svn: 61794
2009-01-06 06:32:49 +00:00
Daniel Dunbar 85a868f8cc ccc: Track last actual argument instance for each option & change
driver to lookup this way instead of manually scanning arguments in
multiple places.

llvm-svn: 61793
2009-01-06 06:12:13 +00:00
Chris Lattner 479ecd7151 document annotation tokens.
llvm-svn: 61792
2009-01-06 06:02:08 +00:00
Chris Lattner f96b08302f Make Token::setLength assert that the token is not an annotation token.
llvm-svn: 61791
2009-01-06 05:25:04 +00:00
Douglas Gregor 7db908614c Oops. Un-publicify SrcMgr::ContentCache::Buffer.
llvm-svn: 61790
2009-01-06 05:11:04 +00:00
Douglas Gregor c7acfdfe9a Add QualifiedDeclRefExpr, which retains additional source-location
information for declarations that were referenced via a qualified-id,
e.g., N::C::value. We keep track of the location of the start of the
nested-name-specifier. Note that the difference between
QualifiedDeclRefExpr and DeclRefExpr does have an effect on the
semantics of function calls in two ways:
  1) The use of a qualified-id instead of an unqualified-id suppresses
     argument-dependent lookup
  2) If the name refers to a virtual function, the qualified-id
  version will call the function determined statically while the
  unqualified-id version will call the function determined dynamically
  (by looking up the appropriate function in the vtable).

Neither of these features is implemented yet, but we do print out
qualified names for QualifiedDeclRefExprs as part of the AST printing.

llvm-svn: 61789
2009-01-06 05:10:23 +00:00
Chris Lattner a8a3f73a47 rename tok::annot_qualtypename -> tok::annot_typename, which is both
shorter and  more accurate.  The type name might not be qualified.

llvm-svn: 61788
2009-01-06 05:06:21 +00:00
Chris Lattner 913e797257 add TypeTraits.h to the Xcode project
llvm-svn: 61787
2009-01-06 05:04:13 +00:00
Chris Lattner c7594438c7 use getBuffer() to fix compile error. Ted, please review.
llvm-svn: 61786
2009-01-06 04:47:20 +00:00
Scott Michel 6ad9b39a09 CellSPU: Update the README
llvm-svn: 61785
2009-01-06 03:51:14 +00:00
Scott Michel 6887caf11c CellSPU:
- Fix bugs 3194, 3195: i128 load/stores produce correct code (although, we
  need to ensure that i128 is 16-byte aligned in real life), and 128 zero-
  extends are supported.
- New td file: SPU128InstrInfo.td: this is where all new i128 support should
  be put in the future.
- Continue to hammer on i64 operations and test cases; ensure that the only
  remaining problem will be i64 mul.

llvm-svn: 61784
2009-01-06 03:36:14 +00:00
Daniel Dunbar e5e454e199 ccc: Use dummy InputOption and UnknownOption classes instead of
InputArg and UnknownArg.
 - Every argument now always corresponds to some option, which
   simplifies other code.

llvm-svn: 61783
2009-01-06 02:30:10 +00:00
Ted Kremenek 12c2af44e9 Misc changes to SourceManager::ContentCache:
- 'Buffer' is now private and must be accessed via 'getBuffer()'.
   This paves the way for lazily mapping in source files on demand.
- Added 'getSize()' (which gets the size of the content without
   necessarily accessing the MemBuffer) and 'getSizeBytesMapped()'.
- Modifed SourceManager to use these new methods.  This reduces the
  number of places that actually access the MemBuffer object for a file
  to those that actually look at the character data.

These changes result in no performance change for -fsyntax-only on Cocoa.h.

llvm-svn: 61782
2009-01-06 01:55:26 +00:00
Dan Gohman 53c282cce8 Delete this test; it's a duplicate of 2006-07-03-schedulers.ll.
llvm-svn: 61781
2009-01-06 01:36:23 +00:00
Daniel Dunbar e31bfdd7c7 ccc: Introduce ArgList for keeping input argv & parsed Args together.
llvm-svn: 61780
2009-01-06 01:35:44 +00:00
Dan Gohman bf8e5204d1 Update these argument lists for the isNormalMemory
argument. This doesn't affect current functionality.

llvm-svn: 61779
2009-01-06 01:28:56 +00:00
Dan Gohman 79c3516912 Use a latency value of 0 for the artificial edges inserted by
AddPseudoTwoAddrDeps. This lets the scheduling infrastructure
avoid recalculating node heights. In very large testcases this
was a major bottleneck. Thanks to Roman Levenstein for finding
this!

As a side effect, fold-pcmpeqd-0.ll is now scheduled better
and it no longer requires spilling on x86-32.

llvm-svn: 61778
2009-01-06 01:19:04 +00:00
Chris Lattner 04a2079726 no need to negate the APInt for 0.
llvm-svn: 61777
2009-01-06 00:06:25 +00:00
Chris Lattner 2fdcc59bb6 Change m_ConstantInt and m_SelectCst to take their constant integers
as template arguments instead of as instance variables, exposing more
optimization opportunities to the compiler earlier.

llvm-svn: 61776
2009-01-05 23:53:12 +00:00
Chris Lattner 4e735eb157 make m_ConstantInt(int64_t) safely match ConstantInt's that are larger than i64.
This fixes an instcombine crash on PR3235.

llvm-svn: 61775
2009-01-05 23:45:50 +00:00
Devang Patel 244a649764 Construct subprogram DIEs using DebugInfo.
llvm-svn: 61772
2009-01-05 23:21:35 +00:00
Devang Patel 245a73ac16 Construct global variable DIEs using DebugInfo.
llvm-svn: 61771
2009-01-05 23:11:11 +00:00
Chris Lattner 610c87cad6 rename these tests to match the attribute.
llvm-svn: 61770
2009-01-05 23:10:19 +00:00
Chris Lattner 933d5ffc11 Optimize stringification a bit to avoid std::string thrashing and
avoid the version of Preprocessor::getSpelling that returns an 
std::string.

llvm-svn: 61769
2009-01-05 23:04:18 +00:00
Devang Patel 0479d7647f Construct compile unit dies using DebugInfo.
llvm-svn: 61768
2009-01-05 23:03:32 +00:00
Dan Gohman c26da71654 Fix a thinko in the grammar for thread_local variables.
llvm-svn: 61767
2009-01-05 23:03:03 +00:00
Daniel Dunbar 0d2bfec51d Remainder is only valid on integer vector operands.
Improve ext vector test case.

llvm-svn: 61766
2009-01-05 22:55:36 +00:00
Bill Wendling f9b5ba7bcb Revert r61415 and r61484. Duncan was correct that these weren't needed.
llvm-svn: 61765
2009-01-05 22:53:45 +00:00
Daniel Dunbar 8f8e40a324 Back out code for handling VectorType's in getFloatingRank.
llvm-svn: 61764
2009-01-05 22:44:35 +00:00
Daniel Dunbar 060d5e248e Use CheckVectorOperands when % is applied to a vector type.
llvm-svn: 61763
2009-01-05 22:42:10 +00:00
Dan Gohman 52d4d8244b Don't call setDepthDirty/setHeightDirty when adding an edge
with latency 0, since it doesn't affect the depth or height.

llvm-svn: 61762
2009-01-05 22:40:26 +00:00
Devang Patel ced6524437 Extract source location info from DebugInfo.
Add methods to add source location info in a DIE.

llvm-svn: 61761
2009-01-05 22:35:52 +00:00
Daniel Dunbar a1f3441d50 Implement getFloatingRank() for extended vectors.
- I'm not sure this is appropriate, but it seems reasonable to be
   able to call getFloatingRank on anything which isFloatingType().

llvm-svn: 61758
2009-01-05 22:14:37 +00:00
Devang Patel c0a190085d Add type DIEs using DebugInfo.
llvm-svn: 61757
2009-01-05 21:47:57 +00:00
Duncan Sands cd6f51cb62 Add a note about passing MVT::Other to getSetCCResultType.
llvm-svn: 61756
2009-01-05 21:33:06 +00:00
Bill Wendling 2012d84f01 Strength test.
llvm-svn: 61755
2009-01-05 21:27:59 +00:00
Duncan Sands 582c53d147 Teach the internalize pass to also internalize
global aliases.

llvm-svn: 61754
2009-01-05 21:24:45 +00:00
Duncan Sands 8d65f3690e When checking if an Argument escapes, check if
the argument is marked nocapture - no need to
analyze the argument if the answer is already
known!

llvm-svn: 61753
2009-01-05 21:19:53 +00:00
Evan Cheng 8804293fe9 Find loop back edges only after empty blocks are eliminated.
llvm-svn: 61752
2009-01-05 21:17:27 +00:00
Chris Lattner 84434a692b testcase for bill's patch.
llvm-svn: 61751
2009-01-05 21:07:34 +00:00
Sebastian Redl 1654ef0187 Silence a GCC warning
llvm-svn: 61747
2009-01-05 20:53:53 +00:00
Sebastian Redl baad4e765f PODness and Type Traits
Make C++ classes track the POD property (C++ [class]p4)
Track the existence of a copy assignment operator.
Implicitly declare the copy assignment operator if none is provided.
Implement most of the parsing job for the G++ type traits extension.
Fully implement the low-hanging fruit of the type traits:
__is_pod: Whether a type is a POD.
__is_class: Whether a type is a (non-union) class.
__is_union: Whether a type is a union.
__is_enum: Whether a type is an enum.
__is_polymorphic: Whether a type is polymorphic (C++ [class.virtual]p1).

llvm-svn: 61746
2009-01-05 20:52:13 +00:00
Duncan Sands 52e5deece5 Not having an aliasee is a theoretical possibility.
llvm-svn: 61745
2009-01-05 20:47:56 +00:00
Duncan Sands 821d13cf78 Format more neatly.
llvm-svn: 61744
2009-01-05 20:39:50 +00:00