oota-llvm.git
15 years agoCleanup for unitialized types. Patch by Jean-Daniel Dupas!
Bill Wendling [Thu, 26 Jun 2008 08:32:05 +0000 (08:32 +0000)]
Cleanup for unitialized types. Patch by Jean-Daniel Dupas!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52775 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago"An improved Mach-O file type detection for sys::IdentifyFileType()
Chris Lattner [Thu, 26 Jun 2008 05:17:18 +0000 (05:17 +0000)]
"An improved Mach-O file type detection for sys::IdentifyFileType()
This patch add supports for single architecture mach-o files (the current implementation only support Universal Binary), and solve the signature conflict between java class and Universal Binary magics.

Note that this function will always returned dynamic library for Universal Binaries (like the current implementation) because the binary type is not include in the file header."

Patch by Jean-Daniel Dupas!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52766 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReserve the size we'll need in advance.
Owen Anderson [Thu, 26 Jun 2008 04:47:41 +0000 (04:47 +0000)]
Reserve the size we'll need in advance.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52763 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAllow for rounding up of stack frame.
Dale Johannesen [Thu, 26 Jun 2008 01:55:32 +0000 (01:55 +0000)]
Allow for rounding up of stack frame.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52751 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFixes the last x86-64 test failure in compat.exp:
Dale Johannesen [Thu, 26 Jun 2008 01:51:13 +0000 (01:51 +0000)]
Fixes the last x86-64 test failure in compat.exp:
<16 x float> is 64-byte aligned (for some reason),
which gets us into the stack realignment code.  The
computation changing FP-relative offsets to SP-relative
was broken, assiging a spill temp to a location
also used for parameter passing.  This
fixes it by rounding up the stack frame to a multiple
of the largest alignment (I concluded it wasn't fixable
without doing this, but I'm not very sure.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52750 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove unused function.
Eric Christopher [Thu, 26 Jun 2008 01:19:35 +0000 (01:19 +0000)]
Remove unused function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52749 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove GetConstantStringInfo to lib/Analysis. Remove
Eric Christopher [Thu, 26 Jun 2008 00:31:12 +0000 (00:31 +0000)]
Move GetConstantStringInfo to lib/Analysis. Remove
string output routine from Constant. Update all
callers. Change debug intrinsic api slightly to
accomodate move of routine, these now return values
instead of strings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52748 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agowhen we know the signbit of an input to uint_to_fp is zero,
Chris Lattner [Thu, 26 Jun 2008 00:16:49 +0000 (00:16 +0000)]
when we know the signbit of an input to uint_to_fp is zero,
change it to sint_to_fp on targets where that is cheaper (and
visaversa of course).  This allows us to compile uint_to_fp to:

_test:
movl 4(%esp), %eax
shrl $23, %eax
cvtsi2ss %eax, %xmm0
movl 8(%esp), %eax
movss %xmm0, (%eax)
ret

instead of:

.align 3
LCPI1_0: ##  double
.long 0 ## double least significant word 4.5036e+15
.long 1127219200 ## double most significant word 4.5036e+15
.text
.align 4,0x90
.globl _test
_test:
subl $12, %esp
movl 16(%esp), %eax
shrl $23, %eax
movl %eax, (%esp)
movl $1127219200, 4(%esp)
movsd (%esp), %xmm0
subsd LCPI1_0, %xmm0
cvtsd2ss %xmm0, %xmm0
movl 20(%esp), %eax
movss %xmm0, (%eax)
addl $12, %esp
ret

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52747 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemember which MachineOperand we were processing, so we don't have to scan the list...
Owen Anderson [Wed, 25 Jun 2008 23:39:39 +0000 (23:39 +0000)]
Remember which MachineOperand we were processing, so we don't have to scan the list to find it again later.
This speeds up live intervals from 0.37s to 0.30s on instcombine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52745 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix the text in an assert string.
Dan Gohman [Wed, 25 Jun 2008 22:14:43 +0000 (22:14 +0000)]
Fix the text in an assert string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52744 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago- Fix a x86 vector isel bug: illegal transformation of a vector_shuffle into a
Evan Cheng [Wed, 25 Jun 2008 20:52:59 +0000 (20:52 +0000)]
- Fix a x86 vector isel bug: illegal transformation of a vector_shuffle into a
  shift.
- Add a readme entry for a missing vector_shuffle optimization that results in
  awful codegen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52740 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support for expanding PPC 128 bit floats.
Duncan Sands [Wed, 25 Jun 2008 20:24:48 +0000 (20:24 +0000)]
Add support for expanding PPC 128 bit floats.
For this it is convenient to permit floats to
be used with EXTRACT_ELEMENT, so I tweaked
things to allow that.  I also added libcalls
for ppcf128 to i32 forms of FP_TO_XINT, since
they exist in libgcc and this case can certainly
occur (and does occur in the testsuite) - before
the i64 libcall was being used.  Also, the
XINT_TO_FP result seemed to be wrong when
the argument is an i128: the wrong fudge
factor was added (the i32 and i64 cases were
handled directly, but the i128 code fell
through to some generic softening code which
seemed to think it was i64 to f32!).  So I
fixed it by adding a fudge factor that I
found in my breakfast cereal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52739 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement JIT support for global aliases, patch by David Chisnall!
Chris Lattner [Wed, 25 Jun 2008 20:21:35 +0000 (20:21 +0000)]
Implement JIT support for global aliases, patch by David Chisnall!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52738 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRestore DeadArgElim back to 52570. It's breaking 447.dealII.
Evan Cheng [Wed, 25 Jun 2008 18:10:09 +0000 (18:10 +0000)]
Restore DeadArgElim back to 52570. It's breaking 447.dealII.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52736 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSwitch the PPC backend and target-independent JIT to use the libsystem
Chris Lattner [Wed, 25 Jun 2008 17:18:44 +0000 (17:18 +0000)]
Switch the PPC backend and target-independent JIT to use the libsystem
InvalidateInstructionCache method instead of calling through
a hook on the JIT.  This is a host feature, not a target feature.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52734 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix compilation errors in my previous patch
Chris Lattner [Wed, 25 Jun 2008 17:17:53 +0000 (17:17 +0000)]
fix compilation errors in my previous patch

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52733 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a new InvalidateInstructionCache method to sys::Memory.
Chris Lattner [Wed, 25 Jun 2008 17:14:10 +0000 (17:14 +0000)]
Add a new InvalidateInstructionCache method to sys::Memory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52731 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agojump threading can introduce allocas, make sure we promote
Chris Lattner [Wed, 25 Jun 2008 16:54:18 +0000 (16:54 +0000)]
jump threading can introduce allocas, make sure we promote
them back to registers!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52729 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorun mem2reg after the second jump threading pass in llvm-ld.
Chris Lattner [Wed, 25 Jun 2008 16:51:55 +0000 (16:51 +0000)]
run mem2reg after the second jump threading pass in llvm-ld.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52728 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove a bunch of dead options that never did anything.
Chris Lattner [Wed, 25 Jun 2008 16:44:52 +0000 (16:44 +0000)]
remove a bunch of dead options that never did anything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52727 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove some dead options.
Chris Lattner [Wed, 25 Jun 2008 16:44:08 +0000 (16:44 +0000)]
remove some dead options.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52726 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimpleInstructionSelector is here no more.
Dan Gohman [Wed, 25 Jun 2008 16:38:59 +0000 (16:38 +0000)]
SimpleInstructionSelector is here no more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52725 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd/complete support for integer and float
Duncan Sands [Wed, 25 Jun 2008 16:34:21 +0000 (16:34 +0000)]
Add/complete support for integer and float
select_cc and friends.  This code could be
factorized a bit but I'm not sure that it's
worth it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52724 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPacify gcc-4.3.
Duncan Sands [Wed, 25 Jun 2008 16:31:18 +0000 (16:31 +0000)]
Pacify gcc-4.3.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52723 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove the OrigVT member from AtomicSDNode, as it is redundant with
Dan Gohman [Wed, 25 Jun 2008 16:07:49 +0000 (16:07 +0000)]
Remove the OrigVT member from AtomicSDNode, as it is redundant with
the base SDNode's VTList.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52722 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosimplify shell syntax to work better on solaris, patch by
Chris Lattner [Wed, 25 Jun 2008 16:03:42 +0000 (16:03 +0000)]
simplify shell syntax to work better on solaris, patch by
Nathan Keynes!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52721 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded MemOperands to Atomic operations since Atomics touches memory.
Mon P Wang [Wed, 25 Jun 2008 08:15:39 +0000 (08:15 +0000)]
Added MemOperands to Atomic operations since Atomics touches memory.
Added abstract class MemSDNode for any Node that have an associated MemOperand
Changed atomic.lcs => atomic.cmp.swap, atomic.las => atomic.load.add, and
atomic.lss => atomic.load.sub

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52706 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a (false) warning on darwin.
Matthijs Kooijman [Wed, 25 Jun 2008 08:12:16 +0000 (08:12 +0000)]
Fix a (false) warning on darwin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52705 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix some cosmetics in comments.
Matthijs Kooijman [Wed, 25 Jun 2008 08:10:21 +0000 (08:10 +0000)]
Fix some cosmetics in comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52704 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago- Use O(1) check of basic block size limit.
Evan Cheng [Wed, 25 Jun 2008 07:50:12 +0000 (07:50 +0000)]
- Use O(1) check of basic block size limit.
- Avoid speculatively execute vector ops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52703 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR2488, a case where we deleted stack restores too aggressively.
Chris Lattner [Wed, 25 Jun 2008 05:59:28 +0000 (05:59 +0000)]
Fix PR2488, a case where we deleted stack restores too aggressively.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52702 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEnable two-address remat by default.
Evan Cheng [Wed, 25 Jun 2008 01:16:38 +0000 (01:16 +0000)]
Enable two-address remat by default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52701 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse push_back rather than operator[], which is incorrect in this cases. Unfortunately...
Owen Anderson [Wed, 25 Jun 2008 01:05:05 +0000 (01:05 +0000)]
Use push_back rather than operator[], which is incorrect in this cases. Unfortunately, this slow the testcase down a little bit,
but only marginally.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52700 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse present tense when talking about User layout. It is implemented now.
Gabor Greif [Wed, 25 Jun 2008 00:10:22 +0000 (00:10 +0000)]
Use present tense when talking about User layout. It is implemented now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52699 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAppend to the ActiveTimers std::vector before looking at the timer instead
Dan Gohman [Tue, 24 Jun 2008 22:07:07 +0000 (22:07 +0000)]
Append to the ActiveTimers std::vector before looking at the timer instead
of after, so that any reallocation it does doesn't get counted for the pass
being timed.  This probably doesn't account for a timing discrepancy I was
looking into, but I'm fixing it anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52693 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agov2f32 is now a valid (MMX) type which breaks this
Dale Johannesen [Tue, 24 Jun 2008 22:03:36 +0000 (22:03 +0000)]
v2f32 is now a valid (MMX) type which breaks this
test (doesn't work for any MMX vector types, it's
not me).  Rewritten to use v2i16 which is generic
and going to stay that way; I think that preserves
the point of the test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52692 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd v2f32 (MMX) type to X86. Support is primitive:
Dale Johannesen [Tue, 24 Jun 2008 22:01:44 +0000 (22:01 +0000)]
Add v2f32 (MMX) type to X86.  Support is primitive:
load,store,call,return,bitcast.  This is enough to
make call and return work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52691 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIn ConstantArray::getAsString(), we know the size of the resultant string in advance...
Owen Anderson [Tue, 24 Jun 2008 21:58:29 +0000 (21:58 +0000)]
In ConstantArray::getAsString(), we know the size of the resultant string in advance so we can pre-allocate it and just fill in
the entries.  This improves the time for the AsmPrinter on InstructionCombining.cpp from 0.4248s to 0.3370s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52690 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse SmallVector instead of std::vector for a minor compile time improvement.
Owen Anderson [Tue, 24 Jun 2008 21:44:59 +0000 (21:44 +0000)]
Use SmallVector instead of std::vector for a minor compile time improvement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52689 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert 52645, the loop unroller changes. It caused a regression in 252.eon.
Dan Gohman [Tue, 24 Jun 2008 20:44:42 +0000 (20:44 +0000)]
Revert 52645, the loop unroller changes. It caused a regression in 252.eon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52688 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a typo in a comment.
Dan Gohman [Tue, 24 Jun 2008 18:00:21 +0000 (18:00 +0000)]
Fix a typo in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52687 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake Allocate<T>() return a T* instead of a void*. And use
Dan Gohman [Tue, 24 Jun 2008 17:49:26 +0000 (17:49 +0000)]
Make Allocate<T>() return a T* instead of a void*. And use
static_cast instead of reinterpret_cast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52686 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRegenerate configure.
Tanya Lattner [Tue, 24 Jun 2008 17:49:13 +0000 (17:49 +0000)]
Regenerate configure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52685 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse const_cast instead of a C-style cast.
Dan Gohman [Tue, 24 Jun 2008 17:47:37 +0000 (17:47 +0000)]
Use const_cast instead of a C-style cast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52684 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCorrect a comment.
Dan Gohman [Tue, 24 Jun 2008 17:46:48 +0000 (17:46 +0000)]
Correct a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52683 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support for building on solaris, working around namespace
Chris Lattner [Tue, 24 Jun 2008 17:44:42 +0000 (17:44 +0000)]
Add support for building on solaris, working around namespace
polution problems from system headers.  Patch by Nathan Keynes!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52682 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPass std::string by reference. Thanks Chris!
Dan Gohman [Tue, 24 Jun 2008 16:40:22 +0000 (16:40 +0000)]
Pass std::string by reference. Thanks Chris!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52678 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCommit the new DeadArgElim pass again, this time with the gcc bootstrap failures...
Matthijs Kooijman [Tue, 24 Jun 2008 16:30:26 +0000 (16:30 +0000)]
Commit the new DeadArgElim pass again, this time with the gcc bootstrap failures fixed.

Also add a testcase to reproduce the gcc bootstrap failure in very much reduced form.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52677 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAllow the test suite to be checked out into projects/test-suite.
Matthijs Kooijman [Tue, 24 Jun 2008 13:01:57 +0000 (13:01 +0000)]
Allow the test suite to be checked out into projects/test-suite.

We will keep the old projects/llvm-test working for existing installs.

The changes to configure are made manually, since I lack autoconf-2.6. Someone
might want to run AutoGen.sh to see if that changes anything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52675 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate testing documentation with more consistent terminology.
Matthijs Kooijman [Tue, 24 Jun 2008 12:58:31 +0000 (12:58 +0000)]
Update testing documentation with more consistent terminology.

All of LLVM's testing features are now referred to as the "Testing
infrastructure", the DejaGNU tests are just that, and the whole program tests
are referred to as the "test suite".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52674 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename a few variables to be more consistent.
Matthijs Kooijman [Tue, 24 Jun 2008 09:14:10 +0000 (09:14 +0000)]
Rename a few variables to be more consistent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52672 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIf it's determined safe, remat MOV32r0 (i.e. xor r, r) and others as it is instead...
Evan Cheng [Tue, 24 Jun 2008 07:10:51 +0000 (07:10 +0000)]
If it's determined safe, remat MOV32r0 (i.e. xor r, r) and others as it is instead of using the longer MOV32ri instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52670 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix some signed vs. unsigned issues in array and vector handling.
Dan Gohman [Tue, 24 Jun 2008 01:17:52 +0000 (01:17 +0000)]
Fix some signed vs. unsigned issues in array and vector handling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52664 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a note about a potential PIC optimization.
Dan Gohman [Tue, 24 Jun 2008 00:53:07 +0000 (00:53 +0000)]
Add a note about a potential PIC optimization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52663 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFixes for being compiled PIC on Linux. This isn't the most
Dan Gohman [Tue, 24 Jun 2008 00:50:01 +0000 (00:50 +0000)]
Fixes for being compiled PIC on Linux. This isn't the most
general solution possible, but it's a fairly simple one.
Based on a patch from the OpenGTL project!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52662 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove an incorrect comment.
Owen Anderson [Tue, 24 Jun 2008 00:15:10 +0000 (00:15 +0000)]
Remove an incorrect comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52660 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse InstrSlots::NUM rather than pre-dividing by four. Also, mark this const.
Owen Anderson [Tue, 24 Jun 2008 00:08:35 +0000 (00:08 +0000)]
Use InstrSlots::NUM rather than pre-dividing by four.  Also, mark this const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52659 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoComment fixes, and make Schedule() pure virtual.
Dan Gohman [Tue, 24 Jun 2008 00:02:44 +0000 (00:02 +0000)]
Comment fixes, and make Schedule() pure virtual.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52658 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoA brief survey of priority_queue usage in the tree turned this up
Dan Gohman [Mon, 23 Jun 2008 23:51:16 +0000 (23:51 +0000)]
A brief survey of priority_queue usage in the tree turned this up
as a questionable case, but the code isn't actually needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52657 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a clear() method to PriorityQueue.
Dan Gohman [Mon, 23 Jun 2008 23:47:46 +0000 (23:47 +0000)]
Add a clear() method to PriorityQueue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52656 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThis situation can occur:
Bill Wendling [Mon, 23 Jun 2008 23:41:14 +0000 (23:41 +0000)]
This situation can occur:

    ,------.
    |      |
    |      v
    |   t2 = phi ... t1 ...
    |      |
    |      v
    |   t1 = ...
    |  ... = ... t1 ...
    |      |
    `------'

where there is a use in a PHI node that's a predecessor to the defining
block. We don't want to mark all predecessors as having the value "alive" in
this case. Also, the assert was too restrictive and didn't handle this case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52655 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse the new PriorityQueue in ScheduleDAGList too, which also
Dan Gohman [Mon, 23 Jun 2008 23:40:09 +0000 (23:40 +0000)]
Use the new PriorityQueue in ScheduleDAGList too, which also
needs arbitrary-element removal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52654 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd getScaledIntervalSize, which gives a measure of the size of an interval that...
Owen Anderson [Mon, 23 Jun 2008 23:25:37 +0000 (23:25 +0000)]
Add getScaledIntervalSize, which gives a measure of the size of an interval that is independent of the scaling of
the function due to empty index slots.  This is suitable for use in backend heuristics that need to reason about the density
of an interval.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52652 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse use_empty() instead of getNumUses(), avoiding a use list traversal.
Dan Gohman [Mon, 23 Jun 2008 23:23:49 +0000 (23:23 +0000)]
Use use_empty() instead of getNumUses(), avoiding a use list traversal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52651 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse getMBBEndIdx rather than assuming that the end is right after the last instructio...
Owen Anderson [Mon, 23 Jun 2008 22:12:23 +0000 (22:12 +0000)]
Use getMBBEndIdx rather than assuming that the end is right after the last instruction in the block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52649 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix spelling and grammar in a comment.
Dan Gohman [Mon, 23 Jun 2008 22:11:52 +0000 (22:11 +0000)]
Fix spelling and grammar in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52648 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoExtract the x86_64 part for the executables.
Bill Wendling [Mon, 23 Jun 2008 22:08:30 +0000 (22:08 +0000)]
Extract the x86_64 part for the executables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52647 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify erase_one slightly. It's not necessary to preserve
Dan Gohman [Mon, 23 Jun 2008 21:46:21 +0000 (21:46 +0000)]
Simplify erase_one slightly. It's not necessary to preserve
the value of the element to be erased while the heap is
being updated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52646 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevamp the loop unroller, extending it to correctly update PHI nodes
Dan Gohman [Mon, 23 Jun 2008 21:29:41 +0000 (21:29 +0000)]
Revamp the loop unroller, extending it to correctly update PHI nodes
in the presence of out-of-loop users of in-loop values and the trip
count is not a known multiple of the unroll count, and to be a bit
simpler overall. This fixes PR2253.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52645 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove option used to debug stack coloring bugs. It's no longer needed since stack...
Evan Cheng [Mon, 23 Jun 2008 21:24:32 +0000 (21:24 +0000)]
Remove option used to debug stack coloring bugs. It's no longer needed since stack coloring is now bug free.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52644 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDisable PRE. It's breaking bootstrapping.
Evan Cheng [Mon, 23 Jun 2008 21:22:35 +0000 (21:22 +0000)]
Disable PRE. It's breaking bootstrapping.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52643 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove a DenseMap's declaration outside of a loop, and just call
Dan Gohman [Mon, 23 Jun 2008 21:15:00 +0000 (21:15 +0000)]
Move a DenseMap's declaration outside of a loop, and just call
clear() on each iteration. This avoids allocating and deallocating
all of DenseMap's memory on each iteration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52642 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse StringMap instead of std::map<std::string, SDNode*>.
Dan Gohman [Mon, 23 Jun 2008 21:08:32 +0000 (21:08 +0000)]
Use StringMap instead of std::map<std::string, SDNode*>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52641 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd methods to StringMap to erase entries by key.
Dan Gohman [Mon, 23 Jun 2008 21:07:03 +0000 (21:07 +0000)]
Add methods to StringMap to erase entries by key.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52640 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInstead of adding an isSS field to LiveInterval to denote stack slot. Use top bit...
Evan Cheng [Mon, 23 Jun 2008 21:03:19 +0000 (21:03 +0000)]
Instead of adding an isSS field to LiveInterval to denote stack slot. Use top bit of 'reg' instead. If the top bit is set, than the LiveInterval represents a stack slot live interval.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52639 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFirst step to fix PR2088. Implement routine to compute the
Wojciech Matyjewicz [Mon, 23 Jun 2008 19:39:50 +0000 (19:39 +0000)]
First step to fix PR2088. Implement routine to compute the
multiplicative inverse of a given number. Modify udivrem to allow input and
output pairs of arguments to overlap. Patch is based on the work by Chandler
Carruth.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52638 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate the .cvs files.
Dan Gohman [Mon, 23 Jun 2008 18:43:26 +0000 (18:43 +0000)]
Update the .cvs files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52637 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix the types for NumElements variables, and add a comment
Dan Gohman [Mon, 23 Jun 2008 18:40:28 +0000 (18:40 +0000)]
Fix the types for NumElements variables, and add a comment
explaining why empty array constants use ValID::createUndef().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52636 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTighten the conditions under which we do PRE, remove some unneeded code, and correct...
Owen Anderson [Mon, 23 Jun 2008 17:49:45 +0000 (17:49 +0000)]
Tighten the conditions under which we do PRE, remove some unneeded code, and correct our preserved analyses list, since we
do now change the CFG by splitting critical edges during PRE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52631 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agominor tidying of comments.
Chris Lattner [Mon, 23 Jun 2008 17:11:23 +0000 (17:11 +0000)]
minor tidying of comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52630 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove two convenience constructors because they're now private, and the
Dan Gohman [Mon, 23 Jun 2008 16:48:17 +0000 (16:48 +0000)]
Remove two convenience constructors because they're now private, and the
private implementation doesn't really need the convenience.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52629 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse std::copy instead of a loop.
Dan Gohman [Mon, 23 Jun 2008 16:45:24 +0000 (16:45 +0000)]
Use std::copy instead of a loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52628 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMore changes from Chris' review: simplify getIndices and avoid
Dan Gohman [Mon, 23 Jun 2008 16:39:44 +0000 (16:39 +0000)]
More changes from Chris' review: simplify getIndices and avoid
copying its return value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52627 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove an unnecessary cast.
Dan Gohman [Mon, 23 Jun 2008 16:38:10 +0000 (16:38 +0000)]
Remove an unnecessary cast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52626 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDuncan pointed out this code could be tidied.
Dan Gohman [Mon, 23 Jun 2008 15:29:14 +0000 (15:29 +0000)]
Duncan pointed out this code could be tidied.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52624 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix the syntax of insertvalue in the example.
Dan Gohman [Mon, 23 Jun 2008 15:26:37 +0000 (15:26 +0000)]
Fix the syntax of insertvalue in the example.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52623 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPort some integer multiplication fixes from LegalizeDAG.
Duncan Sands [Mon, 23 Jun 2008 15:15:44 +0000 (15:15 +0000)]
Port some integer multiplication fixes from LegalizeDAG.
Bail out with an error if there is no libcall available
for the given size of integer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52622 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSupport for expanding the result of EXTRACT_ELEMENT.
Duncan Sands [Mon, 23 Jun 2008 15:08:15 +0000 (15:08 +0000)]
Support for expanding the result of EXTRACT_ELEMENT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52621 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCleanup up LegalizeTypes handling of loads and
Duncan Sands [Mon, 23 Jun 2008 14:19:45 +0000 (14:19 +0000)]
Cleanup up LegalizeTypes handling of loads and
stores.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52620 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake test work on non-x86 machines (like my G4 PPC).
Bill Wendling [Mon, 23 Jun 2008 06:16:31 +0000 (06:16 +0000)]
Make test work on non-x86 machines (like my G4 PPC).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52619 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAt Chris' suggestion, move the liveness and worklist datastructures into
Owen Anderson [Mon, 23 Jun 2008 06:13:12 +0000 (06:13 +0000)]
At Chris' suggestion, move the liveness and worklist datastructures into
instance variables so they can be allocated just once, and reuse the worklist
as the dead list as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52618 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImprove LSR's dead-phi detection to handle use-def cycles
Dan Gohman [Sun, 22 Jun 2008 20:44:02 +0000 (20:44 +0000)]
Improve LSR's dead-phi detection to handle use-def cycles
with more than two nodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52617 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse Loop::block_iterator.
Dan Gohman [Sun, 22 Jun 2008 20:18:58 +0000 (20:18 +0000)]
Use Loop::block_iterator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52616 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGeneralize createSCEV to be able to form SCEV expressions from
Dan Gohman [Sun, 22 Jun 2008 19:56:46 +0000 (19:56 +0000)]
Generalize createSCEV to be able to form SCEV expressions from
ConstantExprs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52615 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse SCEVAddRecExpr::isAffine.
Dan Gohman [Sun, 22 Jun 2008 19:23:09 +0000 (19:23 +0000)]
Use SCEVAddRecExpr::isAffine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52614 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove unnecessary #includes.
Dan Gohman [Sun, 22 Jun 2008 19:21:26 +0000 (19:21 +0000)]
Remove unnecessary #includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52613 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove a few more SCEVExpander methods out-of-line.
Dan Gohman [Sun, 22 Jun 2008 19:09:18 +0000 (19:09 +0000)]
Move a few more SCEVExpander methods out-of-line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52612 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR2369 by making scalarrepl more careful about promoting
Chris Lattner [Sun, 22 Jun 2008 17:46:21 +0000 (17:46 +0000)]
Fix PR2369 by making scalarrepl more careful about promoting
structures.  Its default threshold is to promote things that are
smaller than 128 bytes, which is sane.  However, it is not sane
to do this for things that turn into 128 *registers*.  Add a cap
on the number of registers introduced, defaulting to 128/4=32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52611 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake custom lowering of ADD work correctly. This
Duncan Sands [Sun, 22 Jun 2008 09:42:16 +0000 (09:42 +0000)]
Make custom lowering of ADD work correctly.  This
fixes PR2476; patch by Richard Osborne.  The same
problem exists for a bunch of other operators, but
I'm ignoring this because they will be automagically
fixed when the new LegalizeTypes infrastructure lands,
since it already solves this problem centrally.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52610 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix for PR2479: correctly optimize expressions like (a > 13) & (a ==
Eli Friedman [Sat, 21 Jun 2008 23:36:13 +0000 (23:36 +0000)]
Fix for PR2479: correctly optimize expressions like (a > 13) & (a ==
15).

See also PR1800, which is about the signed case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52608 91177308-0d34-0410-b5e6-96231b3b80d8