This is an archive of the discontinued LLVM Phabricator instance.

[CallSite removal] Remove CallSite uses from InstCombine.
ClosedPublic

Authored by craig.topper on Jan 30 2019, 7:49 PM.

Diff Detail

Event Timeline

craig.topper created this revision.Jan 30 2019, 7:49 PM
craig.topper marked an inline comment as done.Jan 30 2019, 7:51 PM
craig.topper added inline comments.
lib/Transforms/InstCombine/InstCombineCalls.cpp
4263

Wasn't sure what to do here. isMustTailCall is inlined in CallSite, but it can't be inlined in CallBase.

Minor nits. I've been using Call instead of CB because when there is a nice word instead of initialism, I prefer it for readability. But that's up to you really.

lib/Transforms/InstCombine/InstCombineCalls.cpp
3984

A const CallSite isn't actually the same as a const CallBase & -- that would be an ImmutableCallSite.

Still, if the const works here, great.

4263

You can just define it out-of-line. I don't think these *need* to be inlined, and in Instructions.cpp we have all the types available.

4530

Can use clang-format here. Also good candidate for auto *NestF.

chandlerc accepted this revision.Jan 30 2019, 8:00 PM

(also LGTM with the updates above and any renaming you want to do)

This revision is now accepted and ready to land.Jan 30 2019, 8:00 PM
This revision was automatically updated to reflect the committed changes.