Rewrite the main DSE loop to be written in terms of reasoning

about pairs of AA::Location's instead of looking for MemDep's
"Def" predicate.  This is more powerful and general, handling
memset/memcpy/store all uniformly, and implementing PR8701 and
probably obsoleting parts of memcpyoptimizer.

This also fixes an obscure bug with init.trampoline and i8
stores, but I'm not surprised it hasn't been hit yet.  Enhancing
init.trampoline to carry the size that it stores would allow
DSE to be much more aggressive about optimizing them.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120406 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-11-30 07:23:21 +00:00
parent c413330c99
commit cf82dc376a
3 changed files with 145 additions and 80 deletions

View File

@@ -47,6 +47,9 @@ namespace llvm {
/// pair holds the instruction that clobbers the memory. For example,
/// this occurs when we see a may-aliased store to the memory location we
/// care about.
///
/// A dependence query on the first instruction of the entry block will
/// return a clobber(self) result.
Clobber,
/// Def - This is a dependence on the specified instruction which