aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorTim Renouf <tim.renouf@amd.com>2024-10-12 09:34:45 +0100
committerGitHub <noreply@github.com>2024-10-12 09:34:45 +0100
commit76007138f4ffd4e0f510d12b5e8cad529c21f24d (patch)
treeebf9482339898c4173ffc9bb65495d2f615a334e /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent3292ce08678ded1509f078d7de4753a461fc3ff8 (diff)
downloadllvm-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/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 8ee9325..a8b5f96 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -2066,6 +2066,8 @@ static Attribute::AttrKind getAttrFromCode(uint64_t Code) {
return Attribute::NoCallback;
case bitc::ATTR_KIND_NO_CAPTURE:
return Attribute::NoCapture;
+ case bitc::ATTR_KIND_NO_DIVERGENCE_SOURCE:
+ return Attribute::NoDivergenceSource;
case bitc::ATTR_KIND_NO_DUPLICATE:
return Attribute::NoDuplicate;
case bitc::ATTR_KIND_NOFREE: