Jlm
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
jlm::llvm::OutputTracer Class Reference

#include <Trace.hpp>

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

Public Member Functions

 OutputTracer ()
 
bool isTracingThroughLoadedStates () const noexcept
 
bool isTracingThroughHoistBarriers () const noexcept
 
void setTraceThroughLoadedStates (const bool traceThroughLoadedStates)
 
void setTracingThroughHoistBarriers (const bool traceThroughHoistBarriers)
 
- Public Member Functions inherited from jlm::rvsdg::OutputTracer
virtual ~OutputTracer ()
 
 OutputTracer () noexcept
 
StructuralNodePolicy getStructuralNodePolicy () const noexcept
 
bool isDeepInvarianceCheckingEnabled () const noexcept
 
bool isTracingIntoSubregionsEnabled () const noexcept
 
void setStructuralNodePolicy (StructuralNodePolicy value) noexcept
 
bool isInterprocedural () const noexcept
 
void setInterprocedural (bool value) noexcept
 
bool isEnteringPhiNodes () const noexcept
 
void setEnterPhiNodes (bool value) noexcept
 
bool isRegionPredicateCheckingEnabled () const noexcept
 
void setRegionPredicateCheckingEnabled (bool value) noexcept
 
bool isInvarianceCachingEnabled () const noexcept
 
void setInvarianceCaching (bool value) noexcept
 
void clearInvarianceCache ()
 
Output & trace (Output &output)
 
Output & trace (Output &output, const Region *withinRegion)
 

Protected Member Functions

TraceStepResult traceStep (rvsdg::Output &output, BackEdgeState backEdgeState, const rvsdg::Region *withinRegion) override
 
- Protected Member Functions inherited from jlm::rvsdg::OutputTracer
TraceStepResult traceInternal (Output &output, BackEdgeState backEdgeState, const Region *withinRegion)
 
TraceStepResult traceGammaOutput (GammaNode &gammaNode, Output &output, BackEdgeState backEdgeState)
 
TraceStepResult traceThetaOutput (ThetaNode &thetaNode, Output &output, BackEdgeState backEdgeState)
 
TraceStepResult traceThetaArgument (ThetaNode &thetaNode, Output &output)
 
Output & insertInInvarianceCache (const Output &structuralOutput, Input &structuralInput)
 
Input * lookupInInvarianceCache (const Output &structuralOutput)
 

Private Attributes

bool traceThroughLoadedStates_ = false
 
bool traceThroughHoistBarriers_ = true
 

Additional Inherited Members

- Public Types inherited from jlm::rvsdg::OutputTracer
enum class  StructuralNodePolicy { traceThroughTriviallyInvariant = 0 , traceThroughIfDetectedInvariant = 1 , traceIntoSubregions = 2 }
 
- Protected Types inherited from jlm::rvsdg::OutputTracer
enum class  BackEdgeState { NoBackEdgeTaken , PossiblyBackEdgeTaken }
 
- Protected Attributes inherited from jlm::rvsdg::OutputTracer
StructuralNodePolicy structuralNodePolicy_
 
bool isInterprocedural_ = true
 
bool enterPhiNodes_ = true
 
bool enableRegionPredicateChecking_ = false
 
AlternativeRegionPredicateTracer regionPredicateTracer_
 
const Output * startingOutput_ = nullptr
 
bool enableInvarianceCaching_ = false
 
std::unordered_map< const Output *, Input * > invariantOutputCache_ {}
 

Detailed Description

Definition at line 18 of file Trace.hpp.

Constructor & Destructor Documentation

◆ OutputTracer()

jlm::llvm::OutputTracer::OutputTracer ( )
explicit

Definition at line 27 of file Trace.cpp.

Member Function Documentation

◆ isTracingThroughHoistBarriers()

bool jlm::llvm::OutputTracer::isTracingThroughHoistBarriers ( ) const
inlinenoexcept

When enabled, tracing can continue through the output of a hoist barrier, continuing from the hoist barrier's input.

Returns
true if tracing through hoist barriers is enabled, otherwise false.

Definition at line 40 of file Trace.hpp.

◆ isTracingThroughLoadedStates()

bool jlm::llvm::OutputTracer::isTracingThroughLoadedStates ( ) const
inlinenoexcept

When enabled, tracing can continue through the memory state output of a load, and keep tracing from the load's memory state input.

Returns
true if tracing states through loads is enabled, false otherwise

Definition at line 29 of file Trace.hpp.

◆ setTraceThroughLoadedStates()

void jlm::llvm::OutputTracer::setTraceThroughLoadedStates ( const bool  traceThroughLoadedStates)
inline

Enables or disables tracing state edges through load operation nodes.

Parameters
traceThroughLoadedStatesthe new value

Definition at line 50 of file Trace.hpp.

◆ setTracingThroughHoistBarriers()

void jlm::llvm::OutputTracer::setTracingThroughHoistBarriers ( const bool  traceThroughHoistBarriers)
inline

Enables or disables tracing through hoist barriers.

Parameters
traceThroughHoistBarriersthe new value

Definition at line 60 of file Trace.hpp.

◆ traceStep()

OutputTracer::TraceStepResult jlm::llvm::OutputTracer::traceStep ( rvsdg::Output &  output,
BackEdgeState  backEdgeState,
const rvsdg::Region *  withinRegion 
)
overrideprotectedvirtual

The innermost body of the tracing loop. Should trace at least one step, if possible. If it is not possible to trace further, the same output is returned.

Parameters
outputthe output to trace from.
backEdgeStateenum describing the path taken from the starting output to output.
withinRegionif not nullptr, tracing stops if it reaches an argument of the region.
Returns
the result of tracing from the given output

Reimplemented from jlm::rvsdg::OutputTracer.

Definition at line 32 of file Trace.cpp.

Member Data Documentation

◆ traceThroughHoistBarriers_

bool jlm::llvm::OutputTracer::traceThroughHoistBarriers_ = true
private

Definition at line 72 of file Trace.hpp.

◆ traceThroughLoadedStates_

bool jlm::llvm::OutputTracer::traceThroughLoadedStates_ = false
private

Definition at line 71 of file Trace.hpp.


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