[NFC] Delete dead variables and functions#10261
Conversation
jeffniu-openai
left a comment
There was a problem hiding this comment.
wow that's a lot of them
7dce3ae to
7d9f4a1
Compare
Delete some dead variables and functions identified by running with `-Wunused`.
| result.reserve(vs.size() * nRepeat); | ||
| for (auto v : vs) | ||
| for (auto _ : llvm::seq(nRepeat)) | ||
| for (int i = 0; i < nRepeat; ++i) |
| shape = to_vector(indexOp.getType().getShape()); | ||
| offsets = {indexOp.getIndex()}; | ||
| for (auto i : llvm::seq(std::max<int>(0, shape.size() - 1))) | ||
| for (int i = 0, e = std::max<int>(0, shape.size() - 1); i < e; ++i) |
There was a problem hiding this comment.
Definitely worse imo. You could add [[maybe_unused]] to the i declaration if you want the error to pass cleanly.
There was a problem hiding this comment.
I apologise, I didn't realize people would have a particular preference. I've generally leaned away from using llvm::seq because it's a less common pattern and can be slightly less efficient (e.g. https://godbolt.org/z/6sEhaP7c6).
That said, neither of those is a particularly compelling reason, so if you'd like I can put up a PR to change these back.
| Region *parentRegion = parentBlock->getParent(); | ||
| Region &newParentRegion = | ||
| newInitArgOp->getRegion(parentRegion->getRegionNumber()); | ||
| newInitArg = parentRegion->getArgument(argIndex); |
There was a problem hiding this comment.
Should this be newParentRegion.getArgument? I have no idea, but by the naming it looks like what they were going for.
| using ConvertOpToLLVMPattern<triton::DotScaledOp>::ConvertOpToLLVMPattern; | ||
|
|
||
| ScaledDotOpConversion(LLVMTypeConverter &converter, int computeCapability, | ||
| ScaledDotOpConversion(LLVMTypeConverter &converter, int, |
There was a problem hiding this comment.
Remove the constructor argument as well?
There was a problem hiding this comment.
My bad, I missed this, will clean up in the next PR.
Delete some dead variables and functions identified by running with
-Wunused.