Commit Graph

4753 Commits

Author SHA1 Message Date
Brian Gaeke
c1a2be18ea Implement vaarg instruction. This is not quite perfect: 2003-08-11-VaListArg
still causes a crash. But it's better than before.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9794 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 21:20:47 +00:00
Misha Brukman
52709450c8 Implement branching to a PC-relative constant (not a BasicBlock).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9793 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 21:07:30 +00:00
Brian Gaeke
dbde1ae7a0 popStackAndReturnValueToCaller() must advance instruction pointer to normal
destination, if returning from an invoke.

Implement 'unwind' instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9792 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 20:44:58 +00:00
Misha Brukman
351881793a PreSelection is not optional, it performs a necessary and vital transformation
for the Sparc backend: breaking up constant expressions. Thus, we cannot have it
guarded by a conditional, it should never be disabled.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9791 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 20:33:25 +00:00
Misha Brukman
cb93d8d3a9 Remove the *BIG UGLY HACK* from the JIT: PreSelection is now a FunctionPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9790 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 20:32:08 +00:00
Brian Gaeke
9bf06b155c Add stub version of unwind support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9789 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 20:07:06 +00:00
Brian Gaeke
fea483d7c0 visitCallInst --> visitCallSite.
Use visitCallSite to implement both CallInsts and InvokeInsts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9788 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 20:04:22 +00:00
Brian Gaeke
ae2495a921 Make the operation of visitCallInst() only depend on the CallSite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9787 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 19:59:08 +00:00
Brian Gaeke
2cb474c8ad Use CallSites for call sites, instead of CallInsts. A revolutionary concept.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9784 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 19:26:23 +00:00
Misha Brukman
e5ad8155d3 Switch to emitting MachineConstantPool the way it was meant to be done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9777 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 18:06:26 +00:00
Misha Brukman
f905ed5204 Switch to using the standard representation of the constant pool -- namely, the
MachineConstantPool. This involved refactoring the two classes involved in
printing out Sparc assembly. In fact, they should share all this code anyway.


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


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

Also, order #includes as per coding style guide


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9772 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 17:29:48 +00:00
Misha Brukman
22eb79619d Use basename $< to get just the filename, not full path, for ease of reading.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9770 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 17:26:27 +00:00
Misha Brukman
ed1f7c81aa Declare FunctionPasses as such so that they can be used in FunctionPassManager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9768 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 17:20:18 +00:00
Brian Gaeke
af955ba503 Refactor the return-from-function code into popStackAndReturnValueToCaller().
Make external function calls slightly less special; now they get a stack frame.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9765 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 05:22:49 +00:00
Chris Lattner
c1e0d7876b Hopefully this will fix PR98
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9762 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 00:38:09 +00:00
Chris Lattner
0239d7af57 Hopefully fix the objdir != srcdir issue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9761 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-07 00:34:33 +00:00
Chris Lattner
2bee057a56 Fix warnings building on sparc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9758 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-06 21:30:05 +00:00
Chris Lattner
0c7e8e17ff Various cleanups and efficiency improvements
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9753 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-06 19:46:29 +00:00
Chris Lattner
d7222ec801 Fix bug: PR93
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9752 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-06 19:18:49 +00:00
Misha Brukman
6d7aad1dd5 * Make the comment header 80 columns long
* Alphabetize #includes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9751 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-06 18:06:13 +00:00
Misha Brukman
e2bf0a2c36 Let's not forget about our friends -- Constant Pool indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9750 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-06 00:04:11 +00:00
Brian Gaeke
3b3640a373 Shorten and correct some function-header comments.
Make "verbose" output MUCH nicer. Now it tells you when you are linking a
bytecode file, or an archive, and whether it's because you called it by name,
or because you gave it a -l option, and it says "Trying" before it takes
action and prints a message in the past tense afterwards.

Make LinkFiles not skip the first file in Files.

Make LinkFiles warn you if it can't find a file and LLVM_LIB_SEARCH_PATH is
unset.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9747 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 22:12:52 +00:00
Chris Lattner
b6e0631a94 Fix the problem with running cleanups in bugpoint: We were deleting arguments
of intrinsic functions, causing the verifier to fail.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9745 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 21:53:41 +00:00
Chris Lattner
fdcc3acb7b Split behavior into two pieces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9741 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 21:43:02 +00:00
Chris Lattner
e7a6663eb1 Yet more fixes for constant expr shifts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9739 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 20:43:58 +00:00
Chris Lattner
d981f8af79 Further fixes for PR93
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9738 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 20:37:01 +00:00
Chris Lattner
095be96096 no need for endl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9736 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 19:53:32 +00:00
Chris Lattner
29e3b2ba77 Add support for constant expr shifts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9735 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 19:53:03 +00:00
Chris Lattner
c4856f37f0 If we're not checking, don't check!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9732 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 19:09:40 +00:00
Chris Lattner
1bcc70d240 Fix flawed logic that was breaking several SPEC benchmarks, including gzip and crafty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9731 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 17:31:36 +00:00
Misha Brukman
7f1affe677 We know exactly what the value of $< is, so instead of using basename $< to
get just the filename and not the full path, just use the filename directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9730 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 06:43:36 +00:00
Chris Lattner
414d9d2707 Do not use a class before it is defined.
Be gcc 3.4 clean


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9727 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 06:25:06 +00:00
Chris Lattner
502dda001a Be friendly to gcc 3.4... good compiler. Nice compiler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9726 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 06:20:27 +00:00
Chris Lattner
646f8d7457 Be gcc 3.4 clean
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9725 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 06:12:18 +00:00
Chris Lattner
0271345368 Fix name collision
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9722 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 05:55:45 +00:00
Chris Lattner
e860e0d69c Make code gcc 3.4 clean
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9719 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 05:15:42 +00:00
Brian Gaeke
b56a6bc96a Abort when the user program calls abort, instead of printing a funny message and calling exit(1).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9716 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 01:18:49 +00:00
Chris Lattner
d65460f133 Fix bug with previous implementation:
-      // ~(c-X) == X-(c-1) == X+(-c+1)
+      // ~(c-X) == X-c-1 == X+(-c-1)

Implement: C - ~X == X + (1+C)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9715 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 01:06:05 +00:00
Brian Gaeke
2fa8212a7a Use regular old malloc to emulate malloc/alloca instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9713 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 01:02:14 +00:00
Brian Gaeke
3636f4e0d6 Remove a comment which no longer applies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9712 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 00:59:28 +00:00
Chris Lattner
ad5b4fb6b7 Minor cleanup, plus implement InstCombine/xor.ll:test17
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9711 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-04 23:50:51 +00:00
Chris Lattner
d5e4918fa7 Fix spello
Add negate overload


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9709 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-04 23:37:40 +00:00
Chris Lattner
689d24b6ed Implement InstCombine/xor.ll:test(15|16)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9708 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-04 23:37:10 +00:00
Alkis Evlogimenos
e668dab5b3 Change all machine basic block modifier functions in MRegisterInfo to
return the number of instructions added to/removed from the basic block
passed as their first argument.

Note: This is only needed because we use a std::vector instead of an
ilist to keep MachineBasicBlock instructions. Inserting an instruction
to a MachineBasicBlock invalidates all iterators to the basic
block. The return value can be used to update an index to the machine
basic block instruction vector and circumvent the iterator elimination
problem but this is really not needed if we move to a better
representation.


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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9703 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-04 22:42:41 +00:00
Brian Gaeke
cce4e7a1b1 Add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9697 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-04 18:25:56 +00:00
Chris Lattner
9053356dd1 Fix problems in previous changes. This fixes several regressions last night.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9694 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-04 16:04:32 +00:00
John Criswell
700867bb69 Checking in Chris's suggestions:
Added assert() to ensure symbol table is well formed.
Added code to remember the value that was found; resolving types can change
the symbol table and invalidate the value of the iterator.
Added comments to the ResolveTypes() function (mainly for my own benefit).
Please feel free to correct the comments if they are not accurate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9693 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-04 15:22:26 +00:00
Chris Lattner
ac662d1e02 Significantly simplify constant emission by unifying the stuff which used to build up
strings with the stuff that used to print to an ostream directly.  We now NEVER build
up big strings, only to print them once they are formed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9686 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-03 20:19:49 +00:00
Chris Lattner
3e119c68fe Incorporate printSingleConstantValue into its single caller
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9684 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-03 19:44:05 +00:00
Chris Lattner
603c56213d * Reformat some code
* Emit bools as 1/0 instead of true/false, fixing compilation of eon and
  PR 83 & Jello/2003-11-03-GlobalBool.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9683 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-03 19:33:45 +00:00
Chris Lattner
5bc3e31c54 Fix InstCombine/2003-11-03-VarargsCallBug.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9681 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-03 18:44:58 +00:00
Chris Lattner
5ea326a23b Work around a bug in GCC where it can't handle common variables marked weak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9679 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-03 17:35:00 +00:00
Chris Lattner
2580d4f232 Fix bugs with attribute weak emission
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9678 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-03 17:32:38 +00:00
Chris Lattner
6870805117 Implement InstCombine/cast-set.ll:test6[a]. This improves code generated for
a hot function in em3d


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9673 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-03 05:17:03 +00:00
Chris Lattner
8917d36229 This simplifies the CWriter code, makes the generated code easier to read,
and makes the output work with the intel compiler.  Overall, a win.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9671 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-03 04:31:54 +00:00
Chris Lattner
de90b76670 Implement InstCombine/cast-set.ll: test1, test2, test7
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9670 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-03 04:25:02 +00:00
Chris Lattner
8ee9204309 Fix bug with zero sized casts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9667 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-03 01:29:41 +00:00
Chris Lattner
7635ea4230 Eliminate the silly namedContext member of printType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9666 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-03 01:01:59 +00:00
Chris Lattner
15869aa2c7 All DSGraphs keep a reference to the targetdata they are created with. This is
used to eliminate the hard coded, hacked in, sparc specific, global TargetData.
Changing the TargetData used to actually match the code fixes problems, and
eliminates a crash.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9659 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-02 22:27:28 +00:00
Chris Lattner
dbfe36e51e Fix bug: test/Regression/Analysis/DSGraph/2003-11-02-NodeCollapsing.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9658 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-02 21:02:20 +00:00
Chris Lattner
fc07a3473a Fix bug in previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9656 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-02 06:54:48 +00:00
Chris Lattner
bc61e661bd Implement transmogriphication of allocation instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9654 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-02 05:57:39 +00:00
Chris Lattner
d6d0d8c18d Fix PR78
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9648 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-02 02:06:27 +00:00
Chris Lattner
fa395ec036 The "correct" fix for CBackend/2003-10-23-UnusedType.ll is to not even try
to emit types which are not used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9647 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-02 01:29:27 +00:00
Chris Lattner
ba12c23ca7 Including the symbol table in the FindUsedTypes analysis was the WRONG way
to fix test/Regression/CBackend/2003-10-23-UnusedType.ll.  This completely
neutered the deadtypeelim pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9646 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-02 01:28:41 +00:00
Chris Lattner
bb9ae1512e Strip off CPR's manually, because if we don't, the inliner doesn't delete dead
functions.  GRR


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9641 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-31 21:05:58 +00:00
Chris Lattner
07a38e7b77 Make the call graph more precise despite the hated constantpointerrefs.
Do you detect the animosity I feel towards CPRs yet?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9640 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-31 21:05:12 +00:00
Chris Lattner
bc539434c5 Did I mention that I _HATE_ CPRs?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9639 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-31 18:38:06 +00:00
Chris Lattner
b10bed8a63 Constant pointer refs are causing these to fail unnecessarily, which is causing
a lot of code to be pessimized.  I hate CPRs.  :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9635 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-31 17:51:16 +00:00
Alkis Evlogimenos
088eb45cf4 Use already existing classes for post order iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9629 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-31 03:02:34 +00:00
Chris Lattner
95e5a2cc3f Make use of the new AssemblyAnnotationWriter interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9619 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 23:41:03 +00:00
Brian Gaeke
3ceac85296 Include llvm/CodeGen/MachineCodeForInstruction.h. Use it to start
implementing verifySavedState().

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


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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9616 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 21:21:22 +00:00
Alkis Evlogimenos
74fa84fcef Output types in reverse postorder. This will allow the ByteCode/Reader
to create the minimum number of opaque types for each type with a
cycle in its type graph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9615 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 21:04:44 +00:00
Alkis Evlogimenos
60048b8a66 Put DEBUG_OUTPUT at the top along with TRACE_LEVEL. Also fix the code
inside DEBUG_OUTPUT so that it compiles.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9614 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 18:33:58 +00:00
Chris Lattner
14fffaf6c1 When someone includes CallGraph.h, make sure that they link in CallGraph.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9611 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 05:17:30 +00:00
Chris Lattner
8ea8f36a7f Make sure that PHI node operands are first class types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9607 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 01:38:18 +00:00
Chris Lattner
bb60904469 Fix bug: 2003-10-29-CallSiteResolve.ll & PR70
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9600 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 00:46:41 +00:00
Chris Lattner
88c1738064 Print the names of more opaque types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9598 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 00:22:33 +00:00
Chris Lattner
daf2a492a7 Make sure to print opaque types names if they are available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9597 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 00:12:51 +00:00
Chris Lattner
942457564d Refactor code, initial implementation of -insert-block-profiling pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9593 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-29 21:24:22 +00:00
Brian Gaeke
bc839b5827 Explicitly cast type, so we aren't passing output_vbr a size_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9590 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-29 20:09:01 +00:00
Brian Gaeke
3386e45440 Tweak sed commands so that they filter out more # stuff and also
work on Mac OS X. Also turn ${...} into $(...); we do not speak BSD
Make.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9589 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-29 20:07:35 +00:00
Chris Lattner
546fc40d69 Fix PR66 & ScalarRepl/2003-10-29-ArrayProblem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9585 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-29 17:55:44 +00:00
Chris Lattner
6ace4daa57 Fix bug: ConstantMerge/2003-10-28-MergeExternalConstants.ll & PR64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9579 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-29 06:01:26 +00:00
Brian Gaeke
11911abf5c In VM::create(), comment out almost the whole function if NO_JITS_ENABLED,
because the Arch variable will likely be undefined.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9576 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-29 04:24:09 +00:00
Alkis Evlogimenos
5d1bdcd6f6 Add more debugging info to help tracing the SlotCalculator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9575 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-29 03:12:12 +00:00
Chris Lattner
fe2143d87d Check in statistifying patch for Bill
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9572 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-28 23:14:59 +00:00
Chris Lattner
c2bcde4da0 Fix PR62, and llvm/test/Regression/CBackend/2003-10-28-CastToPtrToStruct.ll
ConstantExpr's can use unrelated types, make sure to scan them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9569 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-28 23:09:45 +00:00
Chris Lattner
c0204e0b73 Pass in argc & argv
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9563 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-28 22:42:24 +00:00
Chris Lattner
baa2007fae Initial checkin of profiling instrumentation pass. So far, despite the
file name, we only support function profiling.  This will be fixed in the
near future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9547 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-28 18:59:04 +00:00
Chris Lattner
7b6dd2950f Eliminate using declarations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9543 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-27 21:44:09 +00:00
Chris Lattner
2e8dfb8221 Propagating constants to arguments can make other arguments constant. For now
do something dumb, and inefficient, but more complete.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9542 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-27 21:09:00 +00:00
Chris Lattner
35956558e2 Fix test: Linker/2003-10-27-LinkOncePromote.ll
Fix PR58


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9530 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-27 16:39:39 +00:00
Chris Lattner
198f4507e2 Get the list of PHI node values before the basic block is split. Also, add
PHI node entries for unwind instructions just like for call instructions which
became invokes!  This fixes PR57, tested by
Inline/2003-10-26-InlineInvokeExceptionDestPhi.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9526 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-27 05:33:09 +00:00