llvm-6502/test
Chris Lattner 9e59c64c14 Implement initial support for PHI translation in memdep. This means that
memdep keeps track of how PHIs affect the pointer in dep queries, which 
allows it to eliminate the load in cases like rle-phi-translate.ll, which
basically end up being:

BB1:
   X = load P
   br BB3
BB2:
   Y = load Q
   br BB3
BB3:
   R = phi [P] [Q]
   load R

turning "load R" into a phi of X/Y.  In addition to additional exposed
opportunities, this makes memdep safe in many cases that it wasn't before
(which is required for load PRE) and also makes it substantially more 
efficient.  For example, consider:


bb1:  // has many predecessors.
   P = some_operator()
   load P

In this example, previously memdep would scan all the predecessors of BB1
to see if they had something that would mustalias P.  In some cases (e.g.
test/Transforms/GVN/rle-must-alias.ll) it would actually find them and end
up eliminating something.  In many other cases though, it would scan and not
find anything useful.  MemDep now stops at a block if the pointer is defined
in that block and cannot be phi translated to predecessors.  This causes it
to miss the (rare) cases like rle-must-alias.ll, but makes it faster by not
scanning tons of stuff that is unlikely to be useful.  For example, this
speeds up GVN as a whole from 3.928s to 2.448s (60%)!.  IMO, scalar GVN 
should be enhanced to simplify the rle-must-alias pointer base anyway, which
would allow the loads to be eliminated.

In the future, this should be enhanced to phi translate through geps and 
bitcasts as well (as indicated by FIXMEs) making memdep even more powerful.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61022 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-15 03:35:32 +00:00
..
Analysis Revert my re-instated reverted commit, fixes the bootstrap build on x86-64 linux. 2008-12-12 17:09:07 +00:00
Archive
Assembler Fix the .ll grammar rules to allow any type before an 'i32', not just an 2008-10-15 06:16:45 +00:00
Bindings/Ocaml [PR2886] Ignore stderr from ocamlc since it prints unresolvable warnings on some platforms. 2008-10-22 12:41:54 +00:00
Bitcode
BugPoint this is unneeded now. 2008-06-16 04:25:39 +00:00
CodeGen - Use patterns instead of creating completely new instruction matching patterns, 2008-12-12 21:15:41 +00:00
DebugInfo Fix a couple of Dwarf bugs. 2008-12-10 00:15:44 +00:00
ExecutionEngine Add a test case for APInt bug fix in r51999. 2008-06-05 13:42:21 +00:00
Feature Extend the 'noalias' attribute to function return values. This is intended to 2008-11-24 03:41:24 +00:00
FrontendAda Teach constant folding that an inttoptr of a 2008-08-13 20:20:35 +00:00
FrontendC Add test case for ptr annotation. 2008-11-12 16:12:27 +00:00
FrontendC++ Re-enable test. 2008-12-12 22:42:35 +00:00
FrontendFortran Testcase for recent llvm-gcc fix 2008-11-03 14:43:31 +00:00
FrontendObjC Add test for rdar://6394879. 2008-11-26 02:21:12 +00:00
FrontendObjC++ This is an objective-c test, not an objective-c++ one. 2008-10-06 18:42:48 +00:00
Integer Fix some escaping and quoting in RUN lines, mainly involving { and <. In two 2008-06-10 16:04:47 +00:00
lib Fix make check on Solaris 10/x86: the default grep is not GNU grep, same for as. 2008-10-21 17:21:32 +00:00
Linker Add global variable to test for consistency 2008-10-15 20:22:44 +00:00
LLVMC Remove Clang tests since clang is not installed on the buildbots. 2008-12-09 15:11:45 +00:00
Other Testcase for PR2894. 2008-10-15 22:34:34 +00:00
Scripts simplify shell syntax to work better on solaris, patch by 2008-06-25 16:03:42 +00:00
TableGen Fun x86 encoding tricks: when adding an immediate value of 128, 2008-10-17 01:33:43 +00:00
Transforms Implement initial support for PHI translation in memdep. This means that 2008-12-15 03:35:32 +00:00
Verifier Correct this error message. 2008-11-15 17:50:47 +00:00
Makefile Fix make check on Solaris 10/x86: the default grep is not GNU grep, same for as. 2008-10-21 17:21:32 +00:00
Makefile.tests
TestRunner.sh Fix a bashism in TestRunner.sh. 2008-07-28 18:41:03 +00:00