[lld] d7cf7ab - [LLD] Remove no-opaque-pointers plugin option
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 25 03:31:38 PST 2023
Author: Nikita Popov
Date: 2023-01-25T12:29:59+01:00
New Revision: d7cf7ab61cd0a257a4d9907c8005ee89c6cf6985
URL: https://github.com/llvm/llvm-project/commit/d7cf7ab61cd0a257a4d9907c8005ee89c6cf6985
DIFF: https://github.com/llvm/llvm-project/commit/d7cf7ab61cd0a257a4d9907c8005ee89c6cf6985.diff
LOG: [LLD] Remove no-opaque-pointers plugin option
We always use opaque pointers. The opaque-pointers option is
retained as a no-op, same as no-lto-legacy-pass-manager.
Added:
Modified:
lld/ELF/Config.h
lld/ELF/Driver.cpp
lld/ELF/LTO.cpp
lld/ELF/Options.td
lld/test/ELF/lto/wrap-unreferenced-before-codegen.test
Removed:
################################################################################
diff --git a/lld/ELF/Config.h b/lld/ELF/Config.h
index 706f17b764c88..66aa6656fe4e3 100644
--- a/lld/ELF/Config.h
+++ b/lld/ELF/Config.h
@@ -235,7 +235,6 @@ struct Config {
bool nostdlib;
bool oFormatBinary;
bool omagic;
- bool opaquePointers;
bool optEB = false;
bool optEL = false;
bool optimizeBBJumps;
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 7e2a72acf8f64..f2b9451aea3a4 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -1158,8 +1158,6 @@ static void readConfigs(opt::InputArgList &args) {
config->nostdlib = args.hasArg(OPT_nostdlib);
config->oFormatBinary = isOutputFormatBinary(args);
config->omagic = args.hasFlag(OPT_omagic, OPT_no_omagic, false);
- config->opaquePointers = args.hasFlag(
- OPT_plugin_opt_opaque_pointers, OPT_plugin_opt_no_opaque_pointers, true);
config->optRemarksFilename = args.getLastArgValue(OPT_opt_remarks_filename);
config->optStatsFilename = args.getLastArgValue(OPT_plugin_opt_stats_file);
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp
index b80f1f48f768a..23777aeca92b6 100644
--- a/lld/ELF/LTO.cpp
+++ b/lld/ELF/LTO.cpp
@@ -165,8 +165,6 @@ static lto::Config createConfig() {
c.RunCSIRInstr = config->ltoCSProfileGenerate;
c.PGOWarnMismatch = config->ltoPGOWarnMismatch;
- c.OpaquePointers = config->opaquePointers;
-
if (config->emitLLVM) {
c.PostInternalizeModuleHook = [](size_t task, const Module &m) {
if (std::unique_ptr<raw_fd_ostream> os =
diff --git a/lld/ELF/Options.td b/lld/ELF/Options.td
index b6a6ef64d017a..09dc8c58a63ec 100644
--- a/lld/ELF/Options.td
+++ b/lld/ELF/Options.td
@@ -638,8 +638,6 @@ def: J<"plugin-opt=obj-path=">,
HelpText<"Alias for --lto-obj-path=">;
def plugin_opt_opaque_pointers: F<"plugin-opt=opaque-pointers">,
HelpText<"Use opaque pointers in IR during LTO (default)">;
-def plugin_opt_no_opaque_pointers: F<"plugin-opt=no-opaque-pointers">,
- HelpText<"Use typed pointers in IR during LTO">;
def: J<"plugin-opt=opt-remarks-filename=">,
Alias<opt_remarks_filename>,
HelpText<"Alias for --opt-remarks-filename">;
diff --git a/lld/test/ELF/lto/wrap-unreferenced-before-codegen.test b/lld/test/ELF/lto/wrap-unreferenced-before-codegen.test
index 994f3fbd5de55..0cbcfccbd549a 100644
--- a/lld/test/ELF/lto/wrap-unreferenced-before-codegen.test
+++ b/lld/test/ELF/lto/wrap-unreferenced-before-codegen.test
@@ -28,8 +28,8 @@
# RUN: llvm-mc -triple x86_64-elf -filetype=obj -o %t/malloc.o %t/malloc.s
# RUN: ld.lld -shared -o %t/libmalloc.so -soname libmalloc.so %t/malloc.o
# RUN: llvm-mc -triple x86_64-elf -filetype=obj -o %t/emutls.o %t/emutls.s
-# RUN: llvm-as -opaque-pointers=1 -o %t/usetls.bc %t/usetls.ll
-# RUN: ld.lld --plugin-opt=opaque-pointers -shared -o %t/libusetls.so \
+# RUN: llvm-as -o %t/usetls.bc %t/usetls.ll
+# RUN: ld.lld -shared -o %t/libusetls.so \
# RUN: %t/usetls.bc %t/libmalloc.so \
# RUN: --start-lib %t/emutls.o -mllvm -emulated-tls --wrap malloc
# RUN: llvm-objdump --no-print-imm-hex --dynamic-reloc --disassemble %t/libusetls.so | \
More information about the llvm-commits
mailing list