20#define DEBUG_TYPE "Line"
23const char *
const KindBasicBlock =
"BasicBlock";
24const char *
const KindDiscriminator =
"Discriminator";
25const char *
const KindEndSequence =
"EndSequence";
26const char *
const KindEpilogueBegin =
"EpilogueBegin";
27const char *
const KindLineDebug =
"Line";
28const char *
const KindLineSource =
"Code";
29const char *
const KindNewStatement =
"NewStatement";
30const char *
const KindPrologueEnd =
"PrologueEnd";
31const char *
const KindUndefined =
"Undefined";
32const char *
const KindAlwaysStepInto =
"AlwaysStepInto";
33const char *
const KindNeverStepInto =
"NeverStepInto";
41 const char *
Kind = KindUndefined;
44 else if (getIsLineAssembler())
45 Kind = KindLineSource;
63 if (
options().getInternalNone())
65 return (ShowZero ||
options().getAttributeZero()) ? (
" 0 ")
71 if (!(References && Targets))
75 dbgs() <<
"\n[LVLine::markMissingParents]\n";
77 dbgs() <<
"References: "
79 <<
"Line = " <<
Reference->getLineNumber() <<
"\n";
81 dbgs() <<
"Targets : "
83 <<
"Line = " <<
Target->getLineNumber() <<
"\n";
88 dbgs() <<
"Search Reference: Line = " <<
Reference->getLineNumber()
101 dbgs() <<
"\n[LVLine::findIn]\n"
107 dbgs() <<
"Target : "
108 <<
"Level = " <<
Target->getLevel() <<
", "
110 <<
"Line = " <<
Target->getLineNumber() <<
"\n";
125 if (!References && !Targets)
127 if (References && Targets && References->
size() == Targets->
size()) {
156 std::string Separator = Formatted ?
" " :
"";
157 if (getIsNewStatement()) {
158 Stream << Separator <<
"{" << KindNewStatement <<
"}";
161 if (getIsDiscriminator()) {
162 Stream << Separator <<
"{" << KindDiscriminator <<
"}";
165 if (getIsBasicBlock()) {
166 Stream << Separator <<
"{" << KindBasicBlock <<
"}";
169 if (getIsEndSequence()) {
170 Stream << Separator <<
"{" << KindEndSequence <<
"}";
173 if (getIsEpilogueBegin()) {
174 Stream << Separator <<
"{" << KindEpilogueBegin <<
"}";
177 if (getIsPrologueEnd()) {
178 Stream << Separator <<
"{" << KindPrologueEnd <<
"}";
181 if (getIsAlwaysStepInto()) {
182 Stream << Separator <<
"{" << KindAlwaysStepInto <<
"}";
185 if (getIsNeverStepInto()) {
186 Stream << Separator <<
"{" << KindNeverStepInto <<
"}";
202 if (
options().getAttributeQualifier()) {
Pass interface - Implemented by all 'passes'.
Target - Wrapper for Target specific information.
void printItem(LVElement *Element, LVComparePass Pass)
StringRef getName() const override
bool equals(const LVElement *Element) const
size_t getFilenameIndex() const
StringRef getPathname() const
void printExtra(raw_ostream &OS, bool Full=true) const override
bool equals(const LVLine *Line) const override
bool equals(const LVLine *Line) const override
std::string statesInfo(bool Formatted) const
void printExtra(raw_ostream &OS, bool Full=true) const override
std::string noLineAsString(bool ShowZero=false) const override
static void markMissingParents(const LVLines *References, const LVLines *Targets)
void printExtra(raw_ostream &OS, bool Full=true) const override
void report(LVComparePass Pass) override
const char * kind() const override
void print(raw_ostream &OS, bool Full=true) const override
virtual bool equals(const LVLine *Line) const
virtual void print(raw_ostream &OS, bool Full=true) const
uint32_t getLineNumber() const
virtual std::string noLineAsString(bool ShowZero) const
void incrementPrintedLines()
This class implements an extremely fast bulk output stream that can only output to a stream.
A raw_ostream that writes to an std::string.
std::string formattedKind(StringRef Kind)
LVScopeCompileUnit * getReaderCompileUnit()
std::string formattedName(StringRef Name)
std::map< LVLineKind, LVLineGetFunction > LVLineDispatch
LVCompare & getComparator()
This is an optimization pass for GlobalISel generic memory operations.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.