This is an archive of the discontinued LLVM Phabricator instance.

[DCE] Always get TargetLibraryInfo
ClosedPublic

Authored by aeubanks on Nov 13 2020, 11:35 PM.

Details

Summary

I don't see any reason not to unconditionally retrieve TLI, it's fairly
cheap.

Fixes calls-errno.ll under NPM.

Diff Detail

Event Timeline

aeubanks created this revision.Nov 13 2020, 11:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 13 2020, 11:35 PM
aeubanks requested review of this revision.Nov 13 2020, 11:35 PM
aeubanks planned changes to this revision.Nov 15 2020, 11:15 AM

actually the legacy PM does the same thing, and also opt registers TLI analysis, will take another look

aeubanks updated this revision to Diff 305383.Nov 15 2020, 11:40 AM

also change legacy pass

aeubanks retitled this revision from [DCE] Always get TargetLibraryAnalysis to [DCE] Always get TargetLibraryInfo.Nov 15 2020, 11:40 AM
aeubanks edited the summary of this revision. (Show Details)

looks like opt registers its own TargetLibraryAnalysis but that doesn't count as running it, so getCachedResult returns null

asbirlea accepted this revision.Nov 17 2020, 8:23 PM
This revision is now accepted and ready to land.Nov 17 2020, 8:23 PM
This revision was landed with ongoing or failed builds.Nov 17 2020, 8:41 PM
This revision was automatically updated to reflect the committed changes.