[llvm] b7503ae - [AMDGPU] Clear BreakPhiNodesCache in-between functions

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 11 06:23:46 PDT 2023


Author: pvanhout
Date: 2023-08-11T15:23:41+02:00
New Revision: b7503ae8a07eb557ca7a46d14119463c2c4a8a56

URL: https://github.com/llvm/llvm-project/commit/b7503ae8a07eb557ca7a46d14119463c2c4a8a56
DIFF: https://github.com/llvm/llvm-project/commit/b7503ae8a07eb557ca7a46d14119463c2c4a8a56.diff

LOG: [AMDGPU] Clear BreakPhiNodesCache in-between functions

Otherwise stale pointers pollute the cache and
when a dead PHI's memory is reused for another PHI, we can get a false positive hit in the cache.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D157711

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp b/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
index 5cb4754fb76e3c..8eda801d010966 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
@@ -319,6 +319,7 @@ class AMDGPUCodeGenPrepare : public FunctionPass {
 } // end anonymous namespace
 
 bool AMDGPUCodeGenPrepareImpl::run(Function &F) {
+  BreakPhiNodesCache.clear();
   bool MadeChange = false;
 
   Function::iterator NextBB;


        


More information about the llvm-commits mailing list