Commit Graph

58655 Commits

Author SHA1 Message Date
Bill Wendling 995f81c5ce Suppress warnings about conversion shortening 64-bit to 32-bit.
llvm-svn: 70138
2009-04-26 18:10:20 +00:00
Chris Lattner 4c92b51089 in a tied operand, don't copy over the name or constraint string, just the flags.
llvm-svn: 70137
2009-04-26 18:05:25 +00:00
Chris Lattner c16d476b30 pull operands names "[foo]" into ConstraintInfo.
llvm-svn: 70136
2009-04-26 17:57:12 +00:00
Chris Lattner c3f4c7b1c5 pull the constraint string into the ConstraintInfo struct
instead of passing it around in addition to it.

llvm-svn: 70135
2009-04-26 17:19:08 +00:00
Sanjiv Gupta 8d319047c5 Any size of integral indices are allowed in gep for indexing into sequential types. Also adding a test case to check the indices type allowed into struct.
llvm-svn: 70134
2009-04-26 17:14:35 +00:00
Steve Naroff 8d2b49aae3 Make sure we have a code in the node:-)
This fixes all the -emit-pch problems discovered by utils/pch-test.pl.

llvm-svn: 70125
2009-04-26 14:11:39 +00:00
Sebastian Redl 07d6f79f1b Update StmtNodes.def with the new base class of CXXTemporaryObjectExpr
llvm-svn: 70122
2009-04-26 11:30:47 +00:00
Sebastian Redl f79d397081 Make reference class unification in conditional expressions check for validity of the conversion.
llvm-svn: 70121
2009-04-26 11:21:02 +00:00
Torok Edwin c26ed54e06 Add missing include. This fixes the build with gcc 4.3.3.
llvm-svn: 70115
2009-04-26 07:50:14 +00:00
Chris Lattner d9725f7041 change TargetInfo::ConstraintInfo to be a struct that contains
the enum along with some other data.

llvm-svn: 70114
2009-04-26 07:16:29 +00:00
Douglas Gregor 8bdbf3628f Turn off PCH by default, again
llvm-svn: 70113
2009-04-26 05:09:50 +00:00
Douglas Gregor 5b21e96c56 One more crazy try with PCH-by-default
llvm-svn: 70112
2009-04-26 03:59:49 +00:00
Douglas Gregor 2ef5dc4fc6 Make sure to pull in the target builtin records when initialize the AST context, even if we're not going to initialize the __builin_* identifiers
llvm-svn: 70111
2009-04-26 03:57:37 +00:00
Douglas Gregor 1d46a1f8a5 Simple little smoke-test script that tries to build PCH files and then
dump their contents for all of the compilable tests in Clang's
testsuite. All of the tests pass for C, but there are still many
failures for Objective-C.

llvm-svn: 70110
2009-04-26 03:52:11 +00:00
Douglas Gregor 1970d887ab When writing a PCH file, write multiple type and declaration blocks as
necessary and iterate until all types and declarations have been
written. This reduces the Cocoa.h PCH file size by about 4% (since we
don't write types we don't need), and fixes problems where writing a
declaration generates a new type.

This doesn't seem to have any impact on performance either way.

llvm-svn: 70109
2009-04-26 03:49:13 +00:00
Douglas Gregor 32887f0274 Add a new -ast-dump-full option that traverses the translation unit
declaration rather than printing through the HandleTopLevelDecl
action. Using this, one can deserialize an entire PCH file and dump
it.

llvm-svn: 70108
2009-04-26 02:02:08 +00:00
Chris Lattner 44b03a67f8 Split C++ statements out to their own file.
llvm-svn: 70107
2009-04-26 01:42:41 +00:00
Douglas Gregor 58d23997c8 Turn of PCH by default. I got the info I was looking for
llvm-svn: 70106
2009-04-26 01:34:47 +00:00
Chris Lattner f0b64d73a8 split ObjC and C++ Statements out into their own headers.
llvm-svn: 70105
2009-04-26 01:32:48 +00:00
Eli Friedman bd0e67362c Correct the order of the parameters to CheckAssignmentConstraints in
cleanup attribute checking.  The difference isn't normally visible, but it
can make a difference...

llvm-svn: 70104
2009-04-26 01:30:08 +00:00
Daniel Dunbar 885db54671 Make this code a little more generic.
llvm-svn: 70103
2009-04-26 01:28:51 +00:00
Daniel Dunbar 72a6090dc4 Driver: Add -std-default= option.
- This can be used to supply a default value for -std=; the idea is
   that this can be used in conjunction with CCC_ADD_ARGS or
   QA_OVERRIDE_GCC3_OPTIONS to change the default without having to
   modify the build system.

llvm-svn: 70102
2009-04-26 01:10:38 +00:00
Daniel Dunbar 3ba94d8778 Add option for AddAllArgsTranslated to control whether output argument
should be joined or separate.

llvm-svn: 70101
2009-04-26 01:07:52 +00:00
Chris Lattner 7ec71da215 implement PCH support for the rest of ExprObjC.h, including
the missing bits of ObjCMessageExpr.

llvm-svn: 70100
2009-04-26 00:44:05 +00:00
Douglas Gregor 06ccf7a463 Another shot at switching PCH on by default, now that we've cleaned up some bugs and improved performance. Will be reverted after Mr. Speedy gets done with it
llvm-svn: 70099
2009-04-26 00:37:38 +00:00
Anders Carlsson 6f5c15688d When calling the cleanup function specified by __attribute__((cleanup)), make sure to bitcast the argument so it has the same type as the first argument of the cleanup function. Fixes <rdar://problem/6827047>.
llvm-svn: 70098
2009-04-26 00:34:20 +00:00
Douglas Gregor eda6a89c4e Don't read all of the records in the PCH file's preprocessor block,
most of which are ignored. Instead, move the __COUNTER__ value out to
a PCH-level record (since it is handled eagerly) and move the header
file information into the SourceManager block (which is also,
currently, loaded eagerly).

This results in another 17% performance improvement in the
Cocoa-prefixed "Hello, World" with PCH.

llvm-svn: 70097
2009-04-26 00:07:37 +00:00
Eli Friedman ab2784f2c1 Fix for PR4074: allow subscripting non-lvalue arrays in C90 mode.
I wasn't originally going to use this approach, but cases like 
test/Sema/expr-comma.c make things difficult.

llvm-svn: 70096
2009-04-25 23:46:54 +00:00
Chris Lattner 0dedefe4f2 minor cleanups to ast-dump, use getBody(context).
llvm-svn: 70095
2009-04-25 23:31:28 +00:00
Douglas Gregor 99734e7669 Lazily load the controlling macros for all of the headers known in the
PCH file. In the Cocoa-prefixed "Hello, World" benchmark, this takes
us from reading 503 identifiers down to 37 and from 470 macros down to
4. It also results in an 8% performance improvement.

llvm-svn: 70094
2009-04-25 23:30:02 +00:00
Chris Lattner c06ce0f710 "This fixes message sends to super in a way that both works with real code and passes the test in the test suite. It also fixes a crash when using recent versions of GNU libobjc and compiling modules that do not contain any constant strings but do contain a declaration of the constant string class and possible some other corner cases (thanks to Pete French for providing me with a test case for that one)."
Patch by David Chisnall!

llvm-svn: 70093
2009-04-25 23:19:45 +00:00
Chris Lattner 003af24927 minor diagnostics improvements.
llvm-svn: 70092
2009-04-25 22:50:55 +00:00
Eli Friedman 50322773b7 Minor simplification.
llvm-svn: 70091
2009-04-25 22:44:54 +00:00
Eli Friedman 7524de1da2 Change isNullPointerConstant to be strict; hopefully this won't cause
any issues now that we have our own tgmath.h.

llvm-svn: 70090
2009-04-25 22:37:12 +00:00
Eli Friedman bb967cc98d Make VerifyIntegerConstantExpr print extension warnings for non-ICEs.
Overall, I'm not particularly happy with the current situation regarding 
constant expression diagnostics, but I plan to improve it at some point.

llvm-svn: 70089
2009-04-25 22:26:58 +00:00
Chris Lattner 1c1595f9ef improve documentation on build configurations, patch by
Josef Eisl!

llvm-svn: 70087
2009-04-25 22:24:49 +00:00
Eli Friedman 37e663df63 Silence gcc warnings.
llvm-svn: 70086
2009-04-25 22:20:56 +00:00
Chris Lattner 73b5b5adae add testcase for strange types of gep indices
llvm-svn: 70085
2009-04-25 22:20:49 +00:00
Chris Lattner abd9bc89c5 Add a new TypeBuilder helper class, which eases making LLVM IR types.
Patch by Jeffrey Yasskin!

llvm-svn: 70084
2009-04-25 22:14:04 +00:00
Chris Lattner dc5f7c6f83 improve documentation around memory lifetimes,
patch by Jeffrey Yasskin!

llvm-svn: 70083
2009-04-25 22:10:06 +00:00
Chris Lattner 0cb8977c0a aDd support for building a subset of the llvm tools, patch by Jeffrey Yasskin!
llvm-svn: 70082
2009-04-25 22:08:52 +00:00
Chris Lattner c71d08bc22 fix PR4073 by making designated initializer checking code use
VerifyIntegerConstantExpression instead of isIntegerConstantExpr.
This makes it ext-warn but tolerate things that fold to a constant
but that are not valid i-c-e's.

There must be a bug in the i-c-e computation though, because it
doesn't catch this case even with pedantic.

This also switches the later code to use EvaluateAsInt which is
simpler and handles everything that evaluate does.

llvm-svn: 70081
2009-04-25 21:59:05 +00:00
Chris Lattner 4c73d7a9b8 testcase and asmparser fix for PR4066
llvm-svn: 70080
2009-04-25 21:26:00 +00:00
Chris Lattner cde89e48b2 Allow aliasee to be a GEP or bitcast instead of just a bitcast.
The real fix for this whole mess is to require the operand of the
alias to be a *GlobalValue* (not a general constant, including 
constant exprs) but allow the operand and the alias type to be
unrelated.

This fixes PR4066

llvm-svn: 70079
2009-04-25 21:23:19 +00:00
Douglas Gregor 95272494cb Optimize the loading of an identifier from a PCH file when given the
identifier's ID. In this case, we know where the identifier's entry is
located in the hash table (it starts right before the identifier
string itself), so skip the hash table lookup and read the entry
directly. The performance improvement here is, gain, hard to quantify,
but it's the right thing to do.

llvm-svn: 70078
2009-04-25 21:21:38 +00:00
Chris Lattner 6a6d3cc852 Update docs to not mention gcse/loadvn and mention memdep and
new stuff.  PR3924.

llvm-svn: 70077
2009-04-25 21:11:37 +00:00
Bill Wendling 13535ceb10 Use intptr_t.
llvm-svn: 70076
2009-04-25 21:06:53 +00:00
Douglas Gregor 5287b4e8ec PCH optimization for the identifier table, where we separate
"interesting" identifiers (e.g., those where the IdentifierInfo has
some useful information) from "uninteresting" identifiers (where the
IdentifierInfo is just a name). This makes the hash table smaller (so
searching in it should be faster) and, when loading "uninteresting"
identifiers, we skip the lookup in the hash table.

PCH file size is slightly smaller than before (since we don't emit the
contents of the uninteresting IdentifierInfo structures). The
Cocoa.h-prefixed "Hello, World" doesn't show any speedup, although
we're getting to the point where system noise is a bit issue.

llvm-svn: 70075
2009-04-25 21:04:17 +00:00
Mon P Wang 0f3b758f01 size() should return a size_t; avoids a warning for 64 bit machines.
llvm-svn: 70072
2009-04-25 20:46:59 +00:00
Douglas Gregor 6b7bf5a771 Revert my changes that try to avoid creating StringMap entries for
identifiers. They don't yet work, but will inhibit future
optimizations.

llvm-svn: 70071
2009-04-25 20:26:24 +00:00