oota-llvm.git
18 years agoFix -pedantic warnings
Chris Lattner [Thu, 1 Jun 2006 17:27:11 +0000 (17:27 +0000)]
Fix -pedantic warnings

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

18 years agoFix -pedantic warning
Chris Lattner [Thu, 1 Jun 2006 17:17:46 +0000 (17:17 +0000)]
Fix -pedantic warning

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

18 years agoSilence -pedantic warning
Chris Lattner [Thu, 1 Jun 2006 17:17:06 +0000 (17:17 +0000)]
Silence -pedantic warning

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

18 years agoSilence a -pedantic warning.
Chris Lattner [Thu, 1 Jun 2006 17:16:21 +0000 (17:16 +0000)]
Silence a -pedantic warning.

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

18 years agoMake sure that when checking for MINGW32 libraries we ask for windows.h
Reid Spencer [Thu, 1 Jun 2006 17:16:20 +0000 (17:16 +0000)]
Make sure that when checking for MINGW32 libraries we ask for windows.h

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

18 years agoSilence -pedantic warning.
Chris Lattner [Thu, 1 Jun 2006 17:13:10 +0000 (17:13 +0000)]
Silence -pedantic warning.

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

18 years agoSilence some -pedantic warnings.
Chris Lattner [Thu, 1 Jun 2006 17:12:14 +0000 (17:12 +0000)]
Silence some -pedantic warnings.

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

18 years agoProvide support for detecting if the Win32 imaghlp and psapi libraries
Reid Spencer [Thu, 1 Jun 2006 16:55:59 +0000 (16:55 +0000)]
Provide support for detecting if the Win32 imaghlp and psapi libraries
are available. These libraries are used in lib/System and should be
included on the link line or if not available generate an error when
building lib/System.

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

18 years agoFix a typo
Chris Lattner [Thu, 1 Jun 2006 16:48:56 +0000 (16:48 +0000)]
Fix a typo

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

18 years agoMake a shorthand target for running the llvm2cpp test suite. This test
Reid Spencer [Thu, 1 Jun 2006 07:27:53 +0000 (07:27 +0000)]
Make a shorthand target for running the llvm2cpp test suite. This test
suite is disabled by default because of the length of time it takes to
run. To enable it certain command line fu must be used. This patch just
encodes the command line fu as the magical "check-llvm2cpp" target.

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

18 years agoRestore default arguments for llvm2cpp back to health by declaring an
Reid Spencer [Thu, 1 Jun 2006 07:24:29 +0000 (07:24 +0000)]
Restore default arguments for llvm2cpp back to health by declaring an
emitted variable to actually have a type (picky, picky, picky!)

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

18 years agoNo, libLLVMbzip2 does not have a .a suffix.
Reid Spencer [Thu, 1 Jun 2006 07:23:32 +0000 (07:23 +0000)]
No, libLLVMbzip2 does not have a .a suffix.

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

18 years agoFix gcc command line options after LLVMCore and LLVMbzip2 became archive
Reid Spencer [Thu, 1 Jun 2006 07:19:28 +0000 (07:19 +0000)]
Fix gcc command line options after LLVMCore and LLVMbzip2 became archive
libraries.

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

18 years agoFavor C++ casts over C casts in C++ code.
Reid Spencer [Thu, 1 Jun 2006 07:03:53 +0000 (07:03 +0000)]
Favor C++ casts over C casts in C++ code.

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

18 years agoChange from using a stub function to a stub variable for passing to the
Reid Spencer [Thu, 1 Jun 2006 07:02:51 +0000 (07:02 +0000)]
Change from using a stub function to a stub variable for passing to the
IncludeFile hack to ensure linkage of analysis passes. This works around
some -pedantic warnings about assigning an object to a function.

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

18 years agoPrevent the -pedantic option from causing Mac OS/X build problems:
Reid Spencer [Thu, 1 Jun 2006 06:12:21 +0000 (06:12 +0000)]
Prevent the -pedantic option from causing Mac OS/X build problems:
LiveIntervalAnalysis.cpp:218: error: floating constant exceeds range of 'double'

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

18 years agoRemove a FIXME that was fixed with my last patch.
Owen Anderson [Thu, 1 Jun 2006 06:07:40 +0000 (06:07 +0000)]
Remove a FIXME that was fixed with my last patch.

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

18 years agoMore cleanups. Also, add a special case for updating PHI nodes, and
Owen Anderson [Thu, 1 Jun 2006 06:05:47 +0000 (06:05 +0000)]
More cleanups.  Also, add a special case for updating PHI nodes, and
reimplement getValueDominatingFunction to walk the DominanceTree rather than
just searching blindly.

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

18 years agoTypos
Evan Cheng [Thu, 1 Jun 2006 05:53:27 +0000 (05:53 +0000)]
Typos

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

18 years agoFor PR786:
Reid Spencer [Thu, 1 Jun 2006 05:49:51 +0000 (05:49 +0000)]
For PR786:
Don't warn about -pedantic errors. Add a note to the PR instead.

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

18 years agoFix a bug where incorrect C++ was being emitted.
Reid Spencer [Thu, 1 Jun 2006 04:21:20 +0000 (04:21 +0000)]
Fix a bug where incorrect C++ was being emitted.

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

18 years agoFor PR786:
Reid Spencer [Thu, 1 Jun 2006 01:55:21 +0000 (01:55 +0000)]
For PR786:
Turn -pedantic and -Wno-long-long compile flags on by default. In a few
places, avoid the warnings by removing these options in the local makefile.
One notable exception: lib/Target/CBackend/Writer.cpp. These warnings are
left on as a reminder to developers to clean them up.

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

18 years agoBuild llvm-config into the ToolDir not in the local directory. This makes
Reid Spencer [Thu, 1 Jun 2006 01:52:49 +0000 (01:52 +0000)]
Build llvm-config into the ToolDir not in the local directory. This makes
it more likely to be in a developer's path and consistent with all the
other tools.

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

18 years agoPut an innocuous statement in this file to quelch warnings about compiling
Reid Spencer [Thu, 1 Jun 2006 01:49:08 +0000 (01:49 +0000)]
Put an innocuous statement in this file to quelch warnings about compiling
an empty file.

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

18 years agoOops, llc needs libTarget.a not Target.o
Reid Spencer [Thu, 1 Jun 2006 01:42:33 +0000 (01:42 +0000)]
Oops, llc needs libTarget.a not Target.o

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

18 years agoUse archive libraries instead of object files for VMCore, BCReader,
Reid Spencer [Thu, 1 Jun 2006 01:30:27 +0000 (01:30 +0000)]
Use archive libraries instead of object files for VMCore, BCReader,
BCWriter, and bzip2 libraries. Adjust the various makefiles to accommodate
these changes. This was done to speed up link times.

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

18 years agoSupport correct build:
Reid Spencer [Thu, 1 Jun 2006 01:09:43 +0000 (01:09 +0000)]
Support correct build:
1. Capture the ENABLE_THREADS configure variable in Makefile.config
2. Use ENABLE_THREADS to avoid building ParallelJIT if threads are not
   present.

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

18 years agoTighten this script up a bit.
Reid Spencer [Thu, 1 Jun 2006 01:08:28 +0000 (01:08 +0000)]
Tighten this script up a bit.

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

18 years agoRemove a warning
Evan Cheng [Thu, 1 Jun 2006 00:30:39 +0000 (00:30 +0000)]
Remove a warning

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

18 years agoRename ASM modifier trunc8, trunc16 to subreg8, subreg16.
Evan Cheng [Wed, 31 May 2006 22:34:26 +0000 (22:34 +0000)]
Rename ASM modifier trunc8, trunc16 to subreg8, subreg16.

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

18 years agoFix casting so there's no warning on Alpha.
Reid Spencer [Wed, 31 May 2006 22:26:11 +0000 (22:26 +0000)]
Fix casting so there's no warning on Alpha.

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

18 years agoAdd my most recent work.
Owen Anderson [Wed, 31 May 2006 22:15:45 +0000 (22:15 +0000)]
Add my most recent work.

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

18 years agoSign extender
Evan Cheng [Wed, 31 May 2006 22:05:11 +0000 (22:05 +0000)]
Sign extender

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

18 years agoSquelch this warning:
Reid Spencer [Wed, 31 May 2006 21:53:42 +0000 (21:53 +0000)]
Squelch this warning:
/bzlib.c:126: warning: string length `1056' is greater than the length `509' ISO
C89 compilers are required to support

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

18 years agoFix utostr once and for all, by making there only be one function named
Chris Lattner [Wed, 31 May 2006 21:25:50 +0000 (21:25 +0000)]
Fix utostr once and for all, by making there only be one function named
utostr.  To keep the efficiency in the 32-bit case, make it check to see if
the value is 32-bits and if so switch over to the faster 32-bit case.

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

18 years agoSwap the order of operands created here. For +&|^, the order doesn't matter,
Chris Lattner [Wed, 31 May 2006 21:14:00 +0000 (21:14 +0000)]
Swap the order of operands created here.  For +&|^, the order doesn't matter,
but for sub, it really does!  Fix fixes a miscompilation of fibheap_cut in
llvmgcc4.

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

18 years agoExtract a huge loop into a helper method. Fix a few iterator-invalidation bugs.
Owen Anderson [Wed, 31 May 2006 20:55:06 +0000 (20:55 +0000)]
Extract a huge loop into a helper method.  Fix a few iterator-invalidation bugs.

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

18 years ago4 billion names is enough for anyone. And really fix the build on alpha this time
Andrew Lenharth [Wed, 31 May 2006 20:40:36 +0000 (20:40 +0000)]
4 billion names is enough for anyone.  And really fix the build on alpha this time

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

18 years agofix utostr
Andrew Lenharth [Wed, 31 May 2006 20:18:56 +0000 (20:18 +0000)]
fix utostr

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

18 years agoFix build breakage on alpha, without causing it on x86. as a bonus, all platforms...
Andrew Lenharth [Wed, 31 May 2006 20:18:28 +0000 (20:18 +0000)]
Fix build breakage on alpha, without causing it on x86.  as a bonus, all platforms can invent the same number of unique names now

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

18 years agorevert for now
Andrew Lenharth [Wed, 31 May 2006 19:16:26 +0000 (19:16 +0000)]
revert for now

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

18 years agoRename instructions for consistency sake.
Evan Cheng [Wed, 31 May 2006 19:00:07 +0000 (19:00 +0000)]
Rename instructions for consistency sake.

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

18 years agomake 64-bit safe and fix the build on alpha
Andrew Lenharth [Wed, 31 May 2006 18:56:42 +0000 (18:56 +0000)]
make 64-bit safe and fix the build on alpha

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

18 years agocommuteInstruction() does not always create a new MI!
Evan Cheng [Wed, 31 May 2006 18:03:39 +0000 (18:03 +0000)]
commuteInstruction() does not always create a new MI!

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

18 years agoAdd a brief description for the tblgen program. More detail is needed but
Reid Spencer [Wed, 31 May 2006 17:54:39 +0000 (17:54 +0000)]
Add a brief description for the tblgen program. More detail is needed but
the current author is not the person to provide it. Now that the file
exists, perhaps others will chime in and embellish.

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

18 years agoUpdate the documentation for llvm2cpp after the -gen-* options were added.
Reid Spencer [Wed, 31 May 2006 17:32:21 +0000 (17:32 +0000)]
Update the documentation for llvm2cpp after the -gen-* options were added.

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

18 years agoMajor reorganization and extension of the code. The diff on this will be a
Reid Spencer [Wed, 31 May 2006 17:31:38 +0000 (17:31 +0000)]
Major reorganization and extension of the code. The diff on this will be a
mess as functions were moved around into a better ordering. The code was
extended to provide various -gen-* options to better control what the
generated output should be. Currently it is possible to generate entire
modules (three different ways), functions, global variables, and types.

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

18 years agoMake the getNamedFunction and getNamedGlobal methods be const. They don't
Reid Spencer [Wed, 31 May 2006 16:40:28 +0000 (16:40 +0000)]
Make the getNamedFunction and getNamedGlobal methods be const. They don't
change the module in any way and we should enforce that.

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

18 years agoClarify type naming.
Vladimir Prus [Wed, 31 May 2006 16:03:20 +0000 (16:03 +0000)]
Clarify type naming.

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

18 years agoImprove InstVisitor docs.
Vladimir Prus [Wed, 31 May 2006 15:30:18 +0000 (15:30 +0000)]
Improve InstVisitor docs.

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

18 years agoEliminate a memory leak.
Evan Cheng [Wed, 31 May 2006 07:13:03 +0000 (07:13 +0000)]
Eliminate a memory leak.

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

18 years agovisitVBinOp: Can't fold divide by zero!
Evan Cheng [Wed, 31 May 2006 06:08:35 +0000 (06:08 +0000)]
visitVBinOp: Can't fold divide by zero!

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

18 years agoDon't generate module definitions when the -fragment option is given.
Reid Spencer [Wed, 31 May 2006 04:43:19 +0000 (04:43 +0000)]
Don't generate module definitions when the -fragment option is given.

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

18 years agoSelect vector_shuffle v1, undef <2, 3, ?, ?> to MOVHLPS.
Evan Cheng [Wed, 31 May 2006 00:51:37 +0000 (00:51 +0000)]
Select vector_shuffle v1, undef <2, 3, ?, ?> to MOVHLPS.

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

18 years agoRemove dead code.
Evan Cheng [Wed, 31 May 2006 00:50:42 +0000 (00:50 +0000)]
Remove dead code.

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

18 years agoUpdate vector extract test cases.
Evan Cheng [Wed, 31 May 2006 00:48:09 +0000 (00:48 +0000)]
Update vector extract test cases.

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

18 years agoA new entry
Evan Cheng [Tue, 30 May 2006 23:56:31 +0000 (23:56 +0000)]
A new entry

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

18 years agoMAXP{D|S} and MINP{D|S} are commutable.
Evan Cheng [Tue, 30 May 2006 23:47:30 +0000 (23:47 +0000)]
MAXP{D|S} and MINP{D|S} are commutable.

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

18 years agoCommute shufps / shufpd.
Evan Cheng [Tue, 30 May 2006 23:34:30 +0000 (23:34 +0000)]
Commute shufps / shufpd.

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

18 years ago1. No need to thwart this test with an environment variable. Turning it off
Reid Spencer [Tue, 30 May 2006 23:07:17 +0000 (23:07 +0000)]
1. No need to thwart this test with an environment variable. Turning it off
   is the default and handled by the makefile system and runtest
2. Redirect stderr of llvm-as and llvm2cpp so that warning messages about
   instrinsics don't cause Tcl to report the run as failed.

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

18 years agoSomehow I lost a condition when I was shuffling some code around. Anyway,
Evan Cheng [Tue, 30 May 2006 22:13:36 +0000 (22:13 +0000)]
Somehow I lost a condition when I was shuffling some code around. Anyway,
only transform a shufps to pshufd when the first two operands are the same.

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

18 years agoFix a build breaker.
Evan Cheng [Tue, 30 May 2006 21:45:53 +0000 (21:45 +0000)]
Fix a build breaker.

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

18 years agoOops. PSHUFD is only available with SSE2.
Evan Cheng [Tue, 30 May 2006 21:30:59 +0000 (21:30 +0000)]
Oops. PSHUFD is only available with SSE2.

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

18 years agoAdd a note
Chris Lattner [Tue, 30 May 2006 21:29:15 +0000 (21:29 +0000)]
Add a note

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

18 years agoAlways reserve space for 8 spilled GPRs. GCC apparently assumes that this
Chris Lattner [Tue, 30 May 2006 21:21:04 +0000 (21:21 +0000)]
Always reserve space for 8 spilled GPRs.  GCC apparently assumes that this
space will be available, even if the callee isn't varargs.

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

18 years agollvm2cpp is ready to be compiled so add it to the makefile, but make it
Reid Spencer [Tue, 30 May 2006 21:20:55 +0000 (21:20 +0000)]
llvm2cpp is ready to be compiled so add it to the makefile, but make it
optional.

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

18 years agoAdd the new command line arguments.
Reid Spencer [Tue, 30 May 2006 21:19:29 +0000 (21:19 +0000)]
Add the new command line arguments.

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

18 years agoFix more bugs. This version now passes all of the Feature test except for
Reid Spencer [Tue, 30 May 2006 21:18:23 +0000 (21:18 +0000)]
Fix more bugs. This version now passes all of the Feature test except for
a floating point conversion problem with NAN in intrinsics.ll. llvm2cpp
makes an attempt to provide the correct conversion, based on the
implementation in the CBackend writer, but it doesn't get NAN correct.

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

18 years agoAdded a test case for parameter passing of vector values.
Evan Cheng [Tue, 30 May 2006 20:37:00 +0000 (20:37 +0000)]
Added a test case for parameter passing of vector values.

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

18 years agoFix the test failure on non-Darwin targets.
Evan Cheng [Tue, 30 May 2006 20:35:46 +0000 (20:35 +0000)]
Fix the test failure on non-Darwin targets.

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

18 years agoAllow shufps x, x, mask to be converted to pshufd x, mask to save a move.
Evan Cheng [Tue, 30 May 2006 20:26:50 +0000 (20:26 +0000)]
Allow shufps x, x, mask to be converted to pshufd x, mask to save a move.

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

18 years agoRemove bogus comment.
Evan Cheng [Tue, 30 May 2006 20:24:48 +0000 (20:24 +0000)]
Remove bogus comment.

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

18 years agoAdd llvm2cpp program.
Reid Spencer [Tue, 30 May 2006 19:56:31 +0000 (19:56 +0000)]
Add llvm2cpp program.

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

18 years agoProvide a simpler interface for getting a ConstantArray from a character
Reid Spencer [Tue, 30 May 2006 18:15:07 +0000 (18:15 +0000)]
Provide a simpler interface for getting a ConstantArray from a character
string. Instead of specifying the length, just specify whether the user
wants a terminating null or not. The default is "true" to retain the same
behavior as previously provided by this function.

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

18 years agoMake sure the register pressure reduction schedulers work for non-uniform
Evan Cheng [Tue, 30 May 2006 18:05:39 +0000 (18:05 +0000)]
Make sure the register pressure reduction schedulers work for non-uniform
latency targets, e.g. PPC32.

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

18 years agoWhen a priority_queue is empty, the behavior of top() operator is
Evan Cheng [Tue, 30 May 2006 18:04:34 +0000 (18:04 +0000)]
When a priority_queue is empty, the behavior of top() operator is
non-deterministic. Returns NULL when it's empty!

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

18 years agoExpand ret into "CopyToReg;BRIND"
Rafael Espindola [Tue, 30 May 2006 17:33:19 +0000 (17:33 +0000)]
Expand ret into "CopyToReg;BRIND"

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

18 years agoEnable -fno-use-cxa-atexit on darwin/ppc also.
Chris Lattner [Tue, 30 May 2006 16:38:06 +0000 (16:38 +0000)]
Enable -fno-use-cxa-atexit on darwin/ppc also.

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

18 years agoUndo a patch that breaks llvm-as because the warning message is written to
Reid Spencer [Tue, 30 May 2006 16:34:59 +0000 (16:34 +0000)]
Undo a patch that breaks llvm-as because the warning message is written to
stdout when the output of llvm-as is also written to stdout. We'll have to
fix tcl some other way.

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

18 years agoWrite the WARNING message to cout instead of cerr. Writing to cerr causes
Reid Spencer [Tue, 30 May 2006 16:05:59 +0000 (16:05 +0000)]
Write the WARNING message to cout instead of cerr. Writing to cerr causes
Tcl to claim that the program had an error and thus produces errors in
the dejagnu testing when its really just a warning.

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

18 years agoMake doc comment visible in doxygen output. Clarify Type construction.
Vladimir Prus [Tue, 30 May 2006 15:49:30 +0000 (15:49 +0000)]
Make doc comment visible in doxygen output. Clarify Type construction.

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

18 years agoFix many small bugs in llvm2cpp. This patch gets llvm2cpp working with
Reid Spencer [Tue, 30 May 2006 10:21:41 +0000 (10:21 +0000)]
Fix many small bugs in llvm2cpp. This patch gets llvm2cpp working with
everything except PHI nodes and one odd recurse/opaque type situation.
PHI nodes forward reference INSTRUCTIONS (aaaaaaaahhhhhhh!) :)

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

18 years agoProperly document the second form of ConstArray::get()
Reid Spencer [Tue, 30 May 2006 08:26:13 +0000 (08:26 +0000)]
Properly document the second form of ConstArray::get()

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

18 years agoAdjust the interface to ConstantArray::get. The previous
Reid Spencer [Tue, 30 May 2006 08:23:18 +0000 (08:23 +0000)]
Adjust the interface to ConstantArray::get. The previous
implementation always added a null byte to the end of the string. It turns
out that this is not always wanted. By adding a length parameter we preserve
this behavior when length==0 (default value) but also allow other lengths
(not null terminated) to be created.

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

18 years agoAdd a note about integer multiplication by constants.
Evan Cheng [Tue, 30 May 2006 07:37:37 +0000 (07:37 +0000)]
Add a note about integer multiplication by constants.

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

18 years agoA addressing mode folding enhancement:
Evan Cheng [Tue, 30 May 2006 06:59:36 +0000 (06:59 +0000)]
A addressing mode folding enhancement:
Fold c2 in (x << c1) | c2 where (c2 < c1)
e.g.
int test(int x) {
  return (x << 3) + 7;
}

This can be codegen'd as:
leal 7(,%eax,8), %eax

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

18 years agoAdd a lea instruction selection test case.
Evan Cheng [Tue, 30 May 2006 06:53:55 +0000 (06:53 +0000)]
Add a lea instruction selection test case.

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

18 years agoSome new entries about truncate / anyext
Evan Cheng [Tue, 30 May 2006 06:23:50 +0000 (06:23 +0000)]
Some new entries about truncate / anyext

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

18 years agoFirst complete version of llvm2cpp that doesn't crash on any of the Feature
Reid Spencer [Tue, 30 May 2006 03:43:49 +0000 (03:43 +0000)]
First complete version of llvm2cpp that doesn't crash on any of the Feature
tests. The output in a few cases still doesn't compile, however.

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

18 years agomove calltarget to dsa
Andrew Lenharth [Mon, 29 May 2006 23:39:48 +0000 (23:39 +0000)]
move calltarget to dsa

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

18 years agoSince there was interest on the mailing list, this is a utility pass that
Andrew Lenharth [Mon, 29 May 2006 22:58:38 +0000 (22:58 +0000)]
Since there was interest on the mailing list, this is a utility pass that
uses DSA to make find targets of calls.  It provides a very convinient
interface to DSA results to do things with indirect calls, such as
write a devirtualizer (which I have and may commit one of these days).

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

18 years agoSilly cleanup
Chris Lattner [Mon, 29 May 2006 18:52:52 +0000 (18:52 +0000)]
Silly cleanup

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

18 years agosilly cleanup
Chris Lattner [Mon, 29 May 2006 18:52:05 +0000 (18:52 +0000)]
silly cleanup

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

18 years agoFix a bug with diffing the wrong files. Make output more readable.
Reid Spencer [Mon, 29 May 2006 18:09:38 +0000 (18:09 +0000)]
Fix a bug with diffing the wrong files. Make output more readable.

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

18 years agoNext batch of implementation:
Reid Spencer [Mon, 29 May 2006 18:08:06 +0000 (18:08 +0000)]
Next batch of implementation:
1. Get rid of old AsmWriter cruft that's not needed.
2. Implement several instructions. Enough to get by globalvars.ll and
   alignment.ll in the Feature test suite.
3. Handle constants properly (don't repeat definitions).
4. Make the output compatible with llvm-dis for diff purposes.

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

18 years agoFix file header comment.
Reid Spencer [Mon, 29 May 2006 18:06:28 +0000 (18:06 +0000)]
Fix file header comment.

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

18 years agoRemove temporary testing rules.
Reid Spencer [Mon, 29 May 2006 18:05:59 +0000 (18:05 +0000)]
Remove temporary testing rules.

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

18 years agoReset DEBUG_SYMBOL_TABLE back to 0.
Vladimir Prus [Mon, 29 May 2006 12:54:52 +0000 (12:54 +0000)]
Reset DEBUG_SYMBOL_TABLE back to 0.

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

18 years agoFix compile error when DEBUG_SYMBOL_TABLE is defined.
Vladimir Prus [Mon, 29 May 2006 12:45:15 +0000 (12:45 +0000)]
Fix compile error when DEBUG_SYMBOL_TABLE is defined.

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

18 years agoFix two bugs in the CppWriter.cpp:
Reid Spencer [Mon, 29 May 2006 02:58:15 +0000 (02:58 +0000)]
Fix two bugs in the CppWriter.cpp:
1. Return the module from the MakeModule function so it can be verified.
2. Make sure types get generated with their names

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