llvm::EarlyCSEPass

A simple and fast domtree-based CSE pass.

Synopsis

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

struct EarlyCSEPass
    : OptionalPassInfoMixin<EarlyCSEPass>

Description

This pass does a simple depth-first walk over the dominator tree, eliminating trivially redundant instructions and using instsimplify to canonicalize things as it goes. It is intended to be fast and catch obvious cases so that instcombine and other passes are more effective. It is expected that a later pass of GVN will catch the interesting/hard cases.

Base Classes

NameDescription
OptionalPassInfoMixin<EarlyCSEPass>A CRTP mix-in for passes that can be skipped.

Member Functions

NameDescription
EarlyCSEPass [constructor]Construct an EarlyCSE pass, optionally using MemorySSA.
printPipeline Print this pass's pipeline representation to OS.
run Run the pass over the function.

Static Member Functions

NameDescription
isRequired Return false; optional passes may be skipped.

Data Members

NameDescription
UseMemorySSA Whether this pass should use MemorySSA for CSE of memory operations.