[PATCH] D66126: [Attributor] Towards a more structured deduction pattern

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 12 22:07:14 PDT 2019


jdoerfert created this revision.
jdoerfert added reviewers: sstefan1, uenoku.
Herald added subscribers: bollu, hiraditya.
Herald added a project: LLVM.

This is the first commit aiming to structure the attribute deduction.
The base idea is that we have default propagation patterns as listed
below on top of which we can add specific, e.g., context sensitive,
logic.

Deduction patterns used in this patch:

- argument states are determined from call site argument states, see AAAlignArgument and AAArgumentFromCallSiteArguments.
- call site argument states are determined as if they were floating values, see AAAlignCallSiteArgument and AAAlignFloating.
- floating value states are determined by traversing the def-use chain and combining the states determined for the leaves, see AAAlignFloating and genericValueTraversal.
- call site return states are determined from function return states, see AAAlignCallSiteReturned and AACallSiteReturnedFromReturned.
- function return states are determined from returned value states, see AAAlignReturned and AAReturnedFromReturnedValues.

Through this strategy all logic for alignment is concentrated in the
AAAlignFloating::updateImpl method.

Note: This commit works on its own but is part of a larger change that
involves "on-demand" creation of abstract attributes that will
participate in the fixpoint iteration. Without this part, we sometimes
do not have an AAAlign abstract attribute to query, loosing information
we determined before. All tests have appropriate FIXMEs and the
information will be recovered once we added all parts.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D66126

Files:
  llvm/lib/Transforms/IPO/Attributor.cpp
  llvm/test/Transforms/FunctionAttrs/align.ll
  llvm/test/Transforms/FunctionAttrs/noalias_returned.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66126.214757.patch
Type: text/x-patch
Size: 20438 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190813/ec5a5ede/attachment.bin>


More information about the llvm-commits mailing list