This is an archive of the discontinued LLVM Phabricator instance.

[SROA] Add support for non-integral pointers
ClosedPublic

Authored by sanjoy on Apr 18 2017, 5:14 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

sanjoy created this revision.Apr 18 2017, 5:14 PM
chandlerc requested changes to this revision.Apr 30 2017, 8:50 PM

relatively minor stuff here

lib/Transforms/Scalar/SROA.cpp
1640–1641 ↗(On Diff #95659)

I think these need to be in separate tests with comments, otherwise its too confusing. I thought at first this was a bug because we did *NewTy*->isIntegerTy() and isNonIntegralPointerType(*OldTy*)... But I think that is actually correct?

A comment here saying "if we can convert from pointer to integer" and then "the reverse conversion from integer to pointer" on two separate tests would be easier to read I think.

test/Transforms/SROA/non-integral-pointers.ll
1–4 ↗(On Diff #95659)

Comment to help the reader out by explaining what this is testing and where this shows up in the datalayout?

This revision now requires changes to proceed.Apr 30 2017, 8:50 PM
sanjoy updated this revision to Diff 97359.May 1 2017, 4:07 PM
sanjoy edited edge metadata.
sanjoy marked 2 inline comments as done.
  • address review
reames added a subscriber: reames.May 30 2017, 4:17 PM

Chandler, is this ready to go in? Or do you want to see further changes?

loladiro accepted this revision.Jun 10 2017, 3:10 PM

LGTM, FWIW. I encountered this issue as well and this seems like the correct solution.

This revision was automatically updated to reflect the committed changes.