[NFC] Refactor loop metadata movement
authorNathan Sidwell <nathan@acm.org>
Fri, 5 May 2023 15:58:54 +0000 (11:58 -0400)
committerNathan Sidwell <nathan@acm.org>
Tue, 9 May 2023 22:43:59 +0000 (18:43 -0400)
commit03fde97d4933dac1c9481b9728420dbfe8b443d4
treecef4cc8281f58cd7eb228cbc84cd840471654ebd
parent526027df2d62432db3cfce3a61356369ed13cf5e
[NFC] Refactor loop metadata movement

* Use 'if (T v = expr)' idiom
* llvm.loop is a fixed metadata ID

Differential Revision: https://reviews.llvm.org/D150109

Reviewed By: kazu
llvm/lib/Transforms/Utils/Local.cpp