[all-commits] [llvm/llvm-project] a9d4dd: [MergeFuncs/CFI] Ensure all type metadata is propo...

Oskar Wirga via All-commits all-commits at lists.llvm.org
Wed Apr 10 15:37:48 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a9d4ddd98a0bc495126027122fdca751b6841ceb
      https://github.com/llvm/llvm-project/commit/a9d4ddd98a0bc495126027122fdca751b6841ceb
  Author: Oskar Wirga <oskar.wirga at gmail.com>
  Date:   2024-04-10 (Wed, 10 Apr 2024)

  Changed paths:
    M llvm/lib/Transforms/IPO/MergeFunctions.cpp
    M llvm/test/Transforms/MergeFunc/cfi-thunk-merging.ll

  Log Message:
  -----------
  [MergeFuncs/CFI] Ensure all type metadata is propogated for CFI (#88218)

I noticed that we weren't propagating ALL type metadata that was
attached to CFI functions:

# BEFORE

```
; Function Attrs: minsize nounwind optsize ssp uwtable(sync)
define internal void @foo(ptr nocapture noundef readonly %0) #0 !dbg !62311 !type !34028 !type !34029 !type !34030
... fn merging
; Function Attrs: minsize nounwind optsize ssp uwtable(sync)
define internal void @foo(ptr nocapture noundef readonly %0) #0 !type !34028
```

# AFTER

```
; Function Attrs: minsize nounwind optsize ssp uwtable(sync)
define internal void @foo(ptr nocapture noundef readonly %0) #0 !dbg !62311 !type !34028 !type !34029 !type !34030
... fn merging
; Function Attrs: minsize nounwind optsize ssp uwtable(sync)
define internal void @foo(ptr nocapture noundef readonly %0) #0 !type !type !34028 !type !34029 !type !34030
```

This patch makes sure that the entire vector of metadata is copied over.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list