brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · e957ce6 Raw
40 lines · plain
1; REQUIRES: x86-registered-target2; RUN: opt -module-summary %s -o %t.o3 4;; By default, the indexing step should perform and set the appropriate index5;; flags for dead stripping, attribute propagation, DSO local propagation,6;; and internalization/promotion.7; RUN: llvm-lto2 run %t.o -o %t.out -thinlto-distributed-indexes \8; RUN:		-r %t.o,glob,plx9; RUN: llvm-bcanalyzer -dump %t.o.thinlto.bc | FileCheck %s --check-prefix=ALL10;; The flag value should be 0x461 aka 1121:11;; 0x1: Dead stripping12;; 0x20: Attribute propagation13;; 0x40: DSO local propagation14;; 0x400: Internalization/promotion15; ALL: <FLAGS op0=1121/>16 17;; Ensure dead stripping performed flag is not set on distributed index18;; when option used to disable dead stripping computation.19; RUN: llvm-lto2 run %t.o -o %t.out -thinlto-distributed-indexes \20; RUN:		-r %t.o,glob,plx -compute-dead=false21; RUN: llvm-bcanalyzer -dump %t.o.thinlto.bc | FileCheck %s --check-prefix=NODEAD22;; Flag should be 0x460 aka 1120.23; NODEAD: <FLAGS op0=1120/>24 25;; Disabling attribute propagation should disable that as well as DSO local26;; propagation.27; RUN: llvm-lto2 run %t.o -o %t.out -thinlto-distributed-indexes \28; RUN:		-r %t.o,glob,plx -propagate-attrs=false29; RUN: llvm-bcanalyzer -dump %t.o.thinlto.bc | FileCheck %s --check-prefix=NOPROP30;; Flag should be 0x401 aka 1025.31; NOPROP: <FLAGS op0=1025/>32 33;; Note there isn't currently a way to disable internalization+promotion, which34;; are performed together.35 36target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"37target triple = "x86_64-unknown-linux-gnu"38 39@glob = global i32 040