[PATCH] D129904: [Inline] Introduce function attribute to control maximum stack size of inlined functions
Kazu Hirata via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 8 10:30:55 PDT 2022
kazu added inline comments.
================
Comment at: llvm/lib/Analysis/InlineCost.cpp:164-166
Optional<int> getStringFnAttrAsInt(CallBase &CB, StringRef AttrKind) {
- Attribute Attr = CB.getFnAttr(AttrKind);
- int AttrValue;
- if (Attr.getValueAsString().getAsInteger(10, AttrValue))
- return None;
- return AttrValue;
+ return getStringFnAttrAsInt(CB.getFnAttr(AttrKind));
+}
----------------
Do we need this? It looks like your modification in `analyze()` is using `Optional<int> getStringFnAttrAsInt(Function *F, StringRef AttrKind)`, not the `CallBase &CB` variant.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129904/new/
https://reviews.llvm.org/D129904
More information about the llvm-commits
mailing list