[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 04:42:04 PDT 2023


jmorse accepted this revision.
jmorse added a comment.
This revision is now accepted and ready to land.

LGTM with inline rider



================
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
----------------
Orlando wrote:
> jmorse wrote:
> > Example of the cost being 1 for a dbg.assign, which would be wrong?
> Aha yes, must have introduced this mistake while fiddling with D145573. Are you happy for me to just fix this before landing?
Sure, that sounds alright.


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

https://reviews.llvm.org/D144652



More information about the llvm-commits mailing list