This is an archive of the discontinued LLVM Phabricator instance.

[LoopPeel] Use llvm.experimental.noalias.scope.decl for duplicating noalias metadata as needed.
ClosedPublic

Authored by jeroen.dobbelaere on Jan 27 2021, 10:23 AM.

Details

Summary

The reduction of a sanitizer build failure when enabling the dominance check (D95335) showed that loop peeling also needs to take care of scope duplication, just like loop unrolling (D92887).

Diff Detail

Event Timeline

jeroen.dobbelaere requested review of this revision.Jan 27 2021, 10:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 27 2021, 10:23 AM
nikic added inline comments.Jan 27 2021, 12:01 PM
llvm/lib/Transforms/Utils/LoopPeel.cpp
525

Might make sense to do this once and pass into cloneLoopBlocks?

llvm/test/Transforms/LoopUnroll/peel-loop-noalias-scope-decl.ll
3

I don't think these --verify are needed. opt verifies before and after by default.

llvm/lib/Transforms/Utils/LoopPeel.cpp
525

Yes, that definitely makes sense !

Adapted to comments.

jeroen.dobbelaere marked 2 inline comments as done.Jan 27 2021, 11:27 PM
nikic accepted this revision.Jan 28 2021, 1:02 PM

LGTM

llvm/lib/Transforms/Utils/LoopPeel.cpp
552

nit: ext -> Ext

This revision is now accepted and ready to land.Jan 28 2021, 1:02 PM
jeroen.dobbelaere marked an inline comment as done.Feb 1 2021, 1:04 AM
nikic added a comment.Feb 1 2021, 1:41 AM

@jeroen.dobbelaere Can you please also re-enable the verifier flag (assuming you're not aware of further issues right now)?

@jeroen.dobbelaere Can you please also re-enable the verifier flag (assuming you're not aware of further issues right now)?

That's the plan ;) Just leaving some time for the bots.