forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2a0faed
committed
Add expression compilation support to LLVM JIT provider.
In addition to the interpretation of expressions (which backevaluation of WHERE clauses, target list projection, aggregatestransition values etc) support compiling expressions to native code,using the infrastructure added in earlier commits.To avoid duplicating a lot of code, only support emitting code forcases that are likely to be performance critical. For expression stepsthat aren't deemed that, use the existing interpreter.The generated code isn't great - some architectural changes arerequired to address that. But this already yields a significantspeedup for some analytics queries, particularly with WHERE clausesfiltering a lot, or computing multiple aggregates.Author: Andres FreundTested-By: Thomas MunroDiscussion:https://postgr.es/m/20170901064131.tazjxwus3k2w3ybh@alap3.anarazel.deDisable JITing for VALUES() nodes.VALUES() nodes are only ever executed once. This is primarily helpfulfor debugging, when forcing JITing even for cheap queries.Author: Andres FreundDiscussion:https://postgr.es/m/20170901064131.tazjxwus3k2w3ybh@alap3.anarazel.de1 parent7ced1d1 commit2a0faed
File tree
13 files changed
+2890
-3
lines changed- src
- backend
- executor
- jit
- llvm
- optimizer/plan
- utils
- fmgr
- misc
- include
- jit
- tools/pgindent
13 files changed
+2890
-3
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
36 | 36 |
| |
37 | 37 |
| |
38 | 38 |
| |
| 39 | + | |
39 | 40 |
| |
40 | 41 |
| |
41 | 42 |
| |
| |||
623 | 624 |
| |
624 | 625 |
| |
625 | 626 |
| |
| 627 | + | |
| 628 | + | |
| 629 | + | |
626 | 630 |
| |
627 | 631 |
| |
628 | 632 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
| 28 | + | |
28 | 29 |
| |
29 | 30 |
| |
30 | 31 |
| |
| |||
98 | 99 |
| |
99 | 100 |
| |
100 | 101 |
| |
| 102 | + | |
101 | 103 |
| |
102 | 104 |
| |
103 | 105 |
| |
| |||
128 | 130 |
| |
129 | 131 |
| |
130 | 132 |
| |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
131 | 140 |
| |
| 141 | + | |
132 | 142 |
| |
133 | 143 |
| |
134 | 144 |
| |
|
Lines changed: 37 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
| 27 | + | |
27 | 28 |
| |
28 | 29 |
| |
29 | 30 |
| |
| |||
35 | 36 |
| |
36 | 37 |
| |
37 | 38 |
| |
| 39 | + | |
38 | 40 |
| |
39 | 41 |
| |
40 | 42 |
| |
| |||
143 | 145 |
| |
144 | 146 |
| |
145 | 147 |
| |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
146 | 183 |
| |
147 | 184 |
| |
148 | 185 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
42 |
| - | |
| 42 | + | |
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
|
Lines changed: 64 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| 17 | + | |
17 | 18 |
| |
18 | 19 |
| |
19 | 20 |
| |
| |||
114 | 115 |
| |
115 | 116 |
| |
116 | 117 |
| |
| 118 | + | |
117 | 119 |
| |
118 | 120 |
| |
119 | 121 |
| |
| |||
339 | 341 |
| |
340 | 342 |
| |
341 | 343 |
| |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
342 | 406 |
| |
343 | 407 |
| |
344 | 408 |
| |
|
0 commit comments
Comments
(0)