[llvm] cce24b6 - AMDGPU: Remove IsSourceOfDivergence check

Ruiling Song via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 10 18:00:23 PST 2023


Author: Ruiling Song
Date: 2023-01-11T09:59:35+08:00
New Revision: cce24b6af0999c658fd3e4931eb9bc58252478b8

URL: https://github.com/llvm/llvm-project/commit/cce24b6af0999c658fd3e4931eb9bc58252478b8
DIFF: https://github.com/llvm/llvm-project/commit/cce24b6af0999c658fd3e4931eb9bc58252478b8.diff

LOG: AMDGPU: Remove IsSourceOfDivergence check

This bit is not set/reserved in td file. Let's remove it for now,
we can always add it back if we need it.

Reviewed by: foad

Differential Revision: https://reviews.llvm.org/D141223

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/SIDefines.h
    llvm/lib/Target/AMDGPU/SIInstrInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/SIDefines.h b/llvm/lib/Target/AMDGPU/SIDefines.h
index 1325afb68ca9..519cea1730ed 100644
--- a/llvm/lib/Target/AMDGPU/SIDefines.h
+++ b/llvm/lib/Target/AMDGPU/SIDefines.h
@@ -130,13 +130,6 @@ enum : uint64_t {
 
   // Is a WMMA instruction.
   IsWMMA = UINT64_C(1) << 59,
-
-  // Is source of divergence.
-  //
-  // Note: There is no corresponding SIInstrInfo::IsSourceOfDivergence method
-  // by design, since this flag only covers opcodes that are _always_ divergent.
-  // Use SIInstrInfo::getInstructionUniformity for a more complete analysis.
-  IsSourceOfDivergence = UINT64_C(1) << 60
 };
 
 // v_cmp_class_* etc. use a 10-bit mask for what operation is checked.

diff  --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index e7e8ac2e7255..01c04c1acfb7 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -8404,9 +8404,6 @@ SIInstrInfo::getGenericInstructionUniformity(const MachineInstr &MI) const {
 
 InstructionUniformity
 SIInstrInfo::getInstructionUniformity(const MachineInstr &MI) const {
-  if (MI.getDesc().TSFlags & SIInstrFlags::IsSourceOfDivergence)
-    return InstructionUniformity::NeverUniform;
-
   // Atomics are divergent because they are executed sequentially: when an
   // atomic operation refers to the same address in each thread, then each
   // thread after the first sees the value written by the previous thread as


        


More information about the llvm-commits mailing list