[PATCH] D99846: [GlobalOpt] Replace recursion with extended worklist
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 3 17:09:40 PDT 2021
jdoerfert added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:336-339
if (CE->use_empty()) {
CE->destroyConstant();
Changed = true;
}
----------------
lebedev.ri wrote:
> We need to track hopefully-dead-in-the-end instrs in some vector, and delete them if they are unused.
Not totally sure what you want me to do.
TBH, I thought this would help me but it turns out some dead-constant user that are floating around prevent my global array from ever making it this far.
I'll clean up my Attributor code and get rid of my global arrays. Also need to do some value prop through another one that is not picked up IPSCCP, so might be worth to find a wholesome solution.
================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:384
C->destroyConstant();
- CleanupConstantGlobalUsers(V, Init, DL, GetTLI);
return true;
}
----------------
This return true is wrong now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99846/new/
https://reviews.llvm.org/D99846
More information about the llvm-commits
mailing list