Removing IPConstantPropagation.cpp

Hi,

As far as I know, the ipconstprop pass has not been actively used in years and ipsccp has been used instead. This has the potential for confusion and sometimes leads people to spend time finding & reporting bugs as well as updating it to work with the latest API changes.

If there are people actively using it, I would love to hear.

If no-ones using it, I’d propose to remove the dead code: https://reviews.llvm.org/D84447

Cheers,
Florian

Hi,

As far as I know, the ipconstprop pass has not been actively used in years and ipsccp has been used instead. This has the potential for confusion and sometimes leads people to spend time finding & reporting bugs as well as updating it to work with the latest API changes.

If there are people actively using it, I would love to hear.

If no-ones using it, I’d propose to remove the dead code: https://reviews.llvm.org/D84447

+1 for removal

I don’t know this pass very well, but may I ask, why isn’t it used? I mean, is this transformation already implemented as part of another (used)?

Functionality is basically subsumed by IPSCCP (and the Attributor).

It is also not run by O3.

I’m ok removing it. The only utility I can see is as a simple interprocedural pass for teaching people. I’m not sure that it is the best thing to use for that.

-Chris

Should ConstantProp.cpp also be removed? It doesn’t look like it’s been worked on in over 10 years, and aside from check-llvm lit tests, the only use is in llvm/unittests/ExecutionEngine/MCJIT/MCJITAPITest.cpp via LLVMAddConstantPropagationPass.
(it hasn’t been ported to the new pass manager which is why I’m asking)

Agreed, it has the potential for a relatively simple IPO example pass. I think it would need some accompanying material and if anyone is interested in using it as an example, it should be easy enough to restore the code and move it to llvm/examples.

Cheers,
Florian

If it’s unused/not maintained I think we should also remove it or move it to the examples directory with some additional material, if it is intended to illustrate a simple pass.

Cheers,
Florian

Thanks for all the comments. I push a commit removing the pass: e77624a . It is easy enough to bring it back if we discover some crucial use cases for it.

Cheers,
Florian