1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
Commit Graph

10619 Commits

Author SHA1 Message Date
Alkis Evlogimenos
7f7d70a53c Move MOTy::UseType enum into MachineOperand. This eliminates the
switch statements in the constructors and simplifies the
implementation of the getUseType() member function. You will have to
specify defs using MachineOperand::Def instead of MOTy::Def though
(similarly for Use and UseAndDef).

llvm-svn: 11715
2004-02-22 19:23:26 +00:00
Chris Lattner
56a7886c8a Fix a bug where we were implicitly assuming that there would be at least
one terminator instruction in each basic block.

llvm-svn: 11714
2004-02-22 19:08:15 +00:00
Chris Lattner
cc9a188e0a Reduce the number of pointless copies inserted due to constant pointer refs.
Also, make an assertion actually fireable!

llvm-svn: 11713
2004-02-22 17:35:42 +00:00
Chris Lattner
ed03319931 Fix bug in previous checkout: leave the iterator at the first instruction
AFTER the GEP that was emitted.  :(

llvm-svn: 11712
2004-02-22 17:05:38 +00:00
Alkis Evlogimenos
abc8efe386 Fix silly bug in implementation of getUseType(). Thanks Misha.
llvm-svn: 11711
2004-02-22 07:24:19 +00:00
Chris Lattner
ade64c9839 Completely rewrite how getelementptr instructions are expanded. This has two
(minor) benefits right now:

1. An extra dummy MOVrr32 is gone.  This move would often be coallesced by
   both allocators anyway.
2. The code now uses the gep_type_iterator to walk the gep, which should future
   proof it a bit.  It still assumes that array indexes are Longs though.

These don't really justify rewriting the code.  The big benefit will come later
though.

llvm-svn: 11710
2004-02-22 07:04:00 +00:00
Alkis Evlogimenos
6998610eda When folding memory operands in machine instructions be careful to
leave register operands with the same use/def flags as the original
instruction.

llvm-svn: 11709
2004-02-22 06:54:26 +00:00
Chris Lattner
a3f44e7098 Significantly simplify gep_type_iterator, and make its interface more general/powerful
llvm-svn: 11708
2004-02-22 06:27:03 +00:00
Chris Lattner
63b79422f3 Fix a soon-to-be-missing #include
llvm-svn: 11707
2004-02-22 06:26:17 +00:00
Chris Lattner
727748b382 Get all instruction definitions
llvm-svn: 11706
2004-02-22 06:25:38 +00:00
Chris Lattner
3392d316e9 Wow this is out of date. When we have _real_ code generator documentation,
this should be folded into it.

llvm-svn: 11705
2004-02-22 05:53:54 +00:00
Alkis Evlogimenos
ba33a0ab9b Print basic block boundaries in machine instruction debug output.
llvm-svn: 11704
2004-02-22 05:46:04 +00:00
Chris Lattner
f3e342dc45 Link to most recent "LLVM document"
llvm-svn: 11703
2004-02-22 05:45:02 +00:00
Chris Lattner
69bb1545d1 Implement Transforms/InstCombine/cast.ll:test13, a case which occurs in a
hot 164.gzip loop.

llvm-svn: 11702
2004-02-22 05:25:17 +00:00
Chris Lattner
6636526f53 Test that the instruction combiner can fold away a cast in a GEP instruction.
This occurs in 164.gzip, as a result of it declaring arrays extern.

llvm-svn: 11701
2004-02-22 05:24:09 +00:00
Chris Lattner
cf8afa52b8 The two address pass cannot handle two addr instructions where one incoming
value is a physreg and one is a virtreg.  For this reason, disable copy folding
entirely for physregs.  Also, use the new isMoveInstr target hook which gives us
folding of FP moves as well.

llvm-svn: 11700
2004-02-22 04:44:58 +00:00
Alkis Evlogimenos
32d12d31ae Abstract merging of ranges away from number of slots per instruction.
Also make it less aggressive as the current implementation breaks in
some cases.

llvm-svn: 11696
2004-02-22 04:05:13 +00:00
Chris Lattner
573441bfbd 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.

llvm-svn: 11695
2004-02-22 00:53:54 +00:00
Chris Lattner
7bff00313e Fix an iterator invalidation problem which was causing some nodes to not be
correctly merged over!

llvm-svn: 11693
2004-02-21 22:28:26 +00:00
Chris Lattner
458704f675 Use handy method
llvm-svn: 11692
2004-02-21 22:27:31 +00:00
Chris Lattner
7906b0bc03 Update comments and add warning
llvm-svn: 11691
2004-02-21 22:27:20 +00:00
Misha Brukman
642275dc4e `cat' is usually in /bin, not /usr/bin, at least on our systems.
llvm-svn: 11690
2004-02-21 21:51:41 +00:00
Chris Lattner
7448a9867b 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.

llvm-svn: 11689
2004-02-21 21:06:19 +00:00
Alkis Evlogimenos
e39c21cc93 Make 'fold' statistic's description the same in both allocators.
llvm-svn: 11687
2004-02-21 18:07:33 +00:00
Chris Lattner
dacc6a7448 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.

llvm-svn: 11686
2004-02-21 00:30:28 +00:00
Chris Lattner
0f9200e5a5 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!

llvm-svn: 11684
2004-02-20 23:52:15 +00:00
Chris Lattner
31f8fa66cb Add two missing returns, which caused us to be very pessimistic about the
printf and scanf families!

llvm-svn: 11683
2004-02-20 23:27:09 +00:00
Chris Lattner
0be72bef9f new testcase
llvm-svn: 11682
2004-02-20 23:05:43 +00:00
John Criswell
7f29c6ae94 Added the POVRAY_ROOT to locate Povray.
llvm-svn: 11681
2004-02-20 22:30:46 +00:00
John Criswell
ca86cefb56 Added an option for configuring Povray. By default, it should find my local
installation of Povray (and not do anything for people who don't have it).

llvm-svn: 11680
2004-02-20 22:30:22 +00:00
John Criswell
ce9b18b773 Build an archive for use with Povray.
llvm-svn: 11678
2004-02-20 21:26:46 +00:00
Alkis Evlogimenos
43431e117e Some more statistics improvements.
llvm-svn: 11676
2004-02-20 20:53:26 +00:00
Alkis Evlogimenos
6d57ed784f Disambiguate statistic descriptions.
llvm-svn: 11675
2004-02-20 20:46:49 +00:00
Alkis Evlogimenos
70f547d06e Rename statistic and add another one.
llvm-svn: 11674
2004-02-20 20:43:08 +00:00
Chris Lattner
4653c4cb50 Add support for some string functions, the scanf family, and sprintf
llvm-svn: 11673
2004-02-20 20:27:11 +00:00
Chris Lattner
5b22f55e54 Add a simple implementation of strncpy
llvm-svn: 11672
2004-02-20 20:15:47 +00:00
Chris Lattner
23ea81ddfb New testcase, do not emit a call to __builtin_sqrt, emit a call to sqrt instead!
llvm-svn: 11668
2004-02-20 19:08:12 +00:00
Chris Lattner
c09a5d21e0 Bug fixed
llvm-svn: 11662
2004-02-20 17:41:35 +00:00
Chris Lattner
0d08cf120b PR244: [llvm-gcc] miscompilation when a function is re-declared as static
llvm-svn: 11661
2004-02-20 17:32:24 +00:00
Brian Gaeke
16a18d203e Add checks for <execinfo.h> and backtrace().
llvm-svn: 11660
2004-02-20 06:41:59 +00:00
Alkis Evlogimenos
168e4bf455 Fix crash in debug output.
llvm-svn: 11659
2004-02-20 06:41:12 +00:00
Brian Gaeke
688940d763 Use backtrace() and include execinfo.h, if they were detected by autoconf.
llvm-svn: 11658
2004-02-20 06:40:59 +00:00
Brian Gaeke
2aa4c4f955 Regenerated using autoheader-2.57.
llvm-svn: 11657
2004-02-20 06:40:58 +00:00
Brian Gaeke
42db400d19 Regenerated using autoconf-2.57.
llvm-svn: 11656
2004-02-20 06:40:57 +00:00
Alkis Evlogimenos
16744f2860 Fix instruction numbering in debug output.
llvm-svn: 11655
2004-02-20 06:29:51 +00:00
Alkis Evlogimenos
f32239a5c6 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.

llvm-svn: 11654
2004-02-20 06:15:40 +00:00
Chris Lattner
483712708a If bugpoint can't match the reference output, at LEAST provide the output
we can get.

llvm-svn: 11653
2004-02-20 06:12:58 +00:00
Chris Lattner
a112c05aa6 Wild and passionate uncontrolled goose chases are amusing to watch, but not
very helpful.  Let bugpoint favor being helpful instead of determined.

llvm-svn: 11652
2004-02-20 05:58:58 +00:00
Chris Lattner
ddbd4a598b Format a bit more nicely
llvm-svn: 11651
2004-02-20 05:56:48 +00:00
Chris Lattner
b24f30de8d It is totally unacceptable to print out (literally) millions of zeros when
compiling 129.compress... so don't!

llvm-svn: 11649
2004-02-20 05:49:22 +00:00