Commit Graph

4658 Commits

Author SHA1 Message Date
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