mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
The `SSAConstruction::Cached::getInstructionOperand` predicate took 1m27s on a postgres snapshot before this change and was the slowest predicate in SSAIR. It now takes 4.5s. The slowdown was caused by its use of `getUnmodeledDefinitionInstruction`, which got inlined into a place where join orderer had little choice but to join the `MkInstruction` relation with itself, creating a large intermediate relation. I've added `pragma[noinline]` to `getUnmodeledDefinitionInstruction` and also to similar predicates that are likely to cause the same problem in the future.