Commit e5c2db0
Using ptr as address payload's type
By design, address payload updating builtins does not create a new
address payload. If the payload's type is int, not pointer, the
updating builtin would be like the following:
(1) int addrP0 = createAddrPayload(...)
(2) v = block2d_read (addrP0, ....)
(3) int addrP1 = setBlockX(addrP0, ...)
In llvm IR, those addrP0 and addrP1 are different llvm values. And
it is legal for llvm to reorder instructions into { (1), (3), (2) },
which is incorrect as (2) should use the original addrP0, not the
updated one (addrP1).
For this reason, address payload should be of pointer type. With ptr
type, the above would be:
(1) int* addrP0 = createAddrPayload(...)
(2) v = block2d_read (addrP0, ....)
(3) setBlockX(addrP0, ...)
The llvm cannot reorder them as there are dependences b/w (2) and (3)
via ptr arg.
This PR makes address payload's type to be pointer type (int*).1 parent 77f8e09 commit e5c2db0
File tree
9 files changed
+203
-270
lines changed- IGC
- BiFModule/Implementation
- Compiler
- CISACodeGen
- Optimizer/OpenCLPasses/LSCFuncs
- tests/LSCFuncsResolution
- GenISAIntrinsics
9 files changed
+203
-270
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3390 | 3390 | | |
3391 | 3391 | | |
3392 | 3392 | | |
3393 | | - | |
3394 | 3393 | | |
3395 | 3394 | | |
3396 | 3395 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | 400 | | |
404 | 401 | | |
405 | 402 | | |
| |||
471 | 468 | | |
472 | 469 | | |
473 | 470 | | |
474 | | - | |
| 471 | + | |
475 | 472 | | |
476 | 473 | | |
477 | 474 | | |
| |||
1299 | 1296 | | |
1300 | 1297 | | |
1301 | 1298 | | |
1302 | | - | |
1303 | | - | |
1304 | | - | |
1305 | | - | |
1306 | | - | |
1307 | | - | |
1308 | | - | |
1309 | | - | |
1310 | | - | |
1311 | | - | |
1312 | | - | |
1313 | | - | |
1314 | | - | |
1315 | | - | |
1316 | | - | |
1317 | | - | |
1318 | | - | |
1319 | | - | |
1320 | | - | |
1321 | | - | |
1322 | | - | |
1323 | | - | |
1324 | | - | |
1325 | | - | |
1326 | | - | |
1327 | | - | |
1328 | | - | |
1329 | | - | |
1330 | | - | |
1331 | | - | |
1332 | | - | |
1333 | | - | |
1334 | | - | |
1335 | | - | |
1336 | | - | |
1337 | | - | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
1344 | | - | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
1348 | | - | |
1349 | | - | |
1350 | | - | |
1351 | | - | |
1352 | | - | |
1353 | | - | |
1354 | | - | |
1355 | | - | |
1356 | | - | |
1357 | | - | |
1358 | | - | |
1359 | | - | |
1360 | | - | |
1361 | | - | |
1362 | | - | |
1363 | | - | |
1364 | | - | |
1365 | | - | |
1366 | | - | |
1367 | | - | |
1368 | | - | |
1369 | | - | |
1370 | | - | |
1371 | | - | |
1372 | | - | |
1373 | | - | |
1374 | | - | |
1375 | 1299 | | |
1376 | 1300 | | |
1377 | 1301 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | 321 | | |
330 | 322 | | |
331 | 323 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22848 | 22848 | | |
22849 | 22849 | | |
22850 | 22850 | | |
22851 | | - | |
22852 | 22851 | | |
22853 | 22852 | | |
22854 | 22853 | | |
| |||
22857 | 22856 | | |
22858 | 22857 | | |
22859 | 22858 | | |
22860 | | - | |
| 22859 | + | |
22861 | 22860 | | |
22862 | 22861 | | |
22863 | 22862 | | |
| |||
22872 | 22871 | | |
22873 | 22872 | | |
22874 | 22873 | | |
22875 | | - | |
| 22874 | + | |
22876 | 22875 | | |
22877 | 22876 | | |
22878 | | - | |
| 22877 | + | |
22879 | 22878 | | |
22880 | 22879 | | |
22881 | 22880 | | |
| |||
22888 | 22887 | | |
22889 | 22888 | | |
22890 | 22889 | | |
22891 | | - | |
| 22890 | + | |
22892 | 22891 | | |
22893 | 22892 | | |
22894 | 22893 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1481 | 1481 | | |
1482 | 1482 | | |
1483 | 1483 | | |
1484 | | - | |
1485 | | - | |
| 1484 | + | |
1486 | 1485 | | |
1487 | 1486 | | |
1488 | 1487 | | |
| |||
1509 | 1508 | | |
1510 | 1509 | | |
1511 | 1510 | | |
1512 | | - | |
1513 | 1511 | | |
1514 | 1512 | | |
1515 | 1513 | | |
| |||
0 commit comments