Page MenuHomePhabricator

[TTI] Expose isNoopAddrSpaceCast from TLI. [SROA] Teach SROA to recognize no-op addrspacecast.
AbandonedPublic

Authored by hliao on Jun 11 2020, 9:53 AM.

Details

Reviewers
arsenm
chandlerc
Summary

So far, SROA could only handle convertible pointer pairs if they are in the
same address space. Just like no-op cast, a no-op addrspacecast also changes
no bits, it could also be used to convert pointer pairs from different address
spaces. That benefits infer-address-spaces pass to propagate address spaces.

Diff Detail

Event Timeline

hliao created this revision.Jun 11 2020, 9:53 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 11 2020, 9:53 AM
hliao updated this revision to Diff 270177.Jun 11 2020, 10:15 AM

Revise the formatting.

Updating D81670: [TTI] Expose isNoopAddrSpaceCast from TLI.

[SROA] Teach SROA to recognize no-op addrspacecast.

We should instead allow bitcast to perform no-op addrspacecasts

hliao added a comment.Jun 11 2020, 1:02 PM

We should instead allow bitcast to perform no-op addrspacecasts

That may be a little bit challenging as so far no-op addrspacecast is target-specific. There may be no TTI available when bitcast is constructed.

We should instead allow bitcast to perform no-op addrspacecasts

That may be a little bit challenging as so far no-op addrspacecast is target-specific. There may be no TTI available when bitcast is constructed.

Yes, that is the point. You don't need TTI to use it. Addrspace bitcast will be just a dumb bit reinterpret, not something that may change the value like addrspacecast

hliao abandoned this revision.Jun 25 2020, 8:42 PM