You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.167
Former-commit-id: 289509151e0fee68a1b591a20c9f109c3c789d3a
This commit is contained in:
parent
e19d552987
commit
b084638f15
39
external/llvm/lib/Analysis/PtrUseVisitor.cpp
vendored
39
external/llvm/lib/Analysis/PtrUseVisitor.cpp
vendored
@ -1,39 +0,0 @@
|
||||
//===- PtrUseVisitor.cpp - InstVisitors over a pointers uses --------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
/// \file
|
||||
/// Implementation of the pointer use visitors.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Analysis/PtrUseVisitor.h"
|
||||
#include "llvm/IR/Instruction.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include <algorithm>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
void detail::PtrUseVisitorBase::enqueueUsers(Instruction &I) {
|
||||
for (Use &U : I.uses()) {
|
||||
if (VisitedUses.insert(&U).second) {
|
||||
UseToVisit NewU = {
|
||||
UseToVisit::UseAndIsOffsetKnownPair(&U, IsOffsetKnown),
|
||||
Offset
|
||||
};
|
||||
Worklist.push_back(std::move(NewU));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool detail::PtrUseVisitorBase::adjustOffsetForGEP(GetElementPtrInst &GEPI) {
|
||||
if (!IsOffsetKnown)
|
||||
return false;
|
||||
|
||||
return GEPI.accumulateConstantOffset(DL, Offset);
|
||||
}
|
Reference in New Issue
Block a user