Skip to content

[Strings] Add a string-builtins feature, and lift/lower automatically when enabled #7601

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

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
work
  • Loading branch information
kripken committed May 15, 2025
commit c6366855530b3b540b2bdbedf17e776208c3738f
6 changes: 3 additions & 3 deletions src/pass.h
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,10 @@ struct PassRunner {
// By default, we do not know if we are running first in the ordering of
// optimization passes, or last - we could be anywhere.
struct Ordering {
bool first = false;
bool last = false;
bool first;
bool last;
};
static const Ordering UnknownOrdering;
static constexpr Ordering UnknownOrdering = {false, false};

// Adds the default set of optimization passes; this is what -O does.
//
Expand Down
8 changes: 3 additions & 5 deletions src/tools/optimization-options.h
Original file line number Diff line number Diff line change
Expand Up @@ -400,13 +400,11 @@ struct OptimizationOptions : public ToolOptions {

// Find the first and last default opt passes, so we can tell them they are
// first/last.
Index firstDefault = -1;
Index lastDefault = -1;
Index firstDefault = passes.size();
Index lastDefault = passes.size();
for (Index i = 0; i < passes.size(); i++) {
if (passes[i].name == DEFAULT_OPT_PASSES) {
if (firstDefault == -1) {
firstDefault = i;
}
firstDefault = std::min(firstDefault, i);
lastDefault = i;
}
}
Expand Down