Skip to content

Commit

Permalink
[RLE-DSE] Implement the actual redundant load elimination (RLE)
Browse files Browse the repository at this point in the history
data flow. This should handle some simple RLE. but not phi-node, i.e.
SILArguments.

Also, the new RLE implemented in this patch is disabled by default (behind
a flag). we are working on post-commit review.
  • Loading branch information
trentxintong committed Nov 9, 2015
1 parent e9cade4 commit 3c93dbb
Show file tree
Hide file tree
Showing 5 changed files with 497 additions and 1,548 deletions.
8 changes: 8 additions & 0 deletions include/swift/SIL/MemLocation.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class MemLocation;
class LoadStoreValue;
using LoadStoreValueList = llvm::SmallVector<LoadStoreValue, 8>;
using MemLocationValueMap = llvm::DenseMap<MemLocation, LoadStoreValue>;
using ValueTableMap = llvm::SmallMapVector<unsigned, LoadStoreValue, 8>;

/// This class represents either a single SILValue or a covering of values that
/// we can forward from via the introdution of a SILArgument. This enables us
Expand Down Expand Up @@ -152,6 +153,13 @@ class LoadStoreValue {
return *this;
}

/// Returns whether the LoadStoreValue has been initialized properly.
bool isValid() const {
if (IsCoveringValue)
return true;
return Base && Path.hasValue();
}

/// Returns true if the LoadStoreValue has a non-empty projection path.
bool hasEmptyProjectionPath() const { return !Path.getValue().size(); }

Expand Down
67 changes: 0 additions & 67 deletions include/swift/SIL/MemValue.h

This file was deleted.

Loading

0 comments on commit 3c93dbb

Please sign in to comment.