Commit Graph

6519 Commits

Author SHA1 Message Date
Alkis Evlogimenos
38af59a43c Add method to assign stack slot to virtual register without creating a
new one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13895 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-29 20:38:05 +00:00
Alkis Evlogimenos
f174cc303b Add grow() member that grows the maps when the number of virtual
registers in the function has changed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13893 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-29 19:03:29 +00:00
Alkis Evlogimenos
f717a05698 Remove defs vector from live intervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13892 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-29 16:18:57 +00:00
Chris Lattner
aafb1c16b4 Thoroughly rehack the dynamic linking mechanisms on Win32. The Win32
dynamic linker does not automatically search libraries when looking up
symbols with GetProcAddress.  Because of this we have to emulate it.  The
only detail is that there doesn't seem to be a way to enumerate the
libraries loaded, so we have a gross hack (tm).

This make the JIT functional on win32 under cygwin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13887 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 23:54:07 +00:00
Chris Lattner
1c457b89bb Prune #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13886 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 23:35:39 +00:00
Tanya Lattner
20890832ea updates to ModuloSched
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13881 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 20:14:12 +00:00
Brian Gaeke
fece1822bf Give PhiCp nodes better names in many cases.
Simplify InsertPhiElimInstructions(), and give it a better doxygen comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13880 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 19:34:00 +00:00
Brian Gaeke
b985158c35 Make debugging output with -print-machineinstrs more useful: always print out
the transformed LLVM code which is the input to the instruction selector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13879 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 19:33:59 +00:00
Chris Lattner
9d1af97d02 Fix the big regression that has been killing the nightly tester these last
few days.  Apparently the old symbol table used to auto rename collisions in
the type symbol table and the new one does not.  It doesn't really make sense
for the new one to do so, so we just make the client do it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13877 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 05:47:27 +00:00
Chris Lattner
c3fcaea8ac Don't use size() when you mean empty()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13876 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 05:40:19 +00:00
Chris Lattner
a5dcc4f7b2 Minor efficiency gain: do 1 nlogn lookup instead of two
Code cleanup


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13875 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 05:36:49 +00:00
Chris Lattner
d06a549384 Minor changes. Switch to a SymbolTable remove that does not take linear time
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13874 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 05:30:51 +00:00
Chris Lattner
11b9be5a1a Fix one of the major things that is causing the C Backend to infinite loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13872 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 05:02:13 +00:00
Chris Lattner
49f61c4ea4 Add support for getting executable memory on Windows. This is actually
much easier than on unix.  :)  The only evil thing is that windows.h defines
a macro named FindExecutable, which collides with one of our names.

The JIT now runs on windows, but it cannot resolve external functions
(like printf) yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13871 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 01:20:58 +00:00
Chris Lattner
c89fe6da17 Add a new function for the JIT. libsupport is now the only library that
includes mman.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13870 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 00:59:40 +00:00
Chris Lattner
0cb162b3bb Use the SystemUtils.h file to do our dirty work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13868 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 00:57:27 +00:00
Chris Lattner
e53477e56c Add support for zero length files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13866 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 00:34:42 +00:00
Chris Lattner
fb777c270b Use the new FileUtilities.h API for mapping a file into an address
space


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13864 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 00:24:41 +00:00
Chris Lattner
eb08299518 Add a pair of functions to hide system specific details of mapping a file in for reading.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13863 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 00:23:48 +00:00
Reid Spencer
4e6620c9e0 Remove some more dead code resulting from adding setTypeName().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13862 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 00:21:06 +00:00
Reid Spencer
9ed0f17a62 Remove an assertion that uses Type::TypeTy that is never hit and will
break when Type::TypeTy goes away. Also remove a dead block of code and
dead comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13861 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 22:05:50 +00:00
Reid Spencer
73b7495a96 Clean up a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13860 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 22:04:46 +00:00
Reid Spencer
5dff158858 Fix for bug 348.
The SymbolTable changes caused this one too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13859 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 21:58:13 +00:00
Brian Gaeke
aeb3c80e8d Make comment lines stick out less.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13858 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 21:41:48 +00:00
Chris Lattner
6f05f35a84 Remove long unused #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13857 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 21:25:44 +00:00
Chris Lattner
63e8dfa8a3 These #includes are long dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13856 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 21:24:38 +00:00
John Criswell
e7b9a1a5f2 Fix a bug in the -deadtypeelim pass. The SymbolTable re-write changed it
to eliminate the wrong type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13855 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 21:16:46 +00:00
Chris Lattner
1fc3739560 Fix warnings about reaching end of non-void function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13852 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 20:57:01 +00:00
Chris Lattner
0a576b00b6 Add DynamicLinker support for systems that provide windows.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13851 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 20:53:10 +00:00
Reid Spencer
6ed81e253c Use the SymbolTable::isEmpty() method instead of checking for no value
planes. A SymbolTable could still have types in it! This fixes problems
with two regression tests that failed because a symbol table that only
contained types was being omitted from bytecode files. Thanks to Chris
for the reduced test case that helped find this immediately.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13842 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 20:18:51 +00:00
Chris Lattner
c52663c4ed This code is a real mess, but at least get the JIT *building* on platforms
(such as plan 9) without mmap.  Of course it won't RUN... but that's another
step.  :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13839 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 18:03:56 +00:00
Chris Lattner
a0846a3fa7 Add support for dos-style files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13837 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 17:49:14 +00:00
Chris Lattner
e1368aef23 Fix InstCombine/load.ll & PR347.
This code hadn't been updated after the "structs with more than 256 elements"
related changes to the GEP instruction.  Also it was not handling the
ConstantAggregateZero class.

Now it does!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13834 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 17:30:27 +00:00
Chris Lattner
8dfe5705b1 Implement constant folding of fmod, which is used a lot in povray
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13823 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 07:25:00 +00:00
Chris Lattner
b18b9d7374 Restructure call constant folding code a bit to make it simpler
Add support for acos/asin/atan.  188.ammp contains three calls to acos with
constant arguments.  Constant folding it allows elimination of those 3 calls
and three FP divisions of the results.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13821 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 06:26:28 +00:00
Chris Lattner
bed85ff010 Header file moved
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13813 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 05:41:36 +00:00
Chris Lattner
a5648f2ea2 Signals.h header moved. Eventually this should move into a lib/System library,
but not right now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13811 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 05:31:24 +00:00
Chris Lattner
d895ffe122 Changes to make libSupport build on systems that don't have the wait syscall.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13806 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 01:20:55 +00:00
Alkis Evlogimenos
75dbe8eafa Add constructors that take a BasicBlock to append to, to the rest of
the llvm::Instruction hierarchy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13800 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 00:15:23 +00:00
Alkis Evlogimenos
fe3a093bc6 Do not pass a null pointer if this instruction is not prepended or
appended anywhere.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13798 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 22:50:28 +00:00
Alkis Evlogimenos
f6e8cb4954 Inline trivial constructors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13797 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 22:07:18 +00:00
Reid Spencer
b03de0c780 Several clean ups suggested by Chris: remove tabs, make SlotMachine do lazy
initialization so we don't scan large Modules/Functions needlessly, tighten
up restrictions on what can be put in SlotMachine (no Constants that aren't
GlobalValues).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13796 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 21:56:09 +00:00
Reid Spencer
75719bf239 Provide the correct patch for bug 345. The solution is to add a setTypeName
function to llvmAsmParser.y and then use it in the one place in the grammar
that needs it. Also had to make Type::setName public because setTypeName
needs it in order to retain compatibility with setValueName.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13795 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 21:48:31 +00:00
Alkis Evlogimenos
e5828f1fa7 Refactor common initialization code in private init() functions.
This is a first step in supplying append to basic block constructors
for all instruction types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13793 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 21:41:09 +00:00
Alkis Evlogimenos
99c58f4910 Use one destination constructor for the unconditional branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13792 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 21:38:14 +00:00
Chris Lattner
85acba6d58 Fix PR344: the incorrect remove was being used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13790 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 17:20:52 +00:00
Chris Lattner
42fbc7e809 A quick and ugly hack to fix PR345. I used TypeTy specifically to make
Reid cringe :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13788 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 17:08:25 +00:00
Reid Spencer
798ff64328 Part of bug 122:
This change removes the BuildBytecodeInfo flag from the SlotCalculator
class. This flag was needed to distinguish between the Bytecode/Writer
and the AsmWriter. Now that AsmWriter doesn't use SlotCalculator, we can
remove this flag and simplify some code. Also, some minor name changes
to CachedWriter.h needed to be committed (missed in previous commit).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13785 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 07:37:11 +00:00
Reid Spencer
0d1b77e282 Part of bug 122. Removed dependency of AsmWriter on SlotCalculator by
incorporating a significantly simpler "SlotMachine" into this file. The
SlotMachine is tailored for use by only the AsmWriter whose requirements
for slot numbers are vastly different than from the Bytecode/Writer. Code
change passes all Feature and Regression tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13784 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 07:18:52 +00:00
Tanya Lattner
ebac64534c Adding scheduling class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13783 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 06:27:36 +00:00
Tanya Lattner
4cffb588f5 Updating my cvs versions. THis is still in progress and much will be changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13782 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 06:27:18 +00:00
Brian Gaeke
1812268126 Add a (not very meaningful) default constructor for AllocInfo objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13773 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 20:43:47 +00:00
Reid Spencer
6b1f58b6a4 Put SlotTable.h inclusion back at front of list to be coding standards
compliant. Thanks, Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13771 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 20:09:05 +00:00
Reid Spencer
a85b8cf110 Make the constructor explicit so we can't implicitly convert bool to
SlotTable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13766 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 19:09:25 +00:00
Reid Spencer
3751bd607b Make some improvements suggested by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13765 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 19:03:21 +00:00
Reid Spencer
293a55f9f0 Adding the initial implementation of the SlotTable class. This class is
the Abstract Data Type that holds slot number values and associates them
with Type* and Value*. The SlotTable is simply the holder of the slot
numbers and provides a controlled interface for building the table. It does
not enforce any particular idiom or functionality for manipulating the slot
numbers.

This is part of bug_122. The SlotCalculator and SlotMachine classes will
follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13764 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 18:44:51 +00:00
Alkis Evlogimenos
2662aa0f00 Remove this file as well as it is no longer needed nor it compiles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13762 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 18:24:27 +00:00
Reid Spencer
fa452c0550 Document a couple functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13761 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 18:14:38 +00:00
Reid Spencer
94f2df295d Changed to use SymbolTable's new iteration interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13759 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 17:29:59 +00:00
Reid Spencer
b152f9ff78 Changed to use SymbolTable's new lookup interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13758 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 17:29:21 +00:00
Reid Spencer
875510805f Made it illegal to pass a Type* through one of the Value* interfaces. The
SymbolTable will now assert if this is done. This didn't find any incorrect
usage of SymbolTable but will prevent future mistakes until Type != Value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13755 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 15:20:47 +00:00
Reid Spencer
9231ac8b6f Convert to SymbolTable's new iteration interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13754 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 08:53:40 +00:00
Reid Spencer
af90b0d8b8 Convert to SymbolTable's new iteration interface. Remove tabs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13753 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 08:53:29 +00:00
Reid Spencer
b870c5f7c5 Completely rewrote the class. SymbolTable now separates Type* from Value* in preparation\
for making Type not derive from Value. There are now separate interfaces \
for looking up, finding, and inserting Types and Values. There are also \
three separate iterator interfaces, one for type planes, one for the types \
(type type plane), and one for values within a type plane. See the \
documentation in the Header file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13752 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 08:52:42 +00:00
Reid Spencer
567bc2cc1e Convert to SymbolTable's new lookup and iteration interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13751 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 08:52:20 +00:00
Reid Spencer
c8a1fcdb48 Remove unused header file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13750 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 08:51:36 +00:00
Reid Spencer
3f0635e012 Make this pass simply invoke SymbolTable::strip().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13749 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 08:51:25 +00:00
Reid Spencer
119b342b20 Remove use of Type::TypeTy from an assert. It will go away soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13748 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 08:50:52 +00:00
Reid Spencer
0098bdfb97 Get rid of a wart: useless getFILE function is now a cast macro.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13747 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 08:46:15 +00:00
Vikram S. Adve
e4e97ef64d Recognize memalign and friends, and handle them specially.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13741 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 08:14:52 +00:00
Chris Lattner
3c6a0d4ae2 Implement InstCombine:shift.ll:test16, which turns (X >> C1) & C2 != C3
into (X & (C2 << C1)) != (C3 << C1), where the shift may be either left or
right and the compare may be any one.

This triggers 1546 times in 176.gcc alone, as it is a common pattern that
occurs for bitfield accesses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13740 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 06:32:08 +00:00
Chris Lattner
c971025b01 Implement some helpers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13738 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 05:32:43 +00:00
Chris Lattner
a710ddc9c4 Implement instcombine/cast.ll:test16:
Canonicalize cast X to bool into a setne instruction


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13736 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 04:29:21 +00:00
Tanya Lattner
17fb34bf8c Moved MachineBasicBlock deconstructor to cpp file and removed it from LeakDetector to fix memory leak bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13718 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-24 07:14:35 +00:00
Chris Lattner
b11a99bd39 Fix a bug in my previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13717 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-24 06:24:46 +00:00
Tanya Lattner
792699c46e Added MachineFunction parent* to MachineBasicBlock. Customized ilist template
to set the parent when a MachineBasicBlock is added to a MachineFunction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13716 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-24 06:11:51 +00:00
Chris Lattner
5bf3ce2b7c Eliminate an explicit use of the LLVM basic block, using getParent instead,
which simplifies the code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13707 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-24 03:44:52 +00:00
Tanya Lattner
0c63e03e04 Changed clone to be const.
Changed copy constructor to set parent, prev, and next pointers to null.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13706 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-24 03:14:18 +00:00
Chris Lattner
f52988a92d Spelling people's names right is kinda important
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13702 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:27:29 +00:00
Chris Lattner
99c59e8e21 Add support for accurate garbage collection to the LLVM code generators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13696 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:23:35 +00:00
Chris Lattner
df04097f87 Add some notes to myself, no functional changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13695 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:23:12 +00:00
Chris Lattner
bbdbf30238 minor wording change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13694 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:22:55 +00:00
Chris Lattner
befa499d45 Fix cases where we missed inlining some more obvious candidates because the
caller was in an SCC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13693 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:22:17 +00:00
Chris Lattner
74c68ffd5f Simplify the interface and remove an unneeded #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13692 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:21:35 +00:00
Chris Lattner
9e7cc2f0d4 Fairly substantial changes to update the alias analysis we are querying as
we make the transformation.  This allows us to use interprocedural alias
analyses successfully.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13691 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:21:17 +00:00
Chris Lattner
2741c97104 Adjust to the changes in the AliasSetTracker interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13690 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:20:19 +00:00
Chris Lattner
057f78ab4e Add support for replacement of formal arguments with simpler expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13689 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:19:55 +00:00
Chris Lattner
08005dfdc9 Implement the -lowergc pass which is used by code generators (like the CBE)
that do not have builtin support for garbage collection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13688 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:19:22 +00:00
Chris Lattner
e899705c27 Recognize and verify the new GC intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13687 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:16:51 +00:00
Chris Lattner
5a24d70d99 Changes to work with the changes to the AliasAnalysis interface. The -no-aa
class is now in the BasicAliasAnalysis.cpp file


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13684 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:15:48 +00:00
Chris Lattner
b52f440860 Move the -no-aa AA implementation into this file since both of these
alias analysis implementations are special: they do not autoforward to a
chained implementation of alias analysis


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13683 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:15:12 +00:00
Chris Lattner
484e3027b2 Updates to work with the new auto-forwarding AA interface changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13682 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:14:27 +00:00
Chris Lattner
2412a05b80 Fix a really nasty bug with the -disable-ds-field-sensitivity option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13681 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:14:09 +00:00
Chris Lattner
1bf3408f96 Update to match the autochaining interface that the AA interface uses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13680 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:13:51 +00:00
Chris Lattner
0f312d6998 Implement the interfaces to update value numbering information. Add an
assert.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13679 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:13:24 +00:00
Chris Lattner
c43e0ae350 Rename a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13676 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:10:58 +00:00
Chris Lattner
e995a2abb3 Add a simple implementation of Andersen's interprocedural pointer analysis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13666 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:00:47 +00:00
Tanya Lattner
b5159ed0cb Fixed up my changes to add support for cloning Machine Instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13665 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 20:58:02 +00:00
Tanya Lattner
466b534a57 Adding support to clone MachineInstr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13661 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 19:35:12 +00:00
Vikram S. Adve
052682f1c3 Inline both direct and indirect callees in the CBU phase because
a direct callee may have indirect callees and so may have changed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13649 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 08:00:34 +00:00
Vikram S. Adve
c5204fb6f8 Complete rewrite of the code that merges DS graphs for equivalence classes
of functions called at a common call site.  The rewrite inlines the
resulting graphs bottom-up on the SCCs of the CBU call graph.  It also
simplifies the merging of equivalence classes by exploiting the fact that
functions in non-trivial SCCs are already merged.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13645 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 07:54:02 +00:00
Brian Gaeke
79333da2bb Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13643 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 05:10:06 +00:00
Chris Lattner
0f9e9d0ad2 Fix for PR340: Verifier misses malformed switch instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13618 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-21 16:47:21 +00:00
Chris Lattner
433e25a920 Fix to make the CBE always emit comparisons inline. Hopefully this will
fix the really bad code we're getting on PPC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13609 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-20 20:25:50 +00:00
Brian Gaeke
ceabd97423 Fix a bug in outputting branches to constant PCs. Since the PC is supplied as
a full 64-bit address, it must be adjusted to fit in the branch instruction's
immediate field. (This is only used in the reoptimizer, for now.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13608 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-20 07:43:40 +00:00
Brian Gaeke
a900452d37 Minor simplification: eliminate a dyn_cast.
Fix a typo in a debug message.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13607 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-19 21:30:01 +00:00
Brian Gaeke
c58a7f4b3c Add CloneTraceInto(), which is based on (and has mostly the same
effects as) CloneFunctionInto().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13601 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-19 09:08:14 +00:00
Brian Gaeke
6129af3fb1 Move RemapInstruction() to ValueMapper, so that it can be shared with
CloneTrace, and because it is primarily an operation on ValueMaps.  It
is now a global (non-static) function which can be pulled in using
ValueMapper.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13600 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-19 09:08:12 +00:00
Brian Gaeke
2fea9ade55 Fold two assertions with backwards error messages into one with a
correct error message.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13590 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-17 21:15:18 +00:00
Brian Gaeke
cc9620ca29 Clean up this pass somewhat:
Add better comments, including a better head-of-file comment.
Prune #includes.
Fix a FIXME that Chris put here by using doInitialization().
Use DEBUG() to print out debug msgs.
Give names to basic blocks inserted by this pass.
Expand tabs.
Use InsertProfilingInitCall() from ProfilingUtils to insert the initialize call.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13581 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-14 21:21:52 +00:00
Brian Gaeke
09015d9468 Don't keep track of references to LLVM BasicBlocks while emitting; use
MachineBasicBlocks instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13568 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-14 06:54:58 +00:00
Brian Gaeke
3fb5d1a6cc Support MachineBasicBlock operands on RawFrm instructions.
Get rid of separate numbering for LLVM BasicBlocks; use the automatically
generated MachineBasicBlock numbering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13567 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-14 06:54:57 +00:00
Brian Gaeke
9f088e481c Generate branch machine instructions with MachineBasicBlock operands instead of
LLVM BasicBlock operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13566 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-14 06:54:56 +00:00
Chris Lattner
fa28bb4601 This was not meant to be committed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13565 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-13 20:56:34 +00:00
Chris Lattner
82fec4e31d Fix a nasty bug that caused us to unroll EXTREMELY large loops due to overflow
in the size calculation.

This is not something you want to see:
Loop Unroll: F[main] Loop %no_exit Loop Size = 2 Trip Count = 2147483648 - UNROLLING!

The problem was that 2*2147483648 == 0.

Now we get:
Loop Unroll: F[main] Loop %no_exit Loop Size = 2 Trip Count = 2147483648 - TOO LARGE: 4294967296>100

Thanks to some anonymous person playing with the demo page that repeatedly
caused zion to go into swapping land.  That's one way to ensure you'll get
a quick bugfix.  :)

Testcase here: Transforms/LoopUnroll/2004-05-13-DontUnrollTooMuch.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13564 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-13 20:43:31 +00:00
Chris Lattner
b7cb9ffd34 Two more improvements for null pointer handling: storing a null pointer
and passing a null pointer into a function.

For this testcase:

void %test(int** %X) {
  store int* null, int** %X
  call void %test(int** null)
  ret void
}

we now generate this:

test:
        sub %ESP, 12
        mov %EAX, DWORD PTR [%ESP + 16]
        mov DWORD PTR [%EAX], 0
        mov DWORD PTR [%ESP], 0
        call test
        add %ESP, 12
        ret

instead of this:

test:
        sub %ESP, 12
        mov %EAX, DWORD PTR [%ESP + 16]
        mov %ECX, 0
        mov DWORD PTR [%EAX], %ECX
        mov %EAX, 0
        mov DWORD PTR [%ESP], %EAX
        call test
        add %ESP, 12
        ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13558 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-13 15:26:48 +00:00
Chris Lattner
9f1b531090 Second half of my fixed-sized-alloca patch. This folds the LEA to compute
the alloca address into common operations like loads/stores.

In a simple testcase like this (which is just designed to excersize the
alloca A, nothing more):

int %test(int %X, bool %C) {
        %A = alloca int
        store int %X, int* %A
        store int* %A, int** %G
        br bool %C, label %T, label %F
T:
        call int %test(int 1, bool false)
        %V = load int* %A
        ret int %V
F:
        call int %test(int 123, bool true)
        %V2 = load int* %A
        ret int %V2
}

We now generate:

test:
        sub %ESP, 12
        mov %EAX, DWORD PTR [%ESP + 16]
        mov %CL, BYTE PTR [%ESP + 20]
***     mov DWORD PTR [%ESP + 8], %EAX
        mov %EAX, OFFSET G
        lea %EDX, DWORD PTR [%ESP + 8]
        mov DWORD PTR [%EAX], %EDX
        test %CL, %CL
        je .LBB2 # PC rel: F
.LBB1:  # T
        mov DWORD PTR [%ESP], 1
        mov DWORD PTR [%ESP + 4], 0
        call test
***     mov %EAX, DWORD PTR [%ESP + 8]
        add %ESP, 12
        ret
.LBB2:  # F
        mov DWORD PTR [%ESP], 123
        mov DWORD PTR [%ESP + 4], 1
        call test
***     mov %EAX, DWORD PTR [%ESP + 8]
        add %ESP, 12
        ret

Instead of:

test:
        sub %ESP, 20
        mov %EAX, DWORD PTR [%ESP + 24]
        mov %CL, BYTE PTR [%ESP + 28]
***     lea %EDX, DWORD PTR [%ESP + 16]
***     mov DWORD PTR [%EDX], %EAX
        mov %EAX, OFFSET G
        mov DWORD PTR [%EAX], %EDX
        test %CL, %CL
***     mov DWORD PTR [%ESP + 12], %EDX
        je .LBB2 # PC rel: F
.LBB1:  # T
        mov DWORD PTR [%ESP], 1
        mov %EAX, 0
        mov DWORD PTR [%ESP + 4], %EAX
        call test
***     mov %EAX, DWORD PTR [%ESP + 12]
***     mov %EAX, DWORD PTR [%EAX]
        add %ESP, 20
        ret
.LBB2:  # F
        mov DWORD PTR [%ESP], 123
        mov %EAX, 1
        mov DWORD PTR [%ESP + 4], %EAX
        call test
***     mov %EAX, DWORD PTR [%ESP + 12]
***     mov %EAX, DWORD PTR [%EAX]
        add %ESP, 20
        ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13557 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-13 15:12:43 +00:00
Chris Lattner
cb2fd557ee Substantially improve code generation for address exposed locals (aka fixed
sized allocas in the entry block).  Instead of generating code like this:

entry:
  reg1024 = ESP+1234
... (much later)
  *reg1024 = 17


Generate code that looks like this:
entry:
  (no code generated)
... (much later)
  t = ESP+1234
  *t = 17

The advantage being that we DRAMATICALLY reduce the register pressure for these
silly temporaries (they were all being spilled to the stack, resulting in very
silly code).  This is actually a manual implementation of rematerialization :)

I have a patch to fold the alloca address computation into loads & stores, which
will make this much better still, but just getting this right took way too much time
and I'm sleepy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13554 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-13 07:40:27 +00:00
Chris Lattner
bee887211b Fix a really nasty bug from my changes on Monday to PHIElim. These changes
broke obsequi and a lot of other things.  It all boiled down to MBB being
overloaded in an inner scope and me confusing it with the one in the outer
scope.  Ugh!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13517 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-12 21:47:57 +00:00
Brian Gaeke
d657c42dce Start NextMBBNumber out at zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13515 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-12 21:35:23 +00:00
Brian Gaeke
0bcb1ad7be Add non-const MachineBasicBlock::getParent() accessor method.
MBBs start out as #-1. When a MBB is added to a MachineFunction, it
gets the next available unique MBB number. If it is removed from a
MachineFunction, it goes back to being #-1.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13514 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-12 21:35:22 +00:00
Chris Lattner
2b10b08ad6 Pass boolean constants into function calls more efficiently, generating:
mov DWORD PTR [%ESP + 4], 1

instead of:

        mov %EAX, 1
        mov DWORD PTR [%ESP + 4], %EAX


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13494 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-12 16:35:04 +00:00
Chris Lattner
587992721c Do not pass in the same argument to the extracted function more than once, and
give the extracted function a more useful name than just foo_code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13493 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-12 16:26:18 +00:00
Chris Lattner
d99e1d3afb Implement support for code extracting basic blocks that have a return
instruction in them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13490 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-12 16:07:41 +00:00
Chris Lattner
e746ad512e Implement splitting of PHI nodes, allowing block extraction of BB's that have
PHI node entries from multiple outside-the-region blocks.  This also fixes
extraction of the entry block in a function.  Yaay.

This has successfully block extracted all (but one) block from the score_move
function in obsequi (out of 33).  Hrm, I wonder which block the bug is in.  :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13489 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-12 15:29:13 +00:00
Chris Lattner
bf749367cb * Pull some code out into the definedInRegion/definedInCaller methods
* Add a stub for the severSplitPHINodes which will allow us to bbextract
  bb's with PHI nodes in them soon.
* Remove unused arguments from findInputsOutputs
* Dramatically simplify the code in findInputsOutputs.  In particular,
  nothing really cares whether or not a PHI node is using something.
* Move moveCodeToFunction to after emitCallAndSwitchStatement as that's the
  order they get called.
* Fix a bug where we would code extract a region that included a call to
  vastart.  Like 'alloca', calls to vastart must stay in the function that
  they are defined in.
* Add some comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13482 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-12 06:01:40 +00:00
Chris Lattner
346be7f5bc Generate substantially better code when there are a limited number of exits
from the extracted region.  If the return has 0 or 1 exit blocks, the new
function returns void.  If it has 2 exits, it returns bool, otherwise it
returns a ushort as before.

This allows us to use a conditional branch instruction when there are two
exit blocks, as often happens during block extraction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13481 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-12 04:14:24 +00:00
Chris Lattner
5b01e298ed Two minor improvements:
1. Get rid of the silly abort block.  When doing bb extraction, we get one
     abort block for every block extracted, which is kinda annoying.
  2. If the switch ends up having a single destination, turn it into an
     unconditional branch.

I would like to add support for conditional branches, but to do this we will
want to have the function return a bool instead of a ushort.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13478 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-12 03:22:33 +00:00
Chris Lattner
8abf69374e Switch this from using an std::map to using a DenseMap. This speeds up
phi-elimination from 0.6 to 0.54s on kc++.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13454 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-10 19:17:36 +00:00
Chris Lattner
80e20eb487 Use a new VRegPHIUseCount to compute uses of PHI values by other phi values
in the basic block being processed.  This fixes PhiElimination on kimwitu++
from taking 105s to taking a much more reasonable 0.6s (in a debug build).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13453 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-10 19:06:37 +00:00
Chris Lattner
791f896d9f Now that we use an ilist of machine instructions, iterators are more robust
than before.  Because this is the case, we can compute the first non-phi
instruction once when de-phi'ing a block.  This shaves ~4s off of
phielimination of _Z7yyparsev in kimwitu++ from 109s -> 105s.  There are
still much more important gains to come.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13452 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-10 18:47:18 +00:00
Chris Lattner
c81e6bae88 Fix a fairly serious pessimizaion that was preventing us from efficiently
compiling things like 'add long %X, 1'.  The problem is that we were switching
the order of the operands for longs even though we can't fold them yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13451 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-10 15:15:55 +00:00
Chris Lattner
6d3848df7e Patch to fix PR337. Make sure to mark all aliased physical registers as used
when we see a read of a register.  This is important in cases like:

AL = ...
AH = ...

   = AX

The read of AX must make both the AL and AH defs live until the use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13444 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-10 05:12:43 +00:00
Chris Lattner
9984fd0df9 Fix some comments, avoid sign extending booleans when zero extend works fine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13440 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-09 23:16:33 +00:00
Chris Lattner
96e3b426d5 Generate more efficient code for casting booleans to integers (no sign extension required)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13439 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-09 22:28:45 +00:00
Chris Lattner
cb3ad01833 syntactically loopify natural loops so that the GCC loop optimizer can find them. This should *dramatically* improve the performance of CBE compiled code on targets that depend on GCC's loop optimizations (like PPC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13438 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-09 20:41:32 +00:00
Chris Lattner
4589ed9510 Do not emit prototypes for setjmp/longjmp, as they are handled specially
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13437 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-09 16:03:29 +00:00
Chris Lattner
0555ed8bff Fine grainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13436 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-09 06:22:29 +00:00
Chris Lattner
6875807572 Make the floating point constant pools local to each function, split the
FindUsedTypes manipulation stuff out to be a seperate pass, and make the
main CWriter be a function pass now!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13435 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-09 06:20:51 +00:00
Chris Lattner
c2421439b5 Get this looking more like a function pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13433 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-09 04:30:20 +00:00
Chris Lattner
0979ca7e3e Implement the AddPrototypes method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13432 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-09 04:29:57 +00:00
Chris Lattner
a05e0ec419 Print all PHI copies for successor blocks before the terminator, whether it be a conditional branch or switch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13430 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-09 03:42:48 +00:00
Chris Lattner
be97b4e9ab Fix stupid bug in my checkin yesterday
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13429 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 22:41:42 +00:00
Tanya Lattner
6b160503b5 Changed CPUResource to allow access to maxnum users.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13425 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 16:12:50 +00:00
Tanya Lattner
73e3e2e10f Updating my versions of ModuloScheduling in cvs. Still not complete.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13424 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 16:12:10 +00:00
Brian Gaeke
429022bf83 Add support for widening integral casts.
Flesh out the SetCC support... which currently ends in a little bit
of unfinished code (which is probably completely hilarious) for
generating the condition value splitting the basic block up into 4
blocks, like this (clearly a better API is needed for this!):

       BB
   cond. branch
     /         /          R1=1    R2=0
     \      /
      \    /
    R=phi(R1,R2)

Other minor edits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13423 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 06:36:14 +00:00
Brian Gaeke
59dbff714c Add a bunch more branches
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13422 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 06:08:29 +00:00
Brian Gaeke
9f56482a43 Flesh out GEP support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13421 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 05:27:20 +00:00
Brian Gaeke
6b1d2fa1d1 Add ADD with immediate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13420 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 05:26:55 +00:00
Brian Gaeke
c3e970122a Add forms of CMP, SUBCC, and a few branches, and some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13419 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08 04:21:32 +00:00