This is an archive of the discontinued LLVM Phabricator instance.

[GISel]: Add MachineIRBuilder support for passing in Flags while building instructions
ClosedPublic

Authored by aditya_nandakumar on Dec 10 2018, 8:56 AM.

Details

Summary

Add the ability to pass in flags to buildInstr calls. Currently no validation is performed but that can be easily performed based on the opcode (if necessary).

Diff Detail

Repository
rL LLVM

Event Timeline

paquette added inline comments.Dec 10 2018, 10:05 AM
lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
797

The other instances of this have

Optional<unsigned> Flags = None

Should this also have that?

aditya_nandakumar marked an inline comment as done.Dec 10 2018, 11:04 AM
aditya_nandakumar added inline comments.
lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
797

I believe default parameter values are only allowed only once during the declaration (it's done in MachineIRBuilder.h) .

This revision is now accepted and ready to land.Dec 10 2018, 11:13 AM

Submitted in r348893. Thanks for reviewing.