[llvm] [SLP] NFC. Replace MainOp and AltOp in TreeEntry with InstructionsState. (PR #120198)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 17 05:43:20 PST 2024
================
@@ -836,7 +836,7 @@ class InstructionsState {
return getOpcode() == CheckedOpcode || getAltOpcode() == CheckedOpcode;
}
- InstructionsState() = delete;
+ InstructionsState() = default;
----------------
alexey-bataev wrote:
> 1. From `setOperations` we can know it should store InstructionsState.
>
> ```
> void setOperations(const InstructionsState &S) {
> MainOp = S.getMainOp();
> AltOp = S.getAltOp();
> }
> ```
>
> 2. The `TreeEntry` reimplemented all of the functions of `InstructionsState`. If we need to add some functions in `InstructionsState`, we may need to reimplement it in `TreeEntry` again.
> 3. I expect to add some functions in `InstructionsState` to solve the performance issue for [[SLP] Make getSameOpcode support different instructions if they have same semantics. #112181](https://github.com/llvm/llvm-project/pull/112181).
And how does current infrastructure prevent it?
https://github.com/llvm/llvm-project/pull/120198
More information about the llvm-commits
mailing list