Skip to content

Commit

Permalink
[NFC] Disambiguate LI in GVN
Browse files Browse the repository at this point in the history
Name GVN uses name 'LI' for two different unrelated things:
LoadInst and LoopInfo. This patch relates the variables with
former meaning into 'Load' to disambiguate the code.
  • Loading branch information
xortator committed Apr 1, 2021
1 parent d182893 commit 630818a
Show file tree
Hide file tree
Showing 2 changed files with 125 additions and 123 deletions.
6 changes: 3 additions & 3 deletions llvm/include/llvm/Transforms/Scalar/GVN.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,17 +314,17 @@ class GVN : public PassInfoMixin<GVN> {
/// Given a local dependency (Def or Clobber) determine if a value is
/// available for the load. Returns true if an value is known to be
/// available and populates Res. Returns false otherwise.
bool AnalyzeLoadAvailability(LoadInst *LI, MemDepResult DepInfo,
bool AnalyzeLoadAvailability(LoadInst *Load, MemDepResult DepInfo,
Value *Address, gvn::AvailableValue &Res);

/// Given a list of non-local dependencies, determine if a value is
/// available for the load in each specified block. If it is, add it to
/// ValuesPerBlock. If not, add it to UnavailableBlocks.
void AnalyzeLoadAvailability(LoadInst *LI, LoadDepVect &Deps,
void AnalyzeLoadAvailability(LoadInst *Load, LoadDepVect &Deps,
AvailValInBlkVect &ValuesPerBlock,
UnavailBlkVect &UnavailableBlocks);

bool PerformLoadPRE(LoadInst *LI, AvailValInBlkVect &ValuesPerBlock,
bool PerformLoadPRE(LoadInst *Load, AvailValInBlkVect &ValuesPerBlock,
UnavailBlkVect &UnavailableBlocks);

// Other helper routines
Expand Down
Loading

0 comments on commit 630818a

Please sign in to comment.