Jlm
Classes | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
jlm::llvm::AggregateAllocaSplitting Class Referencefinal

Aggregate Alloca Splitting Transformation. More...

#include <AggregateAllocaSplitting.hpp>

Inheritance diagram for jlm::llvm::AggregateAllocaSplitting:
Inheritance graph
[legend]
Collaboration diagram for jlm::llvm::AggregateAllocaSplitting:
Collaboration graph
[legend]

Classes

struct  AllocaTraceInfo
 
struct  Context
 
class  Statistics
 

Public Member Functions

 ~AggregateAllocaSplitting () noexcept override
 
 AggregateAllocaSplitting ()
 
void Run (rvsdg::RvsdgModule &module, util::StatisticsCollector &statisticsCollector) override
 Perform RVSDG transformation. More...
 
- Public Member Functions inherited from jlm::rvsdg::Transformation
virtual ~Transformation () noexcept
 
 Transformation (std::string_view Name)
 
const std::string_view & GetName () const noexcept
 
void Run (RvsdgModule &module)
 Perform RVSDG transformation. More...
 

Private Member Functions

void splitAllocaNodes (rvsdg::RvsdgModule &rvsdgModule)
 
std::vector< AllocaTraceInfofindSplitableAllocaNodes (rvsdg::Region &region) const
 

Static Private Member Functions

static void splitAllocaNode (const AllocaTraceInfo &allocaTraceInfo)
 
static bool checkGetElementPtrUsers (const rvsdg::SimpleNode &gepNode)
 
static std::optional< AllocaTraceInfoisSplitable (rvsdg::SimpleNode &allocaNode)
 
static bool isSplitableType (const rvsdg::Type &type)
 

Private Attributes

std::unique_ptr< Contextcontext_ {}
 

Detailed Description

Aggregate Alloca Splitting Transformation.

Aggregate Alloca Splitting splits up AllocaOperation nodes with aggregate types, i.e., struct and array types, into multiple AllocaOperation nodes with simple types, i.e., integer or floating-point types. The intention is to simplify the processing of these AllocaOperation nodes by passes such as StoreValueForwarding.

Definition at line 22 of file AggregateAllocaSplitting.hpp.

Constructor & Destructor Documentation

◆ ~AggregateAllocaSplitting()

jlm::llvm::AggregateAllocaSplitting::~AggregateAllocaSplitting ( )
overridedefaultnoexcept

◆ AggregateAllocaSplitting()

jlm::llvm::AggregateAllocaSplitting::AggregateAllocaSplitting ( )

Definition at line 93 of file AggregateAllocaSplitting.cpp.

Member Function Documentation

◆ checkGetElementPtrUsers()

bool jlm::llvm::AggregateAllocaSplitting::checkGetElementPtrUsers ( const rvsdg::SimpleNode gepNode)
staticprivate

Definition at line 268 of file AggregateAllocaSplitting.cpp.

◆ findSplitableAllocaNodes()

std::vector< AggregateAllocaSplitting::AllocaTraceInfo > jlm::llvm::AggregateAllocaSplitting::findSplitableAllocaNodes ( rvsdg::Region region) const
private

Definition at line 409 of file AggregateAllocaSplitting.cpp.

◆ isSplitable()

std::optional< AggregateAllocaSplitting::AllocaTraceInfo > jlm::llvm::AggregateAllocaSplitting::isSplitable ( rvsdg::SimpleNode allocaNode)
staticprivate

Definition at line 119 of file AggregateAllocaSplitting.cpp.

◆ isSplitableType()

bool jlm::llvm::AggregateAllocaSplitting::isSplitableType ( const rvsdg::Type type)
staticprivate

Definition at line 98 of file AggregateAllocaSplitting.cpp.

◆ Run()

void jlm::llvm::AggregateAllocaSplitting::Run ( rvsdg::RvsdgModule module,
util::StatisticsCollector statisticsCollector 
)
overridevirtual

Perform RVSDG transformation.

Note
This method is expected to be called multiple times. An implementation is required to reset the objects' internal state to ensure correct behavior after every invocation.
Parameters
moduleRVSDG module the transformation is performed on.
statisticsCollectorStatistics collector for collecting transformation statistics.

Implements jlm::rvsdg::Transformation.

Definition at line 547 of file AggregateAllocaSplitting.cpp.

◆ splitAllocaNode()

void jlm::llvm::AggregateAllocaSplitting::splitAllocaNode ( const AllocaTraceInfo allocaTraceInfo)
staticprivate

Definition at line 480 of file AggregateAllocaSplitting.cpp.

◆ splitAllocaNodes()

void jlm::llvm::AggregateAllocaSplitting::splitAllocaNodes ( rvsdg::RvsdgModule rvsdgModule)
private

Definition at line 534 of file AggregateAllocaSplitting.cpp.

Member Data Documentation

◆ context_

std::unique_ptr<Context> jlm::llvm::AggregateAllocaSplitting::context_ {}
private

Definition at line 55 of file AggregateAllocaSplitting.hpp.


The documentation for this class was generated from the following files: