Commit c27db779 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Push back the performance regression

The previous changes increased -O execution time, showing up mostly in
definedness analysis and type analysis

I guess that makes sense, since we're adding additional symbols that
we then have to analyze.  We should make the analyses faster in general.

For now, just eliminate some of the unnecessary symbols that we're generating.
We only need to create the NONZERO temporary if we need to care about exception
state, so if there's no exception handler, just skip the temporary and generate
a nested structure.
parent c579c976
......@@ -137,6 +137,11 @@ private:
call->lineno = e->lineno;
call->col_offset = e->col_offset;
// Simple optimization: allow the generation of nested nodes if there isn't a
// current exc handler.
if (exc_handlers.size() == 0)
return call;
auto name = nodeName(e);
pushAssign(name, call);
return makeName(name, AST_TYPE::Load);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment