mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Just like `TInstruction` is cached to prevent re-numbering its tuples in every IR query, I think `TOperand` should be cached too. I tested it on the small comdb2 snapshot, where it only saves one second of work when running a second IR query, but the savings should grow when snapshots are larger and when there are more IR queries in a suite. Tuple numbering is mildly quadratic, so it should be good to avoid repeating it. Adding these annotations adds three cached stages to the existing four cached stages of the IR. The new cached stages are small and do not appear to repeat any work from the other stages, so I see no advantage to merging them with the existing stages.