Reassociate commutative expressions.

Synopsis

Declared in <llvm/Transforms/Scalar/Reassociate.h>

class ReassociatePass
    : public OptionalPassInfoMixin<ReassociatePass>

Base Classes

Name

Description

OptionalPassInfoMixin<ReassociatePass>

A CRTP mix‐in for passes that can be skipped.

Type Aliases

Name

Description

OrderedSet

Ordered set of instructions queued for another optimization pass.

Member Functions

Name

Description

run

Run reassociation over the function.

runImpl

Run reassociation using an explicitly supplied uniformity analysis.

Static Member Functions

Name

Description

isRequired

Return false; optional passes may be skipped.

Protected Types

Name

Description

PairMapValue

Cached pairing of two values with a score for global reassociation.

Protected Data Members

Name

Description

MadeChange

Whether the pass has modified the function.

PairMap

Per‐opcode maps from value pairs to their observed reassociation scores.

RankMap

Map from basic blocks to their reassociation ranks.

RedoInsts

Instructions queued for another optimization pass.

UA

Uniformity analysis used when optimizing for divergent control flow.

ValueRankMap

Map from values to their reassociation ranks.

Protected Static Data Members

Name

Description

GlobalReassociateLimit

Maximum number of global reassociation attempts per pair.

NumBinaryOps

Number of binary operator opcodes tracked in PairMap.

Created with MrDocs