Ivan Krysak
bf6aa40e05
buildControlFlowGraph: improve error messages
...
A concept is going to lead to clear feedback as opposed to typical
SFINAE-adjacent construction error message.
2025-02-13 13:10:51 +02:00
Ivan Krysak
705e4a5955
auto [...] -> auto &&[...]
2025-02-13 13:10:51 +02:00
Ivan Krysak
9e48994c97
EFA: pass the block to the new nodes
...
Before this commit, only its index was passed.
2025-02-13 13:09:50 +02:00
Ivan Krysak
288448f009
Never include model::VerifyHelper from headers
2025-02-13 13:09:50 +02:00
Alessandro Di Federico
f9fad18cb4
EFA, Yield: handle blockless functions
2024-10-31 17:19:51 +01:00
Alessandro Di Federico
a0c670652c
Improve usages of Expected<T>
2024-10-10 14:50:26 +02:00
Alessandro Di Federico
bc064244d6
s/deserialize/fromString/g
2024-09-27 12:07:17 +02:00
Alessandro Di Federico
c1cbb4e9a0
Initialize pointers to nullptr
2024-09-27 12:07:17 +02:00
Alessandro Di Federico
7ddae47040
Minor changes
2024-07-10 15:34:19 +02:00
Ivan Krysak
dfa7478685
Adopt reworked model::Type
2024-06-27 11:05:51 +02:00
Ivan Krysak
9e6bf29f74
TTG: pull dump helper into the template
2024-06-27 11:05:49 +02:00
Ivan Krysak
927e8006b9
Model: rename TypePath to DefinitionReference
2024-06-27 11:05:49 +02:00
Ivan Krysak
8ab27800a8
EFA: remove some dead code
2024-06-27 11:05:49 +02:00
Ivan Krysak
32fd1eed5b
TTG: move classof boilerplate into the template
2024-06-27 11:05:49 +02:00
Ivan Krysak
ac587cbb4f
Model: rename Type into TypeDefinition
2024-06-27 11:05:48 +02:00
Alessandro Di Federico
b62bc8df91
s/FunctionMetadata/ControlFlowGraph/g
2024-06-20 10:24:51 +02:00
Alessandro Di Federico
276a6e0efb
s|ControlFlowGraph.h|CFGHelpers.h|g
2024-06-20 10:24:51 +02:00
Alessandro Di Federico
6e49fed965
FunctionMetadata::{ControlFlowGraph,Blocks}
2024-06-20 10:24:51 +02:00
Alessandro Di Federico
bce1d6c0f3
Adopt invalidation along the core pipeline
2024-06-20 10:24:50 +02:00
Alessandro Di Federico
7553e2acf8
Introduce UniquedBy{Prototype,Metadata}
...
This commit introduces new tags to specify how LLVMContainer should
deduplicate sets of equivalent functions, typically managed by an
`OpaqueFunctionPool`.
2024-06-20 10:24:50 +02:00
Alessandro Di Federico
b350d12ad2
TTG: spread some optional: true around
2024-06-20 10:24:49 +02:00
Alessandro Di Federico
b0d897b87d
Minor changes
2024-06-20 10:24:49 +02:00
Lauri Vasama
8ec89c658c
Template FunctionMetadataCache for use with MLIR
2024-05-29 15:42:15 +02:00
Alessandro Di Federico
8eca2e13fe
Do not use SmallPtrSet with std::includes
2024-05-03 17:59:34 +02:00
Alessandro Di Federico
452036edf1
Purge instructions to save return address
2024-04-30 15:25:53 +02:00
Alessandro Di Federico
0459b9d084
Introduce RegisterUsageAnalyses
2024-04-19 18:33:00 +02:00
Alessandro Di Federico
0b4476d824
Introduce FunctionSummary::clone
2024-04-18 17:55:15 +02:00
Ivan Krysak
6b7650276e
EFA: split importModel into multiple methods
2024-03-18 19:32:34 +01:00
Alessandro Di Federico
e63feda848
Outliner::getCallSiteInfo: drop unused argument
2023-12-12 10:05:30 +01:00
Alessandro Di Federico
28a0fa5b7d
DetectABI: run to fixed point and more
...
This commit switches the approach with which we run the ABI analyses: we
now run them until we reach a fixed point. This enables proper
interprocedural propagation of arguments and return values.
Basically, we now inject reads before call sites, so that, if a function
immediately calls another one, the arguments of the callee are
propagated to the caller.
This commit also updates the logic with which we propagate function
prototypes (and names) to callers. The main advantage of this, is that
function wrappers (in particular, PLT entries) now have the same name as
the function they wrap.
2023-12-12 10:05:22 +01:00
Alessandro Di Federico
02458724b0
Drop CallSummarizer::RegistersClobberedPool
2023-12-11 16:29:13 +01:00
Giacomo Vercesi
0cb3e497a4
Fix typos
2023-11-02 16:48:33 +01:00
Alessandro Di Federico
bf66ecc389
{,Dynamic}Function::Prototype: support typedefs
2023-10-05 10:19:44 +02:00
Alessandro Di Federico
f51af94e8f
TupleTreeReference::isValid is for assertions only
2023-08-23 16:14:05 +02:00
Alessandro Di Federico
247879f7fc
model::Type::ID: switch to progressive IDs
...
This commit switches `model::Type::ID` from being a GUID to be a
progressive number, in order to make things easier for humans.
On top of this, this commit introduces the following changes:
* TypeCopier: import all the necessary PrimitiveTypes and improve
handling of CustomName.
* Move Kind as the last field of the key of each TupleTree type used in
an `UpcastablePointer`.
* Update the ground truth of tests to ignore the `CustomName` in favor
of focusing on `OriginalName`.
* Increase adoption of `model::Binary::makeType`, equivalent to
`Binary.recordNewType(makeType<model::*Type>())`.
2023-08-23 16:14:04 +02:00
Kacper Kołodziej
75ed8f7788
Add WrittenRegisters set to FunctionSummary
...
WrittenRegisters will be used in propagating prototypes to wrappers
functionality to check if function writes to arguments or stack pointer.
2023-07-20 18:09:48 +02:00
Ivan Krysak
9f1d9fd5d0
Use Container::contains() where appropriate
2023-07-02 15:06:11 +00:00
Ivan Krysak
a123ec2c35
Remove clang-format off around concepts
...
Now that clang-format no longer breaks anything involving a concept or
a requires clause on sight, these are no longer necessary
2023-07-02 13:20:49 +02:00
Ivan Krysak
bc98e0079f
Formatting: change PenaltyReturnTypeOnItsOwnLine
...
The new value is 21.
2023-07-02 13:20:49 +02:00
Ivan Krysak
7ed14ca65c
Minor improvements
2023-07-02 11:06:55 +00:00
Ivan Krysak
641fb61f7b
EFA: upgrade buildControlFlowGraph
...
It now assumes that the nodes of the graph it constructs also require
the function entry point on top of the basic block ID.
2023-05-17 14:08:05 +02:00
Ivan Krysak
d99b0241e8
Minor improvements
2023-05-17 14:08:04 +02:00
Alessandro Di Federico
739bed3c1d
DetectABI: serialize CFG in root
...
This is done mainly so that downstream passes do not need to run
`CollectCFG` to store information that has already been computed but not
serialized.
This come at the cost of computing the CFG also of functions we don't
want to analyze in `DetectABI`.
2023-05-17 11:17:44 +02:00
Ivan Krysak
49d3499b26
EFA: fix buildControlFlowGraph requirements
2023-04-27 17:28:22 +02:00
Ivan Krysak
7ca012dbc3
Minor improvements
2023-04-27 17:28:22 +02:00
Massimo Fioravanti
254dc99fcb
TupleTreeGenerator: emit tracking machinery
2023-04-21 17:50:16 +02:00
Alessandro Di Federico
060d26f212
Introduce getLocation(Instruction *)
2023-04-13 18:11:48 +02:00
Alessandro Di Federico
52ee85f55f
Implement efa::BasicBlock::contains
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
ae871f5062
Adopt setOnlyReadsMemory
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
394111ed40
Add missing includes
2023-04-08 08:42:24 +02:00