diff options
author | Alexandros Lamprineas <alexandros.lamprineas@arm.com> | 2022-03-23 14:51:16 +0000 |
---|---|---|
committer | Alexandros Lamprineas <alexandros.lamprineas@arm.com> | 2022-03-28 12:01:53 +0100 |
commit | 8045bf9d0dc5be3a8b8d075fdfe23828f4b7d70e (patch) | |
tree | 4925585b8e4222023961658dbfa59ab52f468d46 /llvm/lib/IR/Module.cpp | |
parent | 4ca111d4cb4c0b425268c86b54fb19c4be2e88dd (diff) | |
download | llvm-8045bf9d0dc5be3a8b8d075fdfe23828f4b7d70e.zip llvm-8045bf9d0dc5be3a8b8d075fdfe23828f4b7d70e.tar.gz llvm-8045bf9d0dc5be3a8b8d075fdfe23828f4b7d70e.tar.bz2 |
[FuncSpec] Support function specialization across multiple arguments.
The current implementation of Function Specialization does not allow
specializing more than one arguments per function call, which is a
limitation I am lifting with this patch.
My main challenge was to choose the most suitable ADT for storing the
specializations. We need an associative container for binding all the
actual arguments of a specialization to the function call. We also
need a consistent iteration order across executions. Lastly we want
to be able to sort the entries by Gain and reject the least profitable
ones.
MapVector fits the bill but not quite; erasing elements is expensive
and using stable_sort messes up the indices to the underlying vector.
I am therefore using the underlying vector directly after calculating
the Gain.
Differential Revision: https://reviews.llvm.org/D119880
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
0 files changed, 0 insertions, 0 deletions