Commit Graph

1189 Commits

Author SHA1 Message Date
Chris Lattner
9d58a500fc Stop using this method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11282 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 21:12:06 +00:00
Chris Lattner
ebcd7941f0 Remvoe use of MO.isVirtualRegister(), turn an assertion into an assert()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11280 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 20:47:24 +00:00
Chris Lattner
bd0485034c Remove use of isPhysicalRegister
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11277 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 20:35:42 +00:00
Chris Lattner
21e79cbacd Fix PR228: [sparc] Boolean constants are emitted as true and false
I will observe that the concept of using WriteAsOperand is completely broken,
but then we all knew that, didn't we?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11255 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 05:16:44 +00:00
Misha Brukman
2647c3925b Doxygenify comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11252 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 23:18:42 +00:00
John Criswell
ccb2a677af Fix PR#226: When emitting padding, always emit it as bytes. Bytes can be
placed into any alignment situation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11247 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 22:15:33 +00:00
Brian Gaeke
f738db0818 Move InstrSchedule's iterator begin/end methods inline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11239 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 18:42:46 +00:00
Brian Gaeke
0dc5753f2b Make SchedGraph::dump() use SchedGraphNodeCommon's const_iterator
instead of randomly groping about inside its outEdges array.
Make SchedGraph::addDummyEdges() use getNumOutEdges() instead of
outEdges.size().
Get rid of ifdefed-out code in SchedGraph::buildGraph().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11238 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 18:42:05 +00:00
Brian Gaeke
97374d40d0 Add a new (static inline) std::ostream& << AllocInfo& method. Use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11002 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-28 19:05:43 +00:00
Tanya Lattner
06723077ed Moved iterators around.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10926 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-20 17:51:13 +00:00
Tanya Lattner
a105c802b2 Moved iterators to common file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10925 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-20 17:49:42 +00:00
Misha Brukman
cbbbdf768f Use the LLVM standard name mangling infrastructure instead of reinventing the
wheel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10891 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-15 22:44:19 +00:00
Brian Gaeke
d011a027e0 Include TargetRegInfo.h and declare SparcTargetMachine forward, to make this
header more easily includable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10880 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-15 18:17:07 +00:00
Chris Lattner
07ad64231f Eliminate the isStringCompatible function, using ConstantArray::isString.
It's not clear why the code was looking for signed chars < 0, but it can't
matter to the assembler anyway, so the check goes away.  This also fixes
compatibility with arrays of [us]byte that have constantexprs in them.

Also slightly restructure some code to be cleaner.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10854 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-14 17:15:17 +00:00
Chris Lattner
7446dc0c4f Finegrainify namespacification
Using the SlotCalculator is total overkill for this file, a simple map
will suffice.  Why doesn't this use the NameMangler interface?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10823 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-13 21:27:59 +00:00
Brian Gaeke
f954326741 Remove dump-input option.
Make addPassesToEmitAssembly() look slightly more like addPassesToJITCompile().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10818 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-13 19:26:21 +00:00
Chris Lattner
d4d4ab58ef Eliminate use of ConstantHandling itf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10782 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 18:08:18 +00:00
Chris Lattner
9982e211ce Move sparc-specific livevar code into lib/Target/Sparc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10733 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-09 18:15:24 +00:00
Chris Lattner
1d415a967b Fix more incestuous #includage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10732 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-09 16:17:09 +00:00
Chris Lattner
46de01e0c8 Move InstrSelection into lib/Target/Sparc, as it's sparc specific. This
makes the incestuous #include'ing of sparc internal headers much less
disturbing.  :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10729 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-09 06:22:34 +00:00
Chris Lattner
75e260990d Move lib/Codegen/RegAlloc into lib/Target/Sparc, as it is sparc specific
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10728 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-09 06:17:12 +00:00
Chris Lattner
f70e0c216c Clean up a lot of the code I added yesterday by exposing the IntrinsicLowering
implementation from the TargetMachine directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10636 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-28 21:23:38 +00:00
Chris Lattner
aed386e6b0 Whoops, don't try to lower non intrinsic calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10632 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-28 09:53:23 +00:00
Chris Lattner
37b1826aab Eliminate some code that is not needed now that we have the intrinsic lowering pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10628 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-28 09:46:33 +00:00
Chris Lattner
f8742b3e03 Use the intrinsic lowering functionality
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10626 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-28 09:43:35 +00:00
Misha Brukman
3615845b3e Really release memory used by functions. Patch by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10572 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-22 03:47:58 +00:00
Chris Lattner
583b9d8455 Hoist some sparc specific code into the sparc target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10554 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 09:17:40 +00:00
Chris Lattner
61838824c2 Remove a horrible API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10551 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 09:15:01 +00:00
Chris Lattner
1e60a9165d Rip JIT specific stuff out of TargetMachine, as per PR176
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10542 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 01:22:19 +00:00
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