This is an archive of the discontinued LLVM Phabricator instance.

[NFC][CodeGen] Modify the type element of TailCalls to simplify the dupRetToEnableTailCallOpts()
ClosedPublic

Authored by ZhangKang on Jul 18 2019, 12:43 AM.

Details

Summary

Now, I am trying to improve the function dupRetToEnableTailCallOpts() to do more generate optimization not only for tail call.

When I do this work, I find the old code can be simplified to define the element type of TailCalls as BasicBlock not CallInst.

Diff Detail

Event Timeline

ZhangKang created this revision.Jul 18 2019, 12:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2019, 12:43 AM
Herald added a subscriber: wuzish. · View Herald Transcript
jsji accepted this revision.Aug 1 2019, 11:27 AM

LGTM.

llvm/lib/CodeGen/CodeGenPrepare.cpp
2061

Can this be a range based for?

This revision is now accepted and ready to land.Aug 1 2019, 11:27 AM
ZhangKang updated this revision to Diff 212955.Aug 1 2019, 8:05 PM
ZhangKang edited the summary of this revision. (Show Details)

Use the for range loop.

ZhangKang marked 2 inline comments as done.Aug 1 2019, 8:05 PM
ZhangKang added inline comments.
llvm/lib/CodeGen/CodeGenPrepare.cpp
2061

Done.

This revision was automatically updated to reflect the committed changes.
ZhangKang marked an inline comment as done.