16 #define GEN_PASS_DEF_STRIPDEBUGINFO
17 #include "mlir/Transforms/Passes.h.inc"
23 struct StripDebugInfo :
public impl::StripDebugInfoBase<StripDebugInfo> {
24 void runOnOperation()
override;
28 void StripDebugInfo::runOnOperation() {
36 for (Block &block : region.getBlocks()) {
37 for (BlockArgument &arg : block.getArguments()) {
38 arg.setLoc(unknownLoc);
47 return std::make_unique<StripDebugInfo>();
static MLIRContext * getContext(OpFoldResult val)
Operation is the basic unit of execution within MLIR.
void setLoc(Location loc)
Set the source location the operation was defined or derived from.
MutableArrayRef< Region > getRegions()
Returns the regions held by this operation.
This class contains a list of basic blocks and a link to the parent operation it is attached to.
Include the generated interface declarations.
std::unique_ptr< Pass > createStripDebugInfoPass()
Creates a pass to strip debug information from a function.
auto get(MLIRContext *context, Ts &&...params)
Helper method that injects context only if needed, this helps unify some of the attribute constructio...