Commit Graph

3043 Commits

Author SHA1 Message Date
Misha Brukman
f4445dfcb7 'graph' is spelled without a 'c'.
Also added Statistic counters for NoAlias and MayAlias.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4972 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-12 05:34:10 +00:00
Chris Lattner
3fc46450b7 Remove #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4968 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-12 03:47:27 +00:00
Vikram S. Adve
d86deb689b External routines used to identify Cilk operations inserted by the
parallelization pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4965 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-10 13:08:48 +00:00
Vikram S. Adve
83e3b6503d This file implements the function DemoteRegToStack(), which takes a
virtual register computed by an Instruction& X and replaces it with
a slot in the stack frame, allocated via alloca.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4964 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-10 13:07:58 +00:00
Vikram S. Adve
e12c74c07b This file implements a pass that automatically parallelizes a program,
using the Cilk multi-threaded runtime system to execute parallel code.
The current version inserts too many sync() operations in the program
because it does not attempt to optimize their placement.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4962 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-10 00:43:34 +00:00
Vikram S. Adve
0d4f76637d Iterator that enumerates the ProgramDependenceGraph (PDG) for a function,
i.e., enumerates all data and control dependences for the function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4958 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-08 14:13:19 +00:00
Vikram S. Adve
96b21c1054 An explicit representation of dependence graphs, and a pass that
computes a dependence graph for data dependences on memory locations
using interprocedural Mod/Ref information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4957 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-08 13:26:29 +00:00
Chris Lattner
138b0cd7da Namespacify more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4956 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-08 06:01:34 +00:00
Chris Lattner
bbdabce1e9 Add support to count the number of dynamic instructions executed by LLI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4955 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-08 05:51:08 +00:00
Chris Lattner
a1af8bd72b Add total instruction, bb, & function counts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4954 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-07 23:24:24 +00:00
Chris Lattner
ac8d4d9d59 Fix bug that was bugging bugpoint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4953 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-07 21:27:16 +00:00
Chris Lattner
342d1826fb Remove dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4952 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-07 18:42:13 +00:00
Vikram S. Adve
bac0622ef9 Two bug fixes:
(1) Make entries for Constant values in the ScalarMap.
(2) Set MOD bit for the node pointed to by the
    argument of a free instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4948 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-06 21:17:10 +00:00
Vikram S. Adve
2b7a92c72f Fix several related bugs in DSNode::mergeWith() caused by the
fact that the incoming nodes may be merged away at intermediate
steps.  Use an extra level of indirection via DSNodeHandles
to track the nodes being merged.  All this now happens in a
static helper function MergeNodes().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4947 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-06 21:15:21 +00:00
Brian Gaeke
d474e9cdce Implement a lot of cast functionality (no FP or 64)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4944 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-06 10:49:33 +00:00
Chris Lattner
c736d56562 Fix bug: 2002-12-05-MissedConstProp.ll pointed out by Casey Carter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4935 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-05 22:41:53 +00:00
Vikram S. Adve
c102cb7359 Cute bug fix: when moving links from N to this, some links could have
been missed if node *this got merged away due to recursive merging!
Also, links were not moved correctly if a node is collapsed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4933 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-05 17:17:26 +00:00
Brian Gaeke
86764d778e Target/X86/Printer.cpp: Add sizePtr function, and use it instead of
" <SIZE> PTR " string when emitting assembly.

Target/X86/X86InstrInfo.def: Tidy up a bit:
 Squashed everything down to 118 chars wide, wrapping lines so that
 comment is at the same point on each line. Rename "NoImpRegs" as
 "NoIR". (most instructions have NoImpRegs twice on a line, so this
 saves 10 columns).

 Also, annotate various instructions with flags for size of memory operand.
  (MemArg16, MemArg32, MemArg64, etc.)

Target/X86/X86InstrInfo.h: Define flags for size of memory operand.
 (MemArg16, MemArg32, MemArg64, etc.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4932 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-05 08:30:40 +00:00
Misha Brukman
dd46e2a81d Added code generation for function prologues and epilogues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4930 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 23:58:08 +00:00
Misha Brukman
2adb3959f6 Implemented functions for emitting prologues and epilogues;
removed EBP from the list of callee-saved registers (it isn't one).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4929 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 23:57:03 +00:00
Misha Brukman
1f283ef3e5 Added push and pop instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4928 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 23:56:26 +00:00
Chris Lattner
4fa1acc945 Fix handling of function calls that return void
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4925 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 23:50:28 +00:00
Chris Lattner
a324364f04 Implement initial support for return values from call instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4924 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 23:45:28 +00:00
Misha Brukman
06f8aecc88 Fun arithmetic with iterators aimed at fixing a bug: inserting instructions
after the *current* instruction while keeping the iterator in the same
'logical' place.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4923 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 19:24:45 +00:00
Misha Brukman
0d2cf3a533 Adjust the stack pointer after a function call, proportional to the number of
arguments pushed onto the stack.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4922 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 19:22:53 +00:00
Misha Brukman
a17a2ac727 Added instructions to add/subtract imm32 to/from a reg32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4921 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 19:15:22 +00:00
Chris Lattner
ac573f61b4 Fix bogus assertion failures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4919 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 17:32:52 +00:00
Chris Lattner
6d66944388 Avoid bad assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4918 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 17:28:40 +00:00
Chris Lattner
93689114a5 Remove think-o assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4917 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 17:18:30 +00:00
Chris Lattner
d6c4cfab54 Avoid crashing on Arguments, just silently miscompile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4916 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 17:15:34 +00:00
Misha Brukman
a361c8417b storeReg2RegOffset() and loadRegOffset2Reg() now take the iterator by value
instead of by reference, since they return the modified iterator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4914 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 17:14:13 +00:00
Misha Brukman
0af0d5bd3e Moved buildReg2RegClassMap() into from X86RegisterInfo to MRegisterInfo, since
it is target-independent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4911 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 16:47:04 +00:00
Chris Lattner
504c411e81 Add a "Lazy Function Resolution in Jello" section
Remove some todo's


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4910 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 16:12:54 +00:00
Chris Lattner
33ced56edb Fix a bug I introduced in a previous change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4909 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 06:56:56 +00:00
Chris Lattner
dbf30f7b02 Add support for referencing global variables/functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4907 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 06:45:19 +00:00
Chris Lattner
b72d221d61 Print out direct global references
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4906 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 06:44:41 +00:00
Misha Brukman
dc2ec004f1 This should fix the bug seen with some registers not being allocated
correctly: skipping instructions by incorrectly incrementing the pointer.

Also adds support for building a reg-to-regclass map, and splits the function
for saving register to stack into two, one suitable for virtual registers
(which also assigns it a physical register) and one for simply storing back
physical registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4898 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 23:15:19 +00:00
Misha Brukman
03c6fafd05 Added support for callee- and caller-save registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4897 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 23:11:21 +00:00
Chris Lattner
e8e6743cb7 Fix broken ret opcode, grr...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4895 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 22:50:02 +00:00
Chris Lattner
f815aebd20 Checkin debug implementation of MCE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4893 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 20:56:42 +00:00
Chris Lattner
d852c15546 Fix instsel for calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4891 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 20:30:12 +00:00
Chris Lattner
149a5203a9 Simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4886 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 19:40:16 +00:00
Chris Lattner
b91b657e02 Fix big bug introduced with symbol table changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4885 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 18:32:30 +00:00
Chris Lattner
f18a36e398 Fix the build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4884 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 18:15:59 +00:00
Brian Gaeke
07f02614f6 brg
Add support for cast ... to bool in visitCastInst (it's a start, anyways...)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4883 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 07:36:03 +00:00
Chris Lattner
ea1ddab58e Split the machine code emitter completely out of the printer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4882 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 06:34:06 +00:00
Chris Lattner
4ce42a776a * Move information about Implicit Defs/Uses into X86InstrInfo.def.
* Expose information about implicit defs/uses of register through the
  MachineInstrInfo.h file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4877 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 05:42:53 +00:00
Chris Lattner
6af204077c Initialize implicit uses/defs fields for sparc backend to empty list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4876 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 05:41:54 +00:00
Brian Gaeke
bb25f2f08d brg
X86Implicit.cpp, X86Implicit.h: New files.
InstSelectSimple.cpp: Add some clarifications in visitCallInst comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4874 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 00:51:09 +00:00
Chris Lattner
8f04b0981f More support for machine code emission: raw instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4872 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:56:18 +00:00
Chris Lattner
b0f99b90df Expose explicit type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4871 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:50:41 +00:00
Chris Lattner
76041ce515 Start implementing MachineCodeEmitter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4870 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:44:34 +00:00
Chris Lattner
4aff92860d Eliminate OtherFrm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4868 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:40:58 +00:00
Chris Lattner
a5855c829b Remove comment
Remove handling of OtherFrm


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4867 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:40:46 +00:00
Chris Lattner
40ead95928 Initial support for machine code emission
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4866 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:24:12 +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
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
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
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
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
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
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
Chris Lattner
47b4a9b2e0 Minor code cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4814 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 21:04:50 +00:00
Chris Lattner
1804233ca5 Implement printing of store instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4813 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 21:03:39 +00:00
Chris Lattner
3d3067bf6b The big change here is to handle printing/emission of X86II::MRMSrcMem
instructions.  Right now the only users are load instructions, and Misha's
spill code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4812 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 20:44:15 +00:00
Chris Lattner
92845e37f5 Remove implicit information from instruction selector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4811 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 18:54:29 +00:00
Chris Lattner
457adb55f9 Add printing information for MUL and DIV
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4810 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 18:54:14 +00:00
Chris Lattner
94e8ee2282 Fix a bug that prevented compilation of multiple functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4809 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 17:26:58 +00:00
Chris Lattner
d3e0faca06 Remove opcode information for instructions that are completely defined now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4805 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 17:12:55 +00:00
Chris Lattner
644e3261d1 Add printing support for sahf & setcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4804 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 17:10:57 +00:00
Chris Lattner
675dd2cc47 Add printing support for /0 /1 type instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4803 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 17:09:01 +00:00
Chris Lattner
85b39f229f Add support for /0 /1, etc type instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4802 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 17:08:49 +00:00
Chris Lattner
627079d42a User defined operators are not supposed to live beyond the lifetime of the
pass.  Detect and flag them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4801 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 16:54:22 +00:00
Chris Lattner
4b4e9dd937 Rename the SetCC X86 instructions to reflect the fact that they are the
register versions


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4800 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 16:19:42 +00:00
Chris Lattner
05093a51b4 Simplify setcc code a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4799 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 15:52:38 +00:00
Chris Lattner
77875d88d0 Support Registers of the form (B8+ rd) for example
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4798 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 02:00:20 +00:00
Chris Lattner
97ad9e1fea Dont' set flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4797 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 01:59:50 +00:00
Chris Lattner
233ad71051 Implement printing more, implement opcode output more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4796 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 01:33:44 +00:00
Chris Lattner
0dc20dda5b Huge diff do to reindeinting comments.
Basically just adds OpSize flags for instructions that need them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4795 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 01:33:28 +00:00
Chris Lattner
11e53e3c38 Add new prefix flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4794 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 01:32:55 +00:00
Chris Lattner
644e1abae4 Print another class of instructions correctly, giving us: xorl EDX, EDX
for example.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4793 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 00:30:01 +00:00
Misha Brukman
7c58925050 Booleans are types too. And they get stored in bytes. And InstructionSelection
doesn't assert fail. And everyone's happy. Yay!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4792 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-21 00:25:56 +00:00
Chris Lattner
51cbcbf435 Initial checkin of Module cloning support stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4788 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 20:47:41 +00:00
Chris Lattner
900c23ced0 X86 target builds fine now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4786 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 20:17:03 +00:00
Chris Lattner
da3c8a7674 Fix symbol table problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4785 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 19:32:43 +00:00
Misha Brukman
b83b28697c Add definitions for function headers from MRegisterInfo.h:
Some functions are in X86RegisterInfo.cpp, others, because of the data they
need, are in X86RegisterClasses.cpp, which also defines some register classes:
byte, short, and int.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4784 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 18:59:43 +00:00
Misha Brukman
e1f0d8113a Check not only for MO_VirtualRegister, but MO_MachineRegister as well when
printing out assembly. After all, we want the real thing too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4783 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 18:56:41 +00:00
Misha Brukman
b7825bc725 Initialize the SSARegMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4782 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 18:55:27 +00:00
Chris Lattner
cfe487296c Don't build X86 target yet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4780 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 18:37:37 +00:00
Chris Lattner
6e6026b465 - Eliminated the deferred symbol table stuff in Module & Function, it really
wasn't an optimization and it was causing lots of bugs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4779 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 18:36:02 +00:00
Chris Lattner
c09aab0a4d Fix minor bugs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4778 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 18:32:31 +00:00
Chris Lattner
2c08dcc276 Eliminate the concept of a deferred symbol table. The optimization really isn't,
and it causes obscure bugs to show up in passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4777 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 18:07:48 +00:00
Misha Brukman
d2cc017f46 Add mapping in MachineFunction from SSA regs to Register Classes. Also,
uncovered a bug where registers were not being put in a map if they were not
found...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4776 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 00:58:23 +00:00
Misha Brukman
90ed18c201 Sigh. Fixed some speling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4775 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 00:56:42 +00:00
Misha Brukman
602b9ff595 Thanks to the R8, R16, and R32 macros, I can now deal with registers that
belong to different register classes easier.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4773 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 00:47:40 +00:00
Chris Lattner
03b4c2d22a Remove unneccesary #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4772 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-19 23:12:53 +00:00
Chris Lattner
5a8932f57f Implement the CloneFunction function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4771 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-19 23:12:22 +00:00
Chris Lattner
d18015599c Minor changes to cloning interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4770 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-19 22:54:01 +00:00
Chris Lattner
6c2e2e5287 Fix two fixmes: integrate with inlining, and document
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4769 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-19 22:04:49 +00:00
Chris Lattner
dcd8040d11 Rework inline pass to use cloning infrastructure to do the dirty work
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4766 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-19 21:54:07 +00:00
Chris Lattner
309f19391b Start using the new function cloning header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4764 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-19 20:59:41 +00:00
Chris Lattner
e6aa37388a Move MutatStructTypes.h out of IPO
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4762 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-19 20:49:40 +00:00
Chris Lattner
36b7cc3b06 Rename CloneFunction.h to Cloning.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4760 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-19 20:08:24 +00:00
Chris Lattner
5113eb0c52 Move the function extractor pass from tools/extract into lib/Xform/IPO
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4759 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-19 18:42:59 +00:00
Chris Lattner
9a641b4bce Add a new Module::getNamedFunction method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4758 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-19 18:41:44 +00:00
Brian Gaeke
c03a0cb01b Brian Gaeke says:
lib/Target/X86/InstSelectSimple.cpp: Add a little something to
 visitBranchInst which supports conditional branches.
lib/Target/X86/X86InstrInfo.def: Add defs of JNE, JE, CMPri8


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4755 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-19 09:08:47 +00:00
Nick Hildenbrandt
a1a64f8f27 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4754 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18 22:21:52 +00:00
Chris Lattner
8f0d824dd7 Add peak memory usage measurement capability
Add (currently disabled) faciility to try to filter out pool allocation overhead from memory usage stats


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4753 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18 21:47:09 +00:00
Chris Lattner
1855292172 Add peak memory usage measurement stuff
Add structure padding optimizations


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4749 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18 21:44:46 +00:00
Chris Lattner
4fe346184a Add peak memory usage support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4748 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18 21:44:19 +00:00
Chris Lattner
49a1ed07ab Add stats
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4747 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18 21:42:45 +00:00
Nick Hildenbrandt
9850237536 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4745 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18 20:55:50 +00:00
Chris Lattner
f9f6088e17 Start trying to print instructions more correctly. For now we also print out the opcode for each instruction as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4743 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18 06:56:51 +00:00
Chris Lattner
f21dfcddcf Expose base opcode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4742 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18 06:56:24 +00:00
Chris Lattner
6aab9cf65c Start to add more information to instr.def
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4741 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18 05:37:11 +00:00
Chris Lattner
239dcfd215 Add instruction annotation about whether it has a 0x0F opcode prefix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4740 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18 01:59:28 +00:00
Chris Lattner
9213b73c19 Add more void flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4739 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18 01:37:48 +00:00
Chris Lattner
92bd0f9c4d Set the void flag on instructions that should get it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4738 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18 01:34:36 +00:00
Chris Lattner
af55be15df Print is const!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4737 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 23:22:13 +00:00
Chris Lattner
3b49394f4f Pass on a targetmachine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4736 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 23:22:03 +00:00
Chris Lattner
927dd095c4 Arrange to have a TargetMachine available in X86InstrInfo::print
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4734 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 23:20:37 +00:00
Chris Lattner
e9b309ad13 Wow, I'm incapable of the simplest things today...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4732 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 23:05:21 +00:00
Chris Lattner
fb02a8b11f Rename registers to follow the intel style of all caps
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4731 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 23:03:46 +00:00
Chris Lattner
ebdc7f32e9 Fix misleading indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4730 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 22:57:23 +00:00
Chris Lattner
dbb61c6445 Reorganize printing interface a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4728 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 22:53:13 +00:00
Chris Lattner
a187ed92ae Add default implementation of printing interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4727 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 22:53:03 +00:00
Chris Lattner
71e83caecd Fix minor detail
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4725 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 22:33:26 +00:00
Chris Lattner
ed806bf9fc Add hack to only consider indirect calls indirect if they do more than cast
their source function


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4723 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 22:17:12 +00:00
Chris Lattner
ae5f603665 Add MaxSCC statistics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4722 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 22:16:28 +00:00
Chris Lattner
db85e389ae Count CallInsts correctly, remove unneccesary initializers
S: ----------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4721 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 22:15:40 +00:00
Chris Lattner
570f55de8d Remove only uses of markDef/markDefAndUse methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4719 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 22:14:08 +00:00
Chris Lattner
0692536b71 Fix Mul/Div clobbers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4718 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 21:56:38 +00:00
Chris Lattner
6fc3c52359 Fix a few typos, implement load/store
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4716 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 21:11:55 +00:00
Chris Lattner
9562add237 Add functions to buld X86 specific constructs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4714 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 21:03:35 +00:00
Chris Lattner
1411ba31ba Add information about memory index representation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4712 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 20:33:26 +00:00
Chris Lattner
e7236ffa94 Add load/store instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4711 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 20:33:12 +00:00
Chris Lattner
43189d17c3 Switch visitRet to use getClass()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4710 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 20:07:45 +00:00
Brian Gaeke
6559bb96a9 include/llvm/CodeGen/MachineInstrBuilder.h: Add addClobber() inline
convenience method.  Fix typo in comment.
lib/Target/X86/InstSelectSimple.cpp: Explicitly specify some implicit uses.
 Use MOVZX/MOVSX instead of MOV instructions with sign extend instructions.
 Take out LEAVE instructions.
 32-bit IDIV and DIV use CDQ, not CWQ (CWQ is a typo).
 Fix typo in comment and remove some FIXME comments.
lib/Target/X86/Printer.cpp: Include X86InstrInfo.h and llvm/Function.h.
 Add some simple code to Printer::runOnFunction to iterate over
  MachineBasicBlocks and call X86InstrInfo::print().
lib/Target/X86/X86InstrInfo.def: Make some more instructions with
 implicit defs "Void".  Add more sign/zero extending "move" insns
 (movsx, movzx).
lib/Target/X86/X86RegisterInfo.def: Add EFLAGS as a register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4707 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-14 22:32:30 +00:00
Dinakar Dhurjati
e555460e4e Gives the count for various instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4706 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-13 18:22:13 +00:00
Vikram S. Adve
586aa3c801 Pass to compute various statisics related to DSGraphs.
For now, this just computes the #indirect call sites and
the avg. #callees per indirect call site (actually it prints
both totals and the average is their ratio).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4705 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-13 15:41:00 +00:00
Chris Lattner
12ae297cbd Fix bug: 2002-11-13-PointerFunction.ll
This should fix codegen on vortex to work much better


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4704 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-13 06:54:20 +00:00
Chris Lattner
5f1f2c6162 Inline graphs from outside the SCC into the SCC before SCC resolution starts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4701 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-12 15:58:08 +00:00
Chris Lattner
5190ce8374 Fix two bugs:
* The globals vector was getting broken and unsorted, this caused vortex
   to get badly pessimized
 * Node offset handling was being handled really poorly, and in particular
   we were not merging types with offsets right.  This causes several graphs
   to be non-merged.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4699 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-12 07:20:45 +00:00
Chris Lattner
3ba8893af5 Fix bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4697 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-11 22:23:56 +00:00
Chris Lattner
0ecc42619f Handle a mismatch between # function args and call site args
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4696 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-11 21:36:05 +00:00
Chris Lattner
e425844d8c Elimiante calls to a node with nothing in it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4695 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-11 21:35:38 +00:00
Chris Lattner
a9c9c0216e Complete rewrite of BU code to use Tarjan's SCC finding algorithm to drive
the algorithm instead of hand coded depth first iteration


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4694 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-11 21:35:13 +00:00
Brian Gaeke
20abb6bf45 InstSelectSimple.cpp: (visitReturnInst) Add return instructions with return
values.
X86InstrInfo.def: add LEAVE instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4691 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-11 19:37:09 +00:00
Chris Lattner
e71ffc291c Mark stuff reachable by _AUX_ calls as incomplete in the BU graph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4690 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-11 03:36:55 +00:00
Chris Lattner
8a5db46967 Fix infinite loop in the BU algorithm. Unfortunately this dies a serious
death when handling moderately sized SCC's, but what can you do


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4689 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-11 00:01:34 +00:00
Chris Lattner
6052594209 Print the right call set size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4688 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-11 00:01:02 +00:00
Chris Lattner
998c49c247 Use call site mergeWith method to simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4687 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-11 00:00:46 +00:00
Chris Lattner
d11e954f08 Fix a bug that could trigger when varargs call sites had non-matching number of arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4683 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-10 07:46:08 +00:00
Chris Lattner
aa8146f5c4 * Dramatically rework liveness evaluation.
* Implement the first step of the Globals graph: Deleting nodes from function
  graphs.  In practice, these nodes need to be moved to the globals graph, but
  this will be taken care of later.  Note that the graphs computed right now are
  not strictly correct!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4681 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-10 06:59:55 +00:00
Chris Lattner
4f7815f684 Honor the shouldPrintAuxCalls flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4678 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-10 06:53:59 +00:00
Chris Lattner
2a06886759 Initialize PrintAuxCalls member
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4677 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-10 06:53:38 +00:00
Chris Lattner
a1079051d8 * Bottom-Up graphs print the Aux call vector
* Significantly improve DEBUG output
* Aggressively fold calls together if we inlined a graph that provides
  call nodes.
* Add a bailout if the current graph has over 200 call nodes in it, this is
  a really whacky case that should never happen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4675 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-10 06:52:47 +00:00
Chris Lattner
a2b8d7bff2 Fix testcase: FunctionResolve/2002-11-09-ExternFn.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4668 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-10 03:36:55 +00:00
Chris Lattner
f40f0a39bd eliminate the ability to remove global nodes from deadNodeElminate... for now.
This slows stuff down a bit, but it should get much better before it gets any
worse.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4666 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-09 22:07:02 +00:00
Chris Lattner
dd398486ca Remove obsolete code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4665 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-09 21:41:44 +00:00
Chris Lattner
f76e754c2e Fix logic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4664 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-09 21:40:58 +00:00
Chris Lattner
aa0b468f6d Add globals graphs to all three passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4663 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-09 21:12:07 +00:00
Chris Lattner
7900ed146f Move maskNodeTypes to header file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4661 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-09 21:02:26 +00:00
Chris Lattner
65f2897f2c Clean up DSGraph::removeDeadNodes interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4660 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-09 21:00:49 +00:00
Chris Lattner
96517253a1 Make removeTriviallyDeadNodes a private interface of DSGraph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4659 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-09 20:55:24 +00:00
Chris Lattner
2cfbaaf3b9 Don't put constants into the scalar map!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4657 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-09 20:14:03 +00:00
Chris Lattner
2e4f9bf86e Add initial support for a globals graph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4656 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-09 20:01:01 +00:00
Chris Lattner
d888893a54 Tighten up array handling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4655 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-09 19:25:27 +00:00
Chris Lattner
0779ba6c47 #include Datastructure.h first
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4654 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-09 19:25:10 +00:00
Chris Lattner
0006bd7520 Fix warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4649 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-09 00:49:43 +00:00
Chris Lattner
bf10f05bf7 Fix warning & release build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4648 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-09 00:49:05 +00:00
Chris Lattner
51c20e9a3a Fix spelling error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4645 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08 23:18:37 +00:00
Chris Lattner
23f83dce3f Fold arrays down to a single element. This causes huge wins on some benchmarks
for example: 197.parser (64M->14M), 164.gzip (14M->2.7M).  The actual graphs
represented should not change at all.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4643 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08 22:49:57 +00:00
Chris Lattner
70925b0569 ONLY merge in the aux call sites, this causes a HUGE speedup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4640 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08 22:27:25 +00:00
Chris Lattner
acf491f0b4 Allow specification of whether the call sites should be copied, AND whether
the aux call sites should be copied


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4639 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08 22:27:09 +00:00
Chris Lattner
ce2d1328fc Reenable 'quick exit' case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4638 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08 22:26:43 +00:00
Chris Lattner
7cc9875c9d Reduce amount of work needed to compute ip/modref
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4637 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08 22:17:01 +00:00
Chris Lattner
7a21163cef Reimplement TD pass completely it now works
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4635 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08 21:28:37 +00:00
Chris Lattner
01fb0c75aa Cannot modify original call sites vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4634 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08 21:27:37 +00:00
Chris Lattner
679e8e1b19 - Add a bunch of checking to make sure that dead nodes are not used after they
are marked DEAD.  This helped track down some bugs
- Fix a bunch of bugs where we were doing work on nodes after they became dead
- Add support for aux function call sites
- Add support for not cloning call sites


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4633 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08 21:27:12 +00:00
Chris Lattner
1a948a8269 Remove gunk used by broken TD pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4632 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08 21:25:24 +00:00
Chris Lattner
93fbd733e7 Use the new getMainFunction() method to efficiently locate main
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4630 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08 20:34:21 +00:00
Chris Lattner
a9a93f3777 Add a method "getMainFunction()" that efficiently locates 'main' in a module
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4629 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08 20:34:02 +00:00
Chris Lattner
d321593330 Fix IPModRef to use new DS interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4628 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08 19:13:14 +00:00
Chris Lattner
25f6f373b8 Implement feof
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4627 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08 19:10:26 +00:00
Chris Lattner
f8c6aab05e Use DSNodeHandleMap instead to be safe
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4622 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08 05:01:14 +00:00
Chris Lattner
5134006f93 * actually handle constants (especially constantexprs) correctly.
- This seems to dramatically improve many benchmarks, only slowing down
    gzip significantly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4621 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08 05:00:44 +00:00
Chris Lattner
33312f7031 Add flush
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4619 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08 01:21:07 +00:00
Chris Lattner
6f23963adc Fix bug: FunctionResolve/2002-11-07-RetMismatch.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4618 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08 00:38:20 +00:00
Chris Lattner
9c1338b71c _REALLY_ fix the float constant problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4609 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-07 22:12:53 +00:00
Chris Lattner
eb6f8c757f Print out 'float' constants correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4607 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-07 19:43:59 +00:00
Chris Lattner
a4479cd946 Implement freopen for burg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4606 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-07 19:33:50 +00:00
Chris Lattner
ab2dea5687 Make command line arguments setup be endian correct!!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4605 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-07 19:29:31 +00:00
Brian Gaeke
1749d6359b Add instruction selection code and tests for setcc instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4603 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-07 17:59:21 +00:00
Chris Lattner
ed8e6499dd Implement ResolveCallSiteModRefInfo for IPModRef. computeModRef is not yet done though!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4602 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-07 07:12:23 +00:00
Chris Lattner
460ea29b45 Instead of using a bool that constant has to be explained, use a self
explanitory enum instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4600 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-07 07:06:20 +00:00
Chris Lattner
076c1f923b Implement a new mergeInGraph method, which basically factors code out of
the BU class.

This will be used by the IPModRef class to do stuff, eventually perhaps the
TD pass will use it also.

Speaking of the TD pass, this also eliminates the self recursive case, which
was broken, and couldn't occur anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4599 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-07 06:31:54 +00:00
Chris Lattner
b10604341f Rename DataStructureAnalysis namespace to DS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4596 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-07 05:20:53 +00:00
Chris Lattner
e83cb5316b Fix problem with dangling referrers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4595 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-07 05:00:35 +00:00
Chris Lattner
f17b39ab2a Minor bugfix to enable generation of methcall.llvm.lib, objinst.llvm.lib, and
The problem was merging two unsized types like function's, ie int (int*) with
int (uint *)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4594 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-07 04:59:28 +00:00
Chris Lattner
1421233dc1 Compute total number of nodes and # call nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4592 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-07 02:18:46 +00:00
Chris Lattner
3c87b29985 Move printouts to be wrapped in DEBUG() macros
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4588 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-07 01:54:56 +00:00
Chris Lattner
95a80adc23 When the -only-print-main-ds option is specified, still print out graph size
statistics for skipped functions


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4587 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-07 01:54:44 +00:00
Chris Lattner
cf9b4f0f41 Implement fprintf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4585 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-06 23:05:03 +00:00
Chris Lattner
a5c0bfe09a Implement fputc and ungetc to allow burg to run in lli
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4584 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-06 22:59:28 +00:00
Nick Hildenbrandt
088b472eed Fixes escapeing bug in strings. Fixes test case test/Regression/CBackend/2002-11-06-PrintEscaped.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4583 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-06 21:40:23 +00:00
Nick Hildenbrandt
2cf2cbcefb Loads and stores can't be inlined. This fixes test/Singlesource/matrixTranspose
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4579 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-06 20:07:54 +00:00
Chris Lattner
4476ceb414 Allow the ResolveCallSiteModRefInfo method to return a mapping of nodes,
implement the mod/ref bit masking


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4578 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-06 19:59:33 +00:00
Chris Lattner
268748a0d8 Add a stub to implement the context sensitive mod/ref info for call sites
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4577 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-06 19:38:43 +00:00
Chris Lattner
2110808fd8 Give a back pointer to the IPModRef object to the FunctionModRefInfo object
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4576 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-06 19:07:13 +00:00
Chris Lattner
fc928245ad Remove a couple of #includes, move some code from .h file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4575 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-06 18:38:18 +00:00
Chris Lattner
d747e8ffe9 Change Steens class to build with Vikram's changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4572 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-06 18:08:32 +00:00
Chris Lattner
2c0bd014c5 Make PointerSize & Shift be enums
Fix problem with recursive merging


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4570 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-06 18:01:39 +00:00
Vikram S. Adve
75310d59c9 Make query operations non-const to allow demand-driven analyses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4569 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-06 17:17:55 +00:00
Vikram S. Adve
895c0bd3fb An interprocedural analysis pass that computes flow-insensitive
IP Mod and Ref information for every function and every call site.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4567 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-06 17:02:03 +00:00
Chris Lattner
08db719c4b Dramatically simplify internal DSNode representation, get implementation
*FULLY OPERATIONAL* and safe.  We are now capable of completely analyzing
at LEAST the Olden benchmarks + 181.mcf


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4562 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-06 06:20:27 +00:00
Chris Lattner
ef5af99195 Delete "StripScalars" argument to cloneInto method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4560 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-06 06:16:30 +00:00
Vikram S. Adve
c227a9a513 Remove a nasty little semi-colon someone introduced which
prevented any machine instrs from being printed!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4557 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-06 00:34:26 +00:00
Chris Lattner
5953513308 Attempted fixes to the mergemap to make it work better.
Ended up disabling merge map merging completely.  It shall be removed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4550 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-05 00:01:58 +00:00
Chris Lattner
69e79e0be4 Simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4547 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-04 21:06:54 +00:00
Chris Lattner
a95078dc24 Sun can now use mallinfo()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4546 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-04 21:05:21 +00:00
Chris Lattner
c9d8beff59 No need to explicitly inclue ExportSymbols now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4543 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-04 20:50:57 +00:00
Chris Lattner
18eba91a05 Allow memory sizes to be negative, remove obsolete TmpRSS field
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4538 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-04 19:19:36 +00:00
Chris Lattner
6cd11f6535 mallinfo is not available on sun apparently :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4537 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-04 19:01:41 +00:00
Chris Lattner
0188534cd1 Instcombine this away:
%A = getelementptr [4 x int]* %M, long 0, long 0
        %B = getelementptr int* %A, long 2


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4536 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-04 16:43:32 +00:00
Chris Lattner
0864acf07b Add a transformation to turn:
malloc Ty, C
int
  malloc [C x Ty], 1


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4534 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-04 16:18:53 +00:00
Vikram S. Adve
c405daf392 Simple passes that print out SCCs in the CFGs or in the CallGraph of a module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4532 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-04 14:20:22 +00:00
Chris Lattner
02606637e0 Change the "Cannot merge two portions of the same node yet" from an assertion
into a "oh crap, lets collapse" case


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4530 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-04 06:48:26 +00:00
Chris Lattner
35b74c4e54 Ack: Fix bug in previous checkin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4526 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-04 05:50:42 +00:00
Chris Lattner
38dc4f06af Be more generous about level raising constant expressions don't force each
constant to one particular type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4525 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-04 05:46:37 +00:00
Chris Lattner
af663465d6 Make sure to _delete_ memory allocated by worklists
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4523 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-04 02:54:22 +00:00
Chris Lattner
048912bad9 Give a better error message in an unhandled case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4521 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-04 02:29:15 +00:00
Chris Lattner
a5cf9364f1 Minor fix to space accounting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4520 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-04 01:49:45 +00:00
Chris Lattner
9d4ef12b9c Implement MaxRSS in terms of mallinfo instead of the system RSS. This gives
us much more accurate numbers and actually WORKS.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4518 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-04 00:32:44 +00:00
Chris Lattner
1650015822 Allow the call graph to be called from analyze naturally with print implemented
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4517 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-04 00:21:19 +00:00
Chris Lattner
c875f023d4 Rename ValueMap to ScalarMap
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4516 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-03 21:27:48 +00:00
Chris Lattner
d18f342af8 Rename NewNode flag to HeapNode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4515 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-03 21:24:04 +00:00
Chris Lattner
ef69ccf71b Change the letters used to represent stack and heap allocations to "S" and "H"
respectively.  This is to make presentation easier in the paper.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4514 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-03 19:46:15 +00:00
Anand Shukla
93d545e691 code to lightly instrument at branches
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4511 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-03 01:45:20 +00:00
Chris Lattner
5da2e6ac70 Move function to cpp file from header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4510 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-02 22:07:51 +00:00
Chris Lattner
f01729ea56 Implement signed and unsigned division and remainder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4508 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-02 20:54:46 +00:00
Chris Lattner
ca9671d864 Implement multiply operator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4506 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-02 20:28:58 +00:00
Chris Lattner
68aad93291 * Implement subtract
* Merge add code into logical code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4503 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-02 20:13:22 +00:00
Chris Lattner
e2954c84e9 shuffle code around a bit, implement and, or, xor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4502 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-02 20:04:26 +00:00
Chris Lattner
51b49a9633 Add PHI node support, add comment for branch function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4500 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-02 19:45:49 +00:00
Chris Lattner
2df035bb3c Implement unconditional branching support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4498 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-02 19:27:56 +00:00
Chris Lattner
e9913f2cff * Fix nonconstant shift case
* Turn table into 2d table


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4496 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-02 01:41:55 +00:00
Chris Lattner
b1761fc4df Use a more table driven approach to handling types. Seems to simplify the
code a bit


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4493 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-02 01:15:18 +00:00
Chris Lattner
d5a87f80b7 Make switch statements denser, but only because of the follow-on patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4492 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-02 00:49:56 +00:00
Chris Lattner
796df73e6e * Remove dead variable
* Shift amount is always guaranteed to be 8 bits


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4491 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-02 00:44:25 +00:00
Chris Lattner
5af344d79d Implement the "unknown flag" which mainly consists of aligning printing code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4490 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-02 00:36:03 +00:00
Chris Lattner
7a0b5bb7ab Oops, this was not meant to be checked in
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4489 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-02 00:26:32 +00:00
Chris Lattner
92673296e6 Stop representing scalars as explicit nodes in the graph. Now the only
nodes in the graph are memory objects, which is very nice.  This also greatly
reduces the size and memory footprint for DSGraphs.  For example, the local
DSGraph for llu went from 65 to 13 nodes with this change.  As a side bonus,
dot seems to lay out the graphs slightly better too.  :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4488 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-02 00:13:20 +00:00
Nick Hildenbrandt
7e9fea736d Fixed bug in Regression/CBackend/2002-10-30-FunctionPointerAlloca.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4486 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-01 17:37:09 +00:00
Chris Lattner
4f53bef7cd Fix comments, steens is context sensitive, we just haven't implemented
mod/ref apis yet


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4485 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-01 17:34:23 +00:00
Chris Lattner
ec3e2f41cd New iostream definitions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4482 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-01 16:46:05 +00:00
Chris Lattner
a145d4188c Make sure to include name information if we have it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4481 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-01 04:49:06 +00:00
Chris Lattner
7f124e3abd Add a fixme
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4479 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 23:24:00 +00:00
Brian Gaeke
a1719c9130 InstSelectSimple.cpp: Include llvm/iOther.h for ShiftInst.
Add ISel::visitShiftInst() to instruction select shift instructions.
 Add a comment in visitAdd about how to do 64 bit adds.

X86InstrInfo.def: Add register-to-register move opcodes and shift opcodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4477 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 23:03:59 +00:00
Chris Lattner
9b87c5c53c * Minor optimization: when merging nodes, merge the smaller one into the
larger one.
     * Handle the case where we are merging two nodes of different size better.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4476 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 22:41:15 +00:00
Chris Lattner
59b2b86f35 Reassociate pass now works
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4473 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 17:16:18 +00:00
Chris Lattner
e4b730441d Fixes to the reassociate pass to make it respect dominance properties
Huge thanks go to Casey Carter for writing this fix, reassociate is now
reoperational!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4471 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 17:12:59 +00:00
Chris Lattner
2fe6626ead Fix nasty bug in ::isNeg()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4470 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 17:09:06 +00:00
Vikram S. Adve
26fbcec43b Restore support for indirect function calls (which briefly wasn't working
after I removed annotations on MachineInstr for the CallDescriptor).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4469 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 15:34:48 +00:00
Chris Lattner
7e51c8741f Remove dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4467 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 06:52:26 +00:00
Chris Lattner
8f0a16eac6 This fixes all kinds of problems with array handling. There are still bugs to
be fixed, but we are getting much closer now.

    * Make DSNode::TypeRec a full fledged DSTypeRec type.
    * Add methods used to update and access the typerecords elements
    * Add methods to query if and to cause a node to be completely folded
    * DSGraph construction doesn't use the allocation type for anything at all,
      now nodes get their type information based on how they are used.
    * Fixed a bug with global value handling introduced in the last checkin
    * GEP support is now much better, arrays are handled correctly.  The array
      flag is now updated in type records.  There are still cases that are not
      handled yet (we do not detect pessimizations), but getting much closer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4465 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 05:45:02 +00:00
Chris Lattner
6b1c4fcfb5 Can simplify code now with the isCommutative() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4461 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 04:24:23 +00:00
Chris Lattner
f37c34430d Use new isCommutative interface, which gives us SetEQ and SetNE for free.
Thanks fly out to Casey Carter for this fix.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4460 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 04:20:07 +00:00
Chris Lattner
f2da7241f5 New isAssociative/isCommutative inspection methods, graciously contributed by
Casey Carter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4459 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 04:14:01 +00:00
Chris Lattner
6918c079a1 BreakCriticalEdges should update dominance frontier information as well as
other dominance stuff.  Patch contributed by Casey Carter


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4457 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 02:44:36 +00:00
Chris Lattner
2fdaddf445 Fix two problems:
* Load Implementation can cause unaligned memory accesses, which caused
    problems for sparc.
  * cast from pointer to pointer would zero the upper 32 bits of the pointer
    which obviously causes problems on 64 bit hosts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4454 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 21:47:57 +00:00
Vikram S. Adve
601899d196 Bug fix: need to initialize new CallArgsDescriptor pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4453 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 20:38:49 +00:00
Vikram S. Adve
9691807669 In getID(), don't call getValidSymbolName to mangle external names!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4451 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 20:16:38 +00:00
Chris Lattner
cc0b0c59e8 Add lots more info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4450 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 06:04:46 +00:00
Chris Lattner
188732c971 Remove fixme
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4447 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 02:02:37 +00:00
Chris Lattner
6a592271fb Add special code to make printing SSA form machine instructions nicer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4446 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 01:55:38 +00:00
Chris Lattner
8548ee75eb Make sure to set the destination register correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4444 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 01:49:01 +00:00
Chris Lattner
b752e9a2ae Set the destination register field based on the target specific flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4442 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 01:15:31 +00:00
Chris Lattner
9d17740295 Add flag to specify when no value is produced by an instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4441 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 01:09:34 +00:00
Chris Lattner
443d0122d7 Sparc backend doesn't use target specific flags yet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4440 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 01:07:12 +00:00
Chris Lattner
2a79a0927c Use MRegisterInfo, if available, to print symbolic register names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4438 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 00:58:19 +00:00
Chris Lattner
e5f5221b5e Implement the new optional getRegisterInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4437 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 00:56:18 +00:00
Chris Lattner
1049164aa6 Implement structured machine code printing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4435 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 00:48:05 +00:00
Chris Lattner
3dffa7953f Print machine code after instruction selection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4434 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 00:47:49 +00:00
Chris Lattner
42c7786227 Make sure to pass the LLVM basic block in
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4433 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 00:47:40 +00:00
Chris Lattner
36b36037a3 Construct annotation, to make sure it's attached to function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4429 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 23:40:58 +00:00
Chris Lattner
88726188fe Make argsize calculation stuff optional, so that Targets without FrameInfo
objects yet don't die


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4427 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 23:40:03 +00:00
Chris Lattner
ddd7fcb887 Implement autoinserting ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4426 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 23:19:00 +00:00
Chris Lattner
e316efc0e7 Rename annotation id
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4425 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 23:18:43 +00:00
Misha Brukman
a3bbcb5b66 Fix spelling of `propagate'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4423 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 23:06:16 +00:00
Chris Lattner
b4f68ed32e Convert backend to use passes, implement X86TargetMachine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4421 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 22:37:54 +00:00
Chris Lattner
c66583ef3b These are no longer virtual methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4420 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 22:01:44 +00:00
Chris Lattner
c56406c236 * Privatize the TargetName
* Move optSizeForSubWordData to TargetData
* Remove unused fields


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4417 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 21:48:17 +00:00
Chris Lattner
62eaf7ef60 Implement findOptimalStorageSize a bit more generally
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4416 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 21:47:50 +00:00
Chris Lattner
6334205cb5 Allow TargetMachine to refuse static code gen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4415 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 21:12:46 +00:00
Chris Lattner
055c965bff Rename X86InstructionInfo to X86InstrInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4413 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 21:05:24 +00:00
Chris Lattner
33f53b554a Minor renaming
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4410 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 20:48:56 +00:00
Chris Lattner
eef7454e1c Remove unneccesary #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4408 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 20:47:46 +00:00
Chris Lattner
600e699794 Rename Sparc.h to TargetMachineImpls.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4407 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 20:47:26 +00:00
Chris Lattner
b85c7f4b91 Reenable X86 backend, even though it doesn't do much, at least it compiles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4404 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 20:29:34 +00:00
Chris Lattner
ba64363562 Merge with sparc backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4403 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 20:10:58 +00:00
Chris Lattner
495fe2e087 X86 merge is complete, eliminate unused code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4400 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 20:07:16 +00:00
Vikram S. Adve
a2bae305fb Remove separate vector of implicit refs from MachineInstr, and
instead record them as extra operands in the operands[] vector.
Also, move CallArgsDescriptor into this class instead of making it an
annotation on the machine instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4399 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 19:41:18 +00:00
Vikram S. Adve
e68a3435ee Move CallArgsDescriptor into this class instead of making it an
annotation on the machine instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4398 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 19:38:46 +00:00
Vikram S. Adve
aabb595c4f Bug fix: align size for dynamic allocas according to stack pointer
alignment restrictions.  This is incomplete for one case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4397 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 19:37:31 +00:00
Chris Lattner
341a937169 Switch to generating machineinstr's instead of MInstructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4396 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:43:55 +00:00
Chris Lattner
a535fabe7d Be compatible with sparc backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4395 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:43:38 +00:00
Chris Lattner
9bbf439e38 Implement MachineInstrInfo interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4394 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:43:19 +00:00
Chris Lattner
79c033765c Switch to different flag set
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4393 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:42:40 +00:00
Chris Lattner
f1757c414c Move TargetInstrDescriptors extern to the one .cpp file that refers to it:
MachineInstr.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4392 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:40:30 +00:00
Chris Lattner
adc101bbcd Move TargetInstrDescriptors to MachineInstrInfo.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4391 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:37:48 +00:00
Chris Lattner
f44f905196 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4390 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:35:41 +00:00
Chris Lattner
d9512caca8 Use higher level methods, don't use TargetInstrDescriptors directly!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4389 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:35:39 +00:00
Chris Lattner
8f7802727f Use higher level method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4386 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:25:41 +00:00
Chris Lattner
ea9d249595 Remove #include, misleading comment, and a typedef used only once
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4383 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:08:05 +00:00
Chris Lattner
88da77c739 Inline typedef, eliminate unused method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4382 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:03:19 +00:00
Chris Lattner
67eaf73c89 Remove long dead #if 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4381 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:00:19 +00:00
Chris Lattner
cb6b4bd1c6 Add #includes that were eliminated from headers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4380 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 16:51:05 +00:00
Chris Lattner
770feb4bfc De-inline methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4379 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 16:50:33 +00:00
Chris Lattner
a80848704a Remove #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4378 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 16:50:20 +00:00
Chris Lattner
97d688515e Remove unneeded #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4377 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 16:50:06 +00:00
Chris Lattner
9538cecf27 Remove forward decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4376 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 16:49:44 +00:00
Chris Lattner
28760f4e77 Make assertIGNode be private to the InterferenceGraph.cpp file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4375 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 16:42:34 +00:00
Chris Lattner
047bbafb99 MachineInstrInfo doesn't need a TargetMachine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4372 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 15:45:20 +00:00
Chris Lattner
ba43675aa0 Don't build X86 target until it builds properly again
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4369 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 23:56:41 +00:00
Chris Lattner
93fa70598c Seperate code out of TargetMachine into MachineInstrInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4368 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 23:55:33 +00:00
Chris Lattner
75276f150e Initial stab at MachineInstr'ication
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4367 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 23:55:19 +00:00
Chris Lattner
c5b8b1a040 MachineInstrInfo no longer #includes this header, so we must
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4366 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 23:54:47 +00:00
Chris Lattner
c01ff9c1f9 Use BuildMI instead of explicit code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4362 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 21:43:57 +00:00
Chris Lattner
9a8e4121aa Remove all traces of the "Opcode Mask" field in the MachineInstr class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4359 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 21:17:20 +00:00
Chris Lattner
b98a53f201 Remove more default arguments that are never used
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4358 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 21:02:40 +00:00
Chris Lattner
7279122e66 Remove default operands that are never used
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4357 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 20:59:49 +00:00
Chris Lattner
413746e983 * Make MachineOperand ctors private, so MachineOperand can only be created
by MachineInstr.
* Add a bunch of new methods to allow incremental addition of operands to the
  machine instr instance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4356 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 20:48:39 +00:00
Chris Lattner
1c7907e896 Fix minor bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4355 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 20:11:17 +00:00
Chris Lattner
0fa600dd35 Don't pass default args
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4354 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 20:10:56 +00:00
Misha Brukman
6ee9b5a57d Fixed spelling and grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4353 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 20:01:52 +00:00
Misha Brukman
e585a7d12a Rewrote uses of deprecated `MachineFunction::get(BasicBlock *BB)'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4352 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 20:01:13 +00:00
Misha Brukman
b7551ef115 Replaced uses of deprecated `MachineFunction::get(BasicBlock *BB)'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4351 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 20:00:31 +00:00
Nick Hildenbrandt
f0fca36d14 Casting NULL can cause problems so lets just not cast NULL to anything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4349 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 19:54:06 +00:00
Chris Lattner
2f305989b3 Remove two arguments that are never specified
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4348 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 19:46:59 +00:00
Chris Lattner
5638bf973f Don't bother passing in default value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4347 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 19:46:25 +00:00
Chris Lattner
ccdf23ebbb Rename some regalloc fields
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4346 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 19:43:23 +00:00
Chris Lattner
4e3be2f728 Fixes to work with updated RegAlloc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4345 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 19:32:07 +00:00
Chris Lattner
f726e776b8 Eliminate usage of MachineBasicBlock::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4344 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 19:22:04 +00:00
Nick Hildenbrandt
50de36a41d *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4343 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 19:05:12 +00:00
Chris Lattner
fcffe865f9 Remove usage of MachineBasicBlock::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4342 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 19:01:16 +00:00
Chris Lattner
fb3a0aed9b Remove usage of MachineBasicBlock::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4341 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 18:50:08 +00:00
Chris Lattner
601fc7c71c Eliminate uses of MachineBasicBlock::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4340 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 18:01:21 +00:00
Chris Lattner
b84a2ba877 Eliminate unneccesary use of MachineBasicBlock::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4339 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 06:01:57 +00:00
Chris Lattner
335d5c399b s/method/function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4338 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 05:58:46 +00:00
Chris Lattner
d0aa0cdbc6 Change MachineBasicBlock's to not be Annotations, instead they are kept as
part of a linked list tracked by MachineFunction.  MachineBasicBlock::get
is now linear time instead of constant time, and thus is deprecated!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4337 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 05:30:46 +00:00
Chris Lattner
07541a2711 Make sched class unsigned
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4336 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 04:59:43 +00:00
Chris Lattner
c5ddc8b74b Make Scheduling Class variables be 'unsigned' instead of 'int'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4333 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 04:53:02 +00:00
Chris Lattner
133f079c8c Rename the redundant MachineOperand::getOperandType() to MachineOperand::getType()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4331 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 04:45:29 +00:00
Chris Lattner
572f5c8c0c Fairly major overhaul of MachineInstr & Operand classes
- Inline methods that are mostly a single line anyway
  - Eliminate several methods that were never called
  - Group methods a bit more consistently


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4329 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 04:24:49 +00:00
Chris Lattner
0be79c6c1b Add #includes now that MachineInstr.h doesn't include llvm/Target/MachineInstrInfo.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4327 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 02:28:39 +00:00
Chris Lattner
4a63b72df9 Don't #include <Support/*>, #include "Support/*"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4325 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 02:11:53 +00:00
Chris Lattner
e61a584f98 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4323 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 02:01:37 +00:00
Chris Lattner
e7d27fa00b MachineFunction now includes MachineBasicBlock so there is no need to
reinclude it


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4322 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 02:01:35 +00:00
Chris Lattner
55291ead55 Rename MachineCodeForBasicBlock to MachineBasicBlock
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4318 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:41:47 +00:00
Chris Lattner
32be9f6cd4 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4317 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:41:27 +00:00
Chris Lattner
a4f808b54e Fixes to previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4314 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:27:30 +00:00
Chris Lattner
51a8d85281 Inline some methods from .cpp files into .h files, minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4313 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:21:55 +00:00
Chris Lattner
6b9445389a Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4312 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:16:38 +00:00
Chris Lattner
227c3d355b Move machine code generation/destruction passes out of Sparc.cpp because
they are generic


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4310 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:12:41 +00:00
Chris Lattner
4f9463772b Move addPassesToEmitAssembly from TargetMachine to UltraSparc because it
really is sparc specific.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4308 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:03:43 +00:00
Chris Lattner
1febf88ef4 Prune #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4307 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:02:51 +00:00
Chris Lattner
0c68e8ce6e Updates to match misha's changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4302 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 00:37:53 +00:00
Misha Brukman
fce1143bcf Changed MachineCodeForMethod' to MachineFunction'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4301 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 00:28:31 +00:00
Chris Lattner
6f8fd25697 Remove dead fixme
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4300 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-27 21:23:43 +00:00
Chris Lattner
c5291f5e0e Instruction select constant arguments correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4297 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-27 21:16:59 +00:00
Chris Lattner
65a78f28e3 Add instruction definitions for mov r, imm instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4296 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-27 21:16:44 +00:00
Chris Lattner
dc476b87d9 change ++ to +1 when using random access iterators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4292 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-27 19:09:51 +00:00
Chris Lattner
9550dc2df2 Add #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4291 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-27 19:08:03 +00:00
Chris Lattner
683d5da9fb Fix a major bug in lli
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4289 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-26 01:57:15 +00:00
Chris Lattner
726140821f Initial checkin of X86 backend.
We can instruction select exactly one instruction 'ret void'.  Wow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4284 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-25 22:55:53 +00:00
Chris Lattner
a750de9bfb Build the X86 target as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4283 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-25 22:55:05 +00:00
Chris Lattner
78cee7e7ab Initial checkin of codegen infrastructure for LLVM-JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4282 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-25 22:54:41 +00:00
Chris Lattner
e2d053ad18 Prune #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4277 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-25 02:01:33 +00:00
Chris Lattner
232c3be0b5 Fix misspelling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4276 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-25 01:43:26 +00:00
Nick Hildenbrandt
3cecdc5b9a Malloc prototyping now works even if the original file had its own prototype for malloc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4271 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-23 18:59:40 +00:00
Chris Lattner
a0877726df Tell PassManager that this pass does not invalidate the CFG so that dominator
information and Loop info will not have to be recomputed after this runs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4269 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-23 03:30:47 +00:00
Chris Lattner
54b866b896 Minor cleanups
Make sure to have a pass name


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4268 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-23 01:12:01 +00:00
Chris Lattner
8cdc6b726a - Fix a really nasty bug in the bytecode reader that caused it to fail
reading bytecode files with > 255 types in them, but only when optimization
    is enabled.  This was caused by GCC shrinking an enum to a single byte
    instead of a whole word.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4266 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-23 00:51:54 +00:00
Chris Lattner
5dfab9ec22 Wow, for some reason, when reading bytecode from stdin, we were only reading
4 bytes at a time.  Change this to read blocks of 4k


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4265 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-22 23:55:24 +00:00
Chris Lattner
0ceeb42c97 Ensure definate initialization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4263 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-22 23:34:11 +00:00
Chris Lattner
27a08935ca - Two minor improvements to the MachineInstr class to reduce footprint and
overhead: Merge 3 parallel vectors into 1, change regsUsed hash_set to be a
    bitvector.  Sped up LLC a little less than 10% in a debug build!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4261 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-22 23:16:21 +00:00
Chris Lattner
4bdb9b7ebe - Make sure to only keep track of mappings that the TD pass may need in the
future.  This prevents having spurious map entries to nodes that we really
    don't care about.  This allows us to reenable the DeadNodeElim, which was
    disabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4260 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-22 16:01:03 +00:00
Chris Lattner
9faf18d523 The callee is not correct, and confuses the TD pass. Null it out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4259 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-22 15:58:46 +00:00
Chris Lattner
cb2610ea03 - Rename AnalysisUsage::preservesAll to getPreservesAll & preservesCFG to
setPreservesCFG to be less confusing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4255 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 20:00:28 +00:00
Chris Lattner
e4ae3041f9 Delete unused arguments to DSGraph::cloneInto method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4253 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 19:50:29 +00:00
Chris Lattner
198be22cec - Add "ResolvingCaller" to the CallSite record. This keeps track of which
function was finally able to resolve the function call.  Adding this allows
    the TD pass to actually work right!
  - Temporarily disable dead node pruning.  This will be reenabled soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4252 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 19:47:18 +00:00
Chris Lattner
eff0da9d33 Add another copy ctor form
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4251 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 15:32:34 +00:00
Chris Lattner
99a22847ba As it turns out, we don't need a fully generic mapping copy ctor, we just need
something that maps through a std::map.  Since this simplified the client and
implementation code, do so now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4250 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 15:04:18 +00:00
Chris Lattner
448f4949dc Don't create a new node for every reference to a global. This caused a huge
node explosion that doesn't help anything at all.  In previous versions of
the representation this DID help, but not anymore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4249 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 13:51:30 +00:00
Chris Lattner
482b651cf8 Fix a confusing bug that caused return value and callee pointers to not
be printed!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4248 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 13:47:57 +00:00
Chris Lattner
13ec72a12a Remove some unneccesary 'using' directives
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4246 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 13:31:48 +00:00
Chris Lattner
65d6a9ee47 Fix bug with prior checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4242 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 02:18:55 +00:00
Chris Lattner
0969c50cb8 - Make DSCallSite not inherit from std::vector. Renamed methods slightly.
Make copy ctor have two versions to avoid dealing with conditional template
    argument.  DSCallSite ctor now takes all arguments instead of taking one
    and being populated later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4240 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 02:08:03 +00:00
Chris Lattner
0c8d73b74c Avoid extra copy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4239 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 22:12:06 +00:00
Chris Lattner
9de906c72a Simplify code a bit, add comment flyer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4238 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 22:11:44 +00:00
Chris Lattner
7836d609fa Split some long lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4237 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 22:11:17 +00:00
Vikram S. Adve
26b98265b7 Remove spurious caller pointer in DSCallSite.
Also add functions to access pointer argument nodes cleanly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4235 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 21:41:02 +00:00
Chris Lattner
e80fe61a72 This function can be static
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4234 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 20:39:31 +00:00
Chris Lattner
d1f8d0abeb Fix previous checkin :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4233 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 20:39:17 +00:00
Chris Lattner
bd14460289 Avoid extra callSite copy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4232 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 20:32:13 +00:00
Chris Lattner
af4800b8a9 Print the array flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4231 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 20:29:10 +00:00
Vikram S. Adve
42fd169310 Added a first-class representation for each call site that can be
used in the DS graphs.  Essentially, what was vector<DSNodeHandle>
before is now a DSCallSite with the same vector, plus pointers to the
CallInst and the caller Function.  The special-purpose class
BUDataStructure::CallSite is no longer needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4228 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 18:07:37 +00:00
Chris Lattner
a3f8586d9d Convert typerec to be a structure instead of a pair
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4226 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-18 18:22:46 +00:00
Chris Lattner
dc062d3e6c Print Mod/ref info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4224 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 22:13:28 +00:00
Chris Lattner
06285237ea Calculate mod/ref info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4223 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 22:13:19 +00:00
Chris Lattner
97e7f083f2 Remove more obsolete code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4221 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 20:53:12 +00:00
Chris Lattner
cf15db34d3 * Make the DSGraph cloner automatically merge global nodes
* BUClosure doesn't have to worry about global nodes
 * TDClosure now works with global nodes
 * Reenable DNE on TD pass, now that globals work right


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4220 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 20:09:52 +00:00
Chris Lattner
1a33e31758 * Apparently string::find doesn't work right on our sun boxes. Work around this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4219 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 16:22:08 +00:00
Chris Lattner
3cc061c0e9 Remove obsolete code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4218 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 04:58:10 +00:00
Chris Lattner
19db0492b8 Enable incompleteness marking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4217 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 04:57:28 +00:00
Chris Lattner
c966a2acee Really disable pool allocator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4216 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 04:57:09 +00:00
Chris Lattner
0e74412cee * First try at implementing TD pass this does not merge global nodes yet,
among other things.
  * Significant rewrite of TD pass to avoid potentially N^2 algorithms if
    possible.  It is still not complete, but at least it's checked in now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4215 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 04:26:54 +00:00
Chris Lattner
e25ab83a5f Reenable printing of TD analysis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4214 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 04:24:30 +00:00
Chris Lattner
613692c106 * Add data structures and code to track the call sites for each function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4213 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 04:24:08 +00:00
Chris Lattner
e17a4e8b55 Cleanup data structure graph printer, eliminate hard coded printing in
favor of generic printer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4209 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 01:02:46 +00:00
Chris Lattner
962ee45fe6 Make sure to print out the call nodes as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4203 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 20:16:16 +00:00
Chris Lattner
e8e035b591 Fix bug: CBackend/2002-10-16-External.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4201 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 20:08:47 +00:00
Chris Lattner
eb265cdc90 * Print the "return" node in the graphs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4199 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 02:04:36 +00:00
Chris Lattner
ff5feedf28 The second element of the iterator is really an offset, not a link
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4196 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 01:43:11 +00:00
Chris Lattner
641e1c252d Specify the graph name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4195 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 01:34:28 +00:00
Chris Lattner
f29e307765 - DSGraph Printing Improvements:
* Print edge source labels again
     * Override node shape to be Mrecord again, instead of just record.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4193 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 01:18:27 +00:00
Chris Lattner
04b72c821e Fix bug: test/Regression/CBackend/2002-10-15-OpaqueTypeProblem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4190 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 00:08:22 +00:00
Chris Lattner
bf0a37b9aa - Fix bug: Assembler/2002-10-15-NameClash.ll
- Clean up code a bit, s/Method/Function/


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4188 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-15 21:41:14 +00:00
Chris Lattner
0dad6e9c95 - Eliminate SymbolTable::ParentSymTab, ST::localLookup, and
Function::ParentSymTab.  These aren't needed at all.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4186 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-15 21:26:29 +00:00
Chris Lattner
fddc755a6f - Fix LLI so that it simulates the endianness of the target machine
correctly, despite the fact that the host machine might not be the same.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4180 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-15 20:34:05 +00:00
Chris Lattner
d344242f2e Make sure to escape \'s when they are output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4179 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-15 19:56:24 +00:00
Chris Lattner
85131c8277 - Add an endianness field to the TargetData datastructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4174 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 22:41:13 +00:00
Vikram S. Adve
edf3a727b7 Print "circular" warning message only in debug mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4170 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 16:32:49 +00:00