Commit Graph

58457 Commits

Author SHA1 Message Date
Owen Anderson b211b5c478 Testcase for PR2537.
llvm-svn: 69866
2009-04-23 04:26:42 +00:00
Owen Anderson 437c6357e0 Fix typo.
llvm-svn: 69865
2009-04-23 04:24:19 +00:00
Chris Lattner 0dc102624f some arm triples have weird characters in them, just fuzzy match
on armv* to be more compatible

llvm-svn: 69864
2009-04-23 04:22:04 +00:00
Owen Anderson 0e357e5fd3 Testcase for PR3085.
llvm-svn: 69863
2009-04-23 04:21:14 +00:00
Owen Anderson 7e96d34f2e Add testcase from PR3086.
llvm-svn: 69862
2009-04-23 04:14:03 +00:00
Chris Lattner 16ce381f37 Silence warnings about common forms of -Wstrict-aliasing etc.
llvm-svn: 69861
2009-04-23 04:12:10 +00:00
Douglas Gregor 515b505c3e PCH (de-)serialization of the protocols in an ObjCInterfaceDecl
llvm-svn: 69860
2009-04-23 03:59:07 +00:00
Douglas Gregor 0ebb9964f9 Add the PCH reader stub for ObjCCompatibleAliasDecl
llvm-svn: 69859
2009-04-23 03:51:49 +00:00
Douglas Gregor 49e72fb870 PCH support for ObjCPropertyImplDecl
llvm-svn: 69858
2009-04-23 03:43:53 +00:00
Douglas Gregor 5f66205233 The ivars in an ObjCImplementationDecl are now stored in the
DeclContext rather than in a separate list. This makes PCH
(de-)serialization trivial, so that ivars can be loaded lazily.

llvm-svn: 69857
2009-04-23 03:23:08 +00:00
Douglas Gregor 510fd8dff1 PCH support for ObjCCategoryImplDecl (which can't be tested now).
llvm-svn: 69856
2009-04-23 02:53:57 +00:00
Douglas Gregor 9a13efd5b2 PCH (de-)serialization for ObjCImplDecl. This can't be tested yet.
llvm-svn: 69855
2009-04-23 02:42:49 +00:00
Anders Carlsson 0781ce7cce Add a CXXConstructExpr that represents an implicit call to a C++ constructor. I think CXXTemporaryObjectExpr is going to become a subclass of CXXConstructExpr, since CXXTemporaryObjectExpr represents a syntactic temporary, for example T()
llvm-svn: 69854
2009-04-23 02:32:43 +00:00
Daniel Dunbar 22b0ada8cf Use std::sort instead of qsort.
- Notably, there was a memory error here, SkipIvars does not have to
   be the same size as IvarsInfo.

 - Fariborz, please check.

llvm-svn: 69850
2009-04-23 01:29:05 +00:00
Douglas Gregor 29bd76fd04 Eliminate the three SmallVectors in ObjCImplDecl (for instance
methods, class methods, and property implementations) and instead
place all of these entities into the DeclContext.

This eliminates more linear walks when looking for class or instance
methods and should make PCH (de-)serialization of ObjCDecls trivial
(and lazy).

llvm-svn: 69849
2009-04-23 01:02:12 +00:00
Dan Gohman 14efb90fcf Add support for printing MO_ExternalSymbol operands in
memory operand tuples. This doesn't ever come up in normal
code however.

llvm-svn: 69848
2009-04-23 00:57:37 +00:00
Dan Gohman 4cc0cae46c Add more ulimit limits, to catch more kinds of runaway behavior.
llvm-svn: 69847
2009-04-23 00:28:31 +00:00
Owen Anderson d4f5537c5e Use the testcase from PR2791.
llvm-svn: 69846
2009-04-23 00:15:26 +00:00
Evan Cheng d8174d3d09 Make sure both operands have binary instructions have the same type.
llvm-svn: 69844
2009-04-22 23:39:28 +00:00
Douglas Gregor 85e110828e PCH support for Objective-C property declarations (UNTESTED!)
llvm-svn: 69843
2009-04-22 23:20:34 +00:00
Evan Cheng 59ca33053b A few more places where the check of use_empty is needed.
llvm-svn: 69842
2009-04-22 23:09:16 +00:00
Fariborz Jahanian 6df69867c3 ivar layout bitmap is alive!
llvm-svn: 69838
2009-04-22 23:00:43 +00:00
Evan Cheng cbfe9df096 Avoid deferencing use_begin() if value does not have a use.
llvm-svn: 69836
2009-04-22 22:45:37 +00:00
Douglas Gregor a57c3abf37 Add PCH statistics for the number/percent of lexical/visible declcontexts read
llvm-svn: 69835
2009-04-22 22:34:57 +00:00
Ted Kremenek 63e29cc99c Add PathDiagnosticRange to PathDiagnostics. These simply wrap SourceRange and
indicate whether or not the range represents an absolute range or should be
extended by lexing to the end of the token.

llvm-svn: 69834
2009-04-22 22:26:10 +00:00
Douglas Gregor acfc76cc63 Support locally-declared external declarations in PCH files
llvm-svn: 69833
2009-04-22 22:18:58 +00:00
David Greene f00919a040 Allow defm to inherit from multiple multiclasses.
llvm-svn: 69832
2009-04-22 22:17:51 +00:00
Douglas Gregor 2e43ab535b Clean up and de-XFAIL-ify PCH test for external definitions
llvm-svn: 69831
2009-04-22 22:09:39 +00:00
Chris Lattner 91cb0eea67 remove obsolete tests.
llvm-svn: 69830
2009-04-22 22:06:26 +00:00
Douglas Gregor d4df8657b4 Support tentative definitions in precompiled headers. This isn't likely
to happen (ever), but at least we'll do the right thing when it does.

llvm-svn: 69829
2009-04-22 22:02:47 +00:00
Douglas Gregor 48db39dc90 Remove the serialization code that predates precompiled
headers. Future approaches to (de-)serializing ASTs will be based on
the PCH infrastructure.

llvm-svn: 69828
2009-04-22 21:45:53 +00:00
Douglas Gregor 7cd60f7be3 Eliminate some FIXMEs in the PCH reader that were either already fixed or aren't actually things to fix
llvm-svn: 69827
2009-04-22 21:15:06 +00:00
Douglas Gregor fedd428d04 Eliminate Sema::KnownFunctionIDs, so that Sema doesn't end up pulling
in a bunch of declarations from the PCH file. We're down to loading
very few declarations in Carbon-prefixed "Hello, World!":

*** PCH Statistics:
  6/20693 types read (0.028995%)
  7/59230 declarations read (0.011818%)
  50/44914 identifiers read (0.111324%)
  0/32954 statements read (0.000000%)
  5/6187 macros read (0.080815%)

llvm-svn: 69825
2009-04-22 20:56:09 +00:00
Ted Kremenek 48b7875e55 BugReporter (extensive diagnostics): Use correct location for location contexts.
llvm-svn: 69824
2009-04-22 20:51:59 +00:00
Ted Kremenek fb05406cef BugReporter (extensive diagnostics): always add an edge if there is no location
context.

llvm-svn: 69823
2009-04-22 20:36:26 +00:00
David Greene a9c6c5d39b Implement !nameconcat to concatenate strings and look up the resulting
name in the symbol table, returning an object.

llvm-svn: 69822
2009-04-22 20:18:10 +00:00
Eli Friedman d3a5a9d7fa Add handling for complex->int, int->complex float, and float->complex
int.  Note that constant int->complex float and float->complex int casts
were being miscompiled.

llvm-svn: 69821
2009-04-22 19:23:09 +00:00
Douglas Gregor b985eebcdf Minimize the number and kind of "external definitions" that the PCH
file needs to store. CodeGen needs to see these definitions (via
HandleTopLevelDecl), otherwise it won't be able to generate code for
them. 

This patch notifies the consumer (e.g., CodeGen) about function
definitions and variable definitions when the corresponding
declarations are deserialized. Hence, we don't eagerly deserialize the
declarations for every variable or function that has a definition in
the PCH file. This gives another 5% speedup for the Carbon-prefixed
"Hello, World!", and brings our PCH statistics down to something far
more reasonable:

*** PCH Statistics:
  13/20693 types read (0.062823%)
  17/59230 declarations read (0.028702%)
  54/44914 identifiers read (0.120230%)
  0/32954 statements read (0.000000%)
  5/6187 macros read (0.080815%)

llvm-svn: 69820
2009-04-22 19:09:20 +00:00
Chris Lattner 63660175f8 Add missing dependency, patch by Jason Haslam!
llvm-svn: 69819
2009-04-22 18:59:57 +00:00
Duncan Sands 7bccadac92 Testcase for PR2958.
llvm-svn: 69818
2009-04-22 18:55:17 +00:00
Devang Patel 51c3619018 Fix cut-n-pasto.
llvm-svn: 69816
2009-04-22 18:51:05 +00:00
Douglas Gregor 4621c6ae15 Lazy loading of builtins for precompiled headers.
PCH files now contain complete information about builtins, including
any declarations that have been synthesized as part of building the
PCH file. When using a PCH file, we do not initialize builtins at all;
when needed, they'll be found in the PCH file.

This optimization translations into a 9% speedup for "Hello, World!"
with Carbon.h as a prefix header and roughly a 5% speedup for 403.gcc
with its prefix header. We're also reading less of the PCH file for
"Hello, World!":

*** PCH Statistics:
  286/20693 types read (1.382110%)
  1630/59230 declarations read (2.751984%)
  764/44914 identifiers read (1.701029%)
  1/32954 statements read (0.003035%)
  5/6187 macros read (0.080815%)

down from

*** PCH Statistics:
  411/20693 types read (1.986179%)
  2553/59230 declarations read (4.310316%)
  1093/44646 identifiers read (2.448148%)
  1/32954 statements read (0.003035%)
  21/6187 macros read (0.339421%)

llvm-svn: 69815
2009-04-22 18:49:13 +00:00
Ted Kremenek 6c867a1460 BugReporter (extensive diagnostics):
- Remove stale assertion that was breaking the test suite.
- When popping location contexts, only add a control-flow piece for fileID
  locations.

llvm-svn: 69814
2009-04-22 18:37:42 +00:00
Ted Kremenek 0752a5dff3 BugReporter (extensive diagnostic algorithm): The initial control-flow edge now
starts from the first character of the first statement.

llvm-svn: 69813
2009-04-22 18:16:20 +00:00
Ted Kremenek 22579c4c8f PathDiagnosticLocation: ranges for terminators now only include the first
character instead of the entire range for the IfStmt, ForStmt, etc. We may
gradually refine these ranges later, but basically terminator ranges just refer
to the first keyword.

llvm-svn: 69812
2009-04-22 18:03:00 +00:00
Daniel Dunbar e4f25b706b Reapply r69771, with updates & fixes:
Rework the shadow struct that is layed out for Objective-C classes.

 - Superclasses are now always laid out in their shadow structure at
   the first field.

 - Prior to this, the entire class heirarchy was flattened into a
   single structure which meant that alignment, padding, and bitfields
   were incorrect (the ASTRecordLayout was correct however, which
   meant our debug info didn't coincide with ivar offsets, for
   example).

 - This is still very suboptimal (for example, ivar are looked up
   recursively, but I believe the ivar layout itself is now at least
   close to correct.

 - <rdar://problem/6773388> error: objc[29823]: layout bitmap sliding
   backwards

llvm-svn: 69811
2009-04-22 17:43:55 +00:00
David Greene 753ed8fd9c Implement multiclass inheritance.
llvm-svn: 69810
2009-04-22 16:42:54 +00:00
Dan Gohman 79af854f55 Simplify trivial cast-of-cast SCEVs.
llvm-svn: 69809
2009-04-22 16:20:48 +00:00
Dan Gohman 54fd2869a3 SCEVExpander's InsertCastOfTo knows how to move existing cast
instructions in order to avoid inserting new ones. However, if
the cast instruction is the SCEVExpander's InsertPt, this
causes subsequently emitted instructions to be inserted near
the cast, and not at the location of the original insert point.
Fix this by adjusting the insert point in such cases.
This fixes PR4009.

llvm-svn: 69808
2009-04-22 16:11:16 +00:00
Dan Gohman 9dd9a45e12 Use BasicBlock::iterator instead of Instruction* for insert points,
to better handle inserting instructions at the end of a block.

llvm-svn: 69807
2009-04-22 16:05:50 +00:00