[PATCH] D54507: [ThinLTO] Handle chains of aliases
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 14 13:52:26 PST 2018
pcc added inline comments.
================
Comment at: lib/Transforms/Utils/CanonicalizeAliases.cpp:61
+ if (NewOp != cast<Constant>(U))
+ Modified = true;
+ Ops.push_back(NewOp);
----------------
You don't need to track this yourself, `getWithOperands` will do it for you.
http://llvm-cs.pcc.me.uk/lib/IR/Constants.cpp#1185
================
Comment at: lib/Transforms/Utils/CanonicalizeAliases.cpp:70
+ bool Changed = false;
+ for (auto &GA : M.aliases()) {
+ canonicalizeAlias(&GA, Changed);
----------------
Remove braces
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54507/new/
https://reviews.llvm.org/D54507
More information about the llvm-commits
mailing list