MLIR  18.0.0git
Namespaces | Macros | Functions
SROA.cpp File Reference
#include "mlir/Transforms/SROA.h"
#include "mlir/Analysis/SliceAnalysis.h"
#include "mlir/Interfaces/MemorySlotInterfaces.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "mlir/Transforms/Passes.h"
#include "mlir/Transforms/"

Go to the source code of this file.


 Include the generated interface declarations.


#define DEBUG_TYPE   "sroa"


static std::optional< MemorySlotDestructuringInfo > computeDestructuringInfo (DestructurableMemorySlot &slot)
 Computes information for slot destructuring. More...
static void destructureSlot (DestructurableMemorySlot &slot, DestructurableAllocationOpInterface allocator, RewriterBase &rewriter, MemorySlotDestructuringInfo &info, const SROAStatistics &statistics)
 Performs the destructuring of a destructible slot given associated destructuring information. More...

Macro Definition Documentation


#define DEBUG_TYPE   "sroa"

Definition at line 20 of file SROA.cpp.



Definition at line 16 of file SROA.cpp.

Function Documentation

◆ computeDestructuringInfo()

static std::optional<MemorySlotDestructuringInfo> computeDestructuringInfo ( DestructurableMemorySlot slot)

Computes information for slot destructuring.

This will compute whether this slot can be destructured and data to perform the destructuring. Returns nothing if the slot cannot be destructured or if there is no useful work to be done.

Definition at line 46 of file SROA.cpp.

References mlir::MemorySlot::elemType, mlir::getForwardSlice(), mlir::Value::getUses(), mlir::MemorySlot::ptr, mlir::succeeded(), and mlir::Value::use_empty().

Referenced by mlir::tryToDestructureMemorySlots().

◆ destructureSlot()

static void destructureSlot ( DestructurableMemorySlot slot,
DestructurableAllocationOpInterface  allocator,
RewriterBase rewriter,
MemorySlotDestructuringInfo &  info,
const SROAStatistics statistics