mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
IR: Set -preserve-bc-uselistorder=false by default
But keep it on by default in `llvm-as`, `opt`, `bugpoint`, `llvm-link`, `llvm-extract`, and `LTOCodeGenerator`. Part of PR5680. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234921 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -19,7 +19,7 @@ using namespace llvm;
|
|||||||
static cl::opt<bool> PreserveBitcodeUseListOrder(
|
static cl::opt<bool> PreserveBitcodeUseListOrder(
|
||||||
"preserve-bc-uselistorder",
|
"preserve-bc-uselistorder",
|
||||||
cl::desc("Preserve use-list order when writing LLVM bitcode."),
|
cl::desc("Preserve use-list order when writing LLVM bitcode."),
|
||||||
cl::init(true), cl::Hidden);
|
cl::init(false), cl::Hidden);
|
||||||
|
|
||||||
static cl::opt<bool> PreserveAssemblyUseListOrder(
|
static cl::opt<bool> PreserveAssemblyUseListOrder(
|
||||||
"preserve-ll-uselistorder",
|
"preserve-ll-uselistorder",
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include "llvm/IR/LegacyPassManager.h"
|
#include "llvm/IR/LegacyPassManager.h"
|
||||||
#include "llvm/IR/Mangler.h"
|
#include "llvm/IR/Mangler.h"
|
||||||
#include "llvm/IR/Module.h"
|
#include "llvm/IR/Module.h"
|
||||||
|
#include "llvm/IR/UseListOrder.h"
|
||||||
#include "llvm/IR/Verifier.h"
|
#include "llvm/IR/Verifier.h"
|
||||||
#include "llvm/InitializePasses.h"
|
#include "llvm/InitializePasses.h"
|
||||||
#include "llvm/LTO/LTOModule.h"
|
#include "llvm/LTO/LTOModule.h"
|
||||||
@ -603,6 +604,10 @@ void LTOCodeGenerator::setCodeGenDebugOptions(const char *options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void LTOCodeGenerator::parseCodeGenDebugOptions() {
|
void LTOCodeGenerator::parseCodeGenDebugOptions() {
|
||||||
|
// Turn on -preserve-bc-uselistorder by default, but let the command-line
|
||||||
|
// override it.
|
||||||
|
setPreserveBitcodeUseListOrder(true);
|
||||||
|
|
||||||
// if options were requested, set them
|
// if options were requested, set them
|
||||||
if (!CodegenOptions.empty())
|
if (!CodegenOptions.empty())
|
||||||
cl::ParseCommandLineOptions(CodegenOptions.size(),
|
cl::ParseCommandLineOptions(CodegenOptions.size(),
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include "llvm/IR/LLVMContext.h"
|
#include "llvm/IR/LLVMContext.h"
|
||||||
#include "llvm/IR/LegacyPassManager.h"
|
#include "llvm/IR/LegacyPassManager.h"
|
||||||
#include "llvm/IR/LegacyPassNameParser.h"
|
#include "llvm/IR/LegacyPassNameParser.h"
|
||||||
|
#include "llvm/IR/UseListOrder.h"
|
||||||
#include "llvm/LinkAllIR.h"
|
#include "llvm/LinkAllIR.h"
|
||||||
#include "llvm/LinkAllPasses.h"
|
#include "llvm/LinkAllPasses.h"
|
||||||
#include "llvm/Support/CommandLine.h"
|
#include "llvm/Support/CommandLine.h"
|
||||||
@ -136,6 +137,10 @@ int main(int argc, char **argv) {
|
|||||||
polly::initializePollyPasses(Registry);
|
polly::initializePollyPasses(Registry);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Turn on -preserve-bc-uselistorder by default, but let the command-line
|
||||||
|
// override it.
|
||||||
|
setPreserveBitcodeUseListOrder(true);
|
||||||
|
|
||||||
cl::ParseCommandLineOptions(argc, argv,
|
cl::ParseCommandLineOptions(argc, argv,
|
||||||
"LLVM automatic testcase reducer. See\nhttp://"
|
"LLVM automatic testcase reducer. See\nhttp://"
|
||||||
"llvm.org/cmds/bugpoint.html"
|
"llvm.org/cmds/bugpoint.html"
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include "llvm/AsmParser/Parser.h"
|
#include "llvm/AsmParser/Parser.h"
|
||||||
#include "llvm/Bitcode/ReaderWriter.h"
|
#include "llvm/Bitcode/ReaderWriter.h"
|
||||||
#include "llvm/IR/Module.h"
|
#include "llvm/IR/Module.h"
|
||||||
|
#include "llvm/IR/UseListOrder.h"
|
||||||
#include "llvm/IR/Verifier.h"
|
#include "llvm/IR/Verifier.h"
|
||||||
#include "llvm/Support/CommandLine.h"
|
#include "llvm/Support/CommandLine.h"
|
||||||
#include "llvm/Support/FileSystem.h"
|
#include "llvm/Support/FileSystem.h"
|
||||||
@ -90,6 +91,11 @@ int main(int argc, char **argv) {
|
|||||||
PrettyStackTraceProgram X(argc, argv);
|
PrettyStackTraceProgram X(argc, argv);
|
||||||
LLVMContext &Context = getGlobalContext();
|
LLVMContext &Context = getGlobalContext();
|
||||||
llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
|
llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
|
||||||
|
|
||||||
|
// Turn on -preserve-bc-uselistorder by default, but let the command-line
|
||||||
|
// override it.
|
||||||
|
setPreserveBitcodeUseListOrder(true);
|
||||||
|
|
||||||
cl::ParseCommandLineOptions(argc, argv, "llvm .ll -> .bc assembler\n");
|
cl::ParseCommandLineOptions(argc, argv, "llvm .ll -> .bc assembler\n");
|
||||||
|
|
||||||
// Parse the file now...
|
// Parse the file now...
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include "llvm/IR/IRPrintingPasses.h"
|
#include "llvm/IR/IRPrintingPasses.h"
|
||||||
#include "llvm/IR/LLVMContext.h"
|
#include "llvm/IR/LLVMContext.h"
|
||||||
#include "llvm/IR/Module.h"
|
#include "llvm/IR/Module.h"
|
||||||
|
#include "llvm/IR/UseListOrder.h"
|
||||||
#include "llvm/IRReader/IRReader.h"
|
#include "llvm/IRReader/IRReader.h"
|
||||||
#include "llvm/IR/LegacyPassManager.h"
|
#include "llvm/IR/LegacyPassManager.h"
|
||||||
#include "llvm/Support/CommandLine.h"
|
#include "llvm/Support/CommandLine.h"
|
||||||
@ -97,6 +98,11 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
LLVMContext &Context = getGlobalContext();
|
LLVMContext &Context = getGlobalContext();
|
||||||
llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
|
llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
|
||||||
|
|
||||||
|
// Turn on -preserve-bc-uselistorder by default, but let the command-line
|
||||||
|
// override it.
|
||||||
|
setPreserveBitcodeUseListOrder(true);
|
||||||
|
|
||||||
cl::ParseCommandLineOptions(argc, argv, "llvm extractor\n");
|
cl::ParseCommandLineOptions(argc, argv, "llvm extractor\n");
|
||||||
|
|
||||||
// Use lazy loading, since we only care about selected global values.
|
// Use lazy loading, since we only care about selected global values.
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "llvm/IR/DiagnosticPrinter.h"
|
#include "llvm/IR/DiagnosticPrinter.h"
|
||||||
#include "llvm/IR/LLVMContext.h"
|
#include "llvm/IR/LLVMContext.h"
|
||||||
#include "llvm/IR/Module.h"
|
#include "llvm/IR/Module.h"
|
||||||
|
#include "llvm/IR/UseListOrder.h"
|
||||||
#include "llvm/IR/Verifier.h"
|
#include "llvm/IR/Verifier.h"
|
||||||
#include "llvm/IRReader/IRReader.h"
|
#include "llvm/IRReader/IRReader.h"
|
||||||
#include "llvm/Support/CommandLine.h"
|
#include "llvm/Support/CommandLine.h"
|
||||||
@ -104,6 +105,11 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
LLVMContext &Context = getGlobalContext();
|
LLVMContext &Context = getGlobalContext();
|
||||||
llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
|
llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
|
||||||
|
|
||||||
|
// Turn on -preserve-bc-uselistorder by default, but let the command-line
|
||||||
|
// override it.
|
||||||
|
setPreserveBitcodeUseListOrder(true);
|
||||||
|
|
||||||
cl::ParseCommandLineOptions(argc, argv, "llvm linker\n");
|
cl::ParseCommandLineOptions(argc, argv, "llvm linker\n");
|
||||||
|
|
||||||
auto Composite = make_unique<Module>("llvm-link", Context);
|
auto Composite = make_unique<Module>("llvm-link", Context);
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "llvm/IR/LLVMContext.h"
|
#include "llvm/IR/LLVMContext.h"
|
||||||
#include "llvm/IR/LegacyPassNameParser.h"
|
#include "llvm/IR/LegacyPassNameParser.h"
|
||||||
#include "llvm/IR/Module.h"
|
#include "llvm/IR/Module.h"
|
||||||
|
#include "llvm/IR/UseListOrder.h"
|
||||||
#include "llvm/IR/Verifier.h"
|
#include "llvm/IR/Verifier.h"
|
||||||
#include "llvm/IRReader/IRReader.h"
|
#include "llvm/IRReader/IRReader.h"
|
||||||
#include "llvm/InitializePasses.h"
|
#include "llvm/InitializePasses.h"
|
||||||
@ -344,6 +345,10 @@ int main(int argc, char **argv) {
|
|||||||
polly::initializePollyPasses(Registry);
|
polly::initializePollyPasses(Registry);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Turn on -preserve-bc-uselistorder by default, but let the command-line
|
||||||
|
// override it.
|
||||||
|
setPreserveBitcodeUseListOrder(true);
|
||||||
|
|
||||||
cl::ParseCommandLineOptions(argc, argv,
|
cl::ParseCommandLineOptions(argc, argv,
|
||||||
"llvm .bc -> .bc modular optimizer and analysis printer\n");
|
"llvm .bc -> .bc modular optimizer and analysis printer\n");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user