llvm-6502/test
Chandler Carruth 8d93d41027 Re-implement the analysis of uses in mem2reg to be significantly more
robust. It now uses an InstVisitor and worklist to actually walk the
uses of the Alloca transitively and detect the pattern which we can
directly promote: loads & stores of the whole alloca and instructions we
can completely ignore.

Also, with this new implementation teach both the predicate for testing
whether we can promote and the promotion engine itself to use the same
code so we no longer have strange divergence between the two code paths.

I've added some silly test cases to demonstrate that we can handle
slightly more degenerate code patterns now. See the below for why this
is even interesting.

Performance impact: roughly 1% regression in the performance of SROA or
ScalarRepl on a large C++-ish test case where most of the allocas are
basically ready for promotion. The reason is because of silly redundant
work that I've left FIXMEs for and which I'll address in the next
commit. I wanted to separate this commit as it changes the behavior.
Once the redundant work in removing the dead uses of the alloca is
fixed, this code appears to be faster than the old version. =]

So why is this useful? Because the previous requirement for promotion
required a *specific* visit pattern of the uses of the alloca to verify:
we *had* to look for no more than 1 intervening use. The end goal is to
have SROA automatically detect when an alloca is already promotable and
directly hand it to the mem2reg machinery rather than trying to
partition and rewrite it. This is a 25% or more performance improvement
for SROA, and a significant chunk of the delta between it and
ScalarRepl. To get there, we need to make mem2reg actually capable of
promoting allocas which *look* promotable to SROA without have SROA do
tons of work to massage the code into just the right form.

This is actually the tip of the iceberg. There are tremendous potential
savings we can realize here by de-duplicating work between mem2reg and
SROA.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187191 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26 08:20:39 +00:00
..
Analysis Add newlines at end of test files, no functionality change 2013-07-13 22:00:58 +00:00
Assembler Update testing cases to pass debug info verifier. 2013-07-24 22:23:00 +00:00
Bindings/Ocaml Fix %t typo in Ocaml bindings test. 2013-07-10 18:55:06 +00:00
Bitcode Make .bc en/decoding of AttrKind stable 2013-07-26 04:16:55 +00:00
BugPoint
CodeGen PPC32 va_list is an actual structure so va_copy needs to copy the whole 2013-07-25 21:36:47 +00:00
DebugInfo Debug Info: improve the verifier to check field types. 2013-07-25 19:33:30 +00:00
ExecutionEngine [mips] Remove XFAIL from test-ptr-reloc-remote.ll 2013-07-24 17:14:05 +00:00
Feature Add a new function attribute 'cold' to functions. 2013-05-24 12:26:52 +00:00
FileCheck Add new directive called CHECK-LABEL to FileCheck. 2013-07-12 14:51:05 +00:00
Instrumentation Current batch of -disable-debug-info-verifier. 2013-07-25 17:16:05 +00:00
Integer
JitListener
Linker Debug Info: improve the verifier to check field types. 2013-07-25 19:33:30 +00:00
MC Add test cases for the various instruction alias and Intel syntax fixes that have gone in lately. 2013-07-26 05:39:33 +00:00
Object Add an initial implementation of archive symbol table generation. 2013-07-23 10:47:01 +00:00
Other Windows/Path.inc: Introduce file_type::character_file and file_type::fifo_file in sys::fs::getStatus(HANDLE). 2013-07-18 17:00:54 +00:00
TableGen Fix a bug in TableGen where the intrinsic function name recognizer could mis-identify names if one was a prefix substring of the other 2013-07-25 12:32:00 +00:00
tools Remove the mblaze backend from llvm. 2013-07-25 18:55:05 +00:00
Transforms Re-implement the analysis of uses in mem2reg to be significantly more 2013-07-26 08:20:39 +00:00
Unit
Verifier Fix typo in test. 2013-07-22 21:10:42 +00:00
YAMLParser
CMakeLists.txt llvm/test/CMakeLists.txt: Add llvm-cov in "check-clang". 2013-07-08 08:44:36 +00:00
lit.cfg Add the ability to use guarded malloc when running llvm lit tests. 2013-07-11 23:36:57 +00:00
lit.site.cfg.in Allow host triple to be correctly overridden in CMake builds 2013-05-04 07:36:23 +00:00
Makefile add polly to check-all 2013-05-20 18:49:15 +00:00
Makefile.tests Remove dead code from the makefile build system. 2013-07-25 20:25:31 +00:00
TestRunner.sh