intel/fs: Make helpers for saving/restoring instruction order
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 23 Aug 2023 09:19:06 +0000 (02:19 -0700)
committerMarge Bot <emma+marge@anholt.net>
Wed, 23 Aug 2023 21:34:38 +0000 (21:34 +0000)
commit158ac265dfd0647830e8bca3e7fecc92e7fa421b
tree433b196ced09c70c07fc1d6ec9535b27ca98d05a
parent2dd56921c93332eec7a48159a22cfbe718a3f85f
intel/fs: Make helpers for saving/restoring instruction order

This moves a bit of code out of a large function, but also lets us reuse
it a few extra places in the next commit.

I opted to stop using ralloc here since this is short-lived data that
doesn't need to stick around for the rest of the compile, and it's easy
enough to free.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24707>
src/intel/compiler/brw_fs.cpp