This is an archive of the discontinued LLVM Phabricator instance.

[PGO] Update ICP pass for recent byval type changes
ClosedPublic

Authored by rnk on Jun 26 2019, 1:59 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

rnk created this revision.Jun 26 2019, 1:59 PM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: hiraditya. · View Herald Transcript
t.p.northover added inline comments.Jun 26 2019, 2:09 PM
llvm/lib/Transforms/Utils/CallPromotionUtils.cpp
419–420 ↗(On Diff #206743)

It'd be better if we could copy/paste the source byval type.

We'd probably have to handle an unspecified byval type anyway; but it's the difference between code that will carry on working forever and we can prune later, and code that will need modifying again before opaque pointers are a thing.

I'm not asking you to do this, Reid; it's late here but I'll try to come up with a concrete diff tomorrow.

rnk updated this revision to Diff 207034.Jun 28 2019, 11:07 AM
rnk marked an inline comment as done.

Prepare for a future with no poitnee types by checking if a byval type is available. If there is a pointee type and the IR is valid, this will be identical to FormalTy.

rnk added a comment.Jun 28 2019, 11:08 AM

Looks good to me. I guess I applied those changes to this diff.

rnk added a comment.Jul 1 2019, 3:36 PM

I see you haven't approved this patch, but I'll go ahead and land it later today. I'll assume you approve of this change since you wrote it. :)

This revision was not accepted when it landed; it landed in state Needs Review.Jul 1 2019, 3:44 PM
This revision was automatically updated to reflect the committed changes.