Page MenuHomePhabricator

[TargetLowering] Remove optional arguments passing to makeLibCall
AcceptedPublic

Authored by shiva0217 on Tue, Aug 6, 2:17 AM.

Details

Summary

The patch introduces MakeLibCallOptions struct as suggested by @efriedma on D65497.
The struct contains bits to pass argument and return value flags to makeLibCall. The patch should not has any functionality changing.

Diff Detail

Repository
rL LLVM

Event Timeline

shiva0217 created this revision.Tue, Aug 6, 2:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptTue, Aug 6, 2:17 AM
efriedma added inline comments.Thu, Aug 8, 3:58 PM
include/llvm/CodeGen/TargetLowering.h
3548

LLVM standard style is that all type names are capitalized.

3550

Does it really make sense to have these two big structs here, when makeLibCall itself only uses a few bits from them?

lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
2478

The "irrelevant" is supposed to be attached to whether the result is signed; an integer that's too large to fit in a register probably isn't going to get extended on any target.

It isn't really a useful comment, though; I'd just get rid of it.

shiva0217 marked 3 inline comments as done.Thu, Aug 8, 11:24 PM
shiva0217 added inline comments.
include/llvm/CodeGen/TargetLowering.h
3548

Ok, Thanks for your kind reminder.

3550

You're right. It seems we only need to define the bits will be used for makeLibCall. I'll update the structure, thanks.

lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
2478

I'll remove the comment, thanks.

shiva0217 updated this revision to Diff 214308.Thu, Aug 8, 11:30 PM
shiva0217 edited the summary of this revision. (Show Details)

Only define the bits will be used for makelibCall in MakeLibCallOptions struct.

lenary edited reviewers, added: luismarques; removed: lenary.Mon, Aug 12, 7:53 AM
luismarques accepted this revision.Thu, Aug 15, 12:54 PM

LGTM with the latest changes.

This revision is now accepted and ready to land.Thu, Aug 15, 12:54 PM