Commit b785c99
authored
Avoid merging globals residing in different comdats (#172835)
The global-merge pass may merge globals residing in different comdat
groups, which may later confuse linker if section GC is being used. In
particular this may happen when merging instrumentation profiler
counters when their corresponding __llvm_prf_cnts sections are being
merged into a single one and moved out of a comdat group, containing
__llvm_prf_cnts and __llvm_prf_data sections. After that __llvm_prf_data
section is becoming orphaned and is garbage-collected when --gc-sections
linker flag is used.1 parent bbd60c0 commit b785c99
File tree
3 files changed
+27
-7
lines changed- llvm
- lib/CodeGen
- test
- CodeGen/AArch64
- Transforms/GlobalMerge
3 files changed
+27
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
562 | 562 | | |
563 | 563 | | |
564 | 564 | | |
| 565 | + | |
565 | 566 | | |
566 | 567 | | |
567 | 568 | | |
| |||
677 | 678 | | |
678 | 679 | | |
679 | 680 | | |
680 | | - | |
| 681 | + | |
| 682 | + | |
681 | 683 | | |
682 | 684 | | |
683 | 685 | | |
| |||
735 | 737 | | |
736 | 738 | | |
737 | 739 | | |
738 | | - | |
| 740 | + | |
739 | 741 | | |
740 | | - | |
| 742 | + | |
741 | 743 | | |
742 | | - | |
| 744 | + | |
743 | 745 | | |
744 | 746 | | |
745 | 747 | | |
746 | 748 | | |
747 | 749 | | |
748 | 750 | | |
749 | 751 | | |
750 | | - | |
| 752 | + | |
751 | 753 | | |
752 | 754 | | |
753 | 755 | | |
754 | | - | |
| 756 | + | |
755 | 757 | | |
756 | 758 | | |
757 | 759 | | |
758 | 760 | | |
759 | | - | |
| 761 | + | |
760 | 762 | | |
761 | 763 | | |
762 | 764 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments