#include "polly/ScopDetectionDiagnostic.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/AliasSetTracker.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/Analysis/RegionInfo.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <string>
#include <utility>
usingnamespacellvm;
#define DEBUG_TYPE …
#define SCOP_STAT(NAME, DESC) …
static Statistic RejectStatistics[] = …;
namespace polly {
template <typename T> std::string operator+(Twine LHS, const T &RHS) { … }
}
namespace llvm {
static bool operator<(const DebugLoc &LHS, const DebugLoc &RHS) { … }
}
namespace polly {
BBPair getBBPairForRegion(const Region *R) { … }
void getDebugLocations(const BBPair &P, DebugLoc &Begin, DebugLoc &End) { … }
void emitRejectionRemarks(const BBPair &P, const RejectLog &Log,
OptimizationRemarkEmitter &ORE) { … }
RejectReason::RejectReason(RejectReasonKind K) : … { … }
const DebugLoc RejectReason::Unknown = …;
const DebugLoc &RejectReason::getDebugLoc() const { … }
void RejectLog::print(raw_ostream &OS, int level) const { … }
ReportCFG::ReportCFG(const RejectReasonKind K) : … { … }
bool ReportCFG::classof(const RejectReason *RR) { … }
std::string ReportInvalidTerminator::getRemarkName() const { … }
const Value *ReportInvalidTerminator::getRemarkBB() const { … }
std::string ReportInvalidTerminator::getMessage() const { … }
const DebugLoc &ReportInvalidTerminator::getDebugLoc() const { … }
bool ReportInvalidTerminator::classof(const RejectReason *RR) { … }
std::string ReportUnreachableInExit::getRemarkName() const { … }
const Value *ReportUnreachableInExit::getRemarkBB() const { … }
std::string ReportUnreachableInExit::getMessage() const { … }
const DebugLoc &ReportUnreachableInExit::getDebugLoc() const { … }
std::string ReportUnreachableInExit::getEndUserMessage() const { … }
bool ReportUnreachableInExit::classof(const RejectReason *RR) { … }
std::string ReportIndirectPredecessor::getRemarkName() const { … }
const Value *ReportIndirectPredecessor::getRemarkBB() const { … }
std::string ReportIndirectPredecessor::getMessage() const { … }
const DebugLoc &ReportIndirectPredecessor::getDebugLoc() const { … }
std::string ReportIndirectPredecessor::getEndUserMessage() const { … }
bool ReportIndirectPredecessor::classof(const RejectReason *RR) { … }
std::string ReportIrreducibleRegion::getRemarkName() const { … }
const Value *ReportIrreducibleRegion::getRemarkBB() const { … }
std::string ReportIrreducibleRegion::getMessage() const { … }
const DebugLoc &ReportIrreducibleRegion::getDebugLoc() const { … }
std::string ReportIrreducibleRegion::getEndUserMessage() const { … }
bool ReportIrreducibleRegion::classof(const RejectReason *RR) { … }
ReportAffFunc::ReportAffFunc(const RejectReasonKind K, const Instruction *Inst)
: … { … }
bool ReportAffFunc::classof(const RejectReason *RR) { … }
std::string ReportUndefCond::getRemarkName() const { … }
const Value *ReportUndefCond::getRemarkBB() const { … }
std::string ReportUndefCond::getMessage() const { … }
bool ReportUndefCond::classof(const RejectReason *RR) { … }
std::string ReportInvalidCond::getRemarkName() const { … }
const Value *ReportInvalidCond::getRemarkBB() const { … }
std::string ReportInvalidCond::getMessage() const { … }
bool ReportInvalidCond::classof(const RejectReason *RR) { … }
std::string ReportUndefOperand::getRemarkName() const { … }
const Value *ReportUndefOperand::getRemarkBB() const { … }
std::string ReportUndefOperand::getMessage() const { … }
bool ReportUndefOperand::classof(const RejectReason *RR) { … }
std::string ReportNonAffBranch::getRemarkName() const { … }
const Value *ReportNonAffBranch::getRemarkBB() const { … }
std::string ReportNonAffBranch::getMessage() const { … }
bool ReportNonAffBranch::classof(const RejectReason *RR) { … }
std::string ReportNoBasePtr::getRemarkName() const { … }
const Value *ReportNoBasePtr::getRemarkBB() const { … }
std::string ReportNoBasePtr::getMessage() const { … }
bool ReportNoBasePtr::classof(const RejectReason *RR) { … }
std::string ReportUndefBasePtr::getRemarkName() const { … }
const Value *ReportUndefBasePtr::getRemarkBB() const { … }
std::string ReportUndefBasePtr::getMessage() const { … }
bool ReportUndefBasePtr::classof(const RejectReason *RR) { … }
std::string ReportVariantBasePtr::getRemarkName() const { … }
const Value *ReportVariantBasePtr::getRemarkBB() const { … }
std::string ReportVariantBasePtr::getMessage() const { … }
std::string ReportVariantBasePtr::getEndUserMessage() const { … }
bool ReportVariantBasePtr::classof(const RejectReason *RR) { … }
std::string ReportDifferentArrayElementSize::getRemarkName() const { … }
const Value *ReportDifferentArrayElementSize::getRemarkBB() const { … }
std::string ReportDifferentArrayElementSize::getMessage() const { … }
bool ReportDifferentArrayElementSize::classof(const RejectReason *RR) { … }
std::string ReportDifferentArrayElementSize::getEndUserMessage() const { … }
std::string ReportNonAffineAccess::getRemarkName() const { … }
const Value *ReportNonAffineAccess::getRemarkBB() const { … }
std::string ReportNonAffineAccess::getMessage() const { … }
bool ReportNonAffineAccess::classof(const RejectReason *RR) { … }
std::string ReportNonAffineAccess::getEndUserMessage() const { … }
ReportLoopBound::ReportLoopBound(Loop *L, const SCEV *LoopCount)
: … { … }
std::string ReportLoopBound::getRemarkName() const { … }
const Value *ReportLoopBound::getRemarkBB() const { … }
std::string ReportLoopBound::getMessage() const { … }
const DebugLoc &ReportLoopBound::getDebugLoc() const { … }
bool ReportLoopBound::classof(const RejectReason *RR) { … }
std::string ReportLoopBound::getEndUserMessage() const { … }
std::string ReportLoopHasNoExit::getRemarkName() const { … }
const Value *ReportLoopHasNoExit::getRemarkBB() const { … }
std::string ReportLoopHasNoExit::getMessage() const { … }
bool ReportLoopHasNoExit::classof(const RejectReason *RR) { … }
const DebugLoc &ReportLoopHasNoExit::getDebugLoc() const { … }
std::string ReportLoopHasNoExit::getEndUserMessage() const { … }
std::string ReportLoopHasMultipleExits::getRemarkName() const { … }
const Value *ReportLoopHasMultipleExits::getRemarkBB() const { … }
std::string ReportLoopHasMultipleExits::getMessage() const { … }
bool ReportLoopHasMultipleExits::classof(const RejectReason *RR) { … }
const DebugLoc &ReportLoopHasMultipleExits::getDebugLoc() const { … }
std::string ReportLoopHasMultipleExits::getEndUserMessage() const { … }
std::string ReportLoopOnlySomeLatches::getRemarkName() const { … }
const Value *ReportLoopOnlySomeLatches::getRemarkBB() const { … }
std::string ReportLoopOnlySomeLatches::getMessage() const { … }
bool ReportLoopOnlySomeLatches::classof(const RejectReason *RR) { … }
const DebugLoc &ReportLoopOnlySomeLatches::getDebugLoc() const { … }
std::string ReportLoopOnlySomeLatches::getEndUserMessage() const { … }
ReportFuncCall::ReportFuncCall(Instruction *Inst)
: … { … }
std::string ReportFuncCall::getRemarkName() const { … }
const Value *ReportFuncCall::getRemarkBB() const { … }
std::string ReportFuncCall::getMessage() const { … }
const DebugLoc &ReportFuncCall::getDebugLoc() const { … }
std::string ReportFuncCall::getEndUserMessage() const { … }
bool ReportFuncCall::classof(const RejectReason *RR) { … }
ReportNonSimpleMemoryAccess::ReportNonSimpleMemoryAccess(Instruction *Inst)
: … { … }
std::string ReportNonSimpleMemoryAccess::getRemarkName() const { … }
const Value *ReportNonSimpleMemoryAccess::getRemarkBB() const { … }
std::string ReportNonSimpleMemoryAccess::getMessage() const { … }
const DebugLoc &ReportNonSimpleMemoryAccess::getDebugLoc() const { … }
std::string ReportNonSimpleMemoryAccess::getEndUserMessage() const { … }
bool ReportNonSimpleMemoryAccess::classof(const RejectReason *RR) { … }
ReportAlias::ReportAlias(Instruction *Inst, AliasSet &AS)
: … { … }
std::string ReportAlias::formatInvalidAlias(std::string Prefix,
std::string Suffix) const { … }
std::string ReportAlias::getRemarkName() const { … }
const Value *ReportAlias::getRemarkBB() const { … }
std::string ReportAlias::getMessage() const { … }
std::string ReportAlias::getEndUserMessage() const { … }
const DebugLoc &ReportAlias::getDebugLoc() const { … }
bool ReportAlias::classof(const RejectReason *RR) { … }
std::string ReportOther::getRemarkName() const { … }
std::string ReportOther::getMessage() const { … }
ReportOther::ReportOther(const RejectReasonKind K) : … { … }
bool ReportOther::classof(const RejectReason *RR) { … }
ReportIntToPtr::ReportIntToPtr(Instruction *BaseValue)
: … { … }
std::string ReportIntToPtr::getRemarkName() const { … }
const Value *ReportIntToPtr::getRemarkBB() const { … }
std::string ReportIntToPtr::getMessage() const { … }
const DebugLoc &ReportIntToPtr::getDebugLoc() const { … }
bool ReportIntToPtr::classof(const RejectReason *RR) { … }
ReportAlloca::ReportAlloca(Instruction *Inst)
: … { … }
std::string ReportAlloca::getRemarkName() const { … }
const Value *ReportAlloca::getRemarkBB() const { … }
std::string ReportAlloca::getMessage() const { … }
const DebugLoc &ReportAlloca::getDebugLoc() const { … }
bool ReportAlloca::classof(const RejectReason *RR) { … }
ReportUnknownInst::ReportUnknownInst(Instruction *Inst)
: … { … }
std::string ReportUnknownInst::getRemarkName() const { … }
const Value *ReportUnknownInst::getRemarkBB() const { … }
std::string ReportUnknownInst::getMessage() const { … }
const DebugLoc &ReportUnknownInst::getDebugLoc() const { … }
bool ReportUnknownInst::classof(const RejectReason *RR) { … }
ReportEntry::ReportEntry(BasicBlock *BB)
: … { … }
std::string ReportEntry::getRemarkName() const { … }
const Value *ReportEntry::getRemarkBB() const { … }
std::string ReportEntry::getMessage() const { … }
std::string ReportEntry::getEndUserMessage() const { … }
const DebugLoc &ReportEntry::getDebugLoc() const { … }
bool ReportEntry::classof(const RejectReason *RR) { … }
ReportUnprofitable::ReportUnprofitable(Region *R)
: … { … }
std::string ReportUnprofitable::getRemarkName() const { … }
const Value *ReportUnprofitable::getRemarkBB() const { … }
std::string ReportUnprofitable::getMessage() const { … }
std::string ReportUnprofitable::getEndUserMessage() const { … }
const DebugLoc &ReportUnprofitable::getDebugLoc() const { … }
bool ReportUnprofitable::classof(const RejectReason *RR) { … }
}