Commit Graph

38157 Commits

Author SHA1 Message Date
Chris Lattner 67d77945e7 Implement splitting of UNDEF nodes. This is the first step towards fixing PR1811
llvm-svn: 44239
2007-11-19 20:21:32 +00:00
Ted Kremenek e866e7b6fc Removed PersistentMap. It is now superseded in every way by the ImmutableMap
and ImmutableSet classes in the main LLVM libraries.

llvm-svn: 44237
2007-11-19 17:25:30 +00:00
Owen Anderson c280216c00 Teach me to do stuff late at night.
llvm-svn: 44236
2007-11-19 16:10:59 +00:00
Dan Gohman 12a8610490 Fix a typo in a comment.
llvm-svn: 44235
2007-11-19 15:36:19 +00:00
Dan Gohman d32081002e Add explicit keywords.
llvm-svn: 44234
2007-11-19 15:30:20 +00:00
Dan Gohman 36347a26f9 Add support in SplitVectorOp for remainder operators.
llvm-svn: 44233
2007-11-19 15:15:03 +00:00
Owen Anderson 99057116f6 Fix a factually incorrect statement pointed out by Max Hailperin.
llvm-svn: 44228
2007-11-19 07:44:43 +00:00
Chris Lattner 4205d25f06 Record the start of the current token, for use in error reporting.
llvm-svn: 44227
2007-11-19 07:43:52 +00:00
Chris Lattner 1a26296453 Add carat diagnostics to tblgen lexer errors.
llvm-svn: 44226
2007-11-19 07:38:58 +00:00
Ted Kremenek eb8471bfa1 Added test case for dead stores checker (live variables analysis) that tests
for correct propagation/update of liveness information within subexpressions
of Block-Level expressions.  Test case provided by Nuno Lopes.

llvm-svn: 44225
2007-11-19 06:38:23 +00:00
Ted Kremenek 850f1155ad Fixed bug where LiveVariables was not properly propagating updates to liveness
state that occurred in subexpressions of Block-Level expressions. Bug and fix
provided by Nuno Lopes.

llvm-svn: 44224
2007-11-19 06:36:49 +00:00
Anders Carlsson 9c1011c090 Put back the flags field in the constant CF string type.
llvm-svn: 44222
2007-11-19 00:25:30 +00:00
Ted Kremenek 094079c0dc Added test case for dead-stores checker. Test case provided by Nuno Lopes.
llvm-svn: 44221
2007-11-18 20:06:35 +00:00
Ted Kremenek 7016e4d509 Fixed bug in WalkaST_VisitDeclSubExprs where we failed to properly check if
the StmtIterator referring to the initializers of a chain of Decls was equal
to the "end" iterator. The particular bug manifested when an iterator was
created on a chain of decls with no initializers.

Thanks to Nuno Lopes for reporting this bug and providing a patch.

llvm-svn: 44220
2007-11-18 20:06:01 +00:00
Chris Lattner 44158478bb Fix the Linker testcase regressions, by making MemoryBuffer::getFileOrSTDIN return
a valid but empty buffer if stdin is empty.

llvm-svn: 44219
2007-11-18 18:52:28 +00:00
Chris Lattner b01e500f16 autoupgrade files that use callfoo as call foo.
llvm-svn: 44218
2007-11-18 18:43:24 +00:00
Chris Lattner f527037485 print a call to a fastcc function as:
call x86_fastcallcc void @func( i32* %X, i64 0 )
not:
	callx86_fastcallcc  void @func( i32* %X, i64 0 )

This fixes Codegen/X86/fast-cc-merge-stack-adj.ll

llvm-svn: 44217
2007-11-18 18:32:16 +00:00
Chris Lattner 861302e264 fix bogus test that the more strict lexer is finding.
llvm-svn: 44216
2007-11-18 18:26:45 +00:00
Chris Lattner c3cc30cdb8 Bugfix, this fixes CodeGen/X86/ldzero.ll and CodeGen/X86/2007-10-16-fp80_select.ll
llvm-svn: 44215
2007-11-18 18:25:18 +00:00
Chris Lattner 660c6b9a92 Replace the original flex lexer with a hand writen one. This
drops a dependency on flex and lets us make future progress more 
easily.  Yay for 2 fewer .cvs files to make silly conflicts with.

llvm-svn: 44213
2007-11-18 08:46:26 +00:00
Chris Lattner 6070028736 minor cleanups
llvm-svn: 44212
2007-11-18 05:48:46 +00:00
Chris Lattner 98c39513ab ensure header is self contained.
llvm-svn: 44211
2007-11-18 05:25:45 +00:00
Chris Lattner da4ab67127 reimplement the tblgen lexer with a simple hand-written lexer. This eliminates
one dependency on flex and gets rid of two ".cvs" files.

llvm-svn: 44210
2007-11-18 02:57:27 +00:00
Steve Naroff 14f5f79bb6 Now that we are passing back "free standing decls", make sure -ast-dump works like -ast-print.
Also added a cast to be safe...

llvm-svn: 44209
2007-11-17 21:37:36 +00:00
Steve Naroff c1e6d60b14 Make sure Sema::ParsedFreeStandingDeclSpec() returns a decl representing the type.
Adding basic printing to StmtPrinter::PrintRawDecl().

llvm-svn: 44208
2007-11-17 21:21:01 +00:00
Nate Begeman d4d45c268c Add support for vectors to int <-> float casts.
llvm-svn: 44204
2007-11-17 03:58:34 +00:00
Ted Kremenek b6c40f3f1b Reverted patch 44199:
http://llvm.org/viewvc/llvm-project?rev=44199&view=rev

This patch completely broke serialization due to an invariant I assumed but
did not hold. The assumed invariant was that all pointer IDs emitted by a call
to BatchEmitOwnedPtrs would be consecutive. This is only the case if there has
been no forward references to an owned pointer (and hence already registered
with the Serializer object).

llvm-svn: 44203
2007-11-17 03:34:33 +00:00
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