mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
[LoopAccesses] Change LAA:getInfo to return a constant reference
As expected, this required a few more const-correctness fixes. Based on Hal's feedback on D7684. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229634 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1173,7 +1173,7 @@ void LoopAccessInfo::emitAnalysis(LoopAccessReport &Message) {
|
||||
Report = Message;
|
||||
}
|
||||
|
||||
bool LoopAccessInfo::isUniform(Value *V) {
|
||||
bool LoopAccessInfo::isUniform(Value *V) const {
|
||||
return (SE->isLoopInvariant(SE->getSCEV(V), TheLoop));
|
||||
}
|
||||
|
||||
@@ -1189,7 +1189,7 @@ static Instruction *getFirstInst(Instruction *FirstInst, Value *V,
|
||||
}
|
||||
|
||||
std::pair<Instruction *, Instruction *>
|
||||
LoopAccessInfo::addRuntimeCheck(Instruction *Loc) {
|
||||
LoopAccessInfo::addRuntimeCheck(Instruction *Loc) const {
|
||||
Instruction *tnullptr = nullptr;
|
||||
if (!PtrRtCheck.Need)
|
||||
return std::pair<Instruction *, Instruction *>(tnullptr, tnullptr);
|
||||
@@ -1301,7 +1301,8 @@ void LoopAccessInfo::print(raw_ostream &OS, unsigned Depth) const {
|
||||
OS << "\n";
|
||||
}
|
||||
|
||||
LoopAccessInfo &LoopAccessAnalysis::getInfo(Loop *L, ValueToValueMap &Strides) {
|
||||
const LoopAccessInfo &LoopAccessAnalysis::getInfo(Loop *L,
|
||||
ValueToValueMap &Strides) {
|
||||
auto &LAI = LoopAccessInfoMap[L];
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
Reference in New Issue
Block a user