Changeset View
Changeset View
Standalone View
Standalone View
lib/Analysis/ScalarEvolution.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | |||||
#include "llvm/IR/DataLayout.h" | #include "llvm/IR/DataLayout.h" | ||||
#include "llvm/IR/DerivedTypes.h" | #include "llvm/IR/DerivedTypes.h" | ||||
#include "llvm/IR/Dominators.h" | #include "llvm/IR/Dominators.h" | ||||
#include "llvm/IR/GetElementPtrTypeIterator.h" | #include "llvm/IR/GetElementPtrTypeIterator.h" | ||||
#include "llvm/IR/GlobalAlias.h" | #include "llvm/IR/GlobalAlias.h" | ||||
#include "llvm/IR/GlobalVariable.h" | #include "llvm/IR/GlobalVariable.h" | ||||
#include "llvm/IR/InstIterator.h" | #include "llvm/IR/InstIterator.h" | ||||
#include "llvm/IR/Instructions.h" | #include "llvm/IR/Instructions.h" | ||||
#include "llvm/IR/IntrinsicInst.h" | |||||
#include "llvm/IR/Intrinsics.h" | |||||
#include "llvm/IR/LLVMContext.h" | #include "llvm/IR/LLVMContext.h" | ||||
#include "llvm/IR/Metadata.h" | #include "llvm/IR/Metadata.h" | ||||
#include "llvm/IR/Operator.h" | #include "llvm/IR/Operator.h" | ||||
#include "llvm/IR/PatternMatch.h" | #include "llvm/IR/PatternMatch.h" | ||||
#include "llvm/Support/CommandLine.h" | #include "llvm/Support/CommandLine.h" | ||||
#include "llvm/Support/Debug.h" | #include "llvm/Support/Debug.h" | ||||
#include "llvm/Support/ErrorHandling.h" | #include "llvm/Support/ErrorHandling.h" | ||||
#include "llvm/Support/MathExtras.h" | #include "llvm/Support/MathExtras.h" | ||||
▲ Show 20 Lines • Show All 5,129 Lines • ▼ Show 20 Lines | const SCEV *ScalarEvolution::createSCEV(Value *V) { | ||||
case Instruction::Select: | case Instruction::Select: | ||||
// U can also be a select constant expr, which let fall through. Since | // U can also be a select constant expr, which let fall through. Since | ||||
// createNodeForSelect only works for a condition that is an `ICmpInst`, and | // createNodeForSelect only works for a condition that is an `ICmpInst`, and | ||||
// constant expressions cannot have instructions as operands, we'd have | // constant expressions cannot have instructions as operands, we'd have | ||||
// returned getUnknown for a select constant expressions anyway. | // returned getUnknown for a select constant expressions anyway. | ||||
if (isa<Instruction>(U)) | if (isa<Instruction>(U)) | ||||
return createNodeForSelectOrPHI(cast<Instruction>(U), U->getOperand(0), | return createNodeForSelectOrPHI(cast<Instruction>(U), U->getOperand(0), | ||||
U->getOperand(1), U->getOperand(2)); | U->getOperand(1), U->getOperand(2)); | ||||
break; | |||||
case Instruction::Call: | |||||
if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(U)) { | |||||
majnemer: `const auto *II`. | |||||
if (II->getIntrinsicID() == Intrinsic::noalias) | |||||
return getSCEV(U->getOperand(0)); | |||||
} | |||||
break; | |||||
} | } | ||||
return getUnknown(V); | return getUnknown(V); | ||||
} | } | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
▲ Show 20 Lines • Show All 5,221 Lines • Show Last 20 Lines |
const auto *II.