[PATCH] D100179: [GVN][NFC] Refactor code and add description for GVN object

ksyx via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 9 04:44:03 PDT 2021


ksyx created this revision.
ksyx added reviewers: lattner, nikic.
Herald added a subscriber: hiraditya.
ksyx requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

In this revision:

- Added descriptions for the GVN object.
  - The original comment says a "good summary of algorithm implemented by this GVN object" is required, but I am not sure how deep to get into this description. Thus, the description I added focused on the work done and relationships among methods.
- Moved the code assigning new value number into a new method to improve code tidiness.
- Since a if statement before a line deleted guaranteed that `StoreOffset + StoreSize >= LoadOffset + LoadSize`, it is guaranteed that `StoreOffset + StoreSize > LoadOffset` so the  being removed in this revision might be redundant.
- Fix typos and spaces.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100179

Files:
  llvm/include/llvm/Transforms/Scalar/GVN.h
  llvm/lib/Transforms/Scalar/GVN.cpp
  llvm/lib/Transforms/Utils/VNCoercion.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100179.336396.patch
Type: text/x-patch
Size: 9915 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210409/8b410d45/attachment.bin>


More information about the llvm-commits mailing list