mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
The `SSAConstruction.getNewIRVariable` was very slow on Wireshark. This was probably because it couldn't join on multiple columns simultaneously. Instead of improving the join, I observed that the `TIRVariable` type was the same between all three IR stages except for a few occurrences of `FunctionIR` that could easily be changed to `Function`. By sharing `TIRVariable` between all the stages, we avoid recomputing it and translating it between every stage, turning the slow `getNewIRVariable` predicate into a no-op. This change means that later stages of the IR can't introduce new variables, but that was already the case because `config/identical-files.json` forced all three `IRVariable.qll` files to be identical.