[AFDO] Merge function attributes after inlining
authorKazu Hirata <kazu@google.com>
Fri, 9 Jul 2021 23:47:12 +0000 (16:47 -0700)
committerKazu Hirata <kazu@google.com>
Fri, 9 Jul 2021 23:47:12 +0000 (16:47 -0700)
commit49d66d9f9f495caeb17de823c72f1459be819d9a
treee9ec326c7f51bd7a07d5d1ed33e6637855587f1a
parent5f306feb4d3ff41b5c48e753067de3c93ca4240f
[AFDO] Merge function attributes after inlining

This patch teaches the sample profile loader to merge function
attributes after inlining functions.

Without this patch, the compiler could inline a function requiring the
512-bit vector width into its caller without merging function
attributes, triggering a failure during instruction selection.

Differential Revision: https://reviews.llvm.org/D105729
llvm/lib/Transforms/IPO/SampleProfile.cpp
llvm/test/Transforms/SampleProfile/Inputs/merge-function-attributes.afdo [new file with mode: 0644]
llvm/test/Transforms/SampleProfile/merge-function-attributes.ll [new file with mode: 0644]