Commit Graph

1833 Commits

Author SHA1 Message Date
Brian Gaeke
03f84a969c Include PowerPC.h. Flesh out the stub versions of addPassesToEmitAssembly()
and addPassesToJITCompile() slightly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11076 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-02 19:06:36 +00:00
Brian Gaeke
b77232d1fc Add comments describing how you would add prototypes for factory methods for
PowerPC-specific passes here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11073 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-02 19:05:28 +00:00
Chris Lattner
af70362e40 Codegen -0.0 correctly. Do not use fldz! This is another -0.0 == +0.0 problem, arg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11070 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-02 18:56:30 +00:00
Alkis Evlogimenos
a1b6f95f78 FpMOV is also a move instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11055 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-01 08:22:16 +00:00
Chris Lattner
847df25e7d Add some comments sketching out how this is to work eventually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11026 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-30 22:25:18 +00:00
Chris Lattner
79b13735ad Add a new flag, which is only used for symmetry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11025 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-30 22:24:18 +00:00
Chris Lattner
cf93cdde56 Add (currently disabled) support to the instruction selector to only insert
FP_REG_KILL instructions at the end of blocks involved with critical edges.

Fix a bug where FP_REG_KILL instructions weren't inserted in fall through
unconditional branches.  Perhaps this will fix some linscan problems?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11019 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-30 22:13:44 +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
Brian Gaeke
954e3164be Add the JITInfo object, accessor & initializer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10972 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-23 06:39:30 +00:00
Brian Gaeke
7b0cd6d6cb Add CodeEmitter and JITInfo stubs. Dump the old
PowerPCTargetMachine::addPassesToJITCompile() method, in favor of the
TargetJITInfo interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10971 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-23 06:35:43 +00:00
Brian Gaeke
b1b9dc35a7 Build the PowerPC directory, so it is less likely to bit-rot (again)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10938 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-21 21:16:10 +00:00
Brian Gaeke
ca78f49234 Import of skeletal PowerPC backend I have had laying around for months...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10937 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-21 21:13:19 +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
Brian Gaeke
0f5918a0b6 Make this assertion more self-explanatory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10879 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-15 18:15:58 +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
aa06d0439e 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10853 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-14 17:14:42 +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
Alkis Evlogimenos
f998a7e671 Output mov %REG = 0 instead of xor %REG, %REG, %REG to clear a
register so that LiveVariable analysis is not confused.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10773 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 07:22:45 +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
Alkis Evlogimenos
5e30002af7 Add TargetInstrInfo::isMoveInstr() to support coalescing in register
allocation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10633 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-28 17:35:08 +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
4482715f3d implement support for the intrinsic lowering functionality
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10629 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-28 09:47:19 +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
Chris Lattner
f045328dd1 finegrainify namespacification
add new getIntPtrType() method


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10579 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-22 05:01:15 +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
Alkis Evlogimenos
0ef76cadbb Move FP_REG_KILL closer to the return instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10567 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-21 16:47:43 +00:00
Alkis Evlogimenos
9abc81790e Move FP_REG_KILL closer to the actual branch instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10563 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 17:28:15 +00:00
Alkis Evlogimenos
e0bb3e766d Remove floating point killer pass. This is now implemented in the
instruction selector by adding a new pseudo-instruction
FP_REG_KILL. This instruction implicitly defines all x86 fp registers
and is a terminator so that passes which add machine code at the end
of basic blocks (like phi elimination) do not add instructions between
it and the branch or return instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10562 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 16:22:59 +00:00
Chris Lattner
655239cc6b Finally, _actually delete the machine code_ for a function, after it has
been emitted.  Also, since the FPK pass is causing memory access violations,
disable it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10559 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 10:20:19 +00:00
Chris Lattner
9068574a29 Fix memory leak in the stackifier, due to the machinebasicblocks not holding
instructions on an ilist


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10556 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 10:12:17 +00:00
Chris Lattner
f2e49d4c1a Finegrainify namespacification
Minor cleanups to killer pass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10555 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 09:58:55 +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
2828970819 A minor cleanup for better encapsulation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10545 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 02:03:14 +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