Ted Kremenek [Wed, 4 Mar 2009 22:56:43 +0000 (22:56 +0000)]
Add prototype support for invalidating fields for structures passed-by-reference
to unknown functions. Most of this logic should be eventually moved to
RegionStore and be made lazy.
Ted Kremenek [Wed, 4 Mar 2009 22:55:18 +0000 (22:55 +0000)]
MemRegion:
- Have 'TypedRegion::getRValueType()' return a null QualType for 'id<...>'
instead of aborting.
- Change 'TypedRegion::isBoundable()' to return true for all objects with a
non-null RValueType (this may not be the final behavior).
Ted Kremenek [Wed, 4 Mar 2009 22:53:46 +0000 (22:53 +0000)]
Add an optional "tag" to conjured symbols that allows us to distinguish between
multiple symbols conjured at the same location. All that is required of the tag
is that it is a fixed void* value that points to an memory address that remains
valid throughout the remainder of the lifetime of the SymbolManager.
Sebastian Redl [Wed, 4 Mar 2009 20:49:43 +0000 (20:49 +0000)]
The basic representation of diagnostics information in tablegen format, plus (uncommented and incomplete) test conversions of the existing def files to this format.
Mike Stump [Wed, 4 Mar 2009 18:17:45 +0000 (18:17 +0000)]
Move more of blocks codegen out of CodeGenModule and into the
BlockModule. No functionality change. This should help people that
don't want to know anything about blocks not be confused by the
overloaded use of the term block or nor want to see all the blocks
goop.
Steve Naroff [Wed, 4 Mar 2009 15:11:40 +0000 (15:11 +0000)]
Finish up some fixes related to <rdar://problem/6497631> Message lookup is sometimes different than gcc's.
- Disallow casting 'super'. GCC allows this, however it doesn't make sense (super isn't an expression and the cast won't alter lookup/dispatch).
- Tighten up lookup when messaging 'self'.
Chris Lattner [Wed, 4 Mar 2009 06:50:57 +0000 (06:50 +0000)]
make the token lexer allocate its temporary token buffers for
preexpanded macro arguments from the preprocessor's bump pointer.
This reduces # mallocs from 12444 to 11792.
Chris Lattner [Wed, 4 Mar 2009 06:34:08 +0000 (06:34 +0000)]
Switch attributes to be allocated from the declcontext bump pointer just like
decls. This reduces the number of calls to malloc on cocoa.h with pth and
-disable-free from 15958 to 12444 times (down ~3500).
Chris Lattner [Wed, 4 Mar 2009 06:05:19 +0000 (06:05 +0000)]
add an a Attr::Destroy method and force clients to go through it. As part of
this, make DeclBase::Destroy destroy attributes instead of the DeclBase dtor.
Chris Lattner [Wed, 4 Mar 2009 05:35:38 +0000 (05:35 +0000)]
allocate MultiKeywordSelector's out of a bump pointer allocator instead of malloc.
This has two advantages 1) no more leaking them, 2) fewer calls to malloc.
This changes us from calling malloc 3685/1390/883/2974/1185 times respectively on
16/20/24/28/32 byte objects when parsing cocoa.h with pth and -disable-free to
calling it 2816/1020/702/2903/1168 times each respectively.
Chris Lattner [Wed, 4 Mar 2009 04:46:18 +0000 (04:46 +0000)]
add a special case for codegen that improves the case where we have
multiple sequential cases to a) not create tons of fall-through basic blocks
and b) not recurse deeply. This fixes codegen on 100K deep cases, and improves
codegen on moderate cases from this:
Chris Lattner [Wed, 4 Mar 2009 04:23:07 +0000 (04:23 +0000)]
Change Parser::ParseCaseStatement to use an iterative approach to parsing
multiple sequential case statements instead of doing it with recursion. This
fixes a problem where we run out of stack space parsing 100K directly nested
cases.
There are a couple other problems that prevent this from being useful in
practice (right now the example only parses correctly with -disable-free and
doesn't work with -emit-llvm), but this is a start.
I'm not including a testcase because it is large and uninteresting for
regtesting.
Sebastian, I would appreciate it if you could scrutinize the smart pointer
gymnastics I do.
Mike Stump [Wed, 4 Mar 2009 03:23:46 +0000 (03:23 +0000)]
Improved ABI compliance for __block variables. No testcases yet as we
still give an unsupported error for them due to the fact this is a
work in progress.
Daniel Dunbar [Wed, 4 Mar 2009 00:04:28 +0000 (00:04 +0000)]
Add new performance numbers; no discussion yet. Obvious two
conclusions are our PCH generation is way faster than gcc, and the
Python based driver kills compile times.
Steve Naroff [Tue, 3 Mar 2009 22:09:41 +0000 (22:09 +0000)]
Fix <rdar://problem/5982579> [clang on xcode] (using arch=x86_64): synthesized property 'sdkPath' must either be named the same as a compatible ivar or must explicitly name an ivar.
Ted Kremenek [Tue, 3 Mar 2009 22:06:47 +0000 (22:06 +0000)]
Rework use of loc::SymbolVal in the retain/release checker to use the new method
SVal::getAsLocSymbol(). This simplifies the code and allows the retain/release
checker to (I believe) also correctly reason about location symbols wrapped in
SymbolicRegions.
Along the way I cleaned up SymbolRef a little, disallowing implicit casts to
'unsigned'.
Chris Lattner [Tue, 3 Mar 2009 19:56:18 +0000 (19:56 +0000)]
implement support for propagating *features* down to the code generator
and defining target-specific macros based on them (like __SSE3__ and
friends). After extensive discussion with Daniel, this work will need
driver support, which will translate things like -msse3 into a -mattr
feature. Until this work is done, the code in clang.cpp is disabled and
the X86TargetInfo ctor still defaults to SSE2. With these two things
changed, this code will work. PR3634
<rdar://problem/6632061> [sema] non object types should not be allowed in @catch statements
<rdar://problem/6252237> [sema] qualified id should be disallowed in @catch statements
Eli Friedman [Tue, 3 Mar 2009 06:41:03 +0000 (06:41 +0000)]
PR3691: Add support for complex modes. I also tossed in support for XF
while I was at it. There are still a lot of diagnostics missing from
this code, and it isn't completely correct for anything other than x86, but
it should work correctly on x86 for valid cases.
Eli Friedman [Tue, 3 Mar 2009 04:48:01 +0000 (04:48 +0000)]
Fix for PR3687: use the memory representation for booleans when a
sub-type describes a memory location, like the pointee type of a pointer
or the element type of an array.
Douglas Gregor [Tue, 3 Mar 2009 04:44:36 +0000 (04:44 +0000)]
Implement the basics of implicit instantiation of class templates, in
response to attempts to diagnose an "incomplete" type. This will force
us to use DiagnoseIncompleteType more regularly (rather than looking at
isIncompleteType), but that's also a good thing.
Implicit instantiation is still very simplistic, and will create a new
definition for the class template specialization (as it should) but it
only actually instantiates the base classes and attaches
those. Actually instantiating class members will follow.
Also, instantiate the types of non-type template parameters before
checking them, allowing, e.g.,
Chris Lattner [Mon, 2 Mar 2009 22:40:39 +0000 (22:40 +0000)]
Add plumbing to support programatically defining __SSE2__ and friends,
even though we still hard code sse2 for now. No support for 3dnow or sse4a,
but someone could add that if they desired.