[PATCH] D83884: GlobalISel: Make type for lower action more consistently optional
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 15 09:07:20 PDT 2020
arsenm created this revision.
arsenm added reviewers: aemerson, dsanders, paquette, aditya_nandakumar, Petar.Avramovic, foad, mbrkusanin.
Herald added subscribers: hiraditya, rovka, wdng.
Herald added a project: LLVM.
Some of the lower implementations were relying on this, however the
type was not set depending on which form .lower* helper form you were
using. For instance, if you used an unconditonal lower(), the type was
never set. Most of the lower actions do not benefit from a type
parameter, and just expand in terms of the original operation's types.
However, some lowerings could benefit from an additional type hint to
combine a promotion and an expansion. An example of this is for
add/sub sat. The DAG integer legalization tries to use smarter
expansions directly when promoting the integer type, and doesn't always
produce the same instruction with a wider type.
Treat this as an optional hint argument, that only means something for
specific lower actions. It may be useful to generalize this mechanism
to pass a full list of type indexes and desired types, but I haven't
run into a case like that yet.
https://reviews.llvm.org/D83884
Files:
llvm/docs/GlobalISel/Legalizer.rst
llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83884.278214.patch
Type: text/x-patch
Size: 8518 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200715/73cca0d6/attachment.bin>
More information about the llvm-commits
mailing list