Commit Graph

35471 Commits

Author SHA1 Message Date
Chris Lattner
c8a9bbcbc7 Add carat diagnostics to tblgen lexer errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44226 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-19 07:38:58 +00:00
Chris Lattner
2b1f1066ac Fix the Linker testcase regressions, by making MemoryBuffer::getFileOrSTDIN return
a valid but empty buffer if stdin is empty.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44219 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-18 18:52:28 +00:00
Chris Lattner
4ce0df6108 autoupgrade files that use callfoo as call foo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44218 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-18 18:43:24 +00:00
Chris Lattner
b28a6dce6d 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44217 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-18 18:32:16 +00:00
Chris Lattner
ef6c875dfa fix bogus test that the more strict lexer is finding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44216 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-18 18:26:45 +00:00
Chris Lattner
d343c6b70e Bugfix, this fixes CodeGen/X86/ldzero.ll and CodeGen/X86/2007-10-16-fp80_select.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44215 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-18 18:25:18 +00:00
Chris Lattner
8e3a8e0452 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44213 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-18 08:46:26 +00:00
Chris Lattner
c1819188b6 minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44212 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-18 05:48:46 +00:00
Chris Lattner
6aaca046d2 ensure header is self contained.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44211 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-18 05:25:45 +00:00
Chris Lattner
a805874422 reimplement the tblgen lexer with a simple hand-written lexer. This eliminates
one dependency on flex and gets rid of two ".cvs" files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44210 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-18 02:57:27 +00:00
Nate Begeman
b348d18caf Add support for vectors to int <-> float casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44204 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-17 03:58:34 +00:00
Ted Kremenek
247fdca789 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44203 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-17 03:34:33 +00:00
Dale Johannesen
b51b4b5fdf Remove indeterminism from a loop. We think this will
fix an occasional nonrepeatable bootstrap failure we've
been seeing on Darwin.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44202 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-17 02:48:01 +00:00
Dale Johannesen
d0763b9159 Fix denormal check in float->APInt conversion.
PR 1804.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44201 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-17 01:02:27 +00:00
Ted Kremenek
07cad1c6ce 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44200 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-17 00:45:37 +00:00
Ted Kremenek
04ab82a806 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44199 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-17 00:40:45 +00:00
Evan Cheng
81a0382181 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44198 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-17 00:40:40 +00:00
Evan Cheng
38b0be01de Shrinkfy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44197 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-17 00:31:16 +00:00
Evan Cheng
6542481a6d Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44196 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-16 23:55:08 +00:00
Dale Johannesen
d81ae56fa2 Testcase from PR 1508 (although its's somewhat
orthogonal to the main problem there)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44194 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-16 23:16:35 +00:00
Tanya Lattner
ee22be064e Fix for PR1801
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44193 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-16 22:44:50 +00:00
Anton Korobeynikov
be6fe28f75 These were implemented
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44189 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-16 11:12:01 +00:00
Chris Lattner
a7d1ab0ab3 Fix PR1800 by correcting mistaken logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44188 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-16 06:04:17 +00:00
Chris Lattner
b763228695 fix a typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44187 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-16 05:32:05 +00:00
Anton Korobeynikov
45b22fa9f1 Implement codegen for flt_rounds on x86
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44183 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-16 01:31:51 +00:00
Anton Korobeynikov
917c2a6ff2 Implement necessary bits for flt_rounds gcc builtin.
Codegen bits and llvm-gcc support will follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44182 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15 23:25:33 +00:00
Nate Begeman
5db1afb462 Basic non-power-of-2 vector support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44181 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15 21:15:26 +00:00
Anton Korobeynikov
4e1a0e386c Reverted r44163 per request
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44177 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15 18:33:16 +00:00
Daniel Berlin
07268172ff Fix bugs in iterator invalidation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44174 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15 18:06:49 +00:00
Duncan Sands
560a737e07 This assertion was bogus.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44167 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15 09:54:37 +00:00
Evan Cheng
5d446265c7 Fix a thinko in post-allocation coalescer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44166 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15 08:13:29 +00:00
Nick Lewycky
65e2da3b4d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44163 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15 06:30:50 +00:00
Chris Lattner
701bc4264d Fix PR1788 by taking the approach suggested by Richard Smith.
Thanks to him for his detailed analysis of the problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44162 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15 06:10:55 +00:00
Chris Lattner
ab64806af2 Import the boost scoped_ptr class to LLVM. This patch was prepared by
Cédric Venet.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44161 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15 05:57:06 +00:00
Owen Anderson
44a95e06cc More templatization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44158 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15 05:00:15 +00:00
Chris Lattner
b7e6b1ab70 many edits, patch by Kelly Wilson!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44157 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15 04:51:31 +00:00
Bill Wendling
5b8318a1a4 Adding debug output during coalescing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44154 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15 02:06:30 +00:00
Bill Wendling
87075caa18 Need to increment the iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44153 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15 00:40:48 +00:00
Ted Kremenek
7c6ad0c06e 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44152 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15 00:05:03 +00:00
Duncan Sands
c455ebeb0c I discover array_lengthof, thanks to gabor on #llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44139 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14 21:58:02 +00:00
Duncan Sands
f04d584cae Tweak the descriptions of the new 'const' and 'pure' attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44132 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14 21:14:02 +00:00
Evan Cheng
e40740bd8c Oops. Debugging code shouldn't have been checked in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44128 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14 19:08:32 +00:00
Ted Kremenek
233b60eced Removed debug #define that was accidentally checked in while debugging
the deserializer.

Fixed assertion when "stream jumping" in the deserializer to properly function
when we have reached the end of the stream.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44124 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14 17:42:09 +00:00
Duncan Sands
0a4f91ea18 Simplify the attribute verification code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44116 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14 14:02:11 +00:00
Duncan Sands
7e9ab25a85 Un XFAIL these tests, now that Bill has backported
the fix from 4.2.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44115 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14 13:40:53 +00:00
Anton Korobeynikov
e925df7f02 Document pure/const parameter attributes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44111 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14 10:30:13 +00:00
Anton Korobeynikov
b9b977d41e Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44110 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14 09:53:48 +00:00
Anton Korobeynikov
0adb7b41e7 Add pure/const attributes. Documentation will follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44109 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14 09:52:30 +00:00
Anton Korobeynikov
9de1934099 Fix PIC jump table codegen on x86-32/linux. In fact, such thing should be applied
to all targets uses GOT-relative offsets for PIC (Alpha?)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44108 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14 09:18:41 +00:00
Duncan Sands
87b665d3de Eliminate the recently introduced CCAssignToStackABISizeAlign
in favour of teaching CCAssignToStack that size 0 and/or align
0 means to use the ABI values.  This seems a neater solution.
It is safe since no legal value type has size 0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44107 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14 08:29:13 +00:00