Alessandro Di Federico
988af25a7d
Adopt UniquedBy* FunctionTags for deduplication
2024-06-26 12:21:58 +02:00
Alessandro Di Federico
bce1d6c0f3
Adopt invalidation along the core pipeline
2024-06-20 10:24:50 +02:00
Alessandro Di Federico
9fce67eee9
Reduce IRBuilder usage in favor of IRBuilderBase
2024-06-20 10:24:50 +02:00
Alessandro Di Federico
a6cf3fbb83
Centralize computation of llvm::Function names
...
This commit introduces a function to obtain the name assigned to a
`llvm::Function` associated to a `model::Function`. This simplifies the
codebase but also enables us to introduce an option to produce
human-friendly names for debugging/testing purposes.
2024-06-20 10:24:49 +02:00
Alessandro Di Federico
5186a58053
s/FunctionMetadata/ControlFlowGraph/
2024-06-18 17:56:24 +02:00
Djordje Todorovic
c58fec45e3
Add ImplicitModelCastPass
...
We introduce a new LLVM Pass that should detect implicit
casts, by marking the 3rd argument of ModelCast as `true`.
The backend will omit printing a cast expression if the
ModelCast is implicit one.
2024-05-16 17:57:22 +02:00
Djordje Todorovic
c4eda86471
MakeModelCast: Change OpaqueFunctionsPool
...
Introduce new key: use TypePair instead of Type *.
2024-05-16 17:57:22 +02:00
Djordje Todorovic
dd68f7d810
Move casts to MakeModelCastPass
...
Production of casts in backend should be indicated by
call to ModelCast only. This patch implements that.
2024-05-16 17:57:22 +02:00
Alessandro Di Federico
bf6cefc05a
Externalize functions to improve build times
2024-05-03 21:52:40 +02:00
Alessandro Di Federico
fe1dffcffd
Add some missing includes
...
This is in preparation of reducing headers in Debug.h.
2024-05-03 21:52:40 +02:00
Alessandro Di Federico
a1f3624b21
TraceProgressListener: flush upon signal
2024-04-18 17:50:33 +02:00
Pietro Fezzardi
05cc20cb6e
Rename MallocLike Tag to ReturnsPolymorphic
...
Also add this Tag to the LocalVariable opcode who was missing it.
2024-03-19 09:44:00 +01:00
Pietro Fezzardi
ed88c6b459
Use LLVM MemoryEffects in hasSideEffects
2024-03-19 09:44:00 +01:00
Pietro Fezzardi
206936f1c0
Drop redunant ReadsMemory and WritesMemory Tags
...
Over time, these tags have shifted to basically coincide with the Copy
and Assign tags. There's no need for them anymore they just make the
code more verbose and less straightforward.
2024-03-19 09:44:00 +01:00
Pietro Fezzardi
1baec8ff7b
Drop old MonotoneFramework
2024-03-19 09:43:59 +01:00
Ivan Krysak
e2018fa1c3
MetaAddress: add partial serialization option
2024-03-18 11:58:11 +01:00
Ivan Krysak
86fdb19b9f
MetaAddress: pull separator into the header
2024-03-18 11:58:11 +01:00
Alessandro Di Federico
3fb9e58b0a
Progress: cap line length to terminal size
2024-03-01 17:47:28 +01:00
Alessandro Di Federico
c7868b4e7d
Runner: improve logging
2024-03-01 14:53:06 +01:00
Alessandro Di Federico
2347304b70
Progress.cpp: handle StepsCount == 0
2024-03-01 14:23:30 +01:00
Alessandro Di Federico
0c212b66d9
Relicense to MIT
2024-02-29 17:03:36 +01:00
Alessandro Di Federico
f6f542769b
Convert all public strings to kebab-case
2024-02-09 09:04:25 +01:00
Pietro Fezzardi
8acf6c2f94
Allow type-less Segments in the Model
2024-02-09 09:04:23 +01:00
Giacomo Vercesi
06f6137004
ResourceFinder: implement getComponentsHash
...
Implement the `getComponentsHash` function which returns a hash string
for all the components currently installed in revng.
2024-01-26 17:46:21 +01:00
Giacomo Vercesi
9a701a0665
GzipTarWriter: fix append for empty files
...
The `GzipTarWriter::append` method erroneously added an empty block of
padding when an empty file (size == 0) was supplied. This corrects the
algorithm by excluding 512 as a valid padding size.
2024-01-26 17:46:21 +01:00
Pietro Fezzardi
72fc2be260
Add missing NoMerge function attributes
2023-12-19 01:27:12 +01:00
Alessandro Di Federico
2de10213d4
Segregate: improve returning aggregates support
...
This commit heavily reworks how we handle returned values, making things
a bit more elegant.
Apart from this, it fixes how were handling types that on the model are
aggregates but were being returned via registers on the IR.
2023-12-12 12:04:21 +01:00
Alessandro Di Federico
d5ad77d2d9
Adopt model::QualifiedType::stripPointer
2023-12-12 12:04:19 +01:00
Alessandro Di Federico
c561a71089
s/Layout::returnsAggregateType/Layout::hasSPTAR/
2023-12-12 12:04:12 +01:00
Alessandro Di Federico
0e7d3a9a71
Pass PlainMetaAddress by pointer
2023-12-12 10:20:51 +01:00
Alessandro Di Federico
29f9f23654
Minor changes
2023-12-11 16:29:56 +01:00
Pietro Fezzardi
842b5e1075
Make Segment::Type a TupleTreeReference
...
This is homogeneous with all other nullable references to types in the
model, such as the StackFrameType in model::Function, and others.
2023-12-05 16:56:52 +01:00
Pietro Fezzardi
83f0457a7f
Add getNonConst helper
...
This function returns the first non-const qualified view of a
model::QualifiedType.
2023-11-27 18:02:21 +01:00
Pietro Fezzardi
dd8049abcc
Add LiteralPrintDecorator Tag
...
This Tag is used to tag all the funcitons that we use to decorate
integer literals to decide how to print them.
Using a single Tag shared among all the decorators enables more concise
code to handle it.
2023-11-20 22:36:39 +01:00
Alessandro Di Federico
8549cc9346
LDDTree: parse ld.so.conf
2023-11-06 14:33:21 +01:00
Pietro Fezzardi
48a708c07c
Support printing NULL in decompiled C code
2023-10-19 16:18:41 +02:00
Alessandro Di Federico
cb8aa3d929
Adopt .prototype()
...
Also adopt `QualifiedType::getFunctionType` where appropriate in order
to unwrap typedefs.
2023-10-05 19:18:38 +02:00
Pietro Fezzardi
7df0aa0dd5
Add readonly memory effect to OpaqueExtractValue
...
This enables DCE to remove unused calls to OpaqueExtractValue,
also preventing them to show up in decompiled C code.
2023-09-27 16:48:03 +02:00
Giacomo Vercesi
4a2cd259e3
Introduce GzipTarFile
...
Add the GzipTarFileWriter and GzipTarReader classes that allow reading a
slightly custom `.tar.gz`.
2023-09-06 15:23:43 +02:00
Giacomo Vercesi
dc90bca33e
revng/Support: split part of Statistics in OnQuit
...
Split the OnQuit functionality of Statistics as a separate header and
object file. Rework the interface to use lambdas instead of the
OnQuitInterface.
2023-09-06 15:23:43 +02:00
Alessandro Di Federico
f584308ead
Introduce getLibrariesFullPath
2023-08-23 16:14:05 +02:00
Alessandro Di Federico
2c8c06e4ab
Introduce ProgressListeners
2023-08-01 10:49:41 +02:00
Kacper Kołodziej
c0f226fa70
Add const qualifiers to some functions
...
getJumpTargetBlock takes llvm::BasicBlock * as argument, but doesn't
need to modify it, so const it adds const to it and other functions that
are used by getJumpTargetBlock: findJumpTarget, isTranslated, getType,
isJumpTarget.
2023-07-31 11:29:40 +02:00
Ivan Krysak
fe0531868c
Use Container::contains() where appropriate
2023-07-05 06:07:09 +00:00
Ivan Krysak
888e5371eb
Formatting: change PenaltyReturnTypeOnItsOwnLine
...
The new value is 21.
2023-07-05 06:06:07 +00: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
Ivan Krysak
9f1d9fd5d0
Use Container::contains() where appropriate
2023-07-02 15:06:11 +00:00
Ivan Krysak
bc98e0079f
Formatting: change PenaltyReturnTypeOnItsOwnLine
...
The new value is 21.
2023-07-02 13:20:49 +02:00
Ivan Krysak
01b4ec36c9
Formatting: set AllowShortEnumsOnASingleLine
...
The new value is `false`.
2023-07-02 13:15:08 +02:00
Alessandro Di Federico
4edcb6dd49
MetaAddress::decomposeIntegerPC: accept APInt
2023-06-30 13:35:04 +02:00