mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-04 22:28:27 +00:00
Sink store based on alias analysis
- by Ella Bolshinsky The alias analysis is used define whether the given instruction is a barrier for store sinking. For 2 identical stores, following instructions are checked in the both basic blocks, to determine whether they are sinking barriers. http://reviews.llvm.org/D6420 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224247 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -502,7 +502,7 @@ public:
|
||||
///
|
||||
|
||||
/// canBasicBlockModify - Return true if it is possible for execution of the
|
||||
/// specified basic block to modify the value pointed to by Ptr.
|
||||
/// specified basic block to modify the location Loc.
|
||||
bool canBasicBlockModify(const BasicBlock &BB, const Location &Loc);
|
||||
|
||||
/// canBasicBlockModify - A convenience wrapper.
|
||||
@@ -510,17 +510,20 @@ public:
|
||||
return canBasicBlockModify(BB, Location(P, Size));
|
||||
}
|
||||
|
||||
/// canInstructionRangeModify - Return true if it is possible for the
|
||||
/// execution of the specified instructions to modify the value pointed to by
|
||||
/// Ptr. The instructions to consider are all of the instructions in the
|
||||
/// range of [I1,I2] INCLUSIVE. I1 and I2 must be in the same basic block.
|
||||
bool canInstructionRangeModify(const Instruction &I1, const Instruction &I2,
|
||||
const Location &Loc);
|
||||
/// canInstructionRangeModRef - Return true if it is possible for the
|
||||
/// execution of the specified instructions to mod\ref (according to the
|
||||
/// mode) the location Loc. The instructions to consider are all
|
||||
/// of the instructions in the range of [I1,I2] INCLUSIVE.
|
||||
/// I1 and I2 must be in the same basic block.
|
||||
bool canInstructionRangeModRef(const Instruction &I1,
|
||||
const Instruction &I2, const Location &Loc,
|
||||
const ModRefResult Mode);
|
||||
|
||||
/// canInstructionRangeModify - A convenience wrapper.
|
||||
bool canInstructionRangeModify(const Instruction &I1, const Instruction &I2,
|
||||
const Value *Ptr, uint64_t Size) {
|
||||
return canInstructionRangeModify(I1, I2, Location(Ptr, Size));
|
||||
/// canInstructionRangeModRef - A convenience wrapper.
|
||||
bool canInstructionRangeModRef(const Instruction &I1,
|
||||
const Instruction &I2, const Value *Ptr,
|
||||
uint64_t Size, const ModRefResult Mode) {
|
||||
return canInstructionRangeModRef(I1, I2, Location(Ptr, Size), Mode);
|
||||
}
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
|
Reference in New Issue
Block a user