Skip to content

[opt] Remove reference to new PM from description of optimization level flags #65169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions llvm/tools/opt/opt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,32 +149,30 @@ static cl::opt<bool>
StripNamedMetadata("strip-named-metadata",
cl::desc("Strip module-level named metadata"));



static cl::opt<bool>
OptLevelO0("O0", cl::desc("Optimization level 0. Similar to clang -O0. "
"Use -passes='default<O0>' for the new PM"));
"Same as -passes='default<O0>'"));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aeubanks: Me and @karka228 is testing the PullRequest funcitonality a bit with this simple adjustment of the options descriptions. So I tried out adding you as an additional reviewer.

Given the rules we got for mixing -O and -passes this new wording will highlight that -O is equivalent to the longer form using -passes. So I think this is a nice improvement.


static cl::opt<bool>
OptLevelO1("O1", cl::desc("Optimization level 1. Similar to clang -O1. "
"Use -passes='default<O1>' for the new PM"));
"Same as -passes='default<O1>'"));

static cl::opt<bool>
OptLevelO2("O2", cl::desc("Optimization level 2. Similar to clang -O2. "
"Use -passes='default<O2>' for the new PM"));
"Same as -passes='default<O2>'"));

static cl::opt<bool>
OptLevelOs("Os", cl::desc("Like -O2 but size-conscious. Similar to clang "
"-Os. Use -passes='default<Os>' for the new PM"));
"-Os. Same as -passes='default<Os>'"));

static cl::opt<bool> OptLevelOz(
"Oz",
cl::desc("Like -O2 but optimize for code size above all else. Similar to "
"clang -Oz. Use -passes='default<Oz>' for the new PM"));
"clang -Oz. Same as -passes='default<Oz>'"));

static cl::opt<bool>
OptLevelO3("O3", cl::desc("Optimization level 3. Similar to clang -O3. "
"Use -passes='default<O3>' for the new PM"));
"Same as -passes='default<O3>'"));

static cl::opt<unsigned> CodeGenOptLevel(
"codegen-opt-level",
Expand Down