LLVM 22.0.0git
|
Represents the relative location of an instruction. More...
#include "llvm/ProfileData/SampleProf.h"
Public Member Functions | |
LineLocation (uint32_t L, uint32_t D) | |
LLVM_ABI void | print (raw_ostream &OS) const |
LLVM_ABI void | dump () const |
LLVM_ABI void | serialize (raw_ostream &OS) const |
bool | operator< (const LineLocation &O) const |
bool | operator== (const LineLocation &O) const |
bool | operator!= (const LineLocation &O) const |
uint64_t | getHashCode () 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 288 of file SampleProf.h.
Definition at line 289 of file SampleProf.h.
References D(), Discriminator, and LineOffset.
Referenced by operator!=(), operator<(), and operator==().
LLVM_DUMP_METHOD void LineLocation::dump | ( | ) | const |
Definition at line 170 of file SampleProf.cpp.
References llvm::dbgs(), LLVM_DUMP_METHOD, and print().
|
inline |
Definition at line 310 of file SampleProf.h.
References Discriminator, and LineOffset.
|
inline |
Definition at line 306 of file SampleProf.h.
References Discriminator, LineLocation(), and LineOffset.
|
inline |
Definition at line 297 of file SampleProf.h.
References Discriminator, LineLocation(), and LineOffset.
|
inline |
Definition at line 302 of file SampleProf.h.
References Discriminator, LineLocation(), and LineOffset.
void LineLocation::print | ( | raw_ostream & | OS | ) | const |
Definition at line 126 of file SampleProf.cpp.
References Discriminator, and LineOffset.
Referenced by dump().
void LineLocation::serialize | ( | raw_ostream & | OS | ) | const |
Definition at line 173 of file SampleProf.cpp.
References Discriminator, llvm::encodeULEB128(), and LineOffset.
uint32_t llvm::sampleprof::LineLocation::Discriminator |
Definition at line 315 of file SampleProf.h.
Referenced by llvm::sampleprof::SampleContext::decodeContextString(), getHashCode(), LineLocation(), operator!=(), operator<(), operator==(), print(), and serialize().
uint32_t llvm::sampleprof::LineLocation::LineOffset |
Definition at line 314 of file SampleProf.h.
Referenced by llvm::sampleprof::SampleContext::decodeContextString(), getHashCode(), LineLocation(), operator!=(), operator<(), operator==(), print(), and serialize().