Commit Graph

55586 Commits

Author SHA1 Message Date
Chris Lattner 97e277e55e more minor simplifications.
llvm-svn: 66214
2009-03-05 23:03:49 +00:00
Chris Lattner d26760aecb refactor C++ bitfield checking a bit (haha)
llvm-svn: 66213
2009-03-05 23:01:03 +00:00
Daniel Dunbar f804897ee9 Don't mangle names of local variables.
- For one thing, this adds unneeded overhead; for another, this
   routine can be used to emit unnamed decls which we shouldn't try to
   mangle.

llvm-svn: 66212
2009-03-05 22:59:19 +00:00
Ted Kremenek 3add5e51ff Fix another GRExprEngine::VisitCast regression: handle casts of void* to function pointers.
llvm-svn: 66211
2009-03-05 22:47:06 +00:00
Chris Lattner 73bf7b42b6 fix PR3607 and a fixme, by checking bitfield constraints
more consistently.

llvm-svn: 66210
2009-03-05 22:45:59 +00:00
Fariborz Jahanian c559f3f175 More function stop for objc2's ivar layout bit map.
llvm-svn: 66209
2009-03-05 22:39:55 +00:00
Ted Kremenek 5f968930d7 Minor tweak: Recognize 'CGCF' prefix in addition to 'CF' and 'CG'.
llvm-svn: 66208
2009-03-05 22:11:14 +00:00
Dan Gohman c719d73eec Don't use plain INC32 and DEC32 on x86-64; it needs
INC64_32r and INC64_16r, because these instructions are encoded
differently on x86-64. This fixes JIT regressions on x86-64 in
kimwitu++ and others.

llvm-svn: 66207
2009-03-05 21:32:23 +00:00
Dan Gohman e014b193c9 When creating X86ISD::INC and X86ISD::DEC nodes, only add one operand.
The extra operand didn't appear to cause any trouble, but it was
erroneous regardless.

llvm-svn: 66206
2009-03-05 21:29:28 +00:00
Ted Kremenek a06a68fa9b Fix regression in GRExprEngine::VisitCast: Do not wrap symbolic function pointers with TypedViewRegions.
llvm-svn: 66187
2009-03-05 20:22:13 +00:00
Steve Naroff e29c4dd022 Partial fix <rdar://problem/6301205> [irgen] dot-syntax on super isn't supported.
Tweak Sema::ActOnMemberReferenceExpr() and Sema::ActOnDeclarationNameExpr() to handle "super." notation for Class methods.

llvm-svn: 66185
2009-03-05 20:12:00 +00:00
Fariborz Jahanian 631c5818ab Moved CollectObjCIvars to more commonly available place
for future use.

llvm-svn: 66184
2009-03-05 20:08:48 +00:00
Dan Gohman 2c2f192c74 Fix the "test" optimization to recognize "dec" as an add of
negative one, as subtracts of immediates are canonicalized
to adds.

llvm-svn: 66180
2009-03-05 19:32:48 +00:00
Dan Gohman 14cc4a458e Make this test more thorough. Not only should there be no %esi,
there should be no spilling of anything.

llvm-svn: 66179
2009-03-05 19:31:32 +00:00
Gabor Greif 1bf3f5a662 ignore build dirs
llvm-svn: 66176
2009-03-05 19:22:57 +00:00
Fariborz Jahanian 01dff426c8 Adds a template for a function for objc2's gc's ivar layout
bitmap.

llvm-svn: 66175
2009-03-05 19:17:31 +00:00
Chris Lattner bbbbbf30bd move some code to gracefully handle the case when a handler crashes.
llvm-svn: 66171
2009-03-05 18:22:14 +00:00
Ted Kremenek a7ec605dbd Update test case: objects stored to self.ivar are not tracked.
llvm-svn: 66168
2009-03-05 18:15:02 +00:00
Devang Patel 709d6ac46d GlobalOpt only process non constant local GVs while optimizing global vars.
If non constant local GV named A is used by a constant local GV named B (e.g. llvm.dbg.variable) and B is not used by anyone else then eliminate A as well as B.

In other words, debug info should not interfere in removal of unused GV.
--This life, and those below, will be ignored--

M    test/Transforms/GlobalOpt/2009-03-03-dbg.ll
M    lib/Transforms/IPO/GlobalOpt.cpp

llvm-svn: 66167
2009-03-05 18:12:02 +00:00
Ted Kremenek fa3d77bc2c Retrofit some basic tracking of ivars (for the current object) into BasicStore.
llvm-svn: 66166
2009-03-05 18:08:28 +00:00
Ted Kremenek 89f4781703 Minor code compaction. No functionality change.
llvm-svn: 66165
2009-03-05 16:41:21 +00:00
Ted Kremenek 1fe63ac93d Rename VarBindings -> Bindings.
llvm-svn: 66164
2009-03-05 16:32:59 +00:00
Ted Kremenek 2f340d6cb6 BasicStore:
- Store bindings using a MemRegion -> SVal binding instead of VarDecl -> SVal
  binding. This mirrors some of the idea of RegionStore, but is far simpler and
  not nearly as functional.  This leads to some code simplification and
  some potential for some minor precision hacks.
  
Along the way...
- constify the use of MemRegion* in a few places
- add operator<<(llvm::raw_ostream, const MemRegion*)

llvm-svn: 66163
2009-03-05 16:31:07 +00:00
Steve Naroff 8f4528bc7c Tweak diag for <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.
llvm-svn: 66162
2009-03-05 15:45:01 +00:00
Steve Naroff 41d09add4f Fix <rdar://problem/6144382> [sema] gcc inconsistency w.r.t. forward protocol declarations.
llvm-svn: 66161
2009-03-05 15:22:01 +00:00
Duncan Sands 96f52eb13f Add missing file.
llvm-svn: 66160
2009-03-05 09:19:13 +00:00
Mike Stump 4446dcf061 prep work for copy/destroy helpers for block literals.
llvm-svn: 66159
2009-03-05 08:32:30 +00:00
Owen Anderson 380b3838f6 (Hopefully) silence a warning.
llvm-svn: 66158
2009-03-05 08:23:20 +00:00
Nick Lewycky c540cc6591 Regenerate.
llvm-svn: 66157
2009-03-05 08:20:44 +00:00
Nick Lewycky 16aac9994b Autodetect the availability of -export-dynamic in the linker.
llvm-svn: 66156
2009-03-05 08:20:21 +00:00
Chris Lattner ff9fbcaa8a if we die in IR generation of a compound statement, include
it in the stack trace, giving us stuff like:

Stack dump:
0.	Program arguments: clang t.c -emit-llvm 
1.	<eof> parser at end of file
2.	t.c:1:5: LLVM IR generation of declaration 'a'
3.	t.c:1:9: LLVM IR generation of compound statement ('{}')
4.	t.c:2:3: LLVM IR generation of compound statement ('{}')
Abort

llvm-svn: 66154
2009-03-05 08:04:57 +00:00
Chris Lattner eae6cb6154 rename PrettyStackTraceDecl -> PrettyStackTraceActionsDecl.
Introduce a new PrettyStackTraceDecl.
Use it to add the top level LLVM IR generation stuff in 
Backend.cpp to stack traces.  We now get crashes like:

Stack dump:
0.	Program arguments: clang t.c -emit-llvm 
1.	<eof> parser at end of file
2.	t.c:1:5: LLVM IR generation of declaration 'a'
Abort

for IR generation crashes.

llvm-svn: 66153
2009-03-05 08:00:35 +00:00
Ted Kremenek 1d09f6a221 Update checker build.
llvm-svn: 66152
2009-03-05 07:55:15 +00:00
Chris Lattner 6acdec9332 remove unneeded forward decl.
llvm-svn: 66151
2009-03-05 07:54:06 +00:00
Chris Lattner f68012072c if we crash while parsing a block literal, include it.
llvm-svn: 66150
2009-03-05 07:32:12 +00:00
Chris Lattner f02db35b05 fix eof check
llvm-svn: 66149
2009-03-05 07:27:50 +00:00
Chris Lattner bcfe4f7b7b When the parser is live, print out the location and spelling of its current token.
For example:

Stack dump:
0.	Program arguments: clang t.cpp 
1.	t.cpp:4:8: current parser token: ';'
2.	t.cpp:3:1: parsing struct/union/class body 'x'
Abort

It is weird that the parser is always "underneath" any parse context 
actions, but the parser is created first.

llvm-svn: 66148
2009-03-05 07:24:28 +00:00
Owen Anderson ad503987a8 Be more careful about choosing restore points when doing restore folding. This fixes some subtle miscompilations.
llvm-svn: 66147
2009-03-05 07:19:18 +00:00
Chris Lattner a2a1f27bd5 finish comment.
llvm-svn: 66146
2009-03-05 07:16:05 +00:00
Chris Lattner 8d0fe8cd90 Daniel wanted the stack printed upside down. Perhaps he
feels a kinship to machine stacks that grow down.  Now we get
stuff like this:

Stack dump:
0.	Program arguments: clang clang_crash_Iw2Osj.mi 
1.	/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/xmmintrin.h:624:1: parsing function body '_mm_cvtpi16_ps'
2.	/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/xmmintrin.h:624:1: in compound statement ('{}')
Abort

llvm-svn: 66145
2009-03-05 07:03:49 +00:00
Chris Lattner 2674eb4bd1 indicate what the program args line is.
llvm-svn: 66144
2009-03-05 06:51:42 +00:00
Chris Lattner 0c33d436b3 switch this message back to only being in -debug mode.
llvm-svn: 66143
2009-03-05 06:48:16 +00:00
Daniel Dunbar d02cb1dc2b Driver: Basic argument parsing.
- Add Driver::ParseArgStrings.
 - Store values directly in CommaJoinedArg to support simple access.
 - Add FlagArg class.

llvm-svn: 66142
2009-03-05 06:38:47 +00:00
Nate Begeman 359df7420f When allocating stubs, keep track of which Functions are referencing the stub.
This invalidates the stubs in the resolver map when they are no longer referenced,
and should the JIT memory manager ever pick up a deallocateStub interface, the
JIT could reclaim the memory for unused stubs as well.

llvm-svn: 66141
2009-03-05 06:34:37 +00:00
Evan Cheng b7922dee15 Do not split edges to EH landing pads. It will cause code size explosion.
llvm-svn: 66140
2009-03-05 06:31:26 +00:00
Ted Kremenek 2b24f306df Test case: When using RegionStore with the retain/release checker, stop tracking objects assigned to self's ivar.
llvm-svn: 66139
2009-03-05 05:14:55 +00:00
Ted Kremenek 77a3cb2dfa Add test case for RegionStore's tracking of the ivars of 'self'.
llvm-svn: 66136
2009-03-05 04:55:08 +00:00
Ted Kremenek d3c82768e4 Add initial support for tracking ivars, with special handling for ivars of 'self'.
llvm-svn: 66133
2009-03-05 04:50:08 +00:00
Eli Friedman cecc21d2f6 Make IRGen compatible with declaring a function with incomplete
return/argument types.  (The generated IR isn't ideal, but we can't 
really do better in general.)

llvm-svn: 66132
2009-03-05 04:18:07 +00:00
Ted Kremenek 9ce427b21f Add 'cast<>' to remove an extra function call and dynamic cast.
llvm-svn: 66131
2009-03-05 03:44:53 +00:00