This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Do not track calls to inlined intrinsics in IFI.
ClosedPublic

Authored by jeroen.dobbelaere on Jul 12 2021, 4:02 AM.

Details

Summary

Just like intrinsics are not tracked for IFI.InlinedCalls, they should not be tracked for IFI.InlinedCallSites.

In the current top-of-tree this change is a NFC, but the full restrict patches (D68484) potentially trigger an read-after-free
if intrinsics are also added to the InlindeCallSites, due to a late optimization potentially removing some of the inlined intrinsics.

Also see https://lists.llvm.org/pipermail/llvm-dev/2021-July/151722.html for a discussion about the problem.

Diff Detail

Event Timeline

jeroen.dobbelaere requested review of this revision.Jul 12 2021, 4:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 12 2021, 4:02 AM
aeubanks accepted this revision.Jul 12 2021, 8:33 AM

lgtm with nit

llvm/lib/Transforms/Utils/InlineFunction.cpp
2442

not strictly true, I'd say something like "calls intrinsic aren't inlineable".

This revision is now accepted and ready to land.Jul 12 2021, 8:33 AM
This revision was landed with ongoing or failed builds.Jul 13 2021, 1:36 AM
This revision was automatically updated to reflect the committed changes.
jeroen.dobbelaere marked an inline comment as done.Jul 13 2021, 1:37 AM