[PATCH] D87301: [IRSim][IROutliner] Adding consistent function attribute merging
Andrew Litteken via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 8 12:34:30 PDT 2020
AndrewLitteken added inline comments.
================
Comment at: llvm/lib/IR/Attributes.cpp:2077
+ setOR<UseSampleProfileAttr>(Base, ToMerge);
+}
----------------
jdoerfert wrote:
> AndrewLitteken wrote:
> > jdoerfert wrote:
> > > Are we sure we want/need to duplicate this here in addition to the merge rules at the end of `llvm/include/llvm/IR/Attributes.td` ?
> > We can probably just call `mergeFnAttrs` from this function and merge the attributes from SanitizeAddress separately.
> Hm, why are the "SanitizeAddress" address ones not handled in `mergeFnAttrs` as well? Doesn't the inliner need to know about them too? I would prefer any way we avoid a second list, that is doomed to cause problems.
I think because it uses the `areInlineCompatible`, like above, where I'm merging them for combining two outlined functions functions together and make sure that the information isn't lost.
That said, I'm not super familiar with these attributes, so this may not be considered safe.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87301/new/
https://reviews.llvm.org/D87301
More information about the llvm-commits
mailing list