[revert](feat) revert Replace LLVM dialect with MLIR (#1038) - #1517
[revert](feat) revert Replace LLVM dialect with MLIR (#1038)#1517245516766 wants to merge 1 commit into
Conversation
|
🔍 OpenCodeReview found 2 issue(s) in this PR.
|
| Value getSSBufferPtr(bool isAIC, int groupIdx, int ptrSetIdx, | ||
| DenseMap<int, Value> &precomputedPtrs, | ||
| SmallVector<SmallVector<Value>> ssbufferPtrs); |
There was a problem hiding this comment.
[performance · high]
The ssbufferPtrs parameter was changed from ArrayRef<SmallVector<Value>> (a lightweight view type) to SmallVector<SmallVector<Value>> (pass-by-value), which now causes a deep copy of the entire nested SmallVector structure on every call. This function is called numerous times in loops (e.g., ~19 call sites in the .cpp file), making this a significant performance regression. The parameter should be passed by const reference (const SmallVector<SmallVector<Value>> &) or kept as ArrayRef<SmallVector<Value>> to avoid unnecessary copying.
Suggestion:
| Value getSSBufferPtr(bool isAIC, int groupIdx, int ptrSetIdx, | |
| DenseMap<int, Value> &precomputedPtrs, | |
| SmallVector<SmallVector<Value>> ssbufferPtrs); | |
| Value getSSBufferPtr(bool isAIC, int groupIdx, int ptrSetIdx, | |
| DenseMap<int, Value> &precomputedPtrs, | |
| const SmallVector<SmallVector<Value>> &ssbufferPtrs); |
| Value foundValue = findResult.value().first; | ||
| Type dataType = findResult.value().second; |
There was a problem hiding this comment.
[maintainability · low]
Unused variable foundValue is extracted from findResult.value().first but never referenced afterwards. Only dataType (the second element of the pair) is actually used. This will likely trigger compiler warnings about unused variables and introduces unnecessary code.
Suggestion:
| Value foundValue = findResult.value().first; | |
| Type dataType = findResult.value().second; | |
| Type dataType = findResult.value().second; |
|
/retry |
This reverts commit daceb99.
New contributor declaration
I am not making a trivial change, such as fixing a typo in a comment.
I have written a PR description following these
rules.
I have run
pre-commit run --from-ref origin/main --to-ref HEAD.Select one of the following.
/testforlittests/unittestfor C++ tests/python/testfor end-to-end testsFILL THIS IN.Select one of the following.
littests.littests I have added follow these best practices,including the "tests should be minimal" section. (Usually running Python code
and using the instructions it generates is not minimal.)