mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Teach GVN to invalidate some memdep information when it does an RAUW
of a pointer. This allows is to catch more equivalencies. For example, the type_lists_compatible_p function used to require two iterations of the gvn pass (!) to delete its 18 redundant loads because the first pass would CSE all the addressing computation cruft, which would unblock the second memdep/gvn passes from recognizing them. This change allows memdep/gvn to catch all 18 when run just once on the function (as is typical :) instead of just 3. On all of 403.gcc, this bumps up the # reundandancies found from: 63 gvn - Number of instructions PRE'd 153991 gvn - Number of instructions deleted 50069 gvn - Number of loads deleted to: 63 gvn - Number of instructions PRE'd 154137 gvn - Number of instructions deleted 50185 gvn - Number of loads deleted +120 loads deleted isn't bad. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60799 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -243,6 +243,14 @@ namespace llvm {
|
||||
/// updating the dependence of instructions that previously depended on it.
|
||||
void removeInstruction(Instruction *InstToRemove);
|
||||
|
||||
/// invalidateCachedPointerInfo - This method is used to invalidate cached
|
||||
/// information about the specified pointer, because it may be too
|
||||
/// conservative in memdep. This is an optional call that can be used when
|
||||
/// the client detects an equivalence between the pointer and some other
|
||||
/// value and replaces the other value with ptr. This can make Ptr available
|
||||
/// in more places that cached info does not necessarily keep.
|
||||
void invalidateCachedPointerInfo(Value *Ptr);
|
||||
|
||||
private:
|
||||
MemDepResult getPointerDependencyFrom(Value *Pointer, uint64_t MemSize,
|
||||
bool isLoad,
|
||||
@@ -260,7 +268,6 @@ namespace llvm {
|
||||
NonLocalDepInfo *Cache,
|
||||
unsigned NumSortedEntries);
|
||||
|
||||
|
||||
void RemoveCachedNonLocalPointerDependencies(ValueIsLoadPair P);
|
||||
|
||||
/// verifyRemoved - Verify that the specified instruction does not occur
|
||||
|
Reference in New Issue
Block a user