[PATCH] D66645: [Attributor] Add helper class to compose two structured deduction.
Hideto Ueno via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 23 23:34:35 PDT 2019
uenoku updated this revision to Diff 217010.
uenoku added a comment.
Minor update.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66645/new/
https://reviews.llvm.org/D66645
Files:
llvm/lib/Transforms/IPO/Attributor.cpp
Index: llvm/lib/Transforms/IPO/Attributor.cpp
===================================================================
--- llvm/lib/Transforms/IPO/Attributor.cpp
+++ llvm/lib/Transforms/IPO/Attributor.cpp
@@ -520,6 +520,21 @@
S ^= *T;
}
+/// Helper class to compose two generic deduction
+template <typename AAType, typename Base, typename StateType,
+ template <typename...> class F, template <typename...> class G>
+struct AAComposeTwoGenericDeduction
+ : public F<AAType, G<AAType, Base, StateType>, StateType> {
+ AAComposeTwoGenericDeduction(const IRPosition &IRP)
+ : F<AAType, G<AAType, Base, StateType>, StateType>(IRP) {}
+
+ /// See AbstractAttribute::updateImpl(...).
+ ChangeStatus updateImpl(Attributor &A) override {
+ return F<AAType, G<AAType, Base, StateType>, StateType>::updateImpl(A) |
+ G<AAType, Base, StateType>::updateImpl(A);
+ }
+};
+
/// Helper class for generic deduction: return value -> returned position.
template <typename AAType, typename Base,
typename StateType = typename AAType::StateType>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66645.217010.patch
Type: text/x-patch
Size: 1077 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190824/ece80cef/attachment.bin>
More information about the llvm-commits
mailing list