oota-llvm.git
20 years agoTestcase to ensure that the 'constant' flag follows the definition when there
Chris Lattner [Tue, 5 Oct 2004 02:12:20 +0000 (02:12 +0000)]
Testcase to ensure that the 'constant' flag follows the definition when there
is a question.

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

20 years agoAdjust sys/stat.h inclusion so its only for SunOS.
Reid Spencer [Tue, 5 Oct 2004 00:56:46 +0000 (00:56 +0000)]
Adjust sys/stat.h inclusion so its only for SunOS.

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

20 years agoAdded a couple of includes to get this to compile on Sparc.
Tanya Lattner [Tue, 5 Oct 2004 00:51:26 +0000 (00:51 +0000)]
Added a couple of includes to get this to compile on Sparc.

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

20 years agoSolaris doesn't have MAP_FILE.
Chris Lattner [Tue, 5 Oct 2004 00:46:21 +0000 (00:46 +0000)]
Solaris doesn't have MAP_FILE.

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

20 years agoBug fixed
Chris Lattner [Tue, 5 Oct 2004 00:23:02 +0000 (00:23 +0000)]
Bug fixed

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

20 years agoNew testcase for PR450
Chris Lattner [Tue, 5 Oct 2004 00:18:21 +0000 (00:18 +0000)]
New testcase for PR450

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

20 years agoAdd checks for the ZLIB and BZIP2 header files, not just the libraries.
Reid Spencer [Mon, 4 Oct 2004 22:05:53 +0000 (22:05 +0000)]
Add checks for the ZLIB and BZIP2 header files, not just the libraries.

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

20 years agoFix #include flavor
Chris Lattner [Mon, 4 Oct 2004 18:10:18 +0000 (18:10 +0000)]
Fix #include flavor

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

20 years agoMove the warning about no compression library down to the bottom, away
Reid Spencer [Mon, 4 Oct 2004 18:02:55 +0000 (18:02 +0000)]
Move the warning about no compression library down to the bottom, away
from the fray, so it gets noticed. This commit is made without the
corresponding configure script commit because it doesn't affect
functionality and we don't want to force everyone into another reconfigure

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

20 years agoFix typo in makefile variable name that prevents zlib from being recognized
Reid Spencer [Mon, 4 Oct 2004 17:49:19 +0000 (17:49 +0000)]
Fix typo in makefile variable name that prevents zlib from being recognized

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

20 years agoAdd HAVE_BZIP2 and HAVE_ZLIB
Reid Spencer [Mon, 4 Oct 2004 17:48:37 +0000 (17:48 +0000)]
Add HAVE_BZIP2 and HAVE_ZLIB

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

20 years agoExcise the ill-advised RLCOMP compression algorithm and simply leave the
Reid Spencer [Mon, 4 Oct 2004 17:45:44 +0000 (17:45 +0000)]
Excise the ill-advised RLCOMP compression algorithm and simply leave the
previously temporary NULLCOMP implementation that merely copies the data
verbatim without compression. Also, don't warn if there's no compression
library as that is taken care of during configuration time.

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

20 years agoAdd example 'abstract' architectures for LLI: MIX, MMIX, and DLX
Misha Brukman [Mon, 4 Oct 2004 17:36:35 +0000 (17:36 +0000)]
Add example 'abstract' architectures for LLI: MIX, MMIX, and DLX

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

20 years agoAdd a context for the callback so different compression scenarios can be
Reid Spencer [Mon, 4 Oct 2004 17:29:25 +0000 (17:29 +0000)]
Add a context for the callback so different compression scenarios can be
distinguished. Tidy up documentation.  Thanks, Chris.

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

20 years agoMinor corrections suggested by Chris' ever-watchful eye.
Reid Spencer [Mon, 4 Oct 2004 17:26:26 +0000 (17:26 +0000)]
Minor corrections suggested by Chris' ever-watchful eye.

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

20 years agoFix build if not HAVE_BZIP2
Chris Lattner [Mon, 4 Oct 2004 16:33:25 +0000 (16:33 +0000)]
Fix build if not HAVE_BZIP2

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

20 years agoFirst version of the MappedFile abstraction for operating system idependent
Reid Spencer [Mon, 4 Oct 2004 11:08:32 +0000 (11:08 +0000)]
First version of the MappedFile abstraction for operating system idependent
mapping of files. This first version uses mmap where its available. The
class needs to implement an alternate mechanism based on malloc'd memory
and file reading/writing for platforms without virtual memory.

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

20 years agoFirst version of a support utility to provide generalized compression in
Reid Spencer [Mon, 4 Oct 2004 10:49:41 +0000 (10:49 +0000)]
First version of a support utility to provide generalized compression in
LLVM that handles availability and unavailability of bzip2 and zlib.

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

20 years ago* Prune #includes
Chris Lattner [Mon, 4 Oct 2004 07:31:08 +0000 (07:31 +0000)]
* Prune #includes
* Update comments
* Rearrange code a bit
* Finally ELIMINATE the GAS workaround emitter for Intel mode.  woot!

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

20 years agoAdd support for emitting AT&T style .s files, and make it the default. Users
Chris Lattner [Mon, 4 Oct 2004 07:24:48 +0000 (07:24 +0000)]
Add support for emitting AT&T style .s files, and make it the default.  Users
may now choose their output format with the -x86-asm-syntax={intel|att} flag.

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

20 years agoConvert some missed patterns to support AT&T style
Chris Lattner [Mon, 4 Oct 2004 07:23:07 +0000 (07:23 +0000)]
Convert some missed patterns to support AT&T style

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

20 years agoApparently the GNU assembler has a HUGE hack to be compatible with really
Chris Lattner [Mon, 4 Oct 2004 07:08:46 +0000 (07:08 +0000)]
Apparently the GNU assembler has a HUGE hack to be compatible with really
old and broken AT&T syntax assemblers.  The problem with this hack is that
*SOME* forms of the fdiv and fsub instructions have the 'r' bit inverted.
This was a real pain to figure out, but is trivially easy to support: thus
we are now bug compatible with gas and gcc.

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

20 years agoProvide support for auto-detection and use of compression libraries.
Reid Spencer [Mon, 4 Oct 2004 07:05:07 +0000 (07:05 +0000)]
Provide support for auto-detection and use of compression libraries.

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

20 years agoFix incorrect suffix
Chris Lattner [Mon, 4 Oct 2004 05:20:16 +0000 (05:20 +0000)]
Fix incorrect suffix

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

20 years agoFix some more missed suffixes and swapped operands
Chris Lattner [Mon, 4 Oct 2004 01:38:10 +0000 (01:38 +0000)]
Fix some more missed suffixes and swapped operands

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

20 years agoAdd missing suffixes to FP instructions for AT&T mode
Chris Lattner [Mon, 4 Oct 2004 00:43:31 +0000 (00:43 +0000)]
Add missing suffixes to FP instructions for AT&T mode

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

20 years agoAdd support for the -x86-asm-syntax flag, which can be used to choose between
Chris Lattner [Sun, 3 Oct 2004 20:36:57 +0000 (20:36 +0000)]
Add support for the -x86-asm-syntax flag, which can be used to choose between
Intel and AT&T style assembly language.  The ultimate goal of this is to
eliminate the GasBugWorkaroundEmitter class, but for now AT&T style emission
is not fully operational.

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

20 years agoAdd support to the instruction patterns for AT&T style output, which will
Chris Lattner [Sun, 3 Oct 2004 20:35:00 +0000 (20:35 +0000)]
Add support to the instruction patterns for AT&T style output, which will
hopefully lead to the death of the 'GasBugWorkaroundEmitter'.  This also
includes changes to wrap the whole file to 80 columns! Woot! :)

Note that the AT&T style output has not been tested at all.

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

20 years agoCorrectly parse variant notation
Chris Lattner [Sun, 3 Oct 2004 20:19:02 +0000 (20:19 +0000)]
Correctly parse variant notation

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

20 years agoAdd initial support for variants. This just parses the new format, no
Chris Lattner [Sun, 3 Oct 2004 19:34:31 +0000 (19:34 +0000)]
Add initial support for variants.  This just parses the new format, no
functionality is added

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

20 years agoAdd initial support for variants
Chris Lattner [Sun, 3 Oct 2004 19:34:18 +0000 (19:34 +0000)]
Add initial support for variants

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

20 years agoAdd checks for bzip2 and libz for use with the Compression concept for
Reid Spencer [Sat, 2 Oct 2004 08:50:58 +0000 (08:50 +0000)]
Add checks for bzip2 and libz for use with the Compression concept for
lib/System and the compressing llvm archiver.

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

20 years agoDo not repeat the map lookup
Chris Lattner [Fri, 1 Oct 2004 23:16:43 +0000 (23:16 +0000)]
Do not repeat the map lookup

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

20 years agoWhen a virtual register is folded into an instruction, keep track of whether
Chris Lattner [Fri, 1 Oct 2004 23:15:36 +0000 (23:15 +0000)]
When a virtual register is folded into an instruction, keep track of whether
it was a use, def, or both.  This allows us to be less pessimistic in our
analysis of them.  In practice, this doesn't make a big difference, but it
doesn't hurt either.

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

20 years agoAdd project
Chris Lattner [Fri, 1 Oct 2004 22:25:28 +0000 (22:25 +0000)]
Add project

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

20 years agoAdd a simple little improvement to the local spiller to keep track of stores
Chris Lattner [Fri, 1 Oct 2004 19:47:12 +0000 (19:47 +0000)]
Add a simple little improvement to the local spiller to keep track of stores
and delete them if they turn out to be dead.  This is a useful little hack
that even speeds up some programs.  For example, it speeds up Ptrdist/ks
from 17.53s to 15.59s, and 188.ammp from 149s to 146s.

This also speeds up llc :)

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

20 years agoSubstantially revamp the local spiller, causing it to actually improve the
Chris Lattner [Fri, 1 Oct 2004 19:04:51 +0000 (19:04 +0000)]
Substantially revamp the local spiller, causing it to actually improve the
generated code over the simple spiller.  The new local spiller generates
substantially better code than the simple one in some cases, by reusing
values that are loaded out of stack slots and kept available in registers.

This primarily helps programs that are spilling a lot, and there is still
stuff that can be done to improve it.  This patch makes the local spiller
the default, as it's only a tiny bit slower than the simple spiller (it
increases the runtime of llc by < 1%).

Here are some numbers with speedups.

Program    #reuse  old(s)    new(s)  Speedup

Povray:     3452,  16.87 ->  15.93   (5.5%)
177.mesa:   2176,   2.77 ->   2.76   (0%)
179.art:      35,  28.43 ->  28.01   (1.5%)
183.equake:   55,  61.44 ->  61.41   (0%)
188.ammp:    869, 174    -> 149      (15%)

164.gzip:     43,  40.73 ->  40.71   (0%)
175.vpr:     351,  18.54 ->  17.34   (6.5%)
176.gcc:    2471,   5.01 ->   4.92   (1.8%)
181.mcf       42,  79.30 ->  75.20   (5.2%)
186.crafty:  484,  29.73 ->  30.04   (-1%)
197.parser:  251,  10.47 ->  10.67   (-1%)
252.eon:    1501,   1.98 ->   1.75   (12%)
253.perlbm: 1183,  14.83 ->  14.42   (2.8%)
254.gap:     825,   7.46 ->   7.29   (2.3%)
255.vortex:  285,  10.51 ->  10.27   (2.3%)
256.bzip2:    63,  55.70 ->  55.20   (0.9%)
300.twolf:   830,  21.63 ->  22.00   (-1%)

PtrDist/ks    14,  32.75 -> 17.53    (46.5%)
Olden/tsp     46,   8.71 ->  8.24    (5.4%)
Free/distray  70,   1.09 ->  0.99    (9.2%)

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

20 years agoPretty print a bit nicer :)
Chris Lattner [Fri, 1 Oct 2004 19:01:39 +0000 (19:01 +0000)]
Pretty print a bit nicer :)

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

20 years agoAdd note about converting Skeleton to a useful backend and using it in the
Misha Brukman [Fri, 1 Oct 2004 18:36:22 +0000 (18:36 +0000)]
Add note about converting Skeleton to a useful backend and using it in the
Interpreter.

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

20 years agoDocument this class a bit :-)
Alkis Evlogimenos [Fri, 1 Oct 2004 00:35:07 +0000 (00:35 +0000)]
Document this class a bit :-)

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

20 years agoAdd const version of getLastBlock() member function.
Alkis Evlogimenos [Thu, 30 Sep 2004 21:42:02 +0000 (21:42 +0000)]
Add const version of getLastBlock() member function.

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

20 years agoRemove whitespace from the end of the line.
Alkis Evlogimenos [Thu, 30 Sep 2004 21:39:47 +0000 (21:39 +0000)]
Remove whitespace from the end of the line.

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

20 years agoMake EmitMappingInfo into an "external location" option, so that it can be set
Brian Gaeke [Thu, 30 Sep 2004 20:20:01 +0000 (20:20 +0000)]
Make EmitMappingInfo into an "external location" option, so that it can be set
or cleared externally.

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

20 years agoAdd accessor function.
Brian Gaeke [Thu, 30 Sep 2004 20:14:29 +0000 (20:14 +0000)]
Add accessor function.

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

20 years agoCorrect type of accessor functions.
Brian Gaeke [Thu, 30 Sep 2004 20:14:18 +0000 (20:14 +0000)]
Correct type of accessor functions.

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

20 years agoNamespacify. Add accessor function.
Brian Gaeke [Thu, 30 Sep 2004 20:14:07 +0000 (20:14 +0000)]
Namespacify.  Add accessor function.

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

20 years agoAdd accessor function prototypes for reoptimizer support passes.
Brian Gaeke [Thu, 30 Sep 2004 20:13:55 +0000 (20:13 +0000)]
Add accessor function prototypes for reoptimizer support passes.
Make accessors return FunctionPass* as appropriate.

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

20 years agoI think this will handle double args.
Brian Gaeke [Thu, 30 Sep 2004 19:44:32 +0000 (19:44 +0000)]
I think this will handle double args.

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

20 years agoThat should actually be __MING, not __MINGW.
Misha Brukman [Thu, 30 Sep 2004 18:28:07 +0000 (18:28 +0000)]
That should actually be __MING, not __MINGW.

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

20 years ago#include DataTypes.h to compile on MinGW, patch by Henrik Bach.
Misha Brukman [Thu, 30 Sep 2004 18:27:39 +0000 (18:27 +0000)]
#include DataTypes.h to compile on MinGW, patch by Henrik Bach.

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

20 years agoCheck for __MINGW define instead of __MINGW_H, patch by Henrik Bach.
Misha Brukman [Thu, 30 Sep 2004 18:24:58 +0000 (18:24 +0000)]
Check for __MINGW define instead of __MINGW_H, patch by Henrik Bach.

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

20 years agoUse more efficient map operations. Fix a bug that would affect hypothetical
Chris Lattner [Thu, 30 Sep 2004 16:35:08 +0000 (16:35 +0000)]
Use more efficient map operations.  Fix a bug that would affect hypothetical
targets that supported multiple memory operands.

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

20 years agoThere is no need to call MachineInstr::print directly, just send the MI& to an ostream.
Chris Lattner [Thu, 30 Sep 2004 16:10:45 +0000 (16:10 +0000)]
There is no need to call MachineInstr::print directly, just send the MI& to an ostream.

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

20 years ago* Wrap some comments to 80 cols
Chris Lattner [Thu, 30 Sep 2004 15:59:17 +0000 (15:59 +0000)]
* Wrap some comments to 80 cols
* Add const_iterator stuff
* Add a print method, which means that I can now call dump() from the
  debugger.

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

20 years agoMark the instructions that have delay slots with the hasDelaySlot flag.
Brian Gaeke [Thu, 30 Sep 2004 04:04:48 +0000 (04:04 +0000)]
Mark the instructions that have delay slots with the hasDelaySlot flag.
Add some comments.

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

20 years agoUse TargetMachine::hasDelaySlot() instead of our old switch statement
Brian Gaeke [Thu, 30 Sep 2004 04:04:47 +0000 (04:04 +0000)]
Use TargetMachine::hasDelaySlot() instead of our old switch statement
to find instrs that have delay slots.

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

20 years agoSimplify the logic in the simple spiller and capitalize some variables
Chris Lattner [Thu, 30 Sep 2004 02:59:33 +0000 (02:59 +0000)]
Simplify the logic in the simple spiller and capitalize some variables

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

20 years agoSwitch from defaulting to the 'local' spiller to the 'simple' spiller. The
Chris Lattner [Thu, 30 Sep 2004 02:40:06 +0000 (02:40 +0000)]
Switch from defaulting to the 'local' spiller to the 'simple' spiller.  The
two spillers produce perfectly identical code (at least on povray and eon),
but the simple spiller is substantially faster than the local spiller. Once
the local spiller is improved, we can switch back.

Switching cuts 5.2% off of the llc time for povray (about 1.3s).

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

20 years agoDon't use a densemap for keeping track of which vregs are already loaded, just
Chris Lattner [Thu, 30 Sep 2004 02:33:48 +0000 (02:33 +0000)]
Don't use a densemap for keeping track of which vregs are already loaded, just
use a simple vector.  This speeds up -spiller=simple from taking 22s to taking
.1s on povray (debug build).  This change does not modify the generated code.

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

20 years agoUse longer and more explicit names for instance vars (particularly important
Chris Lattner [Thu, 30 Sep 2004 02:15:18 +0000 (02:15 +0000)]
Use longer and more explicit names for instance vars (particularly important
data structures).  Fix the print method to send to the right ostream, not
always cerr.  Delete typedefs that are only used once.

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

20 years agoFree the VirtRegMap at the end of MachineFunction processing instead of at
Chris Lattner [Thu, 30 Sep 2004 02:02:33 +0000 (02:02 +0000)]
Free the VirtRegMap at the end of MachineFunction processing instead of at
the beginning of processing the next one.

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

20 years agoReindent code, improve comments, move huge nested methods out of classes,
Chris Lattner [Thu, 30 Sep 2004 01:54:45 +0000 (01:54 +0000)]
Reindent code, improve comments, move huge nested methods out of classes,
prune #includes, add print/dump methods, etc.  No functionality changes.

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

20 years agoDisable the 'WARNING: Found global types that are not compatible' warning
Chris Lattner [Thu, 30 Sep 2004 00:12:29 +0000 (00:12 +0000)]
Disable the 'WARNING: Found global types that are not compatible' warning
that always prints when linking programs to libstdc++ :(

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

20 years agoChange the #ifdefs to allow compilation with a V8 compiler, but the JIT still
Misha Brukman [Wed, 29 Sep 2004 23:01:17 +0000 (23:01 +0000)]
Change the #ifdefs to allow compilation with a V8 compiler, but the JIT still
won't work if not compiled in V9 mode, currently by GCC only, because Sun's
system compiler does not tell us if it's a V8 or V9 system.

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

20 years agoHrm, debugging printouts do not need to be in here
Chris Lattner [Wed, 29 Sep 2004 21:21:14 +0000 (21:21 +0000)]
Hrm, debugging printouts do not need to be in here

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

20 years agoMake sure to check select instructions for generic instruction properties
Chris Lattner [Wed, 29 Sep 2004 21:19:28 +0000 (21:19 +0000)]
Make sure to check select instructions for generic instruction properties

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

20 years agoUpdate list of shootout programs that should be working.
Brian Gaeke [Wed, 29 Sep 2004 20:45:06 +0000 (20:45 +0000)]
Update list of shootout programs that should be working.

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

20 years agoTell the target description that calls clobber registers O0...O5.
Brian Gaeke [Wed, 29 Sep 2004 20:45:05 +0000 (20:45 +0000)]
Tell the target description that calls clobber registers O0...O5.

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

20 years agoDon't use DominatorSet::dominates for intra-block instruction dom checks.
Chris Lattner [Wed, 29 Sep 2004 20:07:45 +0000 (20:07 +0000)]
Don't use DominatorSet::dominates for intra-block instruction dom checks.
This method is linear time in the size of the basic block, which is very
bad for large basic blocks.  On the Assembler/2004-09-29-VerifierIsReallySlow.llx
testcase, the verifier changes from taking 50s to 0.23s with this patch.

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

20 years agoThe verifier takes 50s on this testcase, that is not good n stuff
Chris Lattner [Wed, 29 Sep 2004 20:07:25 +0000 (20:07 +0000)]
The verifier takes 50s on this testcase, that is not good n stuff

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

20 years agoFITOD is spelled "fitod", not "fitos". Ouch.
Brian Gaeke [Wed, 29 Sep 2004 19:59:07 +0000 (19:59 +0000)]
FITOD is spelled "fitod", not "fitos". Ouch.

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

20 years agoDon't use .quad to output double constants. The assembler must have a bug or
Brian Gaeke [Wed, 29 Sep 2004 19:59:06 +0000 (19:59 +0000)]
Don't use .quad to output double constants. The assembler must have a bug or
something, because the wrong bit patterns get output.

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

20 years ago* Pull range optimization code out into new InsertRangeTest function.
Chris Lattner [Wed, 29 Sep 2004 17:40:11 +0000 (17:40 +0000)]
* Pull range optimization code out into new InsertRangeTest function.
* SubOne/AddOne functions always return ConstantInt, declare them as such
* Pull code for handling setcc X, cst, where cst is at the end of the range,
  or cc is LE or GE up earlier in visitSetCondInst.  This reduces #iterations
  in some cases.
* Fold: (div X, C1) op C2 -> range check, implementing div.ll:test6 - test9.

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

20 years agoNew testcasses for divides that can be eliminated.
Chris Lattner [Wed, 29 Sep 2004 17:37:07 +0000 (17:37 +0000)]
New testcasses for divides that can be eliminated.

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

20 years agoRecognize FpMOVD as a move.
Brian Gaeke [Wed, 29 Sep 2004 16:45:47 +0000 (16:45 +0000)]
Recognize FpMOVD as a move.

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

20 years agoDo not insert trivially dead select instructions, which allows us to
Chris Lattner [Wed, 29 Sep 2004 05:43:32 +0000 (05:43 +0000)]
Do not insert trivially dead select instructions, which allows us to
potentially fold more in one pass.

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

20 years agoFold binary expressions and casts into PHI nodes that have all constant inputs.
Chris Lattner [Wed, 29 Sep 2004 05:07:12 +0000 (05:07 +0000)]
Fold binary expressions and casts into PHI nodes that have all constant inputs.

This takes something like this:

%A = phi int [ 3, %cond_false.0 ], [ 2, %endif.0.i ], [ 2, %endif.1.i ]
%B = div int %tmp.243, 4

and turns it into:

%A = phi int [ 3/4, %cond_false.0 ], [ 2/4, %endif.0.i ], [ 2/4, %endif.1.i ]

which is later simplified (in this case) into %A = 0.

This triggers thousands of times in spec, for example, 269 times in 176.gcc.

This is tested by InstCombine/add.ll:test23 and set.ll:test18.

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

20 years agoNew testcases
Chris Lattner [Wed, 29 Sep 2004 05:06:12 +0000 (05:06 +0000)]
New testcases

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

20 years agoGenerate better code by being far less clever when it comes to the select instruction...
Nate Begeman [Wed, 29 Sep 2004 05:00:31 +0000 (05:00 +0000)]
Generate better code by being far less clever when it comes to the select instruction.  Don't create overlapping register lifetimes

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

20 years agoadd results
Brian Gaeke [Wed, 29 Sep 2004 03:48:55 +0000 (03:48 +0000)]
add results

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

20 years agoimprove Type::BoolTy codegen by eliminating unnecessary clears and sign extends
Nate Begeman [Wed, 29 Sep 2004 03:45:33 +0000 (03:45 +0000)]
improve Type::BoolTy codegen by eliminating unnecessary clears and sign extends

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

20 years agoSimplify copyConstantToRegister() for longs, using a pair of recursive calls.
Brian Gaeke [Wed, 29 Sep 2004 03:34:41 +0000 (03:34 +0000)]
Simplify copyConstantToRegister() for longs, using a pair of recursive calls.
Copy constant-pool entries' addresses into registers before loading out of them,
to avoid errors from the assembler.
Handle loading call args past the 6th one off the stack.
Add IMPLICIT_DEF pseudo-instrs for double and long arguments passed in register
pairs.
Use FpMOVD to copy doubles around instead of the horrible store-load thing we
were doing before.
Handle 'ret double' and 'ret long'.
Fix a bug in handling 'and/or/xor long'.

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

20 years agoFix bug recognizing moves: isMoveInstr should only treat ORs with %g0 as
Brian Gaeke [Wed, 29 Sep 2004 03:28:15 +0000 (03:28 +0000)]
Fix bug recognizing moves: isMoveInstr should only treat ORs with %g0 as
moves, not all ORs.

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

20 years agoUse FpMOVD pseudo-instruction to move doubles around.
Brian Gaeke [Wed, 29 Sep 2004 03:27:30 +0000 (03:27 +0000)]
Use FpMOVD pseudo-instruction to move doubles around.

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

20 years agoAdd new FpMOVD pseudo-instruction, used to move doubles around.
Brian Gaeke [Wed, 29 Sep 2004 03:27:29 +0000 (03:27 +0000)]
Add new FpMOVD pseudo-instruction, used to move doubles around.

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

20 years agoFix double and long alignment.
Brian Gaeke [Wed, 29 Sep 2004 03:26:27 +0000 (03:26 +0000)]
Fix double and long alignment.
Call the FPMover pass after register allocation.

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

20 years agoPut quotes around argument to .section directive.
Brian Gaeke [Wed, 29 Sep 2004 03:25:40 +0000 (03:25 +0000)]
Put quotes around argument to .section directive.

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

20 years agoAdd createSparcV8FPMoverPass().
Brian Gaeke [Wed, 29 Sep 2004 03:25:39 +0000 (03:25 +0000)]
Add createSparcV8FPMoverPass().

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

20 years agoPass which converts FpMOVD (double move pseudoinstructions) to pairs
Brian Gaeke [Wed, 29 Sep 2004 03:24:34 +0000 (03:24 +0000)]
Pass which converts FpMOVD (double move pseudoinstructions) to pairs
of FMOVS instrs.

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

20 years agoMore testcases for recent instcombine patches
Chris Lattner [Wed, 29 Sep 2004 03:18:20 +0000 (03:18 +0000)]
More testcases for recent instcombine patches

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

20 years agoHrm, really, all tests passed without this, but it is scary to think how...
Chris Lattner [Wed, 29 Sep 2004 03:16:24 +0000 (03:16 +0000)]
Hrm, really, all tests passed without this, but it is scary to think how...

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

20 years agoRemove debugging printout
Chris Lattner [Wed, 29 Sep 2004 03:09:18 +0000 (03:09 +0000)]
Remove debugging printout
Instcombine (setcc (truncate X), C1).

This occurs THOUSANDS of times in many benchmarks.  Particularlly common
seem to be things like (seteq (cast bool X to int), int 0)

This turns it into (seteq bool %X, false), which then becomes (not %X).

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

20 years agoTo go along with sabre's improved InstCombining, improve recognition of
Nate Begeman [Wed, 29 Sep 2004 02:35:05 +0000 (02:35 +0000)]
To go along with sabre's improved InstCombining, improve recognition of
integers that we can use as immediate values in instructions.

Example from yacr2:
-       lis r10, -1
-       ori r10, r10, 65535
-       add r28, r28, r10
+       addi r28, r28, -1
        addi r7, r7, 1
        addi r9, r9, 1
        b .LBB_main_9   ; loopentry.1.i214

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

20 years agoImprove validity checking of windows path names and fix file creation
Reid Spencer [Wed, 29 Sep 2004 00:01:17 +0000 (00:01 +0000)]
Improve validity checking of windows path names and fix file creation
problems.

Patch contributed by Jeff Cohen. Thanks Jeff!

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

20 years agoUse llvm::sys::Path to destroy the file.
Reid Spencer [Tue, 28 Sep 2004 23:58:03 +0000 (23:58 +0000)]
Use llvm::sys::Path to destroy the file.

Patch contributed by Jeff Cohen. Thanks Jeff!

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

20 years agoWin32 implementation of TimeValue::now().
Reid Spencer [Tue, 28 Sep 2004 23:56:20 +0000 (23:56 +0000)]
Win32 implementation of TimeValue::now().

Patch contributed by Jeff Cohen. Thanks Jeff!

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

20 years agoFreeBSD implementation of the TimeValue::now() method.
Reid Spencer [Tue, 28 Sep 2004 23:54:12 +0000 (23:54 +0000)]
FreeBSD implementation of the TimeValue::now() method.

Patch kindly contributed by Jeff Cohen. Thanks Jeff!

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

20 years agoFold (X setcc C1) | (X setcc C2)
Chris Lattner [Tue, 28 Sep 2004 22:33:08 +0000 (22:33 +0000)]
Fold (X setcc C1) | (X setcc C2)

This implements or.ll:test1[89]

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

20 years agoNew testcase
Chris Lattner [Tue, 28 Sep 2004 22:31:49 +0000 (22:31 +0000)]
New testcase

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

20 years agoFold (and (setcc X, C1), (setcc X, C2))
Chris Lattner [Tue, 28 Sep 2004 21:48:02 +0000 (21:48 +0000)]
Fold (and (setcc X, C1), (setcc X, C2))

This is important for several reasons:

1. Benchmarks have lots of code that looks like this (perlbmk in particular):

  %tmp.2.i = setne int %tmp.0.i, 128              ; <bool> [#uses=1]
  %tmp.6343 = seteq int %tmp.0.i, 1               ; <bool> [#uses=1]
  %tmp.63 = and bool %tmp.2.i, %tmp.6343          ; <bool> [#uses=1]

   we now fold away the setne, a clear improvement.

2. In the more important cases, such as (X >= 10) & (X < 20), we now produce
   smaller code: (X-10) < 10.

3. Perhaps the nicest effect of this patch is that it really helps out the
   code generators.  In particular, for a 'range test' like the above,
   instead of generating this on X86 (the difference on PPC is even more
   pronounced):

        cmp %EAX, 50
        setge %CL
        cmp %EAX, 100
        setl %AL
        and %CL, %AL
        cmp %CL, 0

   we now generate this:

        add %EAX, -50
        cmp %EAX, 50

   Furthermore, this causes setcc's to be folded into branches more often.

These combinations trigger dozens of times in the spec benchmarks, particularly
in 176.gcc, 186.crafty, 253.perlbmk, 254.gap, & 099.go.

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