Polly 20.0.0git
|
This class represents a "virtual instruction", an instruction in a ScopStmt, effectively a ScopStmt/Instruction-pair. More...
#include <VirtualInstruction.h>
Public Member Functions | |
VirtualInstruction () | |
VirtualInstruction (ScopStmt *Stmt, Instruction *Inst) | |
Create a new virtual instruction of an instruction Inst in Stmt . | |
VirtualOperandIterator | operand_begin () const |
VirtualOperandIterator | operand_end () const |
llvm::iterator_range< VirtualOperandIterator > | operands () const |
Returns a list of virtual operands. | |
Scop * | getScop () const |
Return the SCoP everything is contained in. | |
ScopStmt * | getStmt () const |
Return the ScopStmt this virtual instruction is in. | |
Instruction * | getInstruction () const |
Return the instruction in the statement. | |
void | print (raw_ostream &OS, bool Reproducible=true) const |
Print a description of this object. | |
void | dump () const |
Private Attributes | |
ScopStmt * | Stmt = nullptr |
The statement this virtual instruction is in. | |
Instruction * | Inst = nullptr |
The instruction of a statement. | |
Friends | |
class | VirtualOperandIterator |
struct | llvm::DenseMapInfo< VirtualInstruction > |
This class represents a "virtual instruction", an instruction in a ScopStmt, effectively a ScopStmt/Instruction-pair.
An instructions can be moved between statements (e.g. to avoid a scalar dependency) and even can be contained in multiple statements (for instance, to recompute a value instead of transferring it), hence 'virtual'. This class is required to represent such instructions that are not in their 'physical' location anymore.
A statement can currently not contain the same instructions multiple times (that is, from different loop iterations). Therefore, a ScopStmt/Instruction-pair uniquely identifies a virtual instructions. ScopStmt::getInstruction() can contain the same instruction multiple times, but they necessarily compute the same value.
Definition at line 231 of file VirtualInstruction.h.
|
inline |
Definition at line 243 of file VirtualInstruction.h.
|
inline |
Create a new virtual instruction of an instruction Inst
in Stmt
.
Definition at line 246 of file VirtualInstruction.h.
LLVM_DUMP_METHOD void VirtualInstruction::dump | ( | ) | const |
Definition at line 165 of file VirtualInstruction.cpp.
References print().
|
inline |
Return the instruction in the statement.
Definition at line 274 of file VirtualInstruction.h.
References Inst.
Referenced by llvm::DenseMapInfo< polly::VirtualInstruction >::getHashValue(), llvm::DenseMapInfo< polly::VirtualInstruction >::isEqual(), polly::operator==(), and walkReachable().
|
inline |
Return the SCoP everything is contained in.
Definition at line 268 of file VirtualInstruction.h.
References polly::ScopStmt::getParent(), and Stmt.
|
inline |
Return the ScopStmt this virtual instruction is in.
Definition at line 271 of file VirtualInstruction.h.
References Stmt.
Referenced by llvm::DenseMapInfo< polly::VirtualInstruction >::getHashValue(), llvm::DenseMapInfo< polly::VirtualInstruction >::isEqual(), polly::operator==(), and walkReachable().
|
inline |
Definition at line 251 of file VirtualInstruction.h.
References Inst, Stmt, and VirtualOperandIterator.
Referenced by operands().
|
inline |
Definition at line 255 of file VirtualInstruction.h.
References Inst, Stmt, and VirtualOperandIterator.
Referenced by operands().
|
inline |
Returns a list of virtual operands.
Virtual operands, like virtual instructions, need to encode the ScopStmt they are in.
Definition at line 263 of file VirtualInstruction.h.
References operand_begin(), and operand_end().
Referenced by walkReachable().
void VirtualInstruction::print | ( | raw_ostream & | OS, |
bool | Reproducible = true |
||
) | const |
Print a description of this object.
OS | Stream to print to. |
Reproducible | If true, ensures that the output is stable between runs and is suitable for checks in regression tests. This excludes printing e.g., pointer values. If false, the output should not be used for regression tests, but may contain more information useful in debugger sessions. |
Definition at line 154 of file VirtualInstruction.cpp.
References polly::ScopStmt::getBaseName(), Inst, and Stmt.
Referenced by dump().
|
friend |
Definition at line 232 of file VirtualInstruction.h.
|
friend |
Definition at line 232 of file VirtualInstruction.h.
Referenced by operand_begin(), and operand_end().
|
private |
The instruction of a statement.
Definition at line 240 of file VirtualInstruction.h.
Referenced by llvm::DenseMapInfo< polly::VirtualInstruction >::getEmptyKey(), getInstruction(), llvm::DenseMapInfo< polly::VirtualInstruction >::getTombstoneKey(), operand_begin(), operand_end(), print(), and VirtualInstruction().
|
private |
The statement this virtual instruction is in.
Definition at line 237 of file VirtualInstruction.h.
Referenced by llvm::DenseMapInfo< polly::VirtualInstruction >::getEmptyKey(), getScop(), getStmt(), llvm::DenseMapInfo< polly::VirtualInstruction >::getTombstoneKey(), operand_begin(), operand_end(), print(), and VirtualInstruction().