Dale Johannesen
7d97662467
Remove indeterminism from a loop. We think this will
...
fix an occasional nonrepeatable bootstrap failure we've
been seeing on Darwin.
llvm-svn: 44202
2007-11-17 02:48:01 +00:00
Dale Johannesen
06a10df562
Fix denormal check in float->APInt conversion.
...
PR 1804.
llvm-svn: 44201
2007-11-17 01:02:27 +00:00
Ted Kremenek
9d89f980aa
Changed implementation of Serialize::EmitDiffPtrID and
...
Deserialize::ReadDiffPtrID to read and emit bools instead of unsigned
integers. This should result in a nice space optimization once we have
"auto-abbreviation" generation in place.
llvm-svn: 44200
2007-11-17 00:45:37 +00:00
Ted Kremenek
4d1e79c8ac
Implemented optimization for BatchEmitOwnedPtrs that we only emit one complete
...
SerializedPtrID, followed by the *differences* in IDs. The big idea is that
most IDs will be just be 1 off from the previous (either that or NULL, which
we encode as a difference if 0), so this will greatly reduce the encoding
space for extra IDs to just 1 bit per pointer.
So far this optimization reduces serialization of Carbon.h by only 1%, but
we aren't using any abbreviations now in the Bitcode file to properly take
advantage of this optimization.
llvm-svn: 44199
2007-11-17 00:40:45 +00:00
Evan Cheng
8e22379303
Live interval splitting:
...
When a live interval is being spilled, rather than creating short, non-spillable
intervals for every def / use, split the interval at BB boundaries. That is, for
every BB where the live interval is defined or used, create a new interval that
covers all the defs and uses in the BB.
This is designed to eliminate one common problem: multiple reloads of the same
value in a single basic block. Note, it does *not* decrease the number of spills
since no copies are inserted so the split intervals are *connected* through
spill and reloads (or rematerialization). The newly created intervals can be
spilled again, in that case, since it does not span multiple basic blocks, it's
spilled in the usual manner. However, it can reuse the same stack slot as the
previously split interval.
This is currently controlled by -split-intervals-at-bb.
llvm-svn: 44198
2007-11-17 00:40:40 +00:00
Evan Cheng
aa72f72bd3
Shrinkfy.
...
llvm-svn: 44197
2007-11-17 00:31:16 +00:00
Evan Cheng
13e8b022f5
Typo.
...
llvm-svn: 44196
2007-11-16 23:55:08 +00:00
Dale Johannesen
a674612d94
Testcase from PR 1508 (although its's somewhat
...
orthogonal to the main problem there)
llvm-svn: 44194
2007-11-16 23:16:35 +00:00
Tanya Lattner
1db762ba63
Fix for PR1801
...
llvm-svn: 44193
2007-11-16 22:44:50 +00:00
Ted Kremenek
f115550f6f
Added assertion in serialization of DeclRefExprs. DeclRefExprs can only
...
own the decl they reference if it is a FunctionDecl. Note that his
ownership property is still considered a hack, and should be fixed.
llvm-svn: 44192
2007-11-16 19:00:35 +00:00
Ted Kremenek
50d7f6f620
Fixed bug in the serialization of FunctionDecls. We would incorrectly
...
query for the number of parameters for FunctionDecls that had type
FunctionTypeNoProto.
llvm-svn: 44191
2007-11-16 18:11:10 +00:00
Chris Lattner
48d52848d7
Tighten up address-of checking, implementing test/Sema/expr-address-of.c.
...
This fixes a bug reported by Seo Sanghyeon.
This was meant to be committed yesterday, but the commit failed. doh.
llvm-svn: 44190
2007-11-16 17:46:48 +00:00
Anton Korobeynikov
b8a47244ac
These were implemented
...
llvm-svn: 44189
2007-11-16 11:12:01 +00:00
Chris Lattner
c53b18362a
Fix PR1800 by correcting mistaken logic.
...
llvm-svn: 44188
2007-11-16 06:04:17 +00:00
Chris Lattner
1b3f58a816
fix a typo
...
llvm-svn: 44187
2007-11-16 05:32:05 +00:00
Anton Korobeynikov
91460e43f1
Implement codegen for flt_rounds on x86
...
llvm-svn: 44183
2007-11-16 01:31:51 +00:00
Anton Korobeynikov
66b91e66ec
Implement necessary bits for flt_rounds gcc builtin.
...
Codegen bits and llvm-gcc support will follow.
llvm-svn: 44182
2007-11-15 23:25:33 +00:00
Nate Begeman
bd117f06ba
Basic non-power-of-2 vector support
...
llvm-svn: 44181
2007-11-15 21:15:26 +00:00
Chris Lattner
0640e3ef35
Fix transient failure on Lex/c90.c due to an uninit variable.
...
llvm-svn: 44180
2007-11-15 19:22:40 +00:00
Chris Lattner
4dcbc2090a
add header file I forgot to check in
...
llvm-svn: 44179
2007-11-15 19:22:18 +00:00
Chris Lattner
609d413363
fix a bug Steve noticed, where a #import of the main file itself would fail.
...
llvm-svn: 44178
2007-11-15 19:07:47 +00:00
Anton Korobeynikov
6a7ddfdb8f
Reverted r44163 per request
...
llvm-svn: 44177
2007-11-15 18:33:16 +00:00
Ted Kremenek
07941e21e9
Added hack when serializing DeclRefExprs. This should probably be fixed.
...
Some FunctionDecls do not appear at the top-level or are owned by a DeclStmt.
In calls to implicitly defined functions, a FunctionDecl is created, but only
the DeclRefExprs reference them. Since an implicitly defined function may be
called multiple times, there is no clear ownership model for such objects.
Temporary solution: when serializing out DeclRefExprs, emit an ownership bit
for the Decl. This bit is determined by querying the serializer to see if the
Decl has already been serialized. If it hasn't, emit the Decl as an owned
pointer.
I repeat: this is a hack. This should be fixed.
llvm-svn: 44176
2007-11-15 18:26:39 +00:00
Ted Kremenek
4791e1a7bd
Started separate section for method definitions for ObjC serialization.
...
Added missing deserialization case in Stmt::Create() switch statement.
llvm-svn: 44175
2007-11-15 18:10:29 +00:00
Daniel Berlin
bb3b099f82
Fix bugs in iterator invalidation
...
llvm-svn: 44174
2007-11-15 18:06:49 +00:00
Steve Naroff
c8fcbe09d0
No need to forward declare definition of objc_super...
...
llvm-svn: 44173
2007-11-15 17:06:21 +00:00
Steve Naroff
e3ffc2f4a9
Finish up variadic methods/messages.
...
llvm-svn: 44172
2007-11-15 13:05:42 +00:00
Steve Naroff
d8ea1ac576
Implement support for variadic methods (work in progress).
...
llvm-svn: 44171
2007-11-15 12:35:21 +00:00
Steve Naroff
05caa48fb4
Extend RewriteTest::RewriteObjCIvarRefExpr() to cope with static typing (when using -> on a type which corresponds to the implementation type).
...
llvm-svn: 44170
2007-11-15 11:33:00 +00:00
Steve Naroff
44864e48bd
Tweak funky cast to accommodate messaging 'super'. This removes any spurious warnings.
...
llvm-svn: 44169
2007-11-15 10:43:57 +00:00
Steve Naroff
7fa2f040f3
Rewrite for messaging 'super'.
...
The code gen. results in some spurious warnings...a cast is forthcoming.
llvm-svn: 44168
2007-11-15 10:28:18 +00:00
Duncan Sands
d4494352f8
This assertion was bogus.
...
llvm-svn: 44167
2007-11-15 09:54:37 +00:00
Evan Cheng
2c1a50455c
Fix a thinko in post-allocation coalescer.
...
llvm-svn: 44166
2007-11-15 08:13:29 +00:00
Nate Begeman
847bfbcaf0
Break out bool/true/false support into a LangOption
...
llvm-svn: 44164
2007-11-15 07:30:50 +00:00
Nick Lewycky
fbb24817cc
Fix handling of overflow in loop calculation by adding new UDiv SCEV. This SCEV
...
is disabled in the sense that it will refuse to create one from a UDiv
instruction, until the code is better tested.
llvm-svn: 44163
2007-11-15 06:30:50 +00:00
Chris Lattner
0841c3b560
Fix PR1788 by taking the approach suggested by Richard Smith.
...
Thanks to him for his detailed analysis of the problem.
llvm-svn: 44162
2007-11-15 06:10:55 +00:00
Chris Lattner
820c1447b4
Import the boost scoped_ptr class to LLVM. This patch was prepared by
...
Cédric Venet.
llvm-svn: 44161
2007-11-15 05:57:06 +00:00
Nate Begeman
4c18c23eb3
Implement codegen of CXX Bool
...
llvm-svn: 44160
2007-11-15 05:40:03 +00:00
Chris Lattner
bb31a42fef
Handle "bool" in all places that touch _Bool.
...
This fixes code like "if((bool)x) {}" for example.
Patch by Nate Begeman.
llvm-svn: 44159
2007-11-15 05:25:19 +00:00
Owen Anderson
1b74a9a628
More templatization.
...
llvm-svn: 44158
2007-11-15 05:00:15 +00:00
Chris Lattner
add10eecf9
many edits, patch by Kelly Wilson!
...
llvm-svn: 44157
2007-11-15 04:51:31 +00:00
Steve Naroff
f60782b8c9
- Implement ivar rewrite (patch by Fariborz).
...
- RewriteMessageExpr()...make implicit casts explicit with synthesizing call (removing warnings when calling objc_msgSend()).
llvm-svn: 44156
2007-11-15 02:58:25 +00:00
Bill Wendling
b3712f8146
Adding debug output during coalescing.
...
llvm-svn: 44154
2007-11-15 02:06:30 +00:00
Bill Wendling
8269925b1e
Need to increment the iterator.
...
llvm-svn: 44153
2007-11-15 00:40:48 +00:00
Ted Kremenek
c5f3e5371c
Fixed serious bug in BatchReadOwnedPtrs where in a chain of calls to
...
deserialize objects if BatchReadOwnedPtrs was called more than once in the
same call chain then the second call would overwrite the SerializedPtrIDs
being used by the first call. Solved this problem by making the vector that
holds the pointer IDs local to a function call. Now BatchReadOwnedPtrs is
reentrant.
llvm-svn: 44152
2007-11-15 00:05:03 +00:00
Steve Naroff
909d666681
Refinement to previous commit. Always cast the first argument to "id"...no need to special case self.
...
llvm-svn: 44149
2007-11-15 00:00:21 +00:00
Steve Naroff
e7f181986a
Cast implicit "self" argument to "id". This removes all warnings associated with implicit references to self. It doesn't yet deal withexplicit references to self...
...
llvm-svn: 44148
2007-11-14 23:54:14 +00:00
Ted Kremenek
cf7a20a6c4
Fixed bug in serialization of EnumConstantDecl where we improperly
...
"default constructed" an APSInt. Fixed another bug in the same method
where we did not allow the NextDeclarator to be NULL.
llvm-svn: 44147
2007-11-14 23:38:09 +00:00
Ted Kremenek
c77e5a126c
Fixed bug when serializing QualTypes where we were serializing in the
...
qualifiers as part of the pointer address.
llvm-svn: 44146
2007-11-14 23:35:01 +00:00
Steve Naroff
03f2767368
Always generate a typedef for @class . The typedef removal logic that I'm removing only made sense when we were operating on preprocess files without typedef guards. Now that we have guards, it is incorrect to ever remove one (since it may increase the likelihood that the rewritten header can't be included stand alone).
...
llvm-svn: 44145
2007-11-14 23:02:56 +00:00