Commit Graph

11 Commits

Author SHA1 Message Date
Alvise de Faveri f7866ddd85 IRCanonicalization: Add MakeLocalVariables pass 2022-06-28 10:24:48 +02:00
Alvise de Faveri da46b38644 Backend: Various improvements to variables declaration 2022-06-28 10:24:18 +02:00
Alvise de Faveri 221b8f74d9 Add reference semantics to stack opcodes
`revng_stack_frame` and `revng_stack_args` are treated as returning
a reference, and are always followed by an `AddressOf` call.
2022-06-28 10:23:45 +02:00
Alvise de Faveri de334a92e9 Backend: Make IntToPtr and PtrToInt transparent 2022-06-28 10:12:22 +02:00
Antonio Frighetto cd65fd1554 Introduce OperatorPrecedenceResolutionPass
A simple pass that maps LLVM IR instructions to C operators,
taking into account their precedence and associativity to
emit nice-looking parenthesized expressions.
2022-06-15 10:28:50 +02:00
Antonio Frighetto 4a045cce53 Introduce MakeModelCastPass
A pass that strips the casts off from some instructions, including
`ModelGEP`s, general function calls, return and store ones, and
embeds the cast into new dedicated `ModelCast` function calls.
2022-06-15 10:28:50 +02:00
Alvise de Faveri 5a41669d2e ModelGEP: Never initialize types from LLVM IR 2022-06-13 15:19:15 +02:00
Pietro Fezzardi 4ed636cbba Support emission in C of null pointers 2022-05-31 12:40:52 +02:00
Pietro Fezzardi 35e0e688d2 Support emission in C of integer or pointers undef 2022-05-31 12:40:52 +02:00
Pietro Fezzardi b909bb6629 New MarkAssignments library in IRCanonicalization
This library replaces the old AddIRSerializationMarkers, cleaning up a
lot of historcal baggage, merging Liveness and MarkAnalysis, and
adopting a more accurate naming across all the codebase.
2022-04-21 18:13:51 +02:00
Alvise de Faveri 3fe9f687cc Move TypeMap initialization to InitModelTypes
Move the code that initializes the TypeMap in a separate library,
that will be shared between ModelGEP and the backend.
2022-04-20 17:35:05 +02:00