[PATCH] D65479: [Bugpoint redesign] Added pass to reduce parameters

Diego TreviƱo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 14 15:41:32 PDT 2019


diegotf marked 2 inline comments as done.
diegotf added a comment.

In D65479#1630098 <https://reviews.llvm.org/D65479#1630098>, @dblaikie wrote:

> Having this pass remove AllocaInst too seems like it might be mixing responsibilities - presumably another pass might be invented to remove these AllocaInst separately? (& then it could get otherAllocaInst, other than just the ones used for parameters - like ones used for locals)


Yeah, I agree. I'll upload another pass to take care of instructions, and that should cleanup the remaining `AllocaInst`s



================
Comment at: llvm/test/Reduce/remove-args.ll:12-41
+define void @func(i32* dereferenceable(4) %used, i32 %unused, i32* dereferenceable(4) %unused2) {
+entry:
+  %used.addr = alloca i32*, align 8
+  %unused.addr = alloca i32, align 4
+  %unused2.addr = alloca i32*, align 8
+  store i32* %used, i32** %used.addr, align 8
+  store i32 %unused, i32* %unused.addr, align 4
----------------
dblaikie wrote:
> Some comments describing what purpose each part of this IR covers would be good - I probably wouldn't expect 'printf' to be in this test - maybe that one is to test functions declared but not defined? Naming the function to indicate that and/or adding comments to describe it would be helpful. (similarly for the other functions - main+func+func2 - what purpose does each one serve?)
That is a great idea, I'll add some comments to clarify each part's purpose.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65479/new/

https://reviews.llvm.org/D65479





More information about the llvm-commits mailing list