Skip to content

Commit dbcb4a7

Browse files
add description module pass over function
1 parent bb5b4b0 commit dbcb4a7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/lib/Target/AMDGPU/AMDGPUUniformIntrinsicCombine.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
/// uniformity. And every instruction that's downstream and cares about dynamic
1717
/// uniformity must be convergent (and isel will introduce v_readfirstlane for
1818
/// them if their operands can't be proven statically uniform).
19+
///
20+
/// Although the transformations are applied at the function level, this pass is
21+
/// structured as a ModulePass because we must also inspect intrinsic
22+
/// declarations at the module scope. A function pass would require re-scanning
23+
/// all instructions in every function, while the module view lets us directly
24+
/// pair intrinsic uses with their declarations in a single traversal.
1925
//===----------------------------------------------------------------------===//
2026

2127
#include "AMDGPU.h"

0 commit comments

Comments
 (0)