Anton Korobeynikov [Sun, 25 Nov 2007 18:41:39 +0000 (18:41 +0000)]
Remove a leak. Destroy LoopInfoBase object. releaseMemory() is actually called in its dtor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44317
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 25 Nov 2007 14:10:56 +0000 (14:10 +0000)]
Fix PR1816. If a bitcast of a function only exists because of a
trivial difference in function attributes, allow calls to it to
be converted to direct calls. Based on a patch by Török Edwin.
While there, move the various lists of mutually incompatible
parameters etc out of the verifier and into ParameterAttributes.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44315
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 25 Nov 2007 07:05:05 +0000 (07:05 +0000)]
Don't ignore files that are no longer in use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44313
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Nov 2007 00:24:49 +0000 (00:24 +0000)]
Fix a long standing deficiency in the X86 backend: we would
sometimes emit "zero" and "all one" vectors multiple times,
for example:
_test2:
pcmpeqd %mm0, %mm0
movq %mm0, _M1
pcmpeqd %mm0, %mm0
movq %mm0, _M2
ret
instead of:
_test2:
pcmpeqd %mm0, %mm0
movq %mm0, _M1
movq %mm0, _M2
ret
This patch fixes this by always arranging for zero/one vectors
to be defined as v4i32 or v2i32 (SSE/MMX) instead of letting them be
any random type. This ensures they get trivially CSE'd on the dag.
This fix is also important for LegalizeDAGTypes, as it gets unhappy
when the x86 backend wants BUILD_VECTOR(i64 0) to be legal even when
'i64' isn't legal.
This patch makes the following changes:
1) X86TargetLowering::LowerBUILD_VECTOR now lowers 0/1 vectors into
their canonical types.
2) The now-dead patterns are removed from the SSE/MMX .td files.
3) All the patterns in the .td file that referred to immAllOnesV or
immAllZerosV in the wrong form now use *_bc to match them with a
bitcast wrapped around them.
4) X86DAGToDAGISel::SelectScalarSSELoad is generalized to handle
bitcast'd zero vectors, which simplifies the code actually.
5) getShuffleVectorZeroOrUndef is updated to generate a shuffle that
is legal, instead of generating one that is illegal and expecting
a later legalize pass to clean it up.
6) isZeroShuffle is generalized to handle bitcast of zeros.
7) several other minor tweaks.
This patch is definite goodness, but has the potential to cause random
code quality regressions. Please be on the lookout for these and let
me know if they happen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44310
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 24 Nov 2007 19:12:15 +0000 (19:12 +0000)]
Implement expand support for MERGE_VALUEs that only produces one result.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44304
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 24 Nov 2007 19:02:07 +0000 (19:02 +0000)]
add a immAllZerosV_bc pattern fragment for consistency with others.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44303
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 24 Nov 2007 18:37:20 +0000 (18:37 +0000)]
remove bogus assertion that broke CodeGen/Generic/cast-fp.ll on x86
among others.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44302
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 24 Nov 2007 18:11:42 +0000 (18:11 +0000)]
Implement support for custom legalization in DAGTypeLegalizer::ExpandOperand.
Improve a comment.
Unbreak Duncan's carefully written path compression where I didn't realize
what was happening!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44301
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 24 Nov 2007 07:07:01 +0000 (07:07 +0000)]
Several changes:
1) Change the interface to TargetLowering::ExpandOperationResult to
take and return entire NODES that need a result expanded, not just
the value. This allows us to handle things like READCYCLECOUNTER,
which returns two values.
2) Implement (extremely limited) support in LegalizeDAG::ExpandOp for MERGE_VALUES.
3) Reimplement custom lowering in LegalizeDAGTypes in terms of the new
ExpandOperationResult. This makes the result simpler and fully
general.
4) Implement (fully general) expand support for MERGE_VALUES in LegalizeDAGTypes.
5) Implement ExpandOperationResult support for ARM f64->i64 bitconvert and ARM
i64 shifts, allowing them to work with LegalizeDAGTypes.
6) Implement ExpandOperationResult support for X86 READCYCLECOUNTER and FP_TO_SINT,
allowing them to work with LegalizeDAGTypes.
LegalizeDAGTypes now passes several more X86 codegen tests when enabled and when
type legalization in LegalizeDAG is ifdef'd out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44300
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 24 Nov 2007 06:13:33 +0000 (06:13 +0000)]
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44299
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 24 Nov 2007 05:39:29 +0000 (05:39 +0000)]
upgrade this test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44298
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 23 Nov 2007 22:42:31 +0000 (22:42 +0000)]
Fix PR1816, by correcting the broken definition of APInt::countTrailingZeros.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44296
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 23 Nov 2007 22:36:49 +0000 (22:36 +0000)]
simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44295
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 23 Nov 2007 22:36:25 +0000 (22:36 +0000)]
Fix APInt::countTrailingZeros to return BitWidth if the input is zero instead of returning some random large number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44294
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 23 Nov 2007 22:35:18 +0000 (22:35 +0000)]
add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44293
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 23 Nov 2007 22:34:59 +0000 (22:34 +0000)]
splice some lines together, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44292
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 23 Nov 2007 22:19:33 +0000 (22:19 +0000)]
!< is >=, not >. Thanks to Max Hailperin for pointing this out!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44291
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 23 Nov 2007 19:30:27 +0000 (19:30 +0000)]
Ding dong, the DoesntAccessMemoryFns and
OnlyReadsMemoryFns tables are dead! We
get more, and more accurate, information
from gcc via the readnone and readonly
function attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44288
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 23 Nov 2007 09:10:17 +0000 (09:10 +0000)]
Remove some logic I thoughtlessly copied over
from the old ADCE implementation (there it was
correct because the transform was being done
for read-only functions).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44287
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 23 Nov 2007 08:46:22 +0000 (08:46 +0000)]
Fix a bug where we'd try to find a scev value for a bitcast operand,
even though the bitcast operand did not have integer type. This fixes
PR1814.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44286
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 22 Nov 2007 23:47:13 +0000 (23:47 +0000)]
Fix PR1817.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44284
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 22 Nov 2007 23:43:29 +0000 (23:43 +0000)]
add some static icmpinst predicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44283
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 22 Nov 2007 23:19:05 +0000 (23:19 +0000)]
add missing #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44282
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Thu, 22 Nov 2007 22:30:10 +0000 (22:30 +0000)]
Don't crash on bogus llvm.noinline. This is first part of PR1817 (preventing reduction)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44281
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 22 Nov 2007 22:24:59 +0000 (22:24 +0000)]
Turn invokes of nounwind functions into ordinary calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44280
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 22 Nov 2007 21:43:27 +0000 (21:43 +0000)]
Teach alias analysis about readnone/readonly functions.
Based on a patch by Török Edwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44279
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 22 Nov 2007 21:40:06 +0000 (21:40 +0000)]
Readonly/readnone functions are allowed to throw
exceptions, so don't turn invokes of them into
calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44278
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 22 Nov 2007 21:06:59 +0000 (21:06 +0000)]
resolve the last fixme's in the new tblgen parser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44277
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 22 Nov 2007 21:05:25 +0000 (21:05 +0000)]
change the Init print methods to return strings, and implement
print in terms of that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44276
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 22 Nov 2007 20:51:34 +0000 (20:51 +0000)]
eliminate a bunch of print methods that are duplicate with the getAsString() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44275
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 22 Nov 2007 20:49:04 +0000 (20:49 +0000)]
Rewrite the tblgen parser in a recursive descent style, eliminating the bison parser.
This makes the parser much easier to understand, eliminates a ton of global variables,
and gives tblgen nice caret diagnostics. It is also faster, but tblgen probably doesn't
care about performance.
There are a couple of FIXMEs which I will take care of next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44274
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 22 Nov 2007 20:23:04 +0000 (20:23 +0000)]
Rename the 'const' parameter attribute to 'readnone',
and the 'pure' parameter attribute to 'readonly'.
Names suggested by DannyB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44273
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 22 Nov 2007 07:59:40 +0000 (07:59 +0000)]
Instead of calculating constant factors, calculate the number of trailing
bits. Patch from Wojciech Matyjewicz.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44268
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 22 Nov 2007 03:07:37 +0000 (03:07 +0000)]
Create nodes for inline asm so that we don't crash looking for the node later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44267
91177308-0d34-0410-b5e6-
96231b3b80d8
Chuck Rose III [Wed, 21 Nov 2007 19:36:25 +0000 (19:36 +0000)]
Switching back to strtoll. Including config.h. On VStudio builds, this overrides strtoll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44264
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 21 Nov 2007 16:43:19 +0000 (16:43 +0000)]
Fix a bug in which node A is replaced by node B, but later
node A gets back into the DAG again because it was hiding in
one of the node maps: make sure that node replacement happens
in those maps too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44263
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 21 Nov 2007 05:21:54 +0000 (05:21 +0000)]
typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44262
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 21 Nov 2007 00:45:00 +0000 (00:45 +0000)]
Fix compiler warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44261
91177308-0d34-0410-b5e6-
96231b3b80d8
Chuck Rose III [Wed, 21 Nov 2007 00:37:56 +0000 (00:37 +0000)]
This change does a couple of things. First it gets the Visual Studio builds working.
I added the lexing files to the VStudio projects and removed the .l files from the
VStudio projects. There was a problem with use of strtoll in TGLexer.cpp and Chris
suggested switching to strtol, so that's included here.
Additionally, this checkin adds minimal x64 builds to the VStudio builds. Build issues
related to x64 in the windows specific files for DynamicLibrary.inc and Singals.inc
are worked around, but not ultimately solved. Binaries used to be stored in
...\win32\{Debug|Release}
but are now kept in
...\win32\bin\{win32|x64}\{Debug|Release}
intermediate files will continue to be stored in the individual project directories under
win32.
Some names will likely change in the future to reflect that the vstudio projects
are no longer 32-bit only, but I wanted to get things up and running today so kept away
from bigger restructuring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44260
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 20 Nov 2007 23:25:17 +0000 (23:25 +0000)]
File missing from previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44259
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 20 Nov 2007 23:24:42 +0000 (23:24 +0000)]
Fix .eh table linkage issues on Darwin. Some EH support
for Darwin PPC, but it's not fully working yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44258
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Nov 2007 22:25:16 +0000 (22:25 +0000)]
Add the ability to convert a tblgen type to a string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44257
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 20 Nov 2007 14:09:29 +0000 (14:09 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44250
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 20 Nov 2007 08:44:50 +0000 (08:44 +0000)]
Small cleanup. Use APInt::getHighBitsSet method instead of shift left.
"setcc" -> "icmp op" in comments. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44249
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 20 Nov 2007 08:24:44 +0000 (08:24 +0000)]
Be more careful when transforming | to +. Patch from Wojciech Matyjewicz.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44248
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Nov 2007 21:43:22 +0000 (21:43 +0000)]
Testcase for PR1811
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44244
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Nov 2007 21:38:03 +0000 (21:38 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44243
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Nov 2007 21:16:54 +0000 (21:16 +0000)]
Implement vector expand support for shuffle_vector. This fixes PR1811.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44242
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 19 Nov 2007 20:46:23 +0000 (20:46 +0000)]
Remove meaningless qualifiers from return types, avoiding compiler warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44240
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Nov 2007 20:21:32 +0000 (20:21 +0000)]
Implement splitting of UNDEF nodes. This is the first step towards fixing PR1811
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44239
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 19 Nov 2007 16:10:59 +0000 (16:10 +0000)]
Teach me to do stuff late at night.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44236
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 19 Nov 2007 15:36:19 +0000 (15:36 +0000)]
Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44235
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 19 Nov 2007 15:30:20 +0000 (15:30 +0000)]
Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44234
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 19 Nov 2007 15:15:03 +0000 (15:15 +0000)]
Add support in SplitVectorOp for remainder operators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44233
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 19 Nov 2007 07:44:43 +0000 (07:44 +0000)]
Fix a factually incorrect statement pointed out by Max Hailperin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44228
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Nov 2007 07:43:52 +0000 (07:43 +0000)]
Record the start of the current token, for use in error reporting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44227
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Nov 2007 07:38:58 +0000 (07:38 +0000)]
Add carat diagnostics to tblgen lexer errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44226
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Nov 2007 18:52:28 +0000 (18:52 +0000)]
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
Chris Lattner [Sun, 18 Nov 2007 18:43:24 +0000 (18:43 +0000)]
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
Chris Lattner [Sun, 18 Nov 2007 18:32:16 +0000 (18:32 +0000)]
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
Chris Lattner [Sun, 18 Nov 2007 18:26:45 +0000 (18:26 +0000)]
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
Chris Lattner [Sun, 18 Nov 2007 18:25:18 +0000 (18:25 +0000)]
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
Chris Lattner [Sun, 18 Nov 2007 08:46:26 +0000 (08:46 +0000)]
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
Chris Lattner [Sun, 18 Nov 2007 05:48:46 +0000 (05:48 +0000)]
minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44212
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Nov 2007 05:25:45 +0000 (05:25 +0000)]
ensure header is self contained.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44211
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Nov 2007 02:57:27 +0000 (02:57 +0000)]
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
Nate Begeman [Sat, 17 Nov 2007 03:58:34 +0000 (03:58 +0000)]
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
Ted Kremenek [Sat, 17 Nov 2007 03:34:33 +0000 (03:34 +0000)]
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
Dale Johannesen [Sat, 17 Nov 2007 02:48:01 +0000 (02:48 +0000)]
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
Dale Johannesen [Sat, 17 Nov 2007 01:02:27 +0000 (01:02 +0000)]
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
Ted Kremenek [Sat, 17 Nov 2007 00:45:37 +0000 (00:45 +0000)]
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
Ted Kremenek [Sat, 17 Nov 2007 00:40:45 +0000 (00:40 +0000)]
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
Evan Cheng [Sat, 17 Nov 2007 00:40:40 +0000 (00:40 +0000)]
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
Evan Cheng [Sat, 17 Nov 2007 00:31:16 +0000 (00:31 +0000)]
Shrinkfy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44197
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 16 Nov 2007 23:55:08 +0000 (23:55 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44196
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 16 Nov 2007 23:16:35 +0000 (23:16 +0000)]
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
Tanya Lattner [Fri, 16 Nov 2007 22:44:50 +0000 (22:44 +0000)]
Fix for PR1801
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44193
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 16 Nov 2007 11:12:01 +0000 (11:12 +0000)]
These were implemented
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44189
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Nov 2007 06:04:17 +0000 (06:04 +0000)]
Fix PR1800 by correcting mistaken logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44188
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Nov 2007 05:32:05 +0000 (05:32 +0000)]
fix a typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44187
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 16 Nov 2007 01:31:51 +0000 (01:31 +0000)]
Implement codegen for flt_rounds on x86
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44183
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Thu, 15 Nov 2007 23:25:33 +0000 (23:25 +0000)]
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
Nate Begeman [Thu, 15 Nov 2007 21:15:26 +0000 (21:15 +0000)]
Basic non-power-of-2 vector support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44181
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Thu, 15 Nov 2007 18:33:16 +0000 (18:33 +0000)]
Reverted r44163 per request
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44177
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Berlin [Thu, 15 Nov 2007 18:06:49 +0000 (18:06 +0000)]
Fix bugs in iterator invalidation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44174
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 15 Nov 2007 09:54:37 +0000 (09:54 +0000)]
This assertion was bogus.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44167
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 15 Nov 2007 08:13:29 +0000 (08:13 +0000)]
Fix a thinko in post-allocation coalescer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44166
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 15 Nov 2007 06:30:50 +0000 (06:30 +0000)]
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
Chris Lattner [Thu, 15 Nov 2007 06:10:55 +0000 (06:10 +0000)]
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
Chris Lattner [Thu, 15 Nov 2007 05:57:06 +0000 (05:57 +0000)]
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
Owen Anderson [Thu, 15 Nov 2007 05:00:15 +0000 (05:00 +0000)]
More templatization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44158
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 15 Nov 2007 04:51:31 +0000 (04:51 +0000)]
many edits, patch by Kelly Wilson!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44157
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 15 Nov 2007 02:06:30 +0000 (02:06 +0000)]
Adding debug output during coalescing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44154
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 15 Nov 2007 00:40:48 +0000 (00:40 +0000)]
Need to increment the iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44153
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 15 Nov 2007 00:05:03 +0000 (00:05 +0000)]
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
Duncan Sands [Wed, 14 Nov 2007 21:58:02 +0000 (21:58 +0000)]
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
Duncan Sands [Wed, 14 Nov 2007 21:14:02 +0000 (21:14 +0000)]
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
Evan Cheng [Wed, 14 Nov 2007 19:08:32 +0000 (19:08 +0000)]
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
Ted Kremenek [Wed, 14 Nov 2007 17:42:09 +0000 (17:42 +0000)]
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
Duncan Sands [Wed, 14 Nov 2007 14:02:11 +0000 (14:02 +0000)]
Simplify the attribute verification code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44116
91177308-0d34-0410-b5e6-
96231b3b80d8