Commit Graph

1241 Commits

Author SHA1 Message Date
Ivan Krysak 2dfdff992d UpcastablePointer: introduce copy helper 2024-06-27 11:05:49 +02:00
Ivan Krysak efc24dee4b UpcastablePointer: introduce empty helper 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 48ace7c147 TTG: reorder early struct template
This heavily improves readability of the generated header.
2024-06-27 11:05:49 +02:00
Ivan Krysak 37f424da06 TTG: move UpcastableX typedef to the template 2024-06-27 11:05:49 +02:00
Ivan Krysak 6a1018b860 Remove unused linter suppressors 2024-06-27 11:05:48 +02:00
Ivan Krysak ac587cbb4f Model: rename Type into TypeDefinition 2024-06-27 11:05:48 +02:00
Ivan Krysak d613023a53 Model: drop an obsolete assert 2024-06-27 11:05:48 +02:00
Ivan Krysak 26c68b78ea Model: drop makeTypeWithID 2024-06-27 11:05:48 +02:00
Ivan Krysak 84c8822c37 Model: drop TypedRegister 2024-06-27 11:05:48 +02:00
Ivan Krysak 4676c951a0 ABI: update outdated comments 2024-06-27 11:05:48 +02:00
Ivan Krysak 7ff1a0f487 Model: remove mostly unused Types.h header 2024-06-27 11:05:48 +02:00
Ivan Krysak b2959e36df Minor improvements 2024-06-27 11:05:48 +02:00
Alessandro Di Federico 71135a56ab Make Target and friends YAML serializable 2024-06-20 10:24:51 +02:00
Alessandro Di Federico 32e6f3e303 Fix handling of -path version of analysis flags
Before this commit, the `*-path` flags required the non-`-path` flag
too.
2024-06-20 10:24:51 +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 f60c1bb4ad s/TrackGuard/DisableTracking/ 2024-06-20 10:24:51 +02:00
Alessandro Di Federico c3733f293a s/RevngPasses/FunctionPass/g 2024-06-20 10:24:51 +02:00
Alessandro Di Federico 553d869d03 Drop Pipe::print method 2024-06-20 10:24:51 +02:00
Alessandro Di Federico 148e6b1979 Rename all LLVMContainer arguments 2024-06-20 10:24:51 +02:00
Alessandro Di Federico 036e9282fe Disable invalidation on const containers 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 b5f7576573 Rework TupleTreeGenerator tracking 2024-06-20 10:24:50 +02:00
Alessandro Di Federico 831ed0db91 TaggedFunctionKind: fix tracking-related issues 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 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 a47c6e81dd FunctionKind::appendAllTargets: disable tracking 2024-06-20 10:24:50 +02:00
Alessandro Di Federico c3751a8c5a Introduce Pipe::invalidate
This method enables pipes to specify a custom invalidation logic.  This
change enables us to supress automatic model tracking in certain parts
and then handle the consequences by hand.

Make sure you read the TODO before using this.
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 3097e94a0d Enable fetching call site prototype without CFG
Before this commit, we used to attach to call site a metadata to trace
back the call site to the CFG (i.e., `FunctionMetadata`).

This led several passes in revng-c to depend on `FunctionMetadata` just
for this.

This commit, attaches to call sites a reference to the prototype itself
(on the `revng.prototype` metadata), breaking many of such dependencies.
2024-06-20 10:24:49 +02:00
Alessandro Di Federico fd68c25aee Implement ContainerBase::dump{,ToDisk} 2024-06-20 10:24:49 +02:00
Alessandro Di Federico b350d12ad2 TTG: spread some optional: true around 2024-06-20 10:24:49 +02:00
Alessandro Di Federico e44fe36539 Make GCBI::getJTReasons static 2024-06-20 10:24:49 +02:00
Alessandro Di Federico 2925b11f6a Model: adopt getConst where appropriate 2024-06-20 10:24:49 +02:00
Alessandro Di Federico 7001d96b97 Implement TagsSet::{operator<,operator==} 2024-06-20 10:24:49 +02:00
Alessandro Di Federico b0d897b87d Minor changes 2024-06-20 10:24:49 +02:00
Alessandro Di Federico d07d6c4f1f Drop leftover Section.h 2024-06-20 10:24:49 +02:00
Massimo Fioravanti db15f7df9a Propagate info about inputs and outputs of pipes
This comit propagates the deduced info about inputs and outputs of pipes
all the way up to the runner, so that the requested output of a pipe can
be passed to its invocation.
2024-06-20 10:24:49 +02:00
Massimo Fioravanti f783868dde Model: adopt tryGet instead of find() != end() 2024-06-20 09:57:36 +02:00
Massimo Fioravanti 43349943a7 Stop serializing the model in the IR 2024-06-20 09:57:36 +02:00
Massimo Fioravanti 7ee8c8000d Introduce revng pipe 2024-06-20 09:57:36 +02:00
Djordje Todorovic 31b5453551 Support/IRHelpers.h: Add toLLVMConstant()
Convert llvm::APInt to llvm::Constant.
2024-05-29 16:25:53 +02:00
Djordje Todorovic 0468a41913 Add DataFlowGraph::materializeOne method 2024-05-29 16:25:53 +02:00
Lauri Vasama 9f7117fe81 Move ModelType test into an .inc file for sharing 2024-05-29 15:42:15 +02:00
Lauri Vasama 8ec89c658c Template FunctionMetadataCache for use with MLIR 2024-05-29 15:42:15 +02:00
Lauri Vasama 3e33a300d5 Introduce RawFunctionType::Architecture 2024-05-29 15:42:15 +02:00
Lauri Vasama 185afcf4c0 Fix spelling of FunctionEntryMDName 2024-05-29 15:42:15 +02:00
Alessandro Di Federico 47c3dd8f0f Drop model::Segment::Sections 2024-05-22 10:25:25 +02:00