OpBuilder(Block) is specifically replaced with OpBuilder::atBlockEnd(Block);
This is to make insertion behavior clear due to there being no one
correct answer for which location in a block the default insertion
point should be.
Differential D77060
[MLIR] Replace OpBuilder(Block) with atBlockBegin and atBlockEnd tpopp on Mar 30 2020, 7:57 AM. Authored by
Details OpBuilder(Block) is specifically replaced with OpBuilder::atBlockEnd(Block); This is to make insertion behavior clear due to there being no one
Diff Detail
Event TimelineComment Actions Could we rather have static constructors that make it explicit what the insertion point is? Comment Actions Static builders (assuming you mean OpBuilder b = OpBuilder::Get(body, body->begin()) ) and an explicit insertion point are orthogonal right? Or do you mean OpBuilder::AtBlockBegin(body)? Comment Actions Indeed, I mean adding OpBuilder::atBlockBeginand OpBuilder::atBlockEnd and removing the default constructor. Deferring to @rriddle though :) Comment Actions I prefer the explicit version as well.
|
This description doesn't really describe this function.