Commit Graph

38172 Commits

Author SHA1 Message Date
Dale Johannesen f265bec4b0 File missing from previous patch.
llvm-svn: 44259
2007-11-20 23:25:17 +00:00
Dale Johannesen 763e110a9f Fix .eh table linkage issues on Darwin. Some EH support
for Darwin PPC, but it's not fully working yet.

llvm-svn: 44258
2007-11-20 23:24:42 +00:00
Chris Lattner 8b9ecdad0c Add the ability to convert a tblgen type to a string.
llvm-svn: 44257
2007-11-20 22:25:16 +00:00
Anders Carlsson 81a5a69682 Store inline asm code in the AST.
llvm-svn: 44255
2007-11-20 19:21:03 +00:00
Anders Carlsson 4f8eb127e1 Add __builtin_abs
llvm-svn: 44254
2007-11-20 19:05:17 +00:00
Chris Lattner 5c3f1541a7 Improve function decl merging, patch by Oliver Hunt!
llvm-svn: 44253
2007-11-20 19:04:50 +00:00
Duncan Sands 04eb67e69a In order for parameter attribute uniquing to make
any sense it is important that ParamAttr::None gets
treated the same as not supplying an attribute at
all.  Rather than stripping ParamAttr::None out of
the list of attributes, assert if ParamAttr::None
is seen.  Fix up the bitcode reader which liked to
insert ParamAttr::None all over the place.  Patch
based on one by Török Edwin.

llvm-svn: 44250
2007-11-20 14:09:29 +00:00
Nick Lewycky 74a26e3750 Small cleanup. Use APInt::getHighBitsSet method instead of shift left.
"setcc" -> "icmp op" in comments. No functionality change.

llvm-svn: 44249
2007-11-20 08:44:50 +00:00
Nick Lewycky 5b18bd3368 Be more careful when transforming | to +. Patch from Wojciech Matyjewicz.
llvm-svn: 44248
2007-11-20 08:24:44 +00:00
Ted Kremenek 9e823c745d Added another test case for the Dead Stores checker that tests that
block-level expressions are evaluated the same as regular expressions. Test
case provided by Nuno Lopes.

llvm-svn: 44247
2007-11-20 03:03:00 +00:00
Ted Kremenek 9d0acca967 Updated CFGStmtVisitor and CFGRecStmtVisitor to have a notion of
"block-expressions" when visiting arbitrary expressions (via calls to
"Visit()").  This results in a refactoring where a dataflow analysis no
longer needs to always special case when handling block-expressions versus
non-block expressions.

Updated LiveVariables and UninitializedValues to conform to the slightly
altered interface of these visitor classes.

Thanks to Nuno Lopes for providing a test case that illustrated some
fundamental problems in the current design of the CFGXXXStmtVisitor classes
and how they were used.

llvm-svn: 44246
2007-11-20 03:01:58 +00:00
Chris Lattner 6edac0ad1d Testcase for PR1811
llvm-svn: 44244
2007-11-19 21:43:22 +00:00
Chris Lattner 09c0393d5e ExpandUnalignedLoad doesn't handle vectors right at all apparently.
Fix a couple of problems:
1. Don't assume the VT-1 is a VT that is half the size.
2. Treat vectors of FP in the vector path, not the FP path.

This has a couple of remaining problems before it will work with
the code in PR1811: the code below this change assumes that it can
use extload/shift/or to construct the result, which isn't right for
vectors.

This also doesn't handle vectors of 1 or vectors that aren't pow-2.

llvm-svn: 44243
2007-11-19 21:38:03 +00:00
Chris Lattner 6fa95ec19d Implement vector expand support for shuffle_vector. This fixes PR1811.
llvm-svn: 44242
2007-11-19 21:16:54 +00:00
Dan Gohman aad83c8ee5 Remove meaningless qualifiers from return types, avoiding compiler warnings.
llvm-svn: 44240
2007-11-19 20:46:23 +00:00
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