llvm.org GIT mirror llvm / d044549
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 Duncan P. N. Exon Smith 4 years ago
7 changed file(s) with 34 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
1818 static cl::opt PreserveBitcodeUseListOrder(
1919 "preserve-bc-uselistorder",
2020 cl::desc("Preserve use-list order when writing LLVM bitcode."),
21 cl::init(true), cl::Hidden);
21 cl::init(false), cl::Hidden);
2222
2323 static cl::opt PreserveAssemblyUseListOrder(
2424 "preserve-ll-uselistorder",
2828 #include "llvm/IR/LegacyPassManager.h"
2929 #include "llvm/IR/Mangler.h"
3030 #include "llvm/IR/Module.h"
31 #include "llvm/IR/UseListOrder.h"
3132 #include "llvm/IR/Verifier.h"
3233 #include "llvm/InitializePasses.h"
3334 #include "llvm/LTO/LTOModule.h"
602603 }
603604
604605 void LTOCodeGenerator::parseCodeGenDebugOptions() {
606 // Turn on -preserve-bc-uselistorder by default, but let the command-line
607 // override it.
608 setPreserveBitcodeUseListOrder(true);
609
605610 // if options were requested, set them
606611 if (!CodegenOptions.empty())
607612 cl::ParseCommandLineOptions(CodegenOptions.size(),
1717 #include "llvm/IR/LLVMContext.h"
1818 #include "llvm/IR/LegacyPassManager.h"
1919 #include "llvm/IR/LegacyPassNameParser.h"
20 #include "llvm/IR/UseListOrder.h"
2021 #include "llvm/LinkAllIR.h"
2122 #include "llvm/LinkAllPasses.h"
2223 #include "llvm/Support/CommandLine.h"
135136 polly::initializePollyPasses(Registry);
136137 #endif
137138
139 // Turn on -preserve-bc-uselistorder by default, but let the command-line
140 // override it.
141 setPreserveBitcodeUseListOrder(true);
142
138143 cl::ParseCommandLineOptions(argc, argv,
139144 "LLVM automatic testcase reducer. See\nhttp://"
140145 "llvm.org/cmds/bugpoint.html"
1818 #include "llvm/AsmParser/Parser.h"
1919 #include "llvm/Bitcode/ReaderWriter.h"
2020 #include "llvm/IR/Module.h"
21 #include "llvm/IR/UseListOrder.h"
2122 #include "llvm/IR/Verifier.h"
2223 #include "llvm/Support/CommandLine.h"
2324 #include "llvm/Support/FileSystem.h"
8990 PrettyStackTraceProgram X(argc, argv);
9091 LLVMContext &Context = getGlobalContext();
9192 llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
93
94 // Turn on -preserve-bc-uselistorder by default, but let the command-line
95 // override it.
96 setPreserveBitcodeUseListOrder(true);
97
9298 cl::ParseCommandLineOptions(argc, argv, "llvm .ll -> .bc assembler\n");
9399
94100 // Parse the file now...
1818 #include "llvm/IR/IRPrintingPasses.h"
1919 #include "llvm/IR/LLVMContext.h"
2020 #include "llvm/IR/Module.h"
21 #include "llvm/IR/UseListOrder.h"
2122 #include "llvm/IRReader/IRReader.h"
2223 #include "llvm/IR/LegacyPassManager.h"
2324 #include "llvm/Support/CommandLine.h"
9697
9798 LLVMContext &Context = getGlobalContext();
9899 llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
100
101 // Turn on -preserve-bc-uselistorder by default, but let the command-line
102 // override it.
103 setPreserveBitcodeUseListOrder(true);
104
99105 cl::ParseCommandLineOptions(argc, argv, "llvm extractor\n");
100106
101107 // Use lazy loading, since we only care about selected global values.
1919 #include "llvm/IR/DiagnosticPrinter.h"
2020 #include "llvm/IR/LLVMContext.h"
2121 #include "llvm/IR/Module.h"
22 #include "llvm/IR/UseListOrder.h"
2223 #include "llvm/IR/Verifier.h"
2324 #include "llvm/IRReader/IRReader.h"
2425 #include "llvm/Support/CommandLine.h"
103104
104105 LLVMContext &Context = getGlobalContext();
105106 llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
107
108 // Turn on -preserve-bc-uselistorder by default, but let the command-line
109 // override it.
110 setPreserveBitcodeUseListOrder(true);
111
106112 cl::ParseCommandLineOptions(argc, argv, "llvm linker\n");
107113
108114 auto Composite = make_unique("llvm-link", Context);
2929 #include "llvm/IR/LLVMContext.h"
3030 #include "llvm/IR/LegacyPassNameParser.h"
3131 #include "llvm/IR/Module.h"
32 #include "llvm/IR/UseListOrder.h"
3233 #include "llvm/IR/Verifier.h"
3334 #include "llvm/IRReader/IRReader.h"
3435 #include "llvm/InitializePasses.h"
343344 polly::initializePollyPasses(Registry);
344345 #endif
345346
347 // Turn on -preserve-bc-uselistorder by default, but let the command-line
348 // override it.
349 setPreserveBitcodeUseListOrder(true);
350
346351 cl::ParseCommandLineOptions(argc, argv,
347352 "llvm .bc -> .bc modular optimizer and analysis printer\n");
348353