DescriptionSubzero. Introduces a new LoweringContext::insert() method.
Emitting an instruction in Subzero requires a fair amount of
boilerplated code:
Context.insert(<InstType>::create(Func, <Args>...));
The ordeal is worse if one needs access to the recently create
instructionL
auto *Instr = <InstType>::create(Func, <Args>...);
Context.insert(Instr);
Instr->...
This CL introduces a new LoweringContext::insert() method:
template <<InstType>, <Args>...>
<InstType> *LoweringContext::insert(<Args>...) {
auto *New = Inst::create(Node.Cfg, <Args>...);
insert(New);
return New;
}
This is essentially a syntatic sugar that allows instructions to be
emitted by using
Context.insert<InstType>(<Args>...);
The compiler should be able to inline the calls (and get rid of the
return value) when appropriate.
make bloat reviews a small increase in translator code size
BUG=
R=sehr@chromium.org, stichnot@chromium.org
Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=1d937a8e35b7ae51ee64c32f8f34d51ba33498f4
Patch Set 1 : ARM32 Proof of concept #Patch Set 2 : git pull #Patch Set 3 : Change other uses of Context.insert. #Patch Set 4 : More changes #
Messages
Total messages: 8 (3 generated)
|