[PATCH] D51968: [deadargelim] Update dbg.value of 'unused' parameters
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 13 11:46:46 PDT 2018
vsk accepted this revision.
vsk added a comment.
Thanks, LGTM as well.
================
Comment at: lib/Transforms/IPO/DeadArgumentElimination.cpp:296
+ if (!Arg.hasSwiftErrorAttr() && Arg.use_empty() && !Arg.hasByValOrInAllocaAttr()) {
+ if(Arg.isUsedByMetadata()) {
+ Arg.replaceAllUsesWith(UndefValue::get(Arg.getType()));
----------------
Nit, add a space before the '('?
https://reviews.llvm.org/D51968
More information about the llvm-commits
mailing list