Commit Graph

4660 Commits

Author SHA1 Message Date
Chris Lattner
928e23f9ba Initial version of MachineCodeEmitter interface: empty
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4864 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:21:36 +00:00
Chris Lattner
b7a2d2256f The hopefully final version of addPassesToEmitMachineCode which does not
have any question about ownership


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4863 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:15:42 +00:00
Misha Brukman
f86c0e0cab Ignore generated files gram.tab.c and gram.tab.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4862 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:15:37 +00:00
Misha Brukman
236757df2e Ignore generated files Lexer.cpp and llvmAsmParser.*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4861 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:14:54 +00:00
Misha Brukman
92ad9f7b40 Ignore generated files FileLexer.* and FileParser.*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4860 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:13:59 +00:00
Chris Lattner
dc095240c9 Add comment about ownership semantics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4859 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:13:45 +00:00
Misha Brukman
f514d51b20 * Abstracted out stack space allocation into its own function
* Added saving of register values to the stack


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4858 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:11:58 +00:00
Misha Brukman
6877dd3fb0 Fix order of operands on a store from reg to [reg+offset].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4857 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:10:35 +00:00
Chris Lattner
9f729a30b2 Add stub to emit machine code for JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4856 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:00:50 +00:00
Chris Lattner
b45b3b3cd1 Continued support for field intitializers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4855 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 17:53:54 +00:00
Chris Lattner
db1b766fe6 Continued support for field initializer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4854 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 17:44:35 +00:00
Chris Lattner
7331ab9d56 Continued support for Field Initializer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4853 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 17:43:58 +00:00
Chris Lattner
9833493bae Adjustments due to new FieldInit stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4852 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 17:43:43 +00:00
Chris Lattner
f1e37d9d03 Add comments, factor out common code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4851 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 16:57:01 +00:00
Chris Lattner
34a7769b0b Add support for field exprs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4850 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 16:43:43 +00:00
Chris Lattner
28520c4b61 * Move BitsInit::resolveReferences up with the rest of BitsInit code
* Initial support for field expressions


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4849 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 16:43:30 +00:00
Chris Lattner
a1651900e1 Initial support for Field Expressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4848 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 16:42:52 +00:00
Chris Lattner
d00e8f1f83 Add correct dependency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4847 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 16:31:46 +00:00
Chris Lattner
24e79094f9 Split up targets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4846 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 16:13:42 +00:00
Chris Lattner
07278e48dc Add comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4845 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 16:13:23 +00:00
Chris Lattner
737ae6ea61 Make sure to build lib/Support before the utilities, then use the new
makefile in utils to build the utilities


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4844 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 01:23:26 +00:00
Chris Lattner
e62c1185be Initial checkin of TableGen utility
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4843 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 01:23:04 +00:00
Chris Lattner
24567a9202 Add makefile to build subdirs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4842 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 01:21:34 +00:00
Chris Lattner
f8bafe8fdb Add rawfrm flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4841 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-01 23:25:59 +00:00
Chris Lattner
a4978ccbcb Don't add implicit regs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4840 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-01 23:24:58 +00:00
Brian Gaeke
c2505985ce brg
InstSelectSimple.cpp: Refactor out conversion of byte, short -> int
  from visitReturnInst() to new method, promote32().
 Use it in both visitReturnInst() and visitCallInst().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4839 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-30 11:57:28 +00:00
Brian Gaeke
18a20212d9 brg
InstSelectSimple.cpp: First draft of visitCallInst method, handling
 int/float args.
X86InstrInfo.def: Add entries for CALL with 32-bit pc relative arg, and
 PUSH with 32-bit reg arg.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4838 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-29 12:01:58 +00:00
Vikram S. Adve
0e2cf7606d Several fixes:
(1) Applied patch from Casey to implement iterator::operator= correctly:
    it should use a pointer, not a reference.
(2) Added operators == and !=, and method all().
(3) Important bug fix: excess bits need to be ignored in operations
    like ==, count(), and all().  We do this by ensuring excess bits
    in the last bitset are always 0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4837 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-27 17:46:38 +00:00
Vikram S. Adve
61ff02982f Fix logical error in TD pass: we should clear Mod/Ref bits of each caller
before inlining their graphs into a function.  To support this,
added flags to CloneFlags to strip/keep Mod/Ref bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4836 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-27 17:41:13 +00:00
Vikram S. Adve
e127a14991 Added flags to CloneFlags to strip/keep Mod/Ref bits when cloning a graph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4835 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-27 17:39:37 +00:00
Vikram S. Adve
f443e6698f No longer need local graph to find call sites.
Also some major fixes within IPModRef.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4834 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-27 17:38:56 +00:00
Vikram S. Adve
9a96428297 (1) Bug fix that was causing nodes with dangling references to be freed.
We run removeDeadNodes() on the TD graph up front before using it.
(2) Major enhancement to printing of results: now we list the actual objects
    that are mod/ref instead of just printing the bit vectors.
Also an important bug fix in TDDataStructures pass (no change here):
clear Mod/Ref bits of callers before inlining into a function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4833 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-27 17:37:46 +00:00
Brian Gaeke
c11232a8c4 brg
InstSelectSimple.cpp: Add some comments that say what I'm going to do for
 calls and casts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4832 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-26 10:43:30 +00:00
Vikram S. Adve
e31267dd9a Keep global nodes in each DS Graph (by forcing them to be marked live).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4831 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-25 18:21:25 +00:00
Misha Brukman
8b938664f2 Oops. Got the MOVrm and MOVmr mixed up. Fixed. We can now print out
instructions correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4830 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-22 23:15:27 +00:00
Misha Brukman
f88a2853c8 Enable the register allocator pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4829 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-22 22:45:07 +00:00
Misha Brukman
0721867c8d A simple (spilling) register allocator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4828 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-22 22:44:32 +00:00
Misha Brukman
cf2b9ac204 Added methods to read/write values to stack in .h, fixed implementation in
.cpp to return the iterator correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4827 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-22 22:43:47 +00:00
Misha Brukman
a85d6bc2bc Added -*- C++ -*- mode to the comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4826 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-22 22:42:50 +00:00
Misha Brukman
faf0b8c401 Add a simple way to add memory locations of format [reg+offset]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4825 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-22 22:42:12 +00:00
Misha Brukman
f6a132c7a0 Added virtual functions for storing and retrieving values from the stack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4824 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-22 22:41:23 +00:00
Misha Brukman
35880f394f Instead of checking op.getType() against MO_VirtualRegister and
MO_MachineRegister, we no longer distinguish Virtual vs. Machine registers
externally, they're ALL registers, all equal.

Registers are only differentiated whether they are >=
MRegisterInfo::FirstVirtual or not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4823 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-22 22:40:52 +00:00
Misha Brukman
7b8ba17761 Set SSARegMap to NULL after deleting it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4822 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-22 22:32:15 +00:00
Brian Gaeke
fa8d571bd4 lib/Target/X86/InstSelectSimple.cpp: Add visitCallInst, visitCastInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4821 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-22 11:07:01 +00:00
Chris Lattner
69a09e5677 Make testcase more interesting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4820 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 23:30:08 +00:00
Chris Lattner
1d53ce4067 Handle cmp Reg, 0 correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4819 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 23:30:00 +00:00
Chris Lattner
7ef33a9076 Printing support for more stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4818 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 22:49:46 +00:00
Chris Lattner
3a9a693987 Don't add implicit operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4817 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 22:49:20 +00:00
Chris Lattner
128a7a96f0 Fix off by one bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4816 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 22:48:15 +00:00
Chris Lattner
15207f45db Add fixme
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4815 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 22:48:01 +00:00