diff options
author | Tim Renouf <tim.renouf@amd.com> | 2024-10-12 09:34:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-12 09:34:45 +0100 |
commit | 76007138f4ffd4e0f510d12b5e8cad529c21f24d (patch) | |
tree | ebf9482339898c4173ffc9bb65495d2f615a334e /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 3292ce08678ded1509f078d7de4753a461fc3ff8 (diff) | |
download | llvm-76007138f4ffd4e0f510d12b5e8cad529c21f24d.zip llvm-76007138f4ffd4e0f510d12b5e8cad529c21f24d.tar.gz llvm-76007138f4ffd4e0f510d12b5e8cad529c21f24d.tar.bz2 |
[LLVM] New NoDivergenceSource function attribute (#111832)
A call to a function that has this attribute is not a source of
divergence, as used by UniformityAnalysis. That allows a front-end to
use known-name calls as an instruction extension mechanism (e.g.
https://github.com/GPUOpen-Drivers/llvm-dialects ) without such a call
being a source of divergence.
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index bec0cae..c3bd107 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -763,6 +763,8 @@ static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind) { return bitc::ATTR_KIND_NO_CALLBACK; case Attribute::NoCapture: return bitc::ATTR_KIND_NO_CAPTURE; + case Attribute::NoDivergenceSource: + return bitc::ATTR_KIND_NO_DIVERGENCE_SOURCE; case Attribute::NoDuplicate: return bitc::ATTR_KIND_NO_DUPLICATE; case Attribute::NoFree: |