Commit Graph

1654 Commits

Author SHA1 Message Date
Brian Gaeke
45f0b6dd56 Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9187 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-16 23:45:05 +00:00
Chris Lattner
72ac148d49 Add support for 'weak' linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9171 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-16 18:29:00 +00:00
Chris Lattner
60fa583545 #include vector which we will need here soon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9144 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-15 22:09:32 +00:00
Chris Lattner
fd05924946 Decrease usage of use_size()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9135 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-15 16:48:29 +00:00
Chris Lattner
c2b81f69ed Output a contorted sequence of instructions to make sure that we don't access
off the bottom of the stack.  This fixes PR#41


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9114 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-14 19:09:05 +00:00
Chris Lattner
d5b7c47b27 Disable the leaf function optimization, which is apparently not legal on
X86/linux.  :(  The problem is that a signal delivered while the function
is executing could clobber the functions stack.  This is a partial fix
for PR41.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9113 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-14 18:52:41 +00:00
Chris Lattner
3875657ee5 Do not allow fallthroughs in switch statements. This fixes PR37,
253.perlbmk, and test/Programs/SingleSource/UnitTests/2003-10-13-SwitchTest.c!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9101 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 20:32:04 +00:00
Brian Gaeke
4296088ccf Remove WordsEmitted statistic; there's already a non-backend-specific
jello statistic for this (just divide #-bytes-of-code-emitted by 4).

Rewrite head-of-file comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9098 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 19:51:20 +00:00
Chris Lattner
4946a8cf56 Use the autoconf macro John wrote
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9095 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 17:13:53 +00:00
Chris Lattner
cf3056db0f Regularize header file comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9071 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 03:32:08 +00:00
Chris Lattner
5ef6ffd6c3 * Spell "necessary" correctly
* Print floating point values using C99 hexadecimal style FP if possible.
  This increases the number of floating point constants that may be emitted
  inline, and improves precision for global variable initializers which
  can not be emitted in integer form.

This fixes the Olden/Power benchmark with the CBE!!!!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9052 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-12 08:12:58 +00:00
Chris Lattner
9860e77110 * Be TBAA safe
* Fix isFPCSafeToPrint to find more constants safe to print, which it was
  failing because ftostr was padding with leading space characters.
* Scan the entire module for global constants instead of each function at a
  time.  This has the advantage of allowing us to emit constants at global
  scope instead of function scope.  This speeds FP programs quite a bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9048 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-12 04:36:29 +00:00
Brian Gaeke
82a036fd19 Don't include "Config/stdlib.h".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9037 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 19:12:22 +00:00
Brian Gaeke
17634f7668 Include <cstdio> instead of <stdio.h>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9032 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 18:46:52 +00:00
Misha Brukman
cf00c4ab3b Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9027 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 17:57:28 +00:00
Misha Brukman
aa41c3ca20 * Doxygenified comments
* Wrap code at 80 columns
* Ordered includes according to LLVM style guide


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9020 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 17:41:32 +00:00
Brian Gaeke
2c9b913fc0 Add # of printed instructions statistic to both the SPARC and X86 LLC backends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8892 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-06 15:41:21 +00:00
Chris Lattner
d324e2501c Add support for the Invoke instruction by using the LowerInvoke pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8872 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-05 19:16:09 +00:00
Chris Lattner
c58c169eda Instead of hacking in custom support for Invoke/Unwind, use the LowerInvoke pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8871 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-05 19:15:47 +00:00
Chris Lattner
dd76acac3f A couple of minor code cleanups.
Print literal doubles using ftostr instead of <<, because it yields higher precision numbers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8855 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-05 00:40:51 +00:00
Alkis Evlogimenos
7237ecef13 Moved enum and command-line option in separate file. Also added function that returns the user selected register allocator to the caller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8819 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-02 16:57:49 +00:00
Alkis Evlogimenos
eed462b685 Change llc command line for register allocators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8815 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-02 06:13:19 +00:00
Alkis Evlogimenos
77e78d050a Revert previous change. For some reason this went into the main branch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8805 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-01 19:40:13 +00:00
Alkis Evlogimenos
6ac2c8c673 Added command line option for linear scan allocator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8804 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-01 19:38:10 +00:00
Misha Brukman
99b2d3d852 The comment seems irrelevant as the pass has become a BasicBlock pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8803 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-01 05:24:50 +00:00
Chris Lattner
56d225116f Make sure to get the definition of getRegisterAllocator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8801 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 22:24:00 +00:00
Chris Lattner
9cd3fe9c6d RegisterAllocation.h is going away
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8795 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 20:15:04 +00:00
Chris Lattner
797c136607 include passes.h which defines the interface this file exposes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8793 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 20:13:59 +00:00
Brian Gaeke
f478556740 Add statistic for # of emitWord() calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8772 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 17:49:41 +00:00
Brian Gaeke
222bd53c2c Update head-of-file comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8699 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-24 18:16:23 +00:00
Brian Gaeke
6a256cc37c Untabify tabs in stuff I've recently added.
Check in my register allocator state-saving code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8698 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-24 18:08:54 +00:00
Brian Gaeke
59b1c566c9 Use getRegClassID() instead of getRegClass()->getID(), since it's there.
Shorten the markSuggestedColorUsable method.
Add a switch for saving reg. alloc. state (coming soon).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8697 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-24 17:50:28 +00:00
Brian Gaeke
eefaeb84f1 Remove some unused methods of class IGNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8696 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-24 04:29:52 +00:00
Misha Brukman
452db67a0e Fixed spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8687 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-23 17:28:11 +00:00
Misha Brukman
8b2fe1943c Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8686 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-23 17:27:28 +00:00
Chris Lattner
8474f6fcda Move getAnalysisUsage method from header to .cpp file. Add a normal file
header comment


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8679 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-23 15:13:04 +00:00
Vikram S. Adve
4d436c1a41 Fix assertion so it doesn't not trip incorrectly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8650 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 07:55:27 +00:00
Brian Gaeke
bd353fb662 Use C++ math header instead of C version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8648 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 03:57:37 +00:00
Brian Gaeke
37bc4cce9b Erase now-unused prototypes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8647 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 02:51:00 +00:00
Brian Gaeke
874f423f54 Rearrange #includes ... since there are fewer now I guess it's a win.
(I also zapped printMachineCode() and printLabel() at the previous checkin,
but forgot to mention it.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8646 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 02:50:21 +00:00
Brian Gaeke
5779ef2ce0 Standardize the names of include guards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8645 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 02:31:37 +00:00
Brian Gaeke
fdb2596c77 Standardize the names of include guards.
Remove more excess whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8644 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 02:31:25 +00:00
Brian Gaeke
6264fb70c1 Standardize the names of include guards.
Fix typos in file header comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8643 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 02:31:15 +00:00
Brian Gaeke
43ce8fe477 I tried to standardize the formatting and tidy up the huge amount of
excess whitespace a little. Also improved some comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8642 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 02:24:09 +00:00
Brian Gaeke
4efe342424 Convert PhyRegAlloc into a proper pass.
PhyRegAlloc.cpp:
 Don't include TargetMachine.h or TargetRegInfo.h, because these are provided
  by PhyRegAlloc.h.
 Merge class RegisterAllocator into class PhyRegAlloc.
 Simplify & move ctor, dtor to PhyRegAlloc.h.
 Make some of PhyRegAlloc's reference members into pointer members,
  so they can be more easily messed with.
 MarkAllocatedRegs() becomes a member method, with fewer args.

PhyRegAlloc.h:
 Include Pass.h, TargetMachine.h and TargetRegInfo.h. Don't declare
  TargetRegInfo forward.
 Give AddedInstrns the obvious clear() method.
 Make some of PhyRegAlloc's reference members into pointer members,
  so they can be more easily messed with.
 Add prototype for markAllocatedRegs().
 Remove unused inline void constructLiveRanges().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8641 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 01:23:46 +00:00
Chris Lattner
02a3be020a Rename Function::getEntryNode -> getEntryBlock
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8625 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 14:39:18 +00:00
Brian Gaeke
79c980399e Fix a typo in Sparc.cpp.
Update names of some pass creator fns in addPassesToEmitAssembly().
FunctionInfo is gone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8599 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-18 17:37:46 +00:00
Brian Gaeke
b92c5c0c15 Rename the pass creator fn to mimic the other creator fn names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8598 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-18 17:37:35 +00:00
Brian Gaeke
866dc1def7 Fix (and properly doxygenify) some comments. Incorporate
functionality of FunctionInfo pass as doFinalization method.
Rename pass to match names of other passes like it.
Rename the pass creator fn to mimic the other creator fn names.
Include StringExtras for utostr().
Make symbol prologue/epilogue stuff redundant with
 EmitBytecodeToAssembly, in preparation for refactoring.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8597 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-18 17:37:25 +00:00
Brian Gaeke
bb7cd97d53 Make the symbol prologue/epilogue stuff redundant with MappingInfo, in
preparation for refactoring.
Rename the pass creator fn to mimic the other creator fn names.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8596 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-18 17:37:14 +00:00