llvm / llvm/llvm-project

Introduce utility for common range-based transforms

Open
#159,346 0 comments 0 reactions 0 assignees View on GitHub
code-cleanup llvm:transforms
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Currently, we have a lot of transforms that are duplicated between CVP and SCCP. Both of these are range-based transforms, which use different ways to obtain the range.

CVP: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp

SCCP: https://github.com/llvm/llvm-project/blob/6a726e9a4d3d05f9aecf366fb6488d63135f04f3/llvm/lib/Transforms/Utils/SCCPSolver.cpp#L290-L317

It would be good to have a common utility where we can place transforms we want to have in both passes. (Some of them we may only want in one or the other, e.g. because they are too expensive for LVI, or because we don't want them in the early pipeline.)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.