[llvm-commits] [llvm] r122677 - /llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp
Frits van Bommel
fvbommel at gmail.com
Sun Jan 2 02:27:59 PST 2011
On Sun, Jan 2, 2011 at 3:46 AM, Nick Lewycky <nicholas at mxc.ca> wrote:
> +// RemoveUsers - For each instruction used by the value, Remove() the function
> +// that contains the instruction. This should happen right before a call to RAUW.
> +void MergeFunctions::RemoveUsers(Value *V) {
> + for (Value::use_iterator UI = V->use_begin(), UE = V->use_end();
> + UI != UE; ++UI) {
> + Use &U = UI.getUse();
> + if (Instruction *I = dyn_cast<Instruction>(U.getUser())) {
> + Remove(I->getParent()->getParent());
> + }
> + }
> }
This doesn't handle uses in constant expressions, which can also make
two functions suddenly compare equal when they change.
More information about the llvm-commits
mailing list