[llvm] ac26708 - [MemProf][NFC] Make new test actually check cold attributes

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 29 13:16:15 PST 2024


Author: Teresa Johnson
Date: 2024-02-29T13:16:06-08:00
New Revision: ac267081a387a53d83ec9e3bfccedb27c21a050f

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

LOG: [MemProf][NFC] Make new test actually check cold attributes

The test added by PR81322 didn't actually check the coldness of the
attributes being matched on the IR. Add that checking.

Added: 
    

Modified: 
    llvm/test/Transforms/MemProfContextDisambiguation/inlined3.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/MemProfContextDisambiguation/inlined3.ll b/llvm/test/Transforms/MemProfContextDisambiguation/inlined3.ll
index 39a595897c370c..a2e01187108d7f 100644
--- a/llvm/test/Transforms/MemProfContextDisambiguation/inlined3.ll
+++ b/llvm/test/Transforms/MemProfContextDisambiguation/inlined3.ll
@@ -188,6 +188,9 @@ attributes #7 = { builtin }
 ; IR: define {{.*}} @_Z1Mv.memprof.1()
 ; IR:   call {{.*}} @_Z2XZv.memprof.1()
 
+; IR: attributes #[[NOTCOLD]] = { builtin "memprof"="notcold" }
+; IR: attributes #[[COLD]] = { builtin "memprof"="cold" }
+
 ; STATS: 2 memprof-context-disambiguation - Number of cold static allocations (possibly cloned)
 ; STATS: 2 memprof-context-disambiguation - Number of not cold static allocations (possibly cloned)
 ; STATS: 3 memprof-context-disambiguation - Number of function clones created during whole program analysis


        


More information about the llvm-commits mailing list