Commit 3e43205
authored
[CIR] Add restrict→noalias on non-builtin pointer params (#191483)
Map `restrict`-qualified pointer parameters to `noalias`, skipping
builtins (e.g. `printf`) where OGCG doesn't apply it. OGCG only adds
`noalias` from `restrict` through its calling-convention lowering path,
which builtins bypass, so the `!fd->getBuiltinID()` guard keeps CIR in
line.
`constructFunctionArgumentAttributes` now takes `targetDecl` so it can
look up `ParmVarDecl` qualifiers.
Updated `asm-label-inline-builtins.c` checks to reflect the new
`noalias` on the non-builtin `__vfprintf_chkieee128` call. New test:
`restrict-noalias.c` (CIR / LLVM / OGCG).
Made with [Cursor](https://cursor.com)1 parent 6d67286 commit 3e43205
3 files changed
Lines changed: 67 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
499 | | - | |
| 499 | + | |
| 500 | + | |
500 | 501 | | |
501 | 502 | | |
502 | 503 | | |
| |||
643 | 644 | | |
644 | 645 | | |
645 | 646 | | |
646 | | - | |
647 | | - | |
| 647 | + | |
| 648 | + | |
648 | 649 | | |
649 | 650 | | |
650 | 651 | | |
651 | | - | |
652 | | - | |
653 | 652 | | |
654 | 653 | | |
655 | 654 | | |
| |||
693 | 692 | | |
694 | 693 | | |
695 | 694 | | |
696 | | - | |
697 | | - | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
698 | 711 | | |
699 | 712 | | |
700 | 713 | | |
| |||
730 | 743 | | |
731 | 744 | | |
732 | 745 | | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
733 | 753 | | |
734 | 754 | | |
735 | 755 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
| 124 | + | |
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
0 commit comments