oota-llvm.git
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

15 years agoRegenerate.
Nick Lewycky [Tue, 20 Jan 2009 00:52:24 +0000 (00:52 +0000)]
Regenerate.

BUILT WITH WRONG VERSION OF AUTOCONF! Somebody please regenerate with an
approved version. Thanks!

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

15 years agoMake the Interpreter use libffi if it's available. Patch from Alexei Svitkine!
Nick Lewycky [Tue, 20 Jan 2009 00:51:40 +0000 (00:51 +0000)]
Make the Interpreter use libffi if it's available. Patch from Alexei Svitkine!

This requires a rebuild of 'configure' itself. I will be committing that next, but
built with the wrong version of autoconf. Somebody who has the right one, please update
it.

As a side-note, because of the way autoconf works, all built tools will link against
libffi, not just lli. If you know how to fix this, please let me know ...

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

15 years agoMake linear scan's trivial coalescer slightly more aggressive.
Evan Cheng [Tue, 20 Jan 2009 00:16:18 +0000 (00:16 +0000)]
Make linear scan's trivial coalescer slightly more aggressive.

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

15 years agoDoxygen-ify comments.
Bill Wendling [Mon, 19 Jan 2009 23:43:56 +0000 (23:43 +0000)]
Doxygen-ify comments.

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

15 years agoVerify debug info.
Devang Patel [Mon, 19 Jan 2009 23:21:49 +0000 (23:21 +0000)]
Verify debug info.

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

15 years agoFix a problem exposed by PR3354: simplifycfg was making a potentially
Chris Lattner [Mon, 19 Jan 2009 23:03:13 +0000 (23:03 +0000)]
Fix a problem exposed by PR3354: simplifycfg was making a potentially
trapping instruction be executed unconditionally.

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

15 years agoRemove SDNode's virtual destructor. This makes it impossible for
Dan Gohman [Mon, 19 Jan 2009 22:39:36 +0000 (22:39 +0000)]
Remove SDNode's virtual destructor. This makes it impossible for
SDNode subclasses to keep state that requires non-trivial
destructors, however it was already effectively impossible,
since the destructor isn't actually ever called. There currently
aren't any SDNode subclasses affected by this, and in general
it's desireable to keep SDNode objects light-weight.

This eliminates the last virtual member function in the SDNode
class, so it eliminates the need for a vtable pointer, making
SDNode smaller.

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

15 years agoMove & restructure test per review.
Dale Johannesen [Mon, 19 Jan 2009 22:33:12 +0000 (22:33 +0000)]
Move & restructure test per review.

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

15 years agoconvert this to an unfoldable potentially trapping constant expr.
Chris Lattner [Mon, 19 Jan 2009 22:12:33 +0000 (22:12 +0000)]
convert this to an unfoldable potentially trapping constant expr.

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

15 years agoimprove compatibility with cygwin, patch by Jay Foad!
Chris Lattner [Mon, 19 Jan 2009 22:00:18 +0000 (22:00 +0000)]
improve compatibility with cygwin, patch by Jay Foad!

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

15 years agodiv/rem by zero and div/rem overflow are both undefined according to
Chris Lattner [Mon, 19 Jan 2009 21:55:26 +0000 (21:55 +0000)]
div/rem by zero and div/rem overflow are both undefined according to
langref.  Constant fold them to undef instead of trying to preserve
the trap.  This fixes PR3354.

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

15 years agoFix SelectionDAG::ReplaceAllUsesWith to behave correctly when
Dan Gohman [Mon, 19 Jan 2009 21:44:21 +0000 (21:44 +0000)]
Fix SelectionDAG::ReplaceAllUsesWith to behave correctly when
uses are added to the From node while it is processing From's
use list, because of automatic local CSE. The fix is to avoid
visiting any new uses.

Fix a few places in the DAGCombiner that assumed that after
a RAUW call, the From node has no users and may be deleted.

This fixes PR3018.

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

15 years agoFix PR3353, infinitely jump threading an infinite loop make from switches.
Chris Lattner [Mon, 19 Jan 2009 21:20:34 +0000 (21:20 +0000)]
Fix PR3353, infinitely jump threading an infinite loop make from switches.

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

15 years agocompile-time fmod was done incorrectly. PR 3316.
Dale Johannesen [Mon, 19 Jan 2009 21:17:05 +0000 (21:17 +0000)]
compile-time fmod was done incorrectly.  PR 3316.

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

15 years agoDebugInfo is a lightweight APIs and consumers are expected to use light objects direc...
Devang Patel [Mon, 19 Jan 2009 21:13:39 +0000 (21:13 +0000)]
DebugInfo is a lightweight APIs and consumers are expected to use light objects directly. There is no need to support isa<>, dyn_cast<> etc...

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