This is an archive of the discontinued LLVM Phabricator instance.

GuardWidening: Pass through AssumptionCache
ClosedPublic

Authored by arsenm on Sep 19 2022, 4:37 PM.

Details

Diff Detail

Unit TestsFailed

Event Timeline

arsenm created this revision.Sep 19 2022, 4:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 19 2022, 4:37 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
arsenm requested review of this revision.Sep 19 2022, 4:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 19 2022, 4:37 PM
Herald added a subscriber: wdng. · View Herald Transcript
mkazantsev added inline comments.Sep 19 2022, 10:35 PM
llvm/lib/Transforms/Scalar/GuardWidening.cpp
120

Looks like it's never nullptr. Change to &AC?

What's the motivation for this?

What's the motivation for this?

I ran into a compile time regression and found isDereferenceableAndAlignedPointer is 2x slower without an AssumptionCache, so I'm just threading through the argument for it everywhere

What's the motivation for this?

I ran into a compile time regression and found isDereferenceableAndAlignedPointer is 2x slower without an AssumptionCache, so I'm just threading through the argument for it everywhere

2x slower if the context instruction is passed without the cache

arsenm updated this revision to Diff 461559.Sep 20 2022, 6:55 AM
arsenm marked an inline comment as done.

Change to reference

mkazantsev accepted this revision.Sep 26 2022, 2:39 AM

Ok, makes sense, thanks.

This revision is now accepted and ready to land.Sep 26 2022, 2:39 AM