This is an archive of the discontinued LLVM Phabricator instance.

[globalisel] Rename G_GEP to G_PTR_ADD
ClosedPublic

Authored by dsanders on Nov 1 2019, 1:19 PM.

Details

Summary

G_GEP is rather poorly named. It's a simple pointer+scalar addition and
doesn't support any of the complexities of getelementptr. I therefore
propose that we rename it. There's a G_PTR_MASK so let's follow that
convention and go with G_PTR_ADD

Event Timeline

dsanders created this revision.Nov 1 2019, 1:19 PM
rovka accepted this revision.Nov 4 2019, 1:05 AM

LGTM.

This revision is now accepted and ready to land.Nov 4 2019, 1:05 AM

Thanks.

I realized I missed a couple things in this patch this morning:

  • Filenames containing 'gep'
  • Functions named buildGep() and similar

I'll fix both of this this before pushing

... this this ...

*sigh* More typos

Thanks.

I realized I missed a couple things in this patch this morning:

  • Filenames containing 'gep'
  • Functions named buildGep() and similar

I'll fix both of this this before pushing

If you're fixing names of instructions, that buildUndef doesn't match the G_IMPLICIT_DEF name has bothered me. I'm not sure which should be renamed, especially since freeze seems to be happening

This revision was automatically updated to reflect the committed changes.

Thanks.

I realized I missed a couple things in this patch this morning:

  • Filenames containing 'gep'
  • Functions named buildGep() and similar

I'll fix both of this this before pushing

If you're fixing names of instructions, that buildUndef doesn't match the G_IMPLICIT_DEF name has bothered me. I'm not sure which should be renamed

Probably buildUndef() should change to buildImplicitDef(). I'm going to leave it for the moment though just to let this change flow down to our downstream repos before I do another big rename

especially since freeze seems to be happening

I'm not sure what you're referring to here.

Thanks.

I realized I missed a couple things in this patch this morning:

  • Filenames containing 'gep'
  • Functions named buildGep() and similar

I'll fix both of this this before pushing

If you're fixing names of instructions, that buildUndef doesn't match the G_IMPLICIT_DEF name has bothered me. I'm not sure which should be renamed

Probably buildUndef() should change to buildImplicitDef(). I'm going to leave it for the moment though just to let this change flow down to our downstream repos before I do another big rename

especially since freeze seems to be happening

I'm not sure what you're referring to here.

The freeze instruction was recently committed, and I thought the plan was to eventually remove undef. Stricter rules are necessary at least for frozen undef than I think are implied by G_IMPLICIT_DEF