1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/test/Bitcode/thinlto-synthetic-count-flag.ll
Easwaran Raman 8482e48d19 [ThinLTO] Compute synthetic function entry count
Summary:
This patch computes the synthetic function entry count on the whole
program callgraph (based on module summary) and writes the entry counts
to the summary. After function importing, this count gets attached to
the IR as metadata. Since it adds a new field to the summary, this bumps
up the version.

Reviewers: tejohnson

Subscribers: mehdi_amini, inglorion, llvm-commits

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

llvm-svn: 349076
2018-12-13 19:54:27 +00:00

22 lines
900 B
LLVM

; REQUIRES: x86-registered-target
; RUN: opt -module-summary %s -o %t.o
; Ensure synthetic entry count flag is not set on distributed index
; RUN: llvm-lto2 run %t.o -o %t.out -thinlto-distributed-indexes \
; RUN: -r %t.o,glob,plx -compute-dead=false
; RUN: llvm-bcanalyzer -dump %t.o.thinlto.bc | FileCheck %s --check-prefix=NOSYNTHETIC
; NOSYNTHETIC: <FLAGS op0=0/>
; Ensure synthetic entry count flag is set on distributed index
; when option used to enable synthetic count propagation
; RUN: llvm-lto2 run %t.o -o %t.out -thinlto-distributed-indexes \
; RUN: -r %t.o,glob,plx -thinlto-synthesize-entry-counts \
; RUN: -compute-dead=false
; RUN: llvm-bcanalyzer -dump %t.o.thinlto.bc | FileCheck %s --check-prefix=HASSYNTHETIC
; HASSYNTHETIC: <FLAGS op0=4/>
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@glob = global i32 0