Commit Graph

13 Commits

Author SHA1 Message Date
Giacomo Vercesi 798af62b87 Introduce helpers declarations
Re-organize the variants of `libtcg-helpers-*.bc` as such:
* `libtcg-helpers-full-$ARCH.bc`: unchanged, contains all helper
  function with their bodies and all CSVs.
* `libtcg-helpers-declarations-only-$ARCH.bc`: all helper
  functions have been turned to declarations. All CSVs (except a couple
  of special ones) have been dropped.
* `libtcg-helpers-to-inline-$ARCH.bc`: only functions with the
  `revng_inline` section retain their body. Only CSVs that are used by
  these functions are present.

Lift now loads only the `declarations-only` variant of helpers, as
their body is not required until `inline-helpers`. In `inline-helpers`
the `to-inline` variant is loaded and linked, which then allows the
helpers to be inlined.
2026-02-05 10:20:45 +01:00
Alessandro Di Federico 5820908675 Remove and ban \file 2025-12-16 17:41:55 +01:00
Ivan Krysak 3561c2b907 Adopt IRBuilder wrapper 2025-10-21 19:17:01 +03:00
Alessandro Di Federico 744184c90c Do not use CallBase::getCalledFunction
Use our wrapper, which does not return nullptr if the `FunctionType`s do
not match.
2024-08-07 16:07:59 +02:00
Alessandro Di Federico ee2d2e25c6 InlineHelpers: add tracing 2024-08-07 16:07:59 +02:00
Alessandro Di Federico 4bca30df5d InlineHelpers: fix bug preventing inlining helpers 2024-02-09 10:04:18 +01:00
Alessandro Di Federico 98f5304c54 InlineHelpers: do not inline recursive functions
Also, turn it into a ModulePass.
2023-12-12 12:04:33 +01:00
Ivan Krysak 7d235f4fd0 Enforce licence header consistency
Also do some basic cleanup: capitalize first letters, add `.`
at the end of the sentences, and so on.
2023-07-03 15:23:10 +00:00
Alessandro Di Federico 79d9011b95 InlineHelpers: drop !dbg post-inlining 2023-04-13 18:11:48 +02:00
Alessandro Di Federico aa6a60c5b8 Adopt new InlineFunction prototype 2023-04-08 08:42:24 +02:00
Alessandro Di Federico fa3206b26d Rename Lifted tag to Isolated 2022-03-17 14:10:50 +01:00
Pietro Fezzardi 370dfdaf13 Update InlineFunction API to LLVM-12 2021-06-14 23:04:02 +02:00
Alessandro Di Federico ce87c30490 Introduce InlineHelpers
InlineHelpers is a simple pass that recursively inlines all the
functions belonging to the section `revng_inline` in isolated functions.
2021-04-30 14:52:25 +02:00