Commit Graph

5 Commits

Author SHA1 Message Date
Pietro Fezzardi 39eb322820 FilterForDecompilation: mark Functions optnone
Before this commit we dropped the body altogether. This was bad because
dropping the body of a Function also clears metadata, preventing the
propagation of FunctionTags from revng.

Now all the functions that are not isolated are simply marked optnone
noinline, so that all the optimizations we do for decompilation are only
restricted to isolated functions.
2021-04-27 21:19:06 +02:00
Pietro Fezzardi 36a525314a Detect isolated functions using FunctionTags 2021-04-27 21:19:06 +02:00
Alessandro Di Federico 690e5fd9bd Update LoadModelPass usage 2021-03-16 12:01:15 +01:00
Pietro Fezzardi e95c21db25 Use Model to detect isolated functions 2021-02-23 10:39:05 +01:00
Pietro Fezzardi ebe43602ac New FilterForDecompilation passes
This commits adds two passes
- FilterForDecompilationFunctionPass deletes the body of a Function if
  it's not a isolated function produced by revng
- FilterForDecompilationModulePass deletes all the bodies of the
  functions that are not isolated functions generated by revng

These passes are used at the beginning of the decompilation pipeline, to
prevent all the passes of the decompilation pipeline to run on root and
other big functions coming from QEMU that do not need to be decompiled.
2020-12-16 18:20:58 +01:00