From: Nikita Popov Date: Wed, 25 Jan 2023 11:04:51 +0000 (+0100) Subject: [LTO] Remove -lto-opaque-pointers flag X-Git-Tag: upstream/17.0.6~19679 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb6c1300f23f249aa29eb6c5325aebc7d61d7345;p=platform%2Fupstream%2Fllvm.git [LTO] Remove -lto-opaque-pointers flag Always use the config default of OpaquePointers == true. --- diff --git a/clang/test/CodeGen/thinlto-inline-asm2.c b/clang/test/CodeGen/thinlto-inline-asm2.c index 7606b27..5d7bbc0 100644 --- a/clang/test/CodeGen/thinlto-inline-asm2.c +++ b/clang/test/CodeGen/thinlto-inline-asm2.c @@ -5,7 +5,7 @@ // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -flto=thin -emit-llvm-bc %t/b.c -o %t/b.bc // RUN: llvm-nm %t/a.bc | FileCheck %s --check-prefix=NM -// RUN: llvm-lto2 run -lto-opaque-pointers %t/a.bc %t/b.bc -o %t/out -save-temps -r=%t/a.bc,ref,plx -r=%t/b.bc,ff_h264_cabac_tables,pl +// RUN: llvm-lto2 run %t/a.bc %t/b.bc -o %t/out -save-temps -r=%t/a.bc,ref,plx -r=%t/b.bc,ff_h264_cabac_tables,pl // RUN: llvm-dis < %t/out.2.2.internalize.bc | FileCheck %s //--- a.c diff --git a/clang/test/Driver/arm-float-abi-lto.c b/clang/test/Driver/arm-float-abi-lto.c index 8b6d8ff..b8788f4 100644 --- a/clang/test/Driver/arm-float-abi-lto.c +++ b/clang/test/Driver/arm-float-abi-lto.c @@ -4,7 +4,7 @@ // RUN: %clang --target=arm-none-eabi -mcpu=cortex-m33 -mfloat-abi=hard -O1 %s -Xclang -opaque-pointers -flto=full -c -o %t.call_full.bc -DCALL_LIB // RUN: %clang --target=arm-none-eabi -mcpu=cortex-m33 -mfloat-abi=hard -O1 %s -Xclang -opaque-pointers -flto=full -c -o %t.define_full.bc -DDEFINE_LIB -// RUN: llvm-lto2 run -lto-opaque-pointers -o %t.lto_full -save-temps %t.call_full.bc %t.define_full.bc \ +// RUN: llvm-lto2 run -o %t.lto_full -save-temps %t.call_full.bc %t.define_full.bc \ // RUN: -r %t.call_full.bc,fn,px \ // RUN: -r %t.call_full.bc,fwrite,l \ // RUN: -r %t.call_full.bc,putchar,l \ @@ -16,7 +16,7 @@ // RUN: %clang --target=arm-none-eabi -mcpu=cortex-m33 -mfloat-abi=hard -O1 %s -Xclang -opaque-pointers -flto=thin -c -o %t.call_thin.bc -DCALL_LIB // RUN: %clang --target=arm-none-eabi -mcpu=cortex-m33 -mfloat-abi=hard -O1 %s -Xclang -opaque-pointers -flto=thin -c -o %t.define_thin.bc -DDEFINE_LIB -// RUN: llvm-lto2 run -lto-opaque-pointers -o %t.lto_thin -save-temps %t.call_thin.bc %t.define_thin.bc \ +// RUN: llvm-lto2 run -o %t.lto_thin -save-temps %t.call_thin.bc %t.define_thin.bc \ // RUN: -r %t.call_thin.bc,fn,px \ // RUN: -r %t.call_thin.bc,fwrite,l \ // RUN: -r %t.call_thin.bc,putchar,l \ diff --git a/clang/test/Driver/memtag-stack_lto.c b/clang/test/Driver/memtag-stack_lto.c index 2fe15a1..3cafe83 100644 --- a/clang/test/Driver/memtag-stack_lto.c +++ b/clang/test/Driver/memtag-stack_lto.c @@ -10,7 +10,7 @@ // Full LTO // RUN: %clang -O1 -target aarch64-unknown-linux -c %s -Xclang -opaque-pointers -flto=full -o %t.ltonewpm1.bc // RUN: %clang -O1 -target aarch64-unknown-linux -c -DBUILD2 %s -Xclang -opaque-pointers -flto=full -o %t.ltonewpm2.bc -// RUN: llvm-lto2 run -lto-opaque-pointers -o %t.ltonewpm %t.ltonewpm1.bc %t.ltonewpm2.bc -save-temps -stack-safety-print -thinlto-threads 1 -O1 \ +// RUN: llvm-lto2 run -o %t.ltonewpm %t.ltonewpm1.bc %t.ltonewpm2.bc -save-temps -stack-safety-print -thinlto-threads 1 -O1 \ // RUN: -r %t.ltonewpm1.bc,fn,plx \ // RUN: -r %t.ltonewpm1.bc,use,lx \ // RUN: -r %t.ltonewpm1.bc,use_local,plx \ @@ -21,7 +21,7 @@ // Thin LTO, new PM // RUN: %clang -O1 -target aarch64-unknown-linux -c %s -Xclang -opaque-pointers -flto=thin -o %t.thinltonewpm1.bc // RUN: %clang -O1 -target aarch64-unknown-linux -c -DBUILD2 %s -Xclang -opaque-pointers -flto=thin -o %t.thinltonewpm2.bc -// RUN: llvm-lto2 run -lto-opaque-pointers -o %t.thinltonewpm %t.thinltonewpm1.bc %t.thinltonewpm2.bc -save-temps -stack-safety-print -thinlto-threads 1 -O1 \ +// RUN: llvm-lto2 run -o %t.thinltonewpm %t.thinltonewpm1.bc %t.thinltonewpm2.bc -save-temps -stack-safety-print -thinlto-threads 1 -O1 \ // RUN: -r %t.thinltonewpm1.bc,fn,plx \ // RUN: -r %t.thinltonewpm1.bc,use,lx \ // RUN: -r %t.thinltonewpm1.bc,use_local,plx \ @@ -41,7 +41,7 @@ // Full LTO: both are safe. // RUN: %clang -O1 -target aarch64-unknown-linux -march=armv8+memtag -fsanitize=memtag-stack -c %s -Xclang -opaque-pointers -flto=full -o %t.ltonewpm1.bc // RUN: %clang -O1 -target aarch64-unknown-linux -march=armv8+memtag -fsanitize=memtag-stack -c -DBUILD2 %s -Xclang -opaque-pointers -flto=full -o %t.ltonewpm2.bc -// RUN: llvm-lto2 run -lto-opaque-pointers -o %t.ltonewpm %t.ltonewpm1.bc %t.ltonewpm2.bc -save-temps -stack-safety-print -thinlto-threads 1 -O1 \ +// RUN: llvm-lto2 run -o %t.ltonewpm %t.ltonewpm1.bc %t.ltonewpm2.bc -save-temps -stack-safety-print -thinlto-threads 1 -O1 \ // RUN: -r %t.ltonewpm1.bc,fn,plx \ // RUN: -r %t.ltonewpm1.bc,use,lx \ // RUN: -r %t.ltonewpm1.bc,use_local,plx \ @@ -52,7 +52,7 @@ // Thin LTO: both are safe. // RUN: %clang -O1 -target aarch64-unknown-linux -march=armv8+memtag -fsanitize=memtag-stack -c %s -Xclang -opaque-pointers -flto=thin -o %t.thinltonewpm1.bc // RUN: %clang -O1 -target aarch64-unknown-linux -march=armv8+memtag -fsanitize=memtag-stack -c -DBUILD2 %s -Xclang -opaque-pointers -flto=thin -o %t.thinltonewpm2.bc -// RUN: llvm-lto2 run -lto-opaque-pointers -o %t.thinltonewpm %t.thinltonewpm1.bc %t.thinltonewpm2.bc -save-temps -stack-safety-print -thinlto-threads 1 -O1 \ +// RUN: llvm-lto2 run -o %t.thinltonewpm %t.thinltonewpm1.bc %t.thinltonewpm2.bc -save-temps -stack-safety-print -thinlto-threads 1 -O1 \ // RUN: -r %t.thinltonewpm1.bc,fn,plx \ // RUN: -r %t.thinltonewpm1.bc,use,lx \ // RUN: -r %t.thinltonewpm1.bc,use_local,plx \ diff --git a/llvm/test/LTO/X86/mix-opaque-typed.ll b/llvm/test/LTO/X86/mix-opaque-typed.ll index fc95cd53..25630aa 100644 --- a/llvm/test/LTO/X86/mix-opaque-typed.ll +++ b/llvm/test/LTO/X86/mix-opaque-typed.ll @@ -1,7 +1,6 @@ ; RUN: llvm-as -opaque-pointers=0 %s -o %t-typed.bc ; RUN: llvm-as -opaque-pointers=1 %S/Inputs/opaque-pointers.ll -o %t-opaque.bc ; RUN: llvm-lto2 run -o %t-lto.bc %t-typed.bc %t-opaque.bc -save-temps \ -; RUN: -lto-opaque-pointers \ ; RUN: -r %t-typed.bc,call_foo,px -r %t-typed.bc,foo,l \ ; RUN: -r %t-opaque.bc,foo,px ; RUN: opt -S -o - %t-lto.bc.0.4.opt.bc | FileCheck %s diff --git a/llvm/tools/llvm-lto2/llvm-lto2.cpp b/llvm/tools/llvm-lto2/llvm-lto2.cpp index 09c74fc..829102c 100644 --- a/llvm/tools/llvm-lto2/llvm-lto2.cpp +++ b/llvm/tools/llvm-lto2/llvm-lto2.cpp @@ -167,10 +167,6 @@ static cl::opt cl::desc("Run PGO context sensitive IR instrumentation"), cl::Hidden); -static cl::opt LtoOpaquePointers("lto-opaque-pointers", - cl::desc("Enable opaque pointer types"), - cl::init(true), cl::Hidden); - static cl::opt DebugPassManager("debug-pass-manager", cl::Hidden, cl::desc("Print pass management debugging information")); @@ -321,7 +317,6 @@ static int run(int argc, char **argv) { Conf.StatsFile = StatsFile; Conf.PTO.LoopVectorization = Conf.OptLevel > 1; Conf.PTO.SLPVectorization = Conf.OptLevel > 1; - Conf.OpaquePointers = LtoOpaquePointers; ThinBackend Backend; if (ThinLTODistributedIndexes)