Commit Graph

81101 Commits

Author SHA1 Message Date
John McCall cef1582923 Support __attribute__((unused)) on types. This suddenly started firing
a lot for me on selfhosts, I dunno why.

llvm-svn: 99981
2010-03-31 02:47:45 +00:00
John McCall eae5acbbd0 Fix PR6327: restore invariants when there's a parse error in an initializer.
llvm-svn: 99980
2010-03-31 02:13:20 +00:00
John McCall da4458e98f Regularize support for naming conversion functions in using decls.
llvm-svn: 99979
2010-03-31 01:36:47 +00:00
Daniel Dunbar 034299ef25 IRGen: Move the auxiliary data structures tracking AST -> LLVM mappings out of CodeGenTypes, to per-record CGRecordLayout structures.
- I did a cursory check that this was perf neutral, FWIW.

llvm-svn: 99978
2010-03-31 01:09:11 +00:00
Daniel Dunbar e75a64f2d3 CGRecordLayoutBuilder: Switch unions to use same mechanism for tracking field and bit-field info as structs.
- Anders, please check.

llvm-svn: 99977
2010-03-31 00:55:13 +00:00
Jakob Stoklund Olesen 9986ba954c Replace V_SET0 with variants for each SSE execution domain.
llvm-svn: 99975
2010-03-31 00:40:13 +00:00
Jakob Stoklund Olesen 710c6892be Fix typo. Thank you, valgrind.
llvm-svn: 99974
2010-03-31 00:40:08 +00:00
Argyrios Kyrtzidis 0204197d53 Add a few asserts to be on the safe side.
llvm-svn: 99973
2010-03-31 00:38:09 +00:00
Argyrios Kyrtzidis 90ab3b7779 Don't skip past the '}' if an expression has error and is not followed by ';'.
llvm-svn: 99972
2010-03-31 00:37:59 +00:00
Douglas Gregor d7f18dd750 Drastically simplify the computation of linkage for typeinfo by using
the existing (and already well-tested) linkage computation for types,
with minor tweaks for dynamic classes and (pointers to) incomplete
types. Fixes PR6597.

llvm-svn: 99968
2010-03-31 00:15:35 +00:00
Daniel Dunbar 23ee4b7710 IRGen: Hide CGRecordLayoutBuilder class, because I can.
llvm-svn: 99967
2010-03-31 00:11:27 +00:00
John McCall 539f22474b Remove silly temporary comment.
llvm-svn: 99964
2010-03-30 23:58:36 +00:00
John McCall d9c7c6568e Introduce a new kind of derived-to-base cast which bypasses the need for
null checks, and make sure we elide null checks when accessing base class
members.

llvm-svn: 99963
2010-03-30 23:58:03 +00:00
Jakob Stoklund Olesen 4d2972d793 Slightly relax test case. An upcoming LLVM commit will change the xor instruction.
llvm-svn: 99962
2010-03-30 23:57:49 +00:00
Daniel Dunbar c4d551b6ff Fix test in -Asserts build.
llvm-svn: 99960
2010-03-30 23:50:00 +00:00
Jakob Stoklund Olesen 19aa6f72a0 Not all platforms start symbols with _
llvm-svn: 99959
2010-03-30 23:12:48 +00:00
Chris Lattner c263b42d0d Fix a major source of compile-time slowness at -O0 -g by optimizing
the storage of !dbg metadata kinds in the instruction themselves.
The on-the-side hash table works great for metadata that not-all
instructions get, or for metadata that only exists when optimizing.
But when compile-time is everything, it isn't great.

I'm not super thrilled with the fact that this plops a TrackingVH in
Instruction, because it grows it by 3 words.  I'm investigating 
alternatives, but this should be a step in the right direction in any
case.

llvm-svn: 99957
2010-03-30 23:03:27 +00:00
Jakob Stoklund Olesen 6f6ebb663c Enable -sse-domain-fix by default. Now with tests!
llvm-svn: 99954
2010-03-30 22:47:00 +00:00
Jakob Stoklund Olesen 3493398f13 V_SETALLONES is an integer instruction.
Since it is just a pxor in disguise, we should probably expand it to a full
polymorphic triple.

llvm-svn: 99953
2010-03-30 22:46:55 +00:00
Jakob Stoklund Olesen dbff4e8103 Renumber SSE execution domains for better code size.
SSEDomainFix will collapse to the domain with the lower number when it has a
choice. The SSEPackedSingle domain often has smaller instructions, so prefer
that.

llvm-svn: 99952
2010-03-30 22:46:53 +00:00
Fariborz Jahanian df58603c26 Recognize __attribute__((NSObject)) directly applied
on retain properties. (radar 7809468).

llvm-svn: 99951
2010-03-30 22:40:11 +00:00
Bob Wilson adb58e32cc Revert Mon Ping's 99930 due to broken llvm-gcc buildbots.
llvm-svn: 99949
2010-03-30 22:28:46 +00:00
Bob Wilson 6f7fd28824 Revert Mon Ping's change 99928, since it broke all the llvm-gcc buildbots.
llvm-svn: 99948
2010-03-30 22:27:04 +00:00
Daniel Dunbar 76dc2e677c Formatting tweaks.
llvm-svn: 99947
2010-03-30 22:26:15 +00:00
Daniel Dunbar 6915cbe7a2 IRGen: Narrow getCGRecordLayout type.
llvm-svn: 99946
2010-03-30 22:26:12 +00:00
Daniel Dunbar 072d0bb247 IRgen: Move CGRecordLayout to its own happy little file.
llvm-svn: 99945
2010-03-30 22:26:10 +00:00
Daniel Dunbar f4ffa0dabf Minor formatting/FIXME cleanups.
llvm-svn: 99944
2010-03-30 22:26:07 +00:00
John McCall b493d53424 Fix an oversight with access control for address-of-function.
llvm-svn: 99942
2010-03-30 22:20:00 +00:00
Rafael Espindola 49b85ab6e6 Remember the regparm attribute in FunctionType::ExtInfo.
Fixes PR3782.

llvm-svn: 99940
2010-03-30 22:15:11 +00:00
Argyrios Kyrtzidis 998d51b98f When "delayed parsing" C++ default arguments, if there is an error, there may be tokens left in the token stream
that will interfere (they will be parsed as if they are after the class' '}') and a crash will occur because
the CachedTokens that holds them will be deleted while the lexer is still using them.

Make sure that the tokens of default args are removed from the token stream.
Fixes PR6647.

llvm-svn: 99939
2010-03-30 22:14:32 +00:00
Devang Patel 57c644f926 Ignore invalid metadata.
llvm-svn: 99938
2010-03-30 22:09:52 +00:00
Douglas Gregor 504662f28f Add a test for C++ [stmt.select]p3, which specifies that redeclaring a
name in the outermost block of a if/else that declares the same name
is ill-formed. Turns out that Clang and MSVC were right about PR6739;
GCC is too lax.

llvm-svn: 99937
2010-03-30 22:07:46 +00:00
John McCall 16df1e59f2 Propagate the "found declaration" (i.e. the using declaration instead of
the underlying/instantiated decl) through a lot of API, including "intermediate"
MemberExprs required for (e.g.) template instantiation.  This is necessary
because of the access semantics of member accesses to using declarations:
only the base class *containing the using decl* need be accessible from the
naming class.

This allows us to complete an access-controlled selfhost, if there are no
recent regressions.

llvm-svn: 99936
2010-03-30 21:47:33 +00:00
Jakob Stoklund Olesen cf35648ebe Revert "Enable -sse-domain-fix by default. What could possibly go wrong?"
Not running 'make check-all' before committing is a bad idea.

llvm-svn: 99933
2010-03-30 21:36:32 +00:00
Rafael Espindola 5c61cbeb58 Fix this test on windows. When running on windows we print
double 0.000000e+000
instead of
double 0.000000e+00

llvm-svn: 99932
2010-03-30 21:19:02 +00:00
Jakob Stoklund Olesen a654df84e6 Enable -sse-domain-fix by default. What could possibly go wrong?
llvm-svn: 99931
2010-03-30 21:09:31 +00:00
Mon P Wang 231e99743a Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset
llvm-svn: 99930
2010-03-30 21:02:45 +00:00
Mon P Wang 7460571381 Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset,
e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
A update of langref will occur in a subsequent checkin.

llvm-svn: 99928
2010-03-30 20:55:56 +00:00
Chris Lattner a3b94ba2c5 move some method definitions to files that make sense.
llvm-svn: 99927
2010-03-30 20:48:48 +00:00
Douglas Gregor 607f14168a Improve diagnostics when printing a template instantiation backtrace
involving substitution of deduced template arguments into a class
template partial specialization or function template, or when
substituting explicitly-specific template arguments into a function
template. We now print the actual deduced argument bindings so the
user can see what got deduced.

llvm-svn: 99923
2010-03-30 20:35:20 +00:00
Ted Kremenek 2d107f9d1d RegionStore: specially handle loads from integer global variables declared 'const'.
Fixes a false positive reported in PR 6288.

llvm-svn: 99922
2010-03-30 20:31:04 +00:00
Ted Kremenek f7c226da00 Use 'const Optional<SVal>&' to avoid an extra copy.
llvm-svn: 99921
2010-03-30 20:30:52 +00:00
Rafael Espindola c50c27cca8 the big refactoring bits of PR3782.
This introduces FunctionType::ExtInfo to hold the calling convention and the
noreturn attribute. The next patch will extend it to include the regparm
attribute and fix the bug.

llvm-svn: 99920
2010-03-30 20:24:48 +00:00
Benjamin Kramer 04c713dd45 Introduce SpecificBumpPtrAllocator, a wrapper for BumpPtrAllocator which allows
only a single type of object to be allocated. Use it to make VNInfo destruction
typesafe.

llvm-svn: 99919
2010-03-30 20:16:45 +00:00
Torok Edwin 921e80b1f5 Typo noticed by Duncan.
llvm-svn: 99918
2010-03-30 20:15:13 +00:00
Dan Gohman 39027c403c Fix a grammaro.
llvm-svn: 99917
2010-03-30 20:04:57 +00:00
Jakob Stoklund Olesen 3b9af40938 Add cross-block inference to SSEDomainFix.
llvm-svn: 99916
2010-03-30 20:04:01 +00:00
Dan Gohman 7a4413a312 Fix llvm-ld to clean up its output files in case of an error.
llvm-svn: 99915
2010-03-30 19:56:41 +00:00
Gabor Greif b469818279 fix two cases where the arguments were extracted from the wrong range out of the InvokeInst
spotted by baldrick -- thanks\!

llvm-svn: 99914
2010-03-30 19:20:53 +00:00
Douglas Gregor ad2c6988a2 Introduce new AST statistics that keep track of the number of isa (or
dyn_cast) invocations for C++ and Objective-C types, declarations,
expressions, and statements. The statistics will be printed when
-print-stats is provided to Clang -cc1, with results such as:

277073 clang - Number of checks for C++ declaration nodes
 13311 clang - Number of checks for C++ expression nodes
    18 clang - Number of checks for C++ statement nodes
174182 clang - Number of checks for C++ type nodes
 92300 clang - Number of checks for Objective-C declaration nodes
  9800 clang - Number of checks for Objective-C expression nodes
     7 clang - Number of checks for Objective-C statement nodes
 65733 clang - Number of checks for Objective-C type nodes

The statistics are only gathered when NDEBUG is not defined, since
they introduce potentially-expensive operations into very low-level
routines (isa).

llvm-svn: 99912
2010-03-30 18:56:13 +00:00