[PATCH] D129915: [InstCombine] Tighten up known library function signature tests (PR #56463)
Martin Sebor via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 10 13:44:30 PDT 2022
msebor marked 3 inline comments as done.
msebor added inline comments.
================
Comment at: llvm/lib/Analysis/TargetLibraryInfo.cpp:44
+enum FuncArgTypeID: char {
+ Void = 0, // Must be zero.
+ Bool, // 8 bits on all targets
----------------
nikic wrote:
> msebor wrote:
> > nikic wrote:
> > > I think it would be better to use a separate zero sentinel value (rather than reusing `Void` for the purpose). It's not like we need to save on enum elements here.
> > `Void` is set to zero in order to terminate the argument list, as in:
> > `TLI_DEFINE_SIG_INTERNAL(Int)`.
> I get that, my point here is that we should do something like `End = 0, Void`, rather than having `Void` both indicate a void return and the end of the list.
`Void` or `Ellip` must always be last (if there's room) so I'm not sure I see an advantage of adding another enumerator to mean the same thing.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129915/new/
https://reviews.llvm.org/D129915
More information about the llvm-commits
mailing list