oota-llvm.git
20 years agoMoved to lib/Linker
Reid Spencer [Sun, 14 Nov 2004 22:15:31 +0000 (22:15 +0000)]
Moved to lib/Linker

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

20 years agoAdd the llvm-ranlib tool
Reid Spencer [Sun, 14 Nov 2004 22:13:59 +0000 (22:13 +0000)]
Add the llvm-ranlib tool

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

20 years agoUse llvm-ar not ar for constructing archive. Wrap at 80 cols.
Reid Spencer [Sun, 14 Nov 2004 22:13:13 +0000 (22:13 +0000)]
Use llvm-ar not ar for constructing archive. Wrap at 80 cols.

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

20 years agoForget strerror_r, it causes problems. Fix later when threading matters
Reid Spencer [Sun, 14 Nov 2004 22:10:54 +0000 (22:10 +0000)]
Forget strerror_r, it causes problems. Fix later when threading matters

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

20 years agoImplement the toString method
Reid Spencer [Sun, 14 Nov 2004 22:10:08 +0000 (22:10 +0000)]
Implement the toString method

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

20 years agoUpdate for prototype changes
Reid Spencer [Sun, 14 Nov 2004 22:09:22 +0000 (22:09 +0000)]
Update for prototype changes

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

20 years ago* Implement getDirectoryContents * Implement getStatusInfo * Implement setStatusInfo...
Reid Spencer [Sun, 14 Nov 2004 22:08:36 +0000 (22:08 +0000)]
* Implement getDirectoryContents * Implement getStatusInfo * Implement setStatusInfo * Implement renameFile

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

20 years agoFix bugs in class invariant
Reid Spencer [Sun, 14 Nov 2004 22:07:50 +0000 (22:07 +0000)]
Fix bugs in class invariant

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

20 years agoInclude the correct implementation file
Reid Spencer [Sun, 14 Nov 2004 22:07:04 +0000 (22:07 +0000)]
Include the correct implementation file

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

20 years agoDon't exceed 80 columns.
Reid Spencer [Sun, 14 Nov 2004 22:06:18 +0000 (22:06 +0000)]
Don't exceed 80 columns.

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

20 years agoImplement IdentifyFileType function
Reid Spencer [Sun, 14 Nov 2004 22:05:32 +0000 (22:05 +0000)]
Implement IdentifyFileType function

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

20 years agoImplement the high level interface to make (de)compression easier.
Reid Spencer [Sun, 14 Nov 2004 22:04:46 +0000 (22:04 +0000)]
Implement the high level interface to make (de)compression easier.

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

20 years agoImplement the MoreHelp utility that calls a function to printmore help information...
Reid Spencer [Sun, 14 Nov 2004 22:04:00 +0000 (22:04 +0000)]
Implement the MoreHelp utility that calls a function to printmore help information if the MoreHelp global is not null.

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

20 years agoDon't bother with a re-linked library, ensure archive library is built.
Reid Spencer [Sun, 14 Nov 2004 22:03:14 +0000 (22:03 +0000)]
Don't bother with a re-linked library, ensure archive library is built.

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

20 years ago*Adjust prototypes for public interface. *Rewrite LinkInArchive to use symbol tables.
Reid Spencer [Sun, 14 Nov 2004 22:02:27 +0000 (22:02 +0000)]
*Adjust prototypes for public interface. *Rewrite LinkInArchive to use symbol tables.

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

20 years agoSimplify compression code by using the high level interface to the Compressor
Reid Spencer [Sun, 14 Nov 2004 22:01:41 +0000 (22:01 +0000)]
Simplify compression code by using the high level interface to the Compressor

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

20 years agoAdd wrappers to get defined symbols from bytecode
Reid Spencer [Sun, 14 Nov 2004 22:00:48 +0000 (22:00 +0000)]
Add wrappers to get defined symbols from bytecode

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

20 years agoSimplify handling of decompression
Reid Spencer [Sun, 14 Nov 2004 22:00:09 +0000 (22:00 +0000)]
Simplify handling of decompression

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

20 years agoSimplify decompression code by using the high level interface to the Compressor
Reid Spencer [Sun, 14 Nov 2004 21:59:21 +0000 (21:59 +0000)]
Simplify decompression code by using the high level interface to the Compressor

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

20 years agoCompletely rewritten to allow reading of archives and symbol table lookup in a more...
Reid Spencer [Sun, 14 Nov 2004 21:58:33 +0000 (21:58 +0000)]
Completely rewritten to allow reading of archives and symbol table lookup in a more efficient manner.

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

20 years agoImplementation declarations for Archive
Reid Spencer [Sun, 14 Nov 2004 21:57:46 +0000 (21:57 +0000)]
Implementation declarations for Archive

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

20 years agoFirst working version
Reid Spencer [Sun, 14 Nov 2004 21:56:59 +0000 (21:56 +0000)]
First working version

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

20 years agoAdd the Archive library
Reid Spencer [Sun, 14 Nov 2004 21:55:27 +0000 (21:55 +0000)]
Add the Archive library

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

20 years agoAdd the Linker library
Reid Spencer [Sun, 14 Nov 2004 21:54:41 +0000 (21:54 +0000)]
Add the Linker library

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

20 years ago*Make naming convention consistent.*Add convertion to/from Unix Epoch time.*Add abili...
Reid Spencer [Sun, 14 Nov 2004 21:53:55 +0000 (21:53 +0000)]
*Make naming convention consistent.*Add convertion to/from Unix Epoch time.*Add ability to convert to readable string.

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

20 years agoMake the remove*OnSignal functions deal with Paths not strings
Reid Spencer [Sun, 14 Nov 2004 21:53:09 +0000 (21:53 +0000)]
Make the remove*OnSignal functions deal with Paths not strings

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

20 years ago*Put the StatusInfo type in the right section. *Provide the ability to rename a file...
Reid Spencer [Sun, 14 Nov 2004 21:52:22 +0000 (21:52 +0000)]
*Put the StatusInfo type in the right section. *Provide the ability to rename a file.*Provide the ability to get/set stat(2) information.*Provide the ability to identify LLVM file types.

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

20 years agoAllow explicit closing of the MappedFile, before destruction
Reid Spencer [Sun, 14 Nov 2004 21:51:36 +0000 (21:51 +0000)]
Allow explicit closing of the MappedFile, before destruction

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

20 years agoLinker is its own module now. Moved to include/llvm/Linker.h
Reid Spencer [Sun, 14 Nov 2004 21:50:50 +0000 (21:50 +0000)]
Linker is its own module now. Moved to include/llvm/Linker.h

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

20 years agoAdd higher level interface to simplify use of Compressor
Reid Spencer [Sun, 14 Nov 2004 21:50:00 +0000 (21:50 +0000)]
Add higher level interface to simplify use of Compressor

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

20 years agoAdd the MoreHelp function pointer. If non-null, this specifies a function to be calle...
Reid Spencer [Sun, 14 Nov 2004 21:49:13 +0000 (21:49 +0000)]
Add the MoreHelp function pointer. If non-null, this specifies a function to be called to print out additional help information

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

20 years agoRemove ReadArchiveFile (functionality moved to Archive.h). Add an alternate form...
Reid Spencer [Sun, 14 Nov 2004 21:48:27 +0000 (21:48 +0000)]
Remove ReadArchiveFile (functionality moved to Archive.h). Add an alternate form for GetBytecodeSymbols.

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

20 years agoComplete rewrite to get first working version.
Reid Spencer [Sun, 14 Nov 2004 21:47:41 +0000 (21:47 +0000)]
Complete rewrite to get first working version.

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

20 years agoAdd a command for using llvm-ar correctly.
Reid Spencer [Sun, 14 Nov 2004 21:46:55 +0000 (21:46 +0000)]
Add a command for using llvm-ar correctly.

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

20 years agoInterface to Linker (revised/expanded from Support/Linker.h)
Reid Spencer [Sun, 14 Nov 2004 21:46:08 +0000 (21:46 +0000)]
Interface to Linker (revised/expanded from Support/Linker.h)

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

20 years agoGhostLinkage not allowed in LLVM AsmWriter, either
Misha Brukman [Sun, 14 Nov 2004 21:04:34 +0000 (21:04 +0000)]
GhostLinkage not allowed in LLVM AsmWriter, either

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

20 years agoGhostLinkage should not reach asm printing stage
Misha Brukman [Sun, 14 Nov 2004 21:03:49 +0000 (21:03 +0000)]
GhostLinkage should not reach asm printing stage

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

20 years agoHandle GhostLinkage (should not ever reach the assembly printing stage!)
Misha Brukman [Sun, 14 Nov 2004 21:03:30 +0000 (21:03 +0000)]
Handle GhostLinkage (should not ever reach the assembly printing stage!)

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

20 years agoMark an unmaterialized function as having GhostLinkage
Misha Brukman [Sun, 14 Nov 2004 21:02:55 +0000 (21:02 +0000)]
Mark an unmaterialized function as having GhostLinkage

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

20 years agoAdd GhostLinkage for marking functions before they're fully materialized
Misha Brukman [Sun, 14 Nov 2004 21:02:28 +0000 (21:02 +0000)]
Add GhostLinkage for marking functions before they're fully materialized

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

20 years agoIf a global is just loaded and restored, realize that it is not changing
Chris Lattner [Sun, 14 Nov 2004 20:50:30 +0000 (20:50 +0000)]
If a global is just loaded and restored, realize that it is not changing
value.  This allows us to turn more globals into constants and eliminate them.
This patch implements GlobalOpt/load-store-global.llx.

Note that this patch speeds up 255.vortex from:

Output/255.vortex.out-cbe.time:program 7.640000
Output/255.vortex.out-llc.time:program 9.810000

to:

Output/255.vortex.out-cbe.time:program 7.250000
Output/255.vortex.out-llc.time:program 9.490000

Which isn't bad at all!

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

20 years agoNew testcase. Believe it or not, this happens a LOT in vortex
Chris Lattner [Sun, 14 Nov 2004 20:41:39 +0000 (20:41 +0000)]
New testcase.  Believe it or not, this happens a LOT in vortex

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

20 years agoFix build on Linux/PowerPC64 using SuSE GCC (#undef PPC)
Misha Brukman [Sun, 14 Nov 2004 20:34:01 +0000 (20:34 +0000)]
Fix build on Linux/PowerPC64 using SuSE GCC (#undef PPC)

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

20 years agoMoved from include/llvm/Support/Linker.h
Reid Spencer [Sun, 14 Nov 2004 20:21:58 +0000 (20:21 +0000)]
Moved from include/llvm/Support/Linker.h

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

20 years agoMoved to lib/Bytecode/Archive in preparation for re-write.
Reid Spencer [Sun, 14 Nov 2004 19:59:40 +0000 (19:59 +0000)]
Moved to lib/Bytecode/Archive in preparation for re-write.

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

20 years agoThis optimization makes MANY phi nodes that all have the same incoming value.
Chris Lattner [Sun, 14 Nov 2004 19:29:34 +0000 (19:29 +0000)]
This optimization makes MANY phi nodes that all have the same incoming value.
If this happens, detect it early instead of relying on instcombine to notice
it later.  This can be a big speedup, because PHI nodes can have many
incoming values.

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

20 years agoImplement instcombine/phi.ll:test6 - pulling operations through PHI nodes.
Chris Lattner [Sun, 14 Nov 2004 19:13:23 +0000 (19:13 +0000)]
Implement instcombine/phi.ll:test6 - pulling operations through PHI nodes.

This exposes subsequent optimization possiblities and reduces code size.
This triggers 1423 times in spec.

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

20 years agoNew testcase: the phi can be eliminated if the casts are sucked into it.
Chris Lattner [Sun, 14 Nov 2004 19:12:17 +0000 (19:12 +0000)]
New testcase: the phi can be eliminated if the casts are sucked into it.
Note that this reduces code size anyway (as well as making further
optimizations simpler) so it's always a win.

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

20 years agoFix typo
Chris Lattner [Sun, 14 Nov 2004 17:54:58 +0000 (17:54 +0000)]
Fix typo

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

20 years agoadd a testcase, which we already handle
Chris Lattner [Sun, 14 Nov 2004 17:54:27 +0000 (17:54 +0000)]
add a testcase, which we already handle

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

20 years agoTransform this:
Chris Lattner [Sun, 14 Nov 2004 07:33:16 +0000 (07:33 +0000)]
Transform this:
  %X = alloca ...
  %Y = alloca ...
    X == Y

into false.  This allows us to simplify some stuff in eon (and probably
many other C++ programs) where operator= was checking for self assignment.
Folding this allows us to SROA several additional structs.

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

20 years agoRemove note to self
Chris Lattner [Sun, 14 Nov 2004 06:57:47 +0000 (06:57 +0000)]
Remove note to self

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

20 years agoFix problem with insertion point for ADJCALLSTACKDOWN.
Brian Gaeke [Sun, 14 Nov 2004 06:32:08 +0000 (06:32 +0000)]
Fix problem with insertion point for ADJCALLSTACKDOWN.

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

20 years agoUpdate lists of failing unit tests.
Brian Gaeke [Sun, 14 Nov 2004 06:32:07 +0000 (06:32 +0000)]
Update lists of failing unit tests.
Exclude bigfib, so that we effectively exclude all C++ benchmarks.
Update to-do list: mention va_start.

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

20 years agoOops, make this test the right thing.
Chris Lattner [Sun, 14 Nov 2004 06:11:41 +0000 (06:11 +0000)]
Oops, make this test the right thing.

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

20 years agoIf a function always returns a constant, replace all calls sites with that
Chris Lattner [Sun, 14 Nov 2004 06:10:11 +0000 (06:10 +0000)]
If a function always returns a constant, replace all calls sites with that
constant value.  This makes the return value dead and allows for
simplification in the caller.

This implements IPConstantProp/return-constant.ll

This triggers several dozen times throughout SPEC.

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

20 years agoNew testcase
Chris Lattner [Sun, 14 Nov 2004 06:02:46 +0000 (06:02 +0000)]
New testcase

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

20 years agoFix NotTest - round up extraStack to the nearest doubleword, if it is
Brian Gaeke [Sun, 14 Nov 2004 05:19:00 +0000 (05:19 +0000)]
Fix NotTest - round up extraStack to the nearest doubleword, if it is
not zero.

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

20 years agoTeach SROA how to promote an array index that is variable, if the dimension
Chris Lattner [Sun, 14 Nov 2004 05:00:19 +0000 (05:00 +0000)]
Teach SROA how to promote an array index that is variable, if the dimension
of the array is just two.  This occurs 8 times in gcc, 6 times in crafty, and
12 times in 099.go.

This implements ScalarRepl/sroa_two.ll

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

20 years agoNew testcase, SROA with variable array index
Chris Lattner [Sun, 14 Nov 2004 04:58:40 +0000 (04:58 +0000)]
New testcase, SROA with variable array index

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

20 years agoUpdate failing Benchmarks; point out that I'm skipping Shootout-C++.
Brian Gaeke [Sun, 14 Nov 2004 04:43:12 +0000 (04:43 +0000)]
Update failing Benchmarks; point out that I'm skipping Shootout-C++.

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

20 years agoRearrange some code, no functionality changes.
Chris Lattner [Sun, 14 Nov 2004 04:24:28 +0000 (04:24 +0000)]
Rearrange some code, no functionality changes.

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

20 years agoUpdate expected UnitTests failures.
Brian Gaeke [Sun, 14 Nov 2004 03:22:08 +0000 (03:22 +0000)]
Update expected UnitTests failures.

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

20 years agoRewrite outgoing arg handling to handle more weird corner cases.
Brian Gaeke [Sun, 14 Nov 2004 03:22:07 +0000 (03:22 +0000)]
Rewrite outgoing arg handling to handle more weird corner cases.

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

20 years agoSupport UndefValue emission.
Brian Gaeke [Sun, 14 Nov 2004 03:22:05 +0000 (03:22 +0000)]
Support UndefValue emission.

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

20 years agosetting path to prcontext.tcl script. Right now it searches for tclsh in your path...
Tanya Lattner [Sat, 13 Nov 2004 23:36:18 +0000 (23:36 +0000)]
setting path to prcontext.tcl script. Right now it searches for tclsh in your path, but this should be obtained from configure.

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

20 years agoRemove debugging code
Chris Lattner [Sat, 13 Nov 2004 23:32:53 +0000 (23:32 +0000)]
Remove debugging code

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

20 years agoArgument promotion transforms functions to unconditionally load their
Chris Lattner [Sat, 13 Nov 2004 23:31:34 +0000 (23:31 +0000)]
Argument promotion transforms functions to unconditionally load their
argument pointers.  This is only valid to do if the function already
unconditionally loaded an argument or if the pointer passed in is known
to be valid.  Make sure to do the required checks.

This fixed ArgumentPromotion/control-flow.ll and the Burg program.

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

20 years agoAdd a testcase we should continue to argpromote
Chris Lattner [Sat, 13 Nov 2004 23:30:22 +0000 (23:30 +0000)]
Add a testcase we should continue to argpromote

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

20 years agoAdd a testcase for a function we cannot legally promote the argument of.
Chris Lattner [Sat, 13 Nov 2004 23:28:39 +0000 (23:28 +0000)]
Add a testcase for a function we cannot legally promote the argument of.

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

20 years agoAdd useful method, minor cleanups
Chris Lattner [Sat, 13 Nov 2004 23:28:10 +0000 (23:28 +0000)]
Add useful method, minor cleanups

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

20 years agoDon't print unneeded labels
Chris Lattner [Sat, 13 Nov 2004 23:27:11 +0000 (23:27 +0000)]
Don't print unneeded labels

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

20 years agoRun prcontext.tcl with tclsh and let it be found in the path. This should be found...
Tanya Lattner [Sat, 13 Nov 2004 23:16:17 +0000 (23:16 +0000)]
Run prcontext.tcl with tclsh and let it be found in the path. This should be found by configure.

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

20 years agoAdding subdirectory dg.exp files in order to be able to use dejagnu to only run speci...
Tanya Lattner [Sat, 13 Nov 2004 23:00:45 +0000 (23:00 +0000)]
Adding subdirectory dg.exp files in order to be able to use dejagnu to only run specific tests (located in some subdirectory of Regression)

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

20 years agoChanged to use tcl script.
Tanya Lattner [Sat, 13 Nov 2004 22:55:51 +0000 (22:55 +0000)]
Changed to use tcl script.

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

20 years agoHack around stupidity in GCC, fixing Burg with the CBE and
Chris Lattner [Sat, 13 Nov 2004 22:21:56 +0000 (22:21 +0000)]
Hack around stupidity in GCC, fixing Burg with the CBE and
CBackend/2004-11-13-FunctionPointerCast.llx

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

20 years agoNew testcase
Chris Lattner [Sat, 13 Nov 2004 22:21:15 +0000 (22:21 +0000)]
New testcase

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

20 years agoRewrote prcontext.py in tcl.
Tanya Lattner [Sat, 13 Nov 2004 21:03:22 +0000 (21:03 +0000)]
Rewrote prcontext.py in tcl.

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

20 years agoshld is a very high latency operation. Instead of emitting it for shifts of
Chris Lattner [Sat, 13 Nov 2004 20:48:57 +0000 (20:48 +0000)]
shld is a very high latency operation. Instead of emitting it for shifts of
two or three, open code the equivalent operation which is faster on athlon
and P4 (by a substantial margin).

For example, instead of compiling this:

long long X2(long long Y) { return Y << 2; }

to:

X3_2:
        movl 4(%esp), %eax
        movl 8(%esp), %edx
        shldl $2, %eax, %edx
        shll $2, %eax
        ret

Compile it to:

X2:
        movl 4(%esp), %eax
        movl 8(%esp), %ecx
        movl %eax, %edx
        shrl $30, %edx
        leal (%edx,%ecx,4), %edx
        shll $2, %eax
        ret

Likewise, for << 3, compile to:

X3:
        movl 4(%esp), %eax
        movl 8(%esp), %ecx
        movl %eax, %edx
        shrl $29, %edx
        leal (%edx,%ecx,8), %edx
        shll $3, %eax
        ret

This matches icc, except that icc open codes the shifts as adds on the P4.

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

20 years agoAdd missing check
Chris Lattner [Sat, 13 Nov 2004 20:04:38 +0000 (20:04 +0000)]
Add missing check

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

20 years agoCompile:
Chris Lattner [Sat, 13 Nov 2004 20:03:48 +0000 (20:03 +0000)]
Compile:

long long X3_2(long long Y) { return Y+Y; }
int X(int Y) { return Y+Y; }

into:

X3_2:
        movl 4(%esp), %eax
        movl 8(%esp), %edx
        addl %eax, %eax
        adcl %edx, %edx
        ret
X:
        movl 4(%esp), %eax
        addl %eax, %eax
        ret

instead of:

X3_2:
        movl 4(%esp), %eax
        movl 8(%esp), %edx
        shldl $1, %eax, %edx
        shll $1, %eax
        ret

X:
        movl 4(%esp), %eax
        shll $1, %eax
        ret

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

20 years agoSimplify handling of shifts to be the same as we do for adds. Add support
Chris Lattner [Sat, 13 Nov 2004 19:50:12 +0000 (19:50 +0000)]
Simplify handling of shifts to be the same as we do for adds.  Add support
for (X * C1) + (X * C2) (where * can be mul or shl), allowing us to fold:

   Y+Y+Y+Y+Y+Y+Y+Y

into
         %tmp.8 = shl long %Y, ubyte 3           ; <long> [#uses=1]

instead of

        %tmp.4 = shl long %Y, ubyte 2           ; <long> [#uses=1]
        %tmp.12 = shl long %Y, ubyte 2          ; <long> [#uses=1]
        %tmp.8 = add long %tmp.4, %tmp.12               ; <long> [#uses=1]

This implements add.ll:test25

Also add support for (X*C1)-(X*C2) -> X*(C1-C2), implementing sub.ll:test18

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

20 years agoNew testcase
Chris Lattner [Sat, 13 Nov 2004 19:49:39 +0000 (19:49 +0000)]
New testcase

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

20 years agoAdd support for shifts
Chris Lattner [Sat, 13 Nov 2004 19:32:45 +0000 (19:32 +0000)]
Add support for shifts

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

20 years agoFold:
Chris Lattner [Sat, 13 Nov 2004 19:31:40 +0000 (19:31 +0000)]
Fold:
   (X + (X << C2)) --> X * ((1 << C2) + 1)
   ((X << C2) + X) --> X * ((1 << C2) + 1)

This means that we now canonicalize "Y+Y+Y" into:

        %tmp.2 = mul long %Y, 3         ; <long> [#uses=1]

instead of:

        %tmp.10 = shl long %Y, ubyte 1          ; <long> [#uses=1]
        %tmp.6 = add long %Y, %tmp.10               ; <long> [#uses=1]

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

20 years agoLazily create the abort message, so only translation units that use unwind
Chris Lattner [Sat, 13 Nov 2004 19:07:32 +0000 (19:07 +0000)]
Lazily create the abort message, so only translation units that use unwind
will actually get it.

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

20 years agoFix: CodeExtractor/2004-11-12-InvokeExtract.ll
Chris Lattner [Sat, 13 Nov 2004 00:06:45 +0000 (00:06 +0000)]
Fix: CodeExtractor/2004-11-12-InvokeExtract.ll

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

20 years agoNew testcase
Chris Lattner [Sat, 13 Nov 2004 00:06:32 +0000 (00:06 +0000)]
New testcase

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

20 years agoFix a bug where the code extractor would get a bit confused handling invoke
Chris Lattner [Fri, 12 Nov 2004 23:50:44 +0000 (23:50 +0000)]
Fix a bug where the code extractor would get a bit confused handling invoke
instructions, setting DefBlock to a block it did not have dom info for.

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

20 years agoSimplify handling of constant initializers
Chris Lattner [Fri, 12 Nov 2004 22:42:57 +0000 (22:42 +0000)]
Simplify handling of constant initializers

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

20 years agoMakefile for lib/Linker
Reid Spencer [Fri, 12 Nov 2004 20:38:45 +0000 (20:38 +0000)]
Makefile for lib/Linker

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

20 years agoThis file originated in lib/VMCore/Linker.cpp but now lives in
Reid Spencer [Fri, 12 Nov 2004 20:37:43 +0000 (20:37 +0000)]
This file originated in lib/VMCore/Linker.cpp but now lives in
lib/Linker/LinkModules.cpp

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

20 years agoThis file originated in tools/gccld/Linker.cpp but now lives in
Reid Spencer [Fri, 12 Nov 2004 20:34:32 +0000 (20:34 +0000)]
This file originated in tools/gccld/Linker.cpp but now lives in
lib/Linker/LinkArchives.cpp

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

20 years ago* Clean up all the shared library output on uninstall
Reid Spencer [Fri, 12 Nov 2004 02:27:36 +0000 (02:27 +0000)]
* Clean up all the shared library output on uninstall
* Provide the correct set of input directories to the TAGS target
* Provide a CTAGS target for building Vi style ctags files.

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

20 years agoDocument the new llvm-ranlib command.
Reid Spencer [Fri, 12 Nov 2004 00:18:35 +0000 (00:18 +0000)]
Document the new llvm-ranlib command.

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

20 years agoCorrectly terminate a list.
Reid Spencer [Fri, 12 Nov 2004 00:16:51 +0000 (00:16 +0000)]
Correctly terminate a list.

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

20 years agoDocument the modifiers and the file format.
Reid Spencer [Fri, 12 Nov 2004 00:15:43 +0000 (00:15 +0000)]
Document the modifiers and the file format.

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

20 years agoMake this build in release mode
Chris Lattner [Thu, 11 Nov 2004 22:11:17 +0000 (22:11 +0000)]
Make this build in release mode

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

20 years agoAdd llvm-ar to the index.
Reid Spencer [Thu, 11 Nov 2004 09:30:00 +0000 (09:30 +0000)]
Add llvm-ar to the index.

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

20 years agoFirst attempt at llvm-ar documentation. Modifiers need a little more
Reid Spencer [Thu, 11 Nov 2004 09:21:18 +0000 (09:21 +0000)]
First attempt at llvm-ar documentation. Modifiers need a little more
explanation.

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