[PATCH] D88193: [SLP] Remove LHS and RHS from OperationData.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 18:28:13 PDT 2020


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel, ABataev, vdmitrie.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
craig.topper requested review of this revision.

These were only really used for 2 things. One was to check if the operand matches the phi if it exists. The other was for the createOp method to build the reduction.

For the first case we still have the operation we just need to know how to index its operands. So I've modified getLHS/getRHS to just use the opcode/kind to know how to find the right operands on an instruction that is now passed in.

For the other case we had to create an OperationData object to set the LHS/RHS values and copy the opcode/kind from another object. We would then just call createOp on that temporary object. Instead I've made LHS/RHS arguments to createOp and removed all these temporary objects.

Ultimately, I'm just trying to familiarize myself with this code so I can figure how fast math flags should work. Thought I'd try make some improvements along the way.


https://reviews.llvm.org/D88193

Files:
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88193.293909.patch
Type: text/x-patch
Size: 8749 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200924/aa9936e9/attachment.bin>


More information about the llvm-commits mailing list