Skip to content

[LLVM][SLSR] Add a debug counter #119770

@justinfargnoli

Description

@justinfargnoli

Add a debug counter to selectively enable or disable SLSR transformations. The debug counter should wrap SLSR's invocation of rewriteCandidateWithBasis().


See DAGCombiner.cpp for an example use case for a debug counter:

SDValue DAGCombiner::combine(SDNode *N) {
  if (!DebugCounter::shouldExecute(DAGCombineCounter))
      return SDValue();
  ...

See 7a8dc3d for an example of a patch that adds support for a debug counter.


Don't feel the need to ask permission to work on this. Just give it a try!

CC @akshayrdeodhar

Metadata

Metadata

Assignees

Labels

enhancementImproving things as opposed to bug fixing, e.g. new or missing featuregood first issuehttps://github.com/llvm/llvm-project/contributellvm:transforms

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions