reactorlabs / rir

GNU General Public License v2.0
62 stars 18 forks source link

ScopeResolution: unnecessary execution of code #1274

Open skrynski opened 4 months ago

skrynski commented 4 months ago

The code here will run on every iteration of this pass. Even if it does not change the 'changed' flag , the method fromContext should not be invoked more than is required.

https://github.com/reactorlabs/rir/blob/0c2896fbc82f505e61ed8db416e113905d8f2237/rir/src/compiler/opt/scope_resolution.cpp#L317