oota-llvm.git
15 years agoUnconditionally reset 'cache' to zero, even if we don't need to resort it.
Chris Lattner [Fri, 23 Jan 2009 06:48:41 +0000 (06:48 +0000)]
Unconditionally reset 'cache' to zero, even if we don't need to resort it.
This avoids using a dangling pointer.

Reset NumSortedEntries after restoring Cache to avoid extraneous sorts.
This fixes the reduced sqlite3 testcase, but apparently not the whole app.

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

15 years agoOnly check if coalescing is worthwhile when the result is targeting a more restrictiv...
Evan Cheng [Fri, 23 Jan 2009 05:48:59 +0000 (05:48 +0000)]
Only check if coalescing is worthwhile when the result is targeting a more restrictive register class.

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

15 years agoUpdate test to reflect command line option name change.
Evan Cheng [Fri, 23 Jan 2009 05:45:31 +0000 (05:45 +0000)]
Update test to reflect command line option name change.

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

15 years agoStage two of fixing pre-alloc-splitting's code size issues: filter out restores that...
Owen Anderson [Fri, 23 Jan 2009 03:28:53 +0000 (03:28 +0000)]
Stage two of fixing pre-alloc-splitting's code size issues: filter out restores that are just
going to be re-spilled again.

This also helps performance.  Pre-alloc-splitting now seems to be an overall win on SPEC.

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

15 years agoCross register class coalescing. Not yet enabled.
Evan Cheng [Fri, 23 Jan 2009 02:15:19 +0000 (02:15 +0000)]
Cross register class coalescing. Not yet enabled.

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

15 years agoCode did not follow associated comment. not a good idea.
Devang Patel [Fri, 23 Jan 2009 01:25:58 +0000 (01:25 +0000)]
Code did not follow associated comment. not a good idea.

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

15 years agoSet appropriate tag for the composite type.
Devang Patel [Fri, 23 Jan 2009 01:19:09 +0000 (01:19 +0000)]
Set appropriate tag for the composite type.

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

15 years agoa minor tweak to my previous patch, handle the invalidation case
Chris Lattner [Fri, 23 Jan 2009 00:27:03 +0000 (00:27 +0000)]
a minor tweak to my previous patch, handle the invalidation case
when there are multiple iterations of the loop.  This fixes PR3375.

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

15 years agoAdd an initial pass at dead spill/restore removal for pre alloc splitting.
Owen Anderson [Fri, 23 Jan 2009 00:23:32 +0000 (00:23 +0000)]
Add an initial pass at dead spill/restore removal for pre alloc splitting.

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

15 years agodo not sign extend characters input to isprint. This improves
Chris Lattner [Thu, 22 Jan 2009 23:38:45 +0000 (23:38 +0000)]
do not sign extend characters input to isprint.  This improves
compatibility with VC++.  Patch by Max Burke!

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

15 years agoHandful of fixes to the VC project files.
Steve Naroff [Thu, 22 Jan 2009 23:05:37 +0000 (23:05 +0000)]
Handful of fixes to the VC project files.

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

15 years agoFix a minor bug in DAGCombiner's folding of SELECT. Folding "select C, 0, 1"
Bob Wilson [Thu, 22 Jan 2009 22:05:48 +0000 (22:05 +0000)]
Fix a minor bug in DAGCombiner's folding of SELECT.  Folding "select C, 0, 1"
to "C ^ 1" is only valid when C is known to be either 0 or 1.  Most of the
similar foldings in this function only handle "i1" types, but this one appears
intentionally written to handle larger integer types.  If C has an integer
type larger than "i1", this needs to check if the high bits of a boolean
are known to be zero.  I also changed the comment to describe this folding as
"C ^ 1" instead of "~C", since that is what the code does and since the latter
would only be valid for "i1" types.  The good news is that most LLVM targets
use TargetLowering::ZeroOrOneBooleanContent so this change will not disable
the optimization; the bad news is that I've been unable to come up with a
testcase to demonstrate the problem.

I have also removed a "FIXME" comment for folding "select C, X, 0" to "C & X",
since the code looks correct to me.  It could be made more aggressive by not
limiting the type to "i1", but that would then require checking for
TargetLowering::ZeroOrNegativeOneBooleanContent.  Similar changes could be
done for the other SELECT foldings, but it was decided to be not worth the
trouble and complexity (see e.g., r44663).

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

15 years agoDon't create ISD::FNEG nodes after legalize if they aren't legal.
Dan Gohman [Thu, 22 Jan 2009 21:58:43 +0000 (21:58 +0000)]
Don't create ISD::FNEG nodes after legalize if they aren't legal.

Simplify x+0 to x in unsafe-fp-math mode. This avoids a bunch of
redundant work in many cases, because in unsafe-fp-math mode,
ISD::FADD with a constant is considered free to negate, so the
DAGCombiner often negates x+0 to -0-x thinking it's free, when
in reality the end result is -x, which is more expensive than x.

Also, combine x*0 to 0.

This fixes PR3374.

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

15 years agointroduce a useful abstraction to find out if a Use is in the call position of an...
Gabor Greif [Thu, 22 Jan 2009 21:35:57 +0000 (21:35 +0000)]
introduce a useful abstraction to find out if a Use is in the call position of an instruction

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

15 years agoRegenerated configure after backing out 62553 and r62616.
Tanya Lattner [Thu, 22 Jan 2009 20:11:17 +0000 (20:11 +0000)]
Regenerated configure after backing out 62553 and r62616.

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

15 years agoRevert r62553 and r62616 due to issues with portability.
Tanya Lattner [Thu, 22 Jan 2009 20:09:20 +0000 (20:09 +0000)]
Revert r62553 and r62616 due to issues with portability.

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

15 years agorename methods in System/Host to be more consistent.
Chris Lattner [Thu, 22 Jan 2009 19:53:00 +0000 (19:53 +0000)]
rename methods in System/Host to be more consistent.

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

15 years agoDo not use buggy llvm-gcc to generate testcases.
Devang Patel [Thu, 22 Jan 2009 18:28:11 +0000 (18:28 +0000)]
Do not use buggy llvm-gcc to generate testcases.

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

15 years agoAdd SelectionDAG::getNOT method to construct bitwise NOT operations,
Bob Wilson [Thu, 22 Jan 2009 17:39:32 +0000 (17:39 +0000)]
Add SelectionDAG::getNOT method to construct bitwise NOT operations,
corresponding to the "not" and "vnot" PatFrags.  Use the new method
in some places where it seems appropriate.

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

15 years agoRemove no-longer relevant comment. Pointed out
Duncan Sands [Thu, 22 Jan 2009 15:37:29 +0000 (15:37 +0000)]
Remove no-longer relevant comment.  Pointed out
by Gabor.

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

15 years agoThis passes on linux.
Duncan Sands [Thu, 22 Jan 2009 15:07:15 +0000 (15:07 +0000)]
This passes on linux.

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

15 years agoFew targets like the tiny little PIC16 have only 16-bit pointers.
Sanjiv Gupta [Thu, 22 Jan 2009 10:14:21 +0000 (10:14 +0000)]
Few targets like the tiny little PIC16 have only 16-bit pointers.

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

15 years agoEliminate a couple of fields from TargetRegisterClass: SubRegClasses and SuperRegClas...
Evan Cheng [Thu, 22 Jan 2009 09:10:11 +0000 (09:10 +0000)]
Eliminate a couple of fields from TargetRegisterClass: SubRegClasses and SuperRegClasses. These are not necessary. Also eliminate getSubRegisterRegClass and getSuperRegisterRegClass. These are slow and their results can change if register file names change. Just use TargetLowering::getRegClassFor() to get the right TargetRegisterClass instead.

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

15 years agofix a typo
Chris Lattner [Thu, 22 Jan 2009 07:21:55 +0000 (07:21 +0000)]
fix a typo

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

15 years agoadd a note
Chris Lattner [Thu, 22 Jan 2009 07:16:03 +0000 (07:16 +0000)]
add a note

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

15 years agofix a testcase.
Chris Lattner [Thu, 22 Jan 2009 07:08:58 +0000 (07:08 +0000)]
fix a testcase.

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

15 years agoFix PR3358, a really nasty bug where recursive phi translated
Chris Lattner [Thu, 22 Jan 2009 07:04:01 +0000 (07:04 +0000)]
Fix PR3358, a really nasty bug where recursive phi translated
analyses could be run without the caches properly sorted.  This
can fix all sorts of weirdness.  Many thanks to Bill for coming
up with the 'issorted' verification idea.

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

15 years agoBump to 2.6svn.
Tanya Lattner [Thu, 22 Jan 2009 05:17:59 +0000 (05:17 +0000)]
Bump to 2.6svn.
Regenerate configure (last regen was with the wrong version).

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

15 years agoMake tblgen more portable, allowing it to build with ICC.
Chris Lattner [Thu, 22 Jan 2009 05:10:16 +0000 (05:10 +0000)]
Make tblgen more portable, allowing it to build with ICC.
Patch by Robert Zeh!

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

15 years agoDon't create .dir files in installation directories. Switch to using
Mike Stump [Thu, 22 Jan 2009 03:24:22 +0000 (03:24 +0000)]
Don't create .dir files in installation directories.  Switch to using
order-only dependancies for installation directories.

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

15 years agoThe operator<() and operator>() were reversing their tests. Have the test the correct...
Bill Wendling [Thu, 22 Jan 2009 03:05:10 +0000 (03:05 +0000)]
The operator<() and operator>() were reversing their tests. Have the test the correct way.

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

15 years agoGet rid of warning about implicit 64-to-32 bit conversions.
Bill Wendling [Thu, 22 Jan 2009 02:10:33 +0000 (02:10 +0000)]
Get rid of warning about implicit 64-to-32 bit conversions.

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

15 years agoAdd a few more notes about LLVM IR features that codegen doesn't
Dan Gohman [Thu, 22 Jan 2009 01:39:38 +0000 (01:39 +0000)]
Add a few more notes about LLVM IR features that codegen doesn't
yet support.

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

15 years agoCMake: Tests PERL availability with PERL_EXECUTABLE variable.
Oscar Fuentes [Thu, 22 Jan 2009 01:20:31 +0000 (01:20 +0000)]
CMake: Tests PERL availability with PERL_EXECUTABLE variable.

On MSVC 64bits, does not put underscore before the symbol name on the
/INCLUDE linker parameter.

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

15 years agoAdd explicit this-> (to make the VS compiler happy).
Steve Naroff [Wed, 21 Jan 2009 23:49:23 +0000 (23:49 +0000)]
Add explicit this-> (to make the VS compiler happy).

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

15 years agoRecognize inline asm for bswap on x86-64 GLIBC. This allows it
Dan Gohman [Wed, 21 Jan 2009 23:40:54 +0000 (23:40 +0000)]
Recognize inline asm for bswap on x86-64 GLIBC. This allows it
to be supported in the JIT.

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

15 years agoFix ilist two-phase name lookup
Douglas Gregor [Wed, 21 Jan 2009 22:38:44 +0000 (22:38 +0000)]
Fix ilist two-phase name lookup

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

15 years agoFix a missing word.
Dan Gohman [Wed, 21 Jan 2009 21:54:44 +0000 (21:54 +0000)]
Fix a missing word.

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

15 years agoVersions of VIM included with Intrepid and Leopard at least appear
Dan Gohman [Wed, 21 Jan 2009 21:52:42 +0000 (21:52 +0000)]
Versions of VIM included with Intrepid and Leopard at least appear
to handle symlinks just fine, so reword the instructions in the
README accordingly.

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

15 years agoEnable syntax highlighting of LLVM and tablegen files by default,
Dan Gohman [Wed, 21 Jan 2009 21:47:51 +0000 (21:47 +0000)]
Enable syntax highlighting of LLVM and tablegen files by default,
so that users don't have to copy text from the README to get this.

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

15 years agoOnly set cindent for C and C++ source files.
Dan Gohman [Wed, 21 Jan 2009 21:30:25 +0000 (21:30 +0000)]
Only set cindent for C and C++ source files.

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

15 years agoNow with RUN line.
Bill Wendling [Wed, 21 Jan 2009 21:28:03 +0000 (21:28 +0000)]
Now with RUN line.

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

15 years agoRun this through -simplifycfg and -mem2reg to test only what we need to test.
Bill Wendling [Wed, 21 Jan 2009 21:02:27 +0000 (21:02 +0000)]
Run this through -simplifycfg and -mem2reg to test only what we need to test.

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

15 years agoAdd a comment to SelectionDAG::ReplaceAllUsesWith to describe a subtle
Dan Gohman [Wed, 21 Jan 2009 20:50:09 +0000 (20:50 +0000)]
Add a comment to SelectionDAG::ReplaceAllUsesWith to describe a subtle
iteraction with SelectionDAG CSE.

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

15 years agoDo not use host floating point types when emitting
Dale Johannesen [Wed, 21 Jan 2009 20:32:55 +0000 (20:32 +0000)]
Do not use host floating point types when emitting
ASCII IR; loading and storing these can change the
bits of NaNs on some hosts.  Remove or add warnings
at a few other places using host floating point;
this is a bad thing to do in general.

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

15 years agoAlso favors NOT64r.
Evan Cheng [Wed, 21 Jan 2009 19:45:31 +0000 (19:45 +0000)]
Also favors NOT64r.

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

15 years agofix warning in release-asserts mode and spelling of assert.
Chris Lattner [Wed, 21 Jan 2009 18:38:18 +0000 (18:38 +0000)]
fix warning in release-asserts mode and spelling of assert.

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

15 years agoadd getPointerToGlobal to the C bindings, patch by Lennart Augustsson!
Chris Lattner [Wed, 21 Jan 2009 18:11:10 +0000 (18:11 +0000)]
add getPointerToGlobal to the C bindings, patch by Lennart Augustsson!
PR3364

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

15 years agoRemove uses of uint32_t in favor of 'unsigned' for better
Chris Lattner [Wed, 21 Jan 2009 18:09:24 +0000 (18:09 +0000)]
Remove uses of uint32_t in favor of 'unsigned' for better
compatibility with cygwin.  Patch by Jay Foad!

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

15 years agoSimplify ReduceLoadWidth's logic: it doesn't need several different
Dan Gohman [Wed, 21 Jan 2009 15:17:51 +0000 (15:17 +0000)]
Simplify ReduceLoadWidth's logic: it doesn't need several different
special cases after producing the new reduced-width load, because the
new load already has the needed adjustments built into it. This fixes
several bugs due to the special cases, including PR3317.

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

15 years agoFix a recent regression. ClrOpcode is not set for i8; for i8, if
Dan Gohman [Wed, 21 Jan 2009 14:50:16 +0000 (14:50 +0000)]
Fix a recent regression. ClrOpcode is not set for i8; for i8, if
we want to clear %ah to zero before a division, just use a
zero-extending mov to %al. This fixes PR3366.

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

15 years agoMimic gcc behaviour with regard to response files.
Mikhail Glushenkov [Wed, 21 Jan 2009 13:14:02 +0000 (13:14 +0000)]
Mimic gcc behaviour with regard to response files.

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

15 years agoFix 'llvm-config --libs' output.
Mikhail Glushenkov [Wed, 21 Jan 2009 13:05:00 +0000 (13:05 +0000)]
Fix 'llvm-config --libs' output.

Change the naming scheme for llvmc plugins so that they do not appear in
'llvm-config --libs' output.

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

15 years agoChange the hook API back to prevent memory leaks.
Mikhail Glushenkov [Wed, 21 Jan 2009 13:04:33 +0000 (13:04 +0000)]
Change the hook API back to prevent memory leaks.

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

15 years agoAllow hooks with arguments.
Mikhail Glushenkov [Wed, 21 Jan 2009 13:04:00 +0000 (13:04 +0000)]
Allow hooks with arguments.

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

15 years agoThis was causing invalid memory accesses when
Duncan Sands [Wed, 21 Jan 2009 11:51:17 +0000 (11:51 +0000)]
This was causing invalid memory accesses when
generating debug info in the compiler.

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

15 years agoLet's try to have our cake and eat it to: move
Duncan Sands [Wed, 21 Jan 2009 11:37:31 +0000 (11:37 +0000)]
Let's try to have our cake and eat it to: move
this test into FrontendC to ensure that llvm-gcc
is available; assemble using "llvm-gcc -xassembler"
rather than "as".

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

15 years agoDon't rely on grep -w working.
Duncan Sands [Wed, 21 Jan 2009 09:41:42 +0000 (09:41 +0000)]
Don't rely on grep -w working.

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

15 years agoFixed build warnings. Restoring changes done in 62600, they were lost in 62655.
Sanjiv Gupta [Wed, 21 Jan 2009 09:02:46 +0000 (09:02 +0000)]
Fixed build warnings. Restoring changes done in 62600, they were lost in 62655.

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

15 years agoCleanup whitespace and comments, and tweak some
Duncan Sands [Wed, 21 Jan 2009 09:00:29 +0000 (09:00 +0000)]
Cleanup whitespace and comments, and tweak some
prototypes, in operand type legalization.  No
functionality change.

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

15 years agoI accidentally removed this check in an earlier commit, which cause breakage in the...
Owen Anderson [Wed, 21 Jan 2009 08:18:03 +0000 (08:18 +0000)]
I accidentally removed this check in an earlier commit, which cause breakage in the pre alloc splitter.

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

15 years agoImplement LowerOperationWrapper for legalizer.
Sanjiv Gupta [Wed, 21 Jan 2009 05:44:05 +0000 (05:44 +0000)]
Implement LowerOperationWrapper for legalizer.
Also a few signed comparison fixes.

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

15 years agoCellSPU:
Scott Michel [Wed, 21 Jan 2009 04:58:48 +0000 (04:58 +0000)]
CellSPU:
- Ensure that (operation) legalization emits proper FDIV libcall when needed.
- Fix various bugs encountered during llvm-spu-gcc build, along with various
  cleanups.
- Start supporting double precision comparisons for remaining libgcc2 build.
  Discovered interesting DAGCombiner feature, which is currently solved via
  custom lowering (64-bit constants are not legal on CellSPU, but DAGCombiner
  insists on inserting one anyway.)
- Update README.

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

15 years agoAllow targets to legalize operations (with illegal operands) that produces multiple...
Sanjiv Gupta [Wed, 21 Jan 2009 04:48:39 +0000 (04:48 +0000)]
Allow targets to legalize operations (with illegal operands) that produces multiple values. For example, a load with an illegal operand (a load produces two values, a value and chain).

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

15 years agoFavors generating "not" over "xor -1". For example.
Evan Cheng [Wed, 21 Jan 2009 02:09:05 +0000 (02:09 +0000)]
Favors generating "not" over "xor -1". For example.
unsigned test(unsigned a) {
  return ~a;
}
llvm used to generate:
movl    $4294967295, %eax
xorl    4(%esp), %eax

Now it generates:
movl      4(%esp), %eax
notl      %eax

It's 3 bytes shorter.

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

15 years agoDisable on x86_64 until I figure out what's wrong.
Dale Johannesen [Wed, 21 Jan 2009 02:08:30 +0000 (02:08 +0000)]
Disable on x86_64 until I figure out what's wrong.

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

15 years agoMake special cases (0 inf nan) work for frem.
Dale Johannesen [Wed, 21 Jan 2009 00:35:19 +0000 (00:35 +0000)]
Make special cases (0 inf nan) work for frem.
Besides APFloat, this involved removing code
from two places that thought they knew the
result of frem(0., x) but were wrong.

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

15 years agoBe more aggressive about renumbering vregs after splitting them.
Owen Anderson [Wed, 21 Jan 2009 00:13:28 +0000 (00:13 +0000)]
Be more aggressive about renumbering vregs after splitting them.

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

15 years agoEncode member accessibility.
Devang Patel [Wed, 21 Jan 2009 00:08:04 +0000 (00:08 +0000)]
Encode member accessibility.

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

15 years agoAppropriately mark fowrad decls.
Devang Patel [Tue, 20 Jan 2009 22:27:02 +0000 (22:27 +0000)]
Appropriately mark fowrad decls.

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

15 years agoNeed compile unit to find location.
Devang Patel [Tue, 20 Jan 2009 22:26:11 +0000 (22:26 +0000)]
Need compile unit to find location.

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

15 years agoCalls to fmod, it turns out, are constant-folded by
Dale Johannesen [Tue, 20 Jan 2009 21:58:13 +0000 (21:58 +0000)]
Calls to fmod, it turns out, are constant-folded by
invoking the host fmod, not by lowering to frem and
constant-folding that.  Fix this so it tests what I
want to test.

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

15 years agoDon't bother running the assembler, we don't know that it will be configured
Chris Lattner [Tue, 20 Jan 2009 21:41:53 +0000 (21:41 +0000)]
Don't bother running the assembler, we don't know that it will be configured
for whatever llc defaults to.  This fixes PR3363

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

15 years agoFix PR3243: a LiveVariables bug. When HandlePhysRegKill is checking whether the last...
Evan Cheng [Tue, 20 Jan 2009 21:25:12 +0000 (21:25 +0000)]
Fix PR3243: a LiveVariables bug. When HandlePhysRegKill is checking whether the last reference is also the last def (i.e. dead def), it should also check if last reference is the current machine instruction being processed. This can happen when it is processing a physical register use and setting the current machine instruction as sub-register's last ref.

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

15 years agoFix typo. Patch by Alexei Svitkine.
Duncan Sands [Tue, 20 Jan 2009 21:20:23 +0000 (21:20 +0000)]
Fix typo.  Patch by Alexei Svitkine.

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

15 years agoUse "SINT_TO_FP" instead of "UINT_TO_FP" when getting the exponent. This was
Bill Wendling [Tue, 20 Jan 2009 21:17:57 +0000 (21:17 +0000)]
Use "SINT_TO_FP" instead of "UINT_TO_FP" when getting the exponent. This was
causing the limited precision stuff to produce the wrong result for values in
the range [0, 1).

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

15 years agoFix struct member's debug info.
Devang Patel [Tue, 20 Jan 2009 21:02:02 +0000 (21:02 +0000)]
Fix struct member's debug info.

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

15 years agoAdd test case for PR3154.
Evan Cheng [Tue, 20 Jan 2009 19:29:54 +0000 (19:29 +0000)]
Add test case for PR3154.

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

15 years agoindentation...
Devang Patel [Tue, 20 Jan 2009 19:23:29 +0000 (19:23 +0000)]
indentation...

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

15 years agoNeed only one set of debug info versions enum.
Devang Patel [Tue, 20 Jan 2009 19:22:03 +0000 (19:22 +0000)]
Need only one set of debug info versions enum.

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

15 years agoChange TargetInstrInfo::isMoveInstr to return source and destination sub-register...
Evan Cheng [Tue, 20 Jan 2009 19:12:24 +0000 (19:12 +0000)]
Change TargetInstrInfo::isMoveInstr to return source and destination sub-register indices as well.

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

15 years agozap white spaces.
Devang Patel [Tue, 20 Jan 2009 19:08:39 +0000 (19:08 +0000)]
zap white spaces.

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

15 years agoFix global variable's address in a DIE.
Devang Patel [Tue, 20 Jan 2009 18:55:39 +0000 (18:55 +0000)]
Fix global variable's address in a DIE.

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

15 years agoEnable debug info for enums.
Devang Patel [Tue, 20 Jan 2009 18:35:14 +0000 (18:35 +0000)]
Enable debug info for enums.

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

15 years agoAdd an IEEE remainder function, which is not
Dale Johannesen [Tue, 20 Jan 2009 18:35:05 +0000 (18:35 +0000)]
Add an IEEE remainder function, which is not
fully implemented yet and not used.  This is
mainly to clarify that APFloat::mod implements
C fmod, not remainder.

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

15 years agoimprove compatibility with various versions of graphviz, patch by
Chris Lattner [Tue, 20 Jan 2009 18:25:03 +0000 (18:25 +0000)]
improve compatibility with various versions of graphviz, patch by
Patrick Boettcher!

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

15 years agoeliminate use of uint32_t to improve compatibility with cygwin
Chris Lattner [Tue, 20 Jan 2009 18:23:14 +0000 (18:23 +0000)]
eliminate use of uint32_t to improve compatibility with cygwin

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

15 years agoEliminate use of uint32_t to improve compatibility with cygwin
Chris Lattner [Tue, 20 Jan 2009 18:22:57 +0000 (18:22 +0000)]
Eliminate use of uint32_t to improve compatibility with cygwin

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

15 years agoEnable debug info for composite types.
Devang Patel [Tue, 20 Jan 2009 18:13:03 +0000 (18:13 +0000)]
Enable debug info for composite types.

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

15 years agoCheck that the "don't barf on k8" fix is not
Duncan Sands [Tue, 20 Jan 2009 18:08:39 +0000 (18:08 +0000)]
Check that the "don't barf on k8" fix is not
accidentally reverted again.

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

15 years agoSpacing
Evan Cheng [Tue, 20 Jan 2009 17:30:40 +0000 (17:30 +0000)]
Spacing

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

15 years agoTemporarily XFAIL until this can be looked at. r62557 is what caused it to start...
Bill Wendling [Tue, 20 Jan 2009 10:28:39 +0000 (10:28 +0000)]
Temporarily XFAIL until this can be looked at. r62557 is what caused it to start failing.

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

15 years agoIf a vector is empty, you're not allowed to access any
Duncan Sands [Tue, 20 Jan 2009 09:05:19 +0000 (09:05 +0000)]
If a vector is empty, you're not allowed to access any
elements, even if it is only to take the address.  Test:
break-anti-dependencies.ll with ENABLE_EXPENSIVE_CHECKS.

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

15 years agoRefactor code. No functionality change.
Evan Cheng [Tue, 20 Jan 2009 06:44:16 +0000 (06:44 +0000)]
Refactor code. No functionality change.

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

15 years agoTestcase for limited precision stuff.
Bill Wendling [Tue, 20 Jan 2009 06:23:59 +0000 (06:23 +0000)]
Testcase for limited precision stuff.

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

15 years agoShift types need to match.
Bill Wendling [Tue, 20 Jan 2009 06:10:42 +0000 (06:10 +0000)]
Shift types need to match.

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

15 years agoanother fix for PR3354
Chris Lattner [Tue, 20 Jan 2009 01:15:41 +0000 (01:15 +0000)]
another fix for PR3354

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

15 years agoAdd a README entry noticed while investigating PR3216.
Dan Gohman [Tue, 20 Jan 2009 01:07:33 +0000 (01:07 +0000)]
Add a README entry noticed while investigating PR3216.

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

15 years agoFix a dagcombine to not generate loads of non-round integer types,
Dan Gohman [Tue, 20 Jan 2009 01:06:45 +0000 (01:06 +0000)]
Fix a dagcombine to not generate loads of non-round integer types,
as its comment says, even in the case where it will be generating
extending loads. This fixes PR3216.

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

15 years agoDo not use DenseMap because the iterator is invalidated while constructing types...
Devang Patel [Tue, 20 Jan 2009 00:58:55 +0000 (00:58 +0000)]
Do not use DenseMap because the iterator is invalidated while constructing types. After all there was a reason why std::map was used initially!

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