[PATCH] D144652: [Assignment Tracking] getIntrinsicInstrCost: set dbg.assign cost to zero

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 13 03:55:50 PDT 2023


jmorse added a comment.

This looks good, but in the test outputs shouldn't the cost be zero? Auto-regenerated without rebuilding opt perhaps? (See inline comment)



================
Comment at: llvm/test/Analysis/CostModel/X86/free-intrinsics.ll:11
 ; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.sideeffect()
-; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.dbg.declare(metadata ptr undef, metadata !6, metadata !DIExpression()), !dbg !8
-; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.dbg.label(metadata !9), !dbg !8
+; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: call void @llvm.dbg.assign(metadata ptr undef, metadata !6, metadata !DIExpression(), metadata !8, metadata ptr undef, metadata !DIExpression()), !dbg !9
+; CHECK-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: call void @llvm.dbg.declare(metadata ptr undef, metadata !6, metadata !DIExpression()), !dbg !9
----------------
Example of the cost being 1 for a dbg.assign, which would be wrong?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144652/new/

https://reviews.llvm.org/D144652



More information about the llvm-commits mailing list