brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.8 KiB · 7ecd91e Raw
64 lines · plain
1;; Test to ensure assignments of calls to their callee function clones are2;; propagated when we create new callsite clones during function assignment.3;4; RUN: opt -passes=memprof-context-disambiguation -supports-hot-cold-new %s -S | FileCheck %s5 6; ModuleID = 'funcassigncloning3.ll'7source_filename = "funcassigncloning3.ll"8target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"9target triple = "x86_64-grtev4-linux-gnu"10 11define void @A() {12  call void @_Znwm(), !memprof !0, !callsite !913  ret void14}15 16define void @B() {17  call void @A(), !callsite !1018  ret void19}20 21define void @C() {22  call void @E(), !callsite !1123  ret void24}25 26define void @D() {27  call void @E(), !callsite !1228  ret void29}30 31; Function Attrs: cold32define void @E() {33  call void @B(), !callsite !1334  call void @A(), !callsite !1435  ret void36}37 38;; Clone E.memprof.2 is eventually created to satisfy the necessary combination39;; of caller edges, which causes creation of a new clone of callsite for the40;; call to A. Earlier this was assigned to call A.memprof.1 and we need to41;; ensure that assignment is propagated.42 43; CHECK: define void @E.memprof.2()44; CHECK-NEXT: call void @B()45; CHECK-NEXT: call void @A.memprof.1()46 47declare void @_Znwm()48 49!0 = !{!1, !3, !5, !7}50!1 = !{!2, !"cold"}51!2 = !{i64 761518489666860826, i64 -1420336805534834351, i64 -2943078617660248973, i64 3500755695426091485, i64 4378935957859808257, i64 4501820981166842392, i64 -6517003774656365154, i64 -3601339536116888955, i64 1856492280661618760, i64 5795517037440084991, i64 3898931366823636439}52!3 = !{!4, !"notcold"}53!4 = !{i64 761518489666860826, i64 -1420336805534834351, i64 -2943078617660248973, i64 3500755695426091485, i64 4378935957859808257, i64 4501820981166842392, i64 -6517003774656365154, i64 -3601339536116888955, i64 1856492280661618760, i64 5795517037440084991, i64 8489804099578214685}54!5 = !{!6, !"notcold"}55!6 = !{i64 761518489666860826, i64 -1420336805534834351, i64 -2943078617660248973, i64 3500755695426091485, i64 4378935957859808257, i64 4501820981166842392, i64 -3569839323322692552, i64 -4068062742094437340, i64 3898931366823636439}56!7 = !{!8, !"cold"}57!8 = !{i64 761518489666860826, i64 -1420336805534834351, i64 -2943078617660248973, i64 3500755695426091485, i64 4378935957859808257, i64 4501820981166842392, i64 -3569839323322692552, i64 -4068062742094437340, i64 8158446606478904094}58!9 = !{i64 761518489666860826, i64 -1420336805534834351, i64 -2943078617660248973, i64 3500755695426091485, i64 4378935957859808257, i64 4501820981166842392}59!10 = !{i64 -3569839323322692552}60!11 = !{i64 3898931366823636439}61!12 = !{i64 8158446606478904094}62!13 = !{i64 -4068062742094437340}63!14 = !{i64 -6517003774656365154, i64 -3601339536116888955, i64 1856492280661618760, i64 5795517037440084991}64