[PATCH] D116971: [AttributorAttributes] Remove hardcoded parameters

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 12 17:04:10 PST 2022


reames added a comment.

Landed a couple changes inspired by this review and discussion here.  None were directly code copied from the review, but all inspired thereby.

commit d1f4c6a6112a9868f178d3a4c666f04ac5dc7415 <https://reviews.llvm.org/rGd1f4c6a6112a9868f178d3a4c666f04ac5dc7415> (HEAD -> main)
Author: Philip Reames <listmail at philipreames.com>
Date:   Wed Jan 12 16:43:02 2022 -0800

  [Attributor] Generalize calloc handling in heap-to-stack for any init value [NFC]

commit 8e76720cf2c0fb230777e98ad5a41175efc4d404 <https://reviews.llvm.org/rG8e76720cf2c0fb230777e98ad5a41175efc4d404>
Author: Philip Reames <listmail at philipreames.com>
Date:   Wed Jan 12 16:16:36 2022 -0800

  [Attributor] Reuse object size evaluation code [NFC]

commit db57065b368ab4a078b749ccf14b0f384ab4571f <https://reviews.llvm.org/rGdb57065b368ab4a078b749ccf14b0f384ab4571f>
Author: Philip Reames <listmail at philipreames.com>
Date:   Wed Jan 12 16:04:18 2022 -0800

  [Attributor] Use getAllocAlignment where possible [NFC]

Remaining pieces I see:

- Figuring out how to generalize getSize.  This is the main change which requires the size arg table.  I keep thinking there should be a way to reuse existing code for this, but if so, I am not currently seeing it.
- Rewriting the entry condition guards (e.g. removable with known initial value) and removing the enum.

I suspect these should be separate patches.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116971/new/

https://reviews.llvm.org/D116971



More information about the llvm-commits mailing list