From 76007138f4ffd4e0f510d12b5e8cad529c21f24d Mon Sep 17 00:00:00 2001 From: Tim Renouf Date: Sat, 12 Oct 2024 09:34:45 +0100 Subject: [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. --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp') 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: -- cgit v1.1