aco: form clauses for LDS instructions
No fossil-db changes. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25676>
This commit is contained in:
parent
8f16745821
commit
72a5c659d4
2 changed files with 8 additions and 1 deletions
|
|
@ -1312,7 +1312,7 @@ should_form_clause(const Instruction* a, const Instruction* b)
|
|||
return false;
|
||||
|
||||
/* Assume loads which don't use descriptors might load from similar addresses. */
|
||||
if (a->isFlatLike())
|
||||
if (a->isFlatLike() || a->accessesLDS())
|
||||
return true;
|
||||
if (a->isSMEM() && a->operands[0].bytes() == 8 && b->operands[0].bytes() == 8)
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1287,6 +1287,7 @@ struct Instruction {
|
|||
|
||||
constexpr bool isVMEM() const noexcept { return isMTBUF() || isMUBUF() || isMIMG(); }
|
||||
|
||||
bool accessesLDS() const noexcept;
|
||||
bool isTrans() const noexcept;
|
||||
};
|
||||
static_assert(sizeof(Instruction) == 16, "Unexpected padding");
|
||||
|
|
@ -1674,6 +1675,12 @@ struct Pseudo_reduction_instruction : public Instruction {
|
|||
static_assert(sizeof(Pseudo_reduction_instruction) == sizeof(Instruction) + 4,
|
||||
"Unexpected padding");
|
||||
|
||||
inline bool
|
||||
Instruction::accessesLDS() const noexcept
|
||||
{
|
||||
return (isDS() && !ds().gds) || isLDSDIR() || isVINTRP();
|
||||
}
|
||||
|
||||
inline void
|
||||
VALU_instruction::swapOperands(unsigned idx0, unsigned idx1)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue