mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 21:55:39 +08:00
[BOLT] Enable lite mode by default with relocations
Summary: When optimizing input with relocations, make it faster and less memory-hungry with lite mode. (cherry picked from FBD24374241)
This commit is contained in:
@@ -1706,7 +1706,8 @@ void RewriteInstance::adjustCommandLineOptions() {
|
||||
opts::AlignText = BC->PageAlign;
|
||||
}
|
||||
|
||||
if (opts::Lite.getNumOccurrences() == 0 && !BC->HasRelocations) {
|
||||
if (BC->isX86() && opts::Lite.getNumOccurrences() == 0 &&
|
||||
!opts::StrictMode && !opts::UseOldText) {
|
||||
opts::Lite = true;
|
||||
}
|
||||
|
||||
@@ -1716,7 +1717,7 @@ void RewriteInstance::adjustCommandLineOptions() {
|
||||
opts::UseOldText = false;
|
||||
}
|
||||
|
||||
if (opts::StrictMode && opts::Lite) {
|
||||
if (opts::Lite && opts::StrictMode) {
|
||||
errs() << "BOLT-ERROR: -strict and -lite cannot be used at the same time\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user