LLVM 20.0.0git
|
Helper class for "break large PHIs" (visitPHINode). More...
Public Member Functions | |
VectorSlice (Type *Ty, unsigned Idx, unsigned NumElts) | |
Value * | getSlicedVal (BasicBlock *BB, Value *Inc, StringRef NewValName) |
Slice Inc according to the information contained within this slice. | |
Public Attributes | |
Type * | Ty = nullptr |
unsigned | Idx = 0 |
unsigned | NumElts = 0 |
PHINode * | NewPHI = nullptr |
Helper class for "break large PHIs" (visitPHINode).
This represents a slice of a PHI's incoming value, which is made up of:
Slice examples: <4 x i64> -> Split into four i64 slices. -> [i64, 0, 1], [i64, 1, 1], [i64, 2, 1], [i64, 3, 1] <5 x i16> -> Split into 2 <2 x i16> slices + a i16 tail. -> [<2 x i16>, 0, 2], [<2 x i16>, 2, 2], [i16, 4, 1]
Definition at line 1901 of file AMDGPUCodeGenPrepare.cpp.
Definition at line 1903 of file AMDGPUCodeGenPrepare.cpp.
|
inline |
Slice Inc
according to the information contained within this slice.
This is cached, so if called multiple times for the same BB
& Inc
pair, it returns the same Sliced value as well.
Note this intentionally does not return the same value for, say, [bb.0, %0] & [bb.1, %0] as:
This is both a minor optimization to avoid creating duplicate instructions, but also a requirement for correctness. It is not forbidden for a PHI node to have the same [BB, Val] pair multiple times. If we returned a new value each time, those previously identical pairs would all have different incoming values (from the same block) and it'd cause a "PHI node has multiple entries for the same basic block with different incoming values!" verifier error.
Definition at line 1931 of file AMDGPUCodeGenPrepare.cpp.
References B, llvm::BasicBlock::getTerminator(), Idx, and NumElts.
unsigned VectorSlice::Idx = 0 |
Definition at line 1907 of file AMDGPUCodeGenPrepare.cpp.
Referenced by getSlicedVal().
PHINode* VectorSlice::NewPHI = nullptr |
Definition at line 1909 of file AMDGPUCodeGenPrepare.cpp.
unsigned VectorSlice::NumElts = 0 |
Definition at line 1908 of file AMDGPUCodeGenPrepare.cpp.
Referenced by getSlicedVal().
Type* VectorSlice::Ty = nullptr |
Definition at line 1906 of file AMDGPUCodeGenPrepare.cpp.