[PATCH] D119943: [AMDGPU] Return better Changed status from AMDGPUAnnotateUniformValues
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 17 01:32:23 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG77e793d0255b: [AMDGPU] Return better Changed status from AMDGPUAnnotateUniformValues (authored by foad).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119943/new/
https://reviews.llvm.org/D119943
Files:
llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp
Index: llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp
@@ -33,6 +33,17 @@
MemorySSA *MSSA;
AliasAnalysis *AA;
bool isEntryFunc;
+ bool Changed;
+
+ void setUniformMetadata(Instruction *I) {
+ I->setMetadata("amdgpu.uniform", MDNode::get(I->getContext(), {}));
+ Changed = true;
+ }
+
+ void setNoClobberMetadata(Instruction *I) {
+ I->setMetadata("amdgpu.noclobber", MDNode::get(I->getContext(), {}));
+ Changed = true;
+ }
public:
static char ID;
@@ -66,13 +77,6 @@
char AMDGPUAnnotateUniformValues::ID = 0;
-static void setUniformMetadata(Instruction *I) {
- I->setMetadata("amdgpu.uniform", MDNode::get(I->getContext(), {}));
-}
-static void setNoClobberMetadata(Instruction *I) {
- I->setMetadata("amdgpu.noclobber", MDNode::get(I->getContext(), {}));
-}
-
void AMDGPUAnnotateUniformValues::visitBranchInst(BranchInst &I) {
if (DA->isUniform(&I))
setUniformMetadata(&I);
@@ -109,8 +113,9 @@
AA = &getAnalysis<AAResultsWrapperPass>().getAAResults();
isEntryFunc = AMDGPU::isEntryFunctionCC(F.getCallingConv());
+ Changed = false;
visit(F);
- return true;
+ return Changed;
}
FunctionPass *
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119943.409534.patch
Type: text/x-patch
Size: 1352 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220217/56088650/attachment-0001.bin>
More information about the llvm-commits
mailing list