Note that this whole thing is going to get redesigned from scratch
(by manifesting a proper type system graph) when we'll finally start
working on the *real* float support.
Alignment considerations all over the place where growing increasingly
verbose and complex, increasing the likelihood of getting them wrong.
This unifies all the alignment logic in one place.
There were issues with how trailing padding is processed which sometimes
led to it being discarded. That should not happen from now on.
As a size benefit this also strictens the exit condition and improves
wording on some of the comments.
Some ABI's (think mips) require a part of the stack to be reserved,
but before this patch we treated those fields as arguments.
Note that this analysis never inserts fields, so if there are no
sufficient field already inserted before-hand it's just going to fail
the conversion (for example, if the field at the *newly adjusted*
offset 0 is not present).
Add the `revng::cantFail` function which allows to wrap functions with
`std::error_code` and check their result. This is analogous to
`llvm::cantFail` for `llvm::Error`.
Before this commit, char literals were always printed with html
escaping, even if the associated PTML builder was set to Tagless.
This commit fixes the problem.
Before this commit, the DLAStep DeduplicateFields was using
NotMergedNode (a reference) in an assertion, in a place where it was
already invalidated by a preceding call to
CollapseSingleChild::collapseSingle that can mutate the graph.
This caused the assertion to trigger erroneously in some situations.
This commit moves the assertion earlier, in a place where the reference
is guaranteed to always be valid.
At the moment this pipe is broken, because it claims to be producing
artifacts with function rank, while it only produces types.
This pipe should be extended and turned into a pipe that generates
the whole Clift module including functions from LLVM IR, and not just
types.
We should add an input LLVMContainer, and the run() method should first
import types, and then create the functions and their bodies.
For the time being the Pipe is removed from the pipeline.
The previous conversion from LLVM to MLIR was translating plain LLVM IR
to LLVM MLIR Dialect, as a preliminary step for further conversion from
LLVM MLIR Dialect to Clift.
This is not how things are expected to work anymore, so the old code is
now dead and can be removed.