Commit Graph

5543 Commits

Author SHA1 Message Date
Chris Lattner
0ad9170327 Use isNull instead of getNode() to test for existence of a node, this is cheaper.
FIX MAJOR BUG, whereby we didn't merge null edges correctly. Correcting this
fixes poolallocation on 175.vpr, and possibly others.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11695 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-22 00:53:54 +00:00
Chris Lattner
d85645f526 Fix an iterator invalidation problem which was causing some nodes to not be
correctly merged over!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11693 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-21 22:28:26 +00:00
Chris Lattner
5171115cf3 Use handy method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11692 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-21 22:27:31 +00:00
Misha Brukman
ac2ecd0ba0 `cat' is usually in /bin, not /usr/bin, at least on our systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11690 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-21 21:51:41 +00:00
Chris Lattner
b9632bee7c When printing a stack trace, demangle it if possible. Since we are potentially
in a signal handler, allocating memory or doing other unsafe things is bad,
which means we should do it in a different process.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11689 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-21 21:06:19 +00:00
Alkis Evlogimenos
d6f6d1a80d Make 'fold' statistic's description the same in both allocators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11687 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-21 18:07:33 +00:00
Chris Lattner
3567937f16 Instead of cloning the globals for main into the globals graph at the end of
BU propagation, clone the globals into the GG of EACH FUNCTION that finishes
processing!  The GlobalsGraph *must* include all globals and effects from
all functions in the program.  Fixing this makes pool allocation work better
on 175.vpr, but it still ultimately crashes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11686 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-21 00:30:28 +00:00
Chris Lattner
d10b5fd395 There is no need to merge the globals graph into the function graphs at the
end of the BU and CBU passes.  The globals will be marked incomplete, so it
doesn't matter if they are missing some info, and merging isn't guaranteed
to bring everything in anyway!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11684 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-20 23:52:15 +00:00
Chris Lattner
4e46e320a5 Add two missing returns, which caused us to be very pessimistic about the
printf and scanf families!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11683 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-20 23:27:09 +00:00
Alkis Evlogimenos
007726ca6f Some more statistics improvements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11676 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-20 20:53:26 +00:00
Alkis Evlogimenos
df158c7e3f Disambiguate statistic descriptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11675 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-20 20:46:49 +00:00
Alkis Evlogimenos
cea4471120 Rename statistic and add another one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11674 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-20 20:43:08 +00:00
Chris Lattner
8ecc27e667 Add support for some string functions, the scanf family, and sprintf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11673 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-20 20:27:11 +00:00
Alkis Evlogimenos
fa510c4af5 Fix crash in debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11659 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-20 06:41:12 +00:00
Brian Gaeke
38ce7e57d4 Use backtrace() and include execinfo.h, if they were detected by autoconf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11658 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-20 06:40:59 +00:00
Alkis Evlogimenos
537fa9838d Fix instruction numbering in debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11655 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-20 06:29:51 +00:00
Alkis Evlogimenos
39a0d5c112 Too many changes in one commit:
1. LiveIntervals now implement a 4 slot per instruction model. Load,
   Use, Def and a Store slot. This is required in order to correctly
   represent caller saved register clobbering on function calls,
   register reuse in the same instruction (def resues last use) and
   also spill code added later by the allocator. The previous
   representation (2 slots per instruction) was insufficient and as a
   result was causing subtle bugs.

2. Fixes in spill code generation. This was the major cause of
   failures in the test suite.

3. Linear scan now has core support for folding memory operands. This
   is untested and not enabled (the live interval update function does
   not attempt to fold loads/stores in instructions).

4. Lots of improvements in the debugging output of both live intervals
   and linear scan. Give it a try... it is beautiful :-)

In summary the above fixes all the issues with the recent reserved
register elimination changes and get the allocator very close to the
next big step: folding memory operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11654 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-20 06:15:40 +00:00
Chris Lattner
f358c5ad15 It is totally unacceptable to print out (literally) millions of zeros when
compiling 129.compress... so don't!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11649 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-20 05:49:22 +00:00
Chris Lattner
6559615fc4 Disable the stack trace thing until we can get an autoconf test for it. This
call breaks on sparcs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11635 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 21:21:23 +00:00
Chris Lattner
982774cbeb Implement new function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11631 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 20:03:14 +00:00
Alkis Evlogimenos
d195e99bc8 Fix RA::verifyAssignment()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11629 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 19:24:17 +00:00
Chris Lattner
d368c6163a Fix problem fusing spill code into instructions: we didn't update the live
variable information to take into account the change of instruction
address.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11628 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 18:34:02 +00:00
Chris Lattner
a96478d7d6 Fix an iterator invalidation problem. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11627 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 18:32:29 +00:00
Chris Lattner
5ed001b6af Add method to update livevar when an instruction moves
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11625 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 18:28:02 +00:00
Chris Lattner
8517e1f0be Fix a __LONG__ term annoyance of mine: symbolic registers weren't being printed
by operator<< on MachineInstr's, and looking up what register "24" is all of the
time was greatly annoying.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11623 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 16:17:08 +00:00
Chris Lattner
5e61fa9519 Add a MachineBasicBlock::getParent() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11622 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 16:13:54 +00:00
Alkis Evlogimenos
1d29a6d6c7 Make ToolExecutionError inherit std::exception and implement its
interface: getMessage() is gone, use what() instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11621 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 07:39:26 +00:00
Alkis Evlogimenos
280f9c939d Print stacktrace in STDERR before dying on a fatal signal. Currently
the symbols are not demangled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11620 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 07:36:35 +00:00
Alkis Evlogimenos
2acef2da06 Rename reloads/spills to loads/stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11619 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 06:19:09 +00:00
Chris Lattner
9cbbee332f Add support for just running the code generator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11611 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 23:24:41 +00:00
Alkis Evlogimenos
779e640657 Implement assignment correctness verification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11609 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 23:15:23 +00:00
Alkis Evlogimenos
52f8f56ef4 Move unused typedefs in private section. Add method to return interval
given a register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11608 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 23:14:52 +00:00
Chris Lattner
a3de11783f indent correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11601 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 20:58:00 +00:00
Chris Lattner
722ca71285 Don't yell. BUGPOINT should yell, not the tool runner :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11600 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 20:57:38 +00:00
Chris Lattner
89bf9ea65e If there is an error running a tool, include the error message (e.g. assertion failure) in the exception
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11597 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 20:38:00 +00:00
Chris Lattner
8c56be5e2b When an error occurs executing a tool, we now throw an exception instead
of calling exit(1).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11593 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 20:21:57 +00:00
Chris Lattner
e6d04f1a99 Eliminate operator[] is deprecated warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11578 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 16:43:51 +00:00
Chris Lattner
fdc01cedd4 Fix deprecated operator[] warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11577 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 16:38:18 +00:00
Alkis Evlogimenos
e9118f3694 Fix argument size for MOVSX and MOVZX instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11576 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 16:20:40 +00:00
Alkis Evlogimenos
23c114fd3b Be more agressive when joining ranges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11575 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 04:38:37 +00:00
Alkis Evlogimenos
99d9923608 Fix overly conservative spill interval computation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11574 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 03:35:38 +00:00
Alkis Evlogimenos
3a9986f5d8 Beautify debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11573 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 00:35:06 +00:00
Chris Lattner
57cb9883aa Fix PR245: Linking weak and strong global variables is dependent on link order
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11565 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 21:56:04 +00:00
Chris Lattner
28a631d37e When we complete the bottom-up pass, make sure to merge the globals in 'main' into
the globals graph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11562 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 19:06:47 +00:00
Chris Lattner
cc0d2f586f Add support for GlobalAddress's for alkis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11560 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 18:23:55 +00:00
Alkis Evlogimenos
9b9b7fc28d These store to memory too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11558 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 17:53:48 +00:00
Chris Lattner
56ddada278 Remove the -disable-kill option. The register allocator is buggy with it,
and it was only for debugging in the first place.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11557 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 17:49:10 +00:00
Chris Lattner
acce13e4cc These store to memory, not read from it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11556 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 17:46:50 +00:00
Alkis Evlogimenos
d886ed99fb Instructiosn with 1 memory operand have 4 operands in our
representation.. duh!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11554 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 15:58:13 +00:00
Alkis Evlogimenos
f41dadafae Align case statements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11552 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 15:50:41 +00:00