mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Clean up doxygen syntax and reword comments to flow better, have a brief
section, and not have unfinished sentence fragments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220147 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
01dc911c73
commit
e99ca835bc
@ -22,13 +22,16 @@
|
|||||||
#include "llvm/IR/Operator.h"
|
#include "llvm/IR/Operator.h"
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
/// AreEquivalentAddressValues - Test if A and B will obviously have the same
|
/// \brief Test if A and B will obviously have the same value.
|
||||||
/// value. This includes recognizing that %t0 and %t1 will have the same
|
///
|
||||||
|
/// This includes recognizing that %t0 and %t1 will have the same
|
||||||
/// value in code like this:
|
/// value in code like this:
|
||||||
|
/// \code
|
||||||
/// %t0 = getelementptr \@a, 0, 3
|
/// %t0 = getelementptr \@a, 0, 3
|
||||||
/// store i32 0, i32* %t0
|
/// store i32 0, i32* %t0
|
||||||
/// %t1 = getelementptr \@a, 0, 3
|
/// %t1 = getelementptr \@a, 0, 3
|
||||||
/// %t2 = load i32* %t1
|
/// %t2 = load i32* %t1
|
||||||
|
/// \endcode
|
||||||
///
|
///
|
||||||
static bool AreEquivalentAddressValues(const Value *A, const Value *B) {
|
static bool AreEquivalentAddressValues(const Value *A, const Value *B) {
|
||||||
// Test if the values are trivially equivalent.
|
// Test if the values are trivially equivalent.
|
||||||
@ -119,23 +122,25 @@ bool llvm::isSafeToLoadUnconditionally(Value *V, Instruction *ScanFrom,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// FindAvailableLoadedValue - Scan the ScanBB block backwards (starting at the
|
/// \brief Scan the ScanBB block backwards to see if we have the value at the
|
||||||
/// instruction before ScanFrom) checking to see if we have the value at the
|
|
||||||
/// memory address *Ptr locally available within a small number of instructions.
|
/// memory address *Ptr locally available within a small number of instructions.
|
||||||
/// If the value is available, return it.
|
|
||||||
///
|
///
|
||||||
/// If not, return the iterator for the last validated instruction that the
|
/// The scan starts from \c ScanFrom. \c MaxInstsToScan specifies the maximum
|
||||||
/// value would be live through. If we scanned the entire block and didn't find
|
/// instructions to scan in the block. If it is set to \c 0, it will scan the whole
|
||||||
/// something that invalidates *Ptr or provides it, ScanFrom would be left at
|
/// block.
|
||||||
/// begin() and this returns null. ScanFrom could also be left
|
|
||||||
///
|
///
|
||||||
/// MaxInstsToScan specifies the maximum instructions to scan in the block. If
|
/// If the value is available, this function returns it. If not, it returns the
|
||||||
/// it is set to 0, it will scan the whole block. You can also optionally
|
/// iterator for the last validated instruction that the value would be live
|
||||||
/// specify an alias analysis implementation, which makes this more precise.
|
/// through. If we scanned the entire block and didn't find something that
|
||||||
|
/// invalidates \c *Ptr or provides it, \c ScanFrom is left at the last
|
||||||
|
/// instruction processed and this returns null.
|
||||||
///
|
///
|
||||||
/// If AATags is non-null and a load or store is found, the AA tags from the
|
/// You can also optionally specify an alias analysis implementation, which
|
||||||
/// load or store are recorded there. If there are no AA tags or if no access
|
/// makes this more precise.
|
||||||
/// is found, it is left unmodified.
|
///
|
||||||
|
/// If \c AATags is non-null and a load or store is found, the AA tags from the
|
||||||
|
/// load or store are recorded there. If there are no AA tags or if no access is
|
||||||
|
/// found, it is left unmodified.
|
||||||
Value *llvm::FindAvailableLoadedValue(Value *Ptr, BasicBlock *ScanBB,
|
Value *llvm::FindAvailableLoadedValue(Value *Ptr, BasicBlock *ScanBB,
|
||||||
BasicBlock::iterator &ScanFrom,
|
BasicBlock::iterator &ScanFrom,
|
||||||
unsigned MaxInstsToScan,
|
unsigned MaxInstsToScan,
|
||||||
|
Loading…
Reference in New Issue
Block a user