Commit Graph

1160 Commits

Author SHA1 Message Date
Misha Brukman
97f9cf2de2 * Converted C-style comments to C++
* Doxygenified comments
* Reordered #includes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10503 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-17 22:08:20 +00:00
Misha Brukman
3d0ad411a5 Reordered #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10502 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-17 22:06:28 +00:00
Misha Brukman
c3402cd735 Doxygenified some comments, reduced extraneous space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10501 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-17 22:06:08 +00:00
Misha Brukman
d71295a684 Reorganized the Sparc backend to be more modular -- each different
implementation of a Target{RegInfo, InstrInfo, Machine, etc} now has a separate
header and a separate implementation file.

This means that instead of a massive SparcInternals.h that forces a
recompilation of the whole target whenever a minor detail is changed, you should
only recompile a few files.

Note that SparcInternals.h is still around; its contents should be minimized.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10500 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-17 22:04:00 +00:00
Alkis Evlogimenos
4d7af65903 Change interface of MachineOperand as follows:
a) remove opIsUse(), opIsDefOnly(), opIsDefAndUse()
    b) add isUse(), isDef()
    c) rename opHiBits32() to isHiBits32(),
              opLoBits32() to isLoBits32(),
              opHiBits64() to isHiBits64(),
              opLoBits64() to isLoBits64().

This results to much more readable code, for example compare
"op.opIsDef() || op.opIsDefAndUse()" to "op.isDef()" a pattern used
very often in the code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10461 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-14 13:24:17 +00:00
John Criswell
f5ba89df1f This appears to fix Bug 172 and does not break any other feature tests or
regression tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10388 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-10 22:51:41 +00:00
Misha Brukman
a59f41fc6c * Add code to flush the ICache, which any self-respecting SMC must do
* Restore registers *after* everything else to avoid any possible side effects

This fixes McCat-imp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10147 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-21 23:48:54 +00:00
Misha Brukman
c6b1584de6 Include the file before we close the llvm namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9954 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 00:23:05 +00:00
Misha Brukman
6275a04768 Substantially re-organized this file:
* There is now only one pass to print out assembly instead of two
* It is a FunctionPass
* The Module-level printing of globals is now in doFinalization() method of the
  FunctionPass
* The code has been reformatted to follow LLVM coding standards
* Some comments, not all, were doxygenified
* Last but not least, the function to create an instance of this pass is also no
  longer a method in the UltraSparc class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9953 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 00:22:19 +00:00
Misha Brukman
661a571053 The function to create an instance of this pass is no longer a method of
the UltraSparc class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9952 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 00:19:02 +00:00
Misha Brukman
7e060be881 The functions to create new instances of passes are no longer methods in the
UltraSparc class. Comments are also doxygen-compatible now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9951 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 00:17:20 +00:00
Misha Brukman
1be1a235d7 * Put command-line switches in their own namespace
* Pass creation functions are no longer in the UltraSparc class


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9950 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 00:16:28 +00:00
Misha Brukman
bede635646 Force a dependency on the .inc file, which must be generated!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9949 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 00:05:09 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
Brian Gaeke
e9414cab00 Fix problems linking against the reoptimizer; _llvm_regAllocState must have
externally-visible linkage, and SaveStateToModule must default to true for llc.
I don't remember why I made it const; perhaps it should be deconstified.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9858 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-10 07:12:01 +00:00
Brian Gaeke
213904133d Operand numbers are now ints. Save the register allocation of the value
each instruction produces as "operand" -1, and the other operands as 0
.. n, as before. PhyRegAlloc::saveState() is refactored into
PhyRegAlloc::saveStateForValue().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9842 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-10 00:05:26 +00:00
Brian Gaeke
1654bdba0b Fix PR103
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9830 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-09 07:08:34 +00:00
Brian Gaeke
641271df3c Fix two typos I found in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9806 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-08 18:12:24 +00:00
Misha Brukman
6d2670de22 For some reason, LICM and GCSE like to crash the FunctionPassManager when they
are being added as FunctionPasses... Sigh.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9798 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-08 00:01:39 +00:00
Misha Brukman
52709450c8 Implement branching to a PC-relative constant (not a BasicBlock).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9793 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 21:07:30 +00:00
Misha Brukman
351881793a PreSelection is not optional, it performs a necessary and vital transformation
for the Sparc backend: breaking up constant expressions. Thus, we cannot have it
guarded by a conditional, it should never be disabled.

Also, it's now available for the JIT since it is a FunctionPass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9791 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 20:33:25 +00:00
Misha Brukman
e5ad8155d3 Switch to emitting MachineConstantPool the way it was meant to be done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9777 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 18:06:26 +00:00
Misha Brukman
f905ed5204 Switch to using the standard representation of the constant pool -- namely, the
MachineConstantPool. This involved refactoring the two classes involved in
printing out Sparc assembly. In fact, they should share all this code anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9776 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 17:45:28 +00:00
Misha Brukman
941fc9acd9 We accept TargetMachine as a const reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9775 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 17:44:18 +00:00
Misha Brukman
7eabdc5fb8 PreSelection and PeepholeOpts are now FunctionPasses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9774 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 17:43:43 +00:00
Misha Brukman
feed25ffdc * Stop making a global for each constant that cannot live in an instruction;
it will be converted to a MachineConstantPool index during instruction
  selection
* This is now eligible to become a FunctionPass since it does not have any side
  effects outside of the function it is processing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9773 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 17:31:22 +00:00
Misha Brukman
49ab7f2089 * Use the MachineConstantPool for storing constants instead of a hash_set;
* Do not create new globals for constants!

Also, order #includes as per coding style guide


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9772 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 17:29:48 +00:00
Misha Brukman
22eb79619d Use basename $< to get just the filename, not full path, for ease of reading.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9770 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 17:26:27 +00:00
Chris Lattner
c1e0d7876b Hopefully this will fix PR98
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9762 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 00:38:09 +00:00
Misha Brukman
6d7aad1dd5 * Make the comment header 80 columns long
* Alphabetize #includes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9751 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-06 18:06:13 +00:00
Misha Brukman
e2bf0a2c36 Let's not forget about our friends -- Constant Pool indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9750 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-06 00:04:11 +00:00
Chris Lattner
414d9d2707 Do not use a class before it is defined.
Be gcc 3.4 clean


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9727 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 06:25:06 +00:00
Brian Gaeke
55766e139a Update verifySavedState()'s comment, so that it reflects its current
status.  In doFinalization(), skip over external functions, just like
Anand's mapping info does.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9703 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-04 22:42:41 +00:00
Brian Gaeke
cce4e7a1b1 Add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9697 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-04 18:25:56 +00:00
Brian Gaeke
3ceac85296 Include llvm/CodeGen/MachineCodeForInstruction.h. Use it to start
implementing verifySavedState().

In saveState(), use the new AllocInfo::AllocStateTy enum, and increment
Insn each time through the loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9617 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 21:21:33 +00:00
Brian Gaeke
82c5eb7bc8 Make AllocState an enum.
Move the stringifying method for that enum into class AllocInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9616 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 21:21:22 +00:00
Brian Gaeke
3386e45440 Tweak sed commands so that they filter out more # stuff and also
work on Mac OS X. Also turn ${...} into $(...); we do not speak BSD
Make.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9589 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-29 20:07:35 +00:00
Brian Gaeke
8fc493430c Publicize the type of FnAllocState.
Prototype option to save state in a global instead of as a Constant in
 the Module. (Turned off, for now, with the on/off switch welded in the off
 position. You get the idea.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9500 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-24 21:21:58 +00:00
Brian Gaeke
232db6e8d6 Move the implementations of ==, != on AllocInfos here, from UnpackTraceFunction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9452 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 20:39:18 +00:00
Brian Gaeke
537132bf12 Move AllocInfo structure to a private AllocInfo.h header file.
Make FnAllocState contain vectors of AllocInfo, instead of LLVM Constants.
Give doFinalization a method comment, and let it do the work of converting
 AllocInfos to LLVM Constants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9451 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 20:32:55 +00:00
Brian Gaeke
b8dbbcee25 Make FnAllocState contain vectors of AllocInfo, instead of LLVM Constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9450 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 20:32:02 +00:00
Brian Gaeke
3d7125cd66 New file, containing AllocInfo structure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9449 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 20:31:51 +00:00
Misha Brukman
f54c437714 * Eliminate `using' directive
* Fix order of #includes
* Make code layout more consistent
* Eliminate extraneous whitespace and comment-lines


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9433 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 18:10:02 +00:00
Misha Brukman
396c8c34ed * Fix order of #include files
* Doxygen-ify method comments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9432 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 18:06:27 +00:00
Misha Brukman
0d82a54bb9 * Order #includes as per style guide
* Doxygen-ify comments
* Make code layout more consistent


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9431 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 18:03:50 +00:00
Misha Brukman
a1f64355d7 * Use C++ style comments instead of C-style
* Make file description more readable
* Make code layout more consistent, include comment in assert so it's visible
  during execution if it hits


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9430 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 18:02:47 +00:00
Misha Brukman
0849f5ace9 * Eliminate `using' directive
* Make code layout more consistent


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9427 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 17:43:17 +00:00
Misha Brukman
5e152593e0 Make code layout more consistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9426 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 17:39:37 +00:00
Misha Brukman
b461d37be9 Make code layout more consistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9418 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 16:48:30 +00:00
Brian Gaeke
3692fd97a6 Change the type of FnAllocState.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9388 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-22 20:44:29 +00:00