This diff implements a pass to reduce uninteresting parameters. It also modifies function calls to fit the new function signature, additionally, the pass removes any AllocInst for out-of-chunk arguments.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 36474 Build 36473: arc lint + arc unit
Event Timeline
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)
llvm/test/Reduce/remove-args.ll | ||
---|---|---|
13–42 | 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?) |
Yeah, I agree. I'll upload another pass to take care of instructions, and that should cleanup the remaining AllocaInsts
llvm/test/Reduce/remove-args.ll | ||
---|---|---|
13–42 | That is a great idea, I'll add some comments to clarify each part's purpose. |
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?)