LLVM
8.0.1
|
Represents the relative location of an instruction. More...
#include "llvm/ProfileData/SampleProf.h"
Public Member Functions | |
LineLocation (uint32_t L, uint32_t D) | |
void | print (raw_ostream &OS) const |
void | dump () const |
bool | operator< (const LineLocation &O) const |
Public Attributes | |
uint32_t | LineOffset |
uint32_t | Discriminator |
Represents the relative location of an instruction.
Instruction locations are specified by the line offset from the beginning of the function (marked by the line where the function header is) and the discriminator value within that line.
The discriminator value is useful to distinguish instructions that are on the same line but belong to different basic blocks (e.g., the two post-increment instructions in "if (p) x++; else y++;").
Definition at line 118 of file SampleProf.h.
Definition at line 119 of file SampleProf.h.
References llvm::dump(), and print().
LLVM_DUMP_METHOD void LineLocation::dump | ( | ) | const |
Definition at line 98 of file SampleProf.cpp.
References llvm::dbgs(), and print().
|
inline |
Definition at line 124 of file SampleProf.h.
References Discriminator, and LineOffset.
void LineLocation::print | ( | raw_ostream & | OS | ) | const |
Definition at line 85 of file SampleProf.cpp.
Referenced by llvm::sampleprof::operator<<().
uint32_t llvm::sampleprof::LineLocation::Discriminator |
Definition at line 130 of file SampleProf.h.
Referenced by operator<(), llvm::sampleprof::SampleProfileWriterText::write(), and llvm::sampleprof::SampleProfileWriterBinary::writeBody().
uint32_t llvm::sampleprof::LineLocation::LineOffset |
Definition at line 129 of file SampleProf.h.
Referenced by operator<(), llvm::sampleprof::SampleProfileWriterText::write(), and llvm::sampleprof::SampleProfileWriterBinary::writeBody().