[llvm-dev] status of IPO/IPCP?

Sean Silva via llvm-dev llvm-dev at lists.llvm.org
Tue May 3 21:50:19 PDT 2016


No tests fail with the patch below, so I would say it's pretty useless. It
seems that the C bindings are the only user but we can probably just have
them return IPSCCP instead.

Any idea why this wasn't removed when IPSCCP was introduced? Probably worth
understanding that before ripping it out, but in the current state of
things I don't think removing it will be problematic.

diff --git a/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
b/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
index a1533b3..24aea5c 100644
--- a/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
+++ b/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
@@ -51,7 +51,9 @@ char IPCP::ID = 0;
 INITIALIZE_PASS(IPCP, "ipconstprop",
                 "Interprocedural constant propagation", false, false)

-ModulePass *llvm::createIPConstantPropagationPass() { return new IPCP(); }
+ModulePass *llvm::createIPConstantPropagationPass() {
+  return createIPSCCPPass();
+}

 bool IPCP::runOnModule(Module &M) {
   if (skipModule(M))

-- Sean Silva


On Tue, May 3, 2016 at 3:06 PM, Davide Italiano via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> The pass is pretty rudimental (as the comment at the top of the file
> hints), and it seems LLVM already has IPSCCP (which should do a better
> job at interprocedural constant propagation).
> I'm also not entirely sure it's used anywhere.
> Is there any reason to keep it around?
>
> Thanks,
>
> --
> Davide
>
> "There are no solved problems; there are only problems that are more
> or less solved" -- Henri Poincare
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160503/378f8771/attachment.html>


More information about the llvm-dev mailing list