Commit Graph

3001 Commits

Author SHA1 Message Date
Ivan Krysak a83521d337 Ensure no duplicate opaque types in headers 2026-06-15 17:28:22 +02:00
Ivan Krysak 3a6ed1e7eb CliftContainer: accept owning module references 2026-06-15 17:28:22 +02:00
Ivan Krysak b383c9a111 Pipebox: improve an error message 2026-06-15 17:28:22 +02:00
Ivan Krysak 77affee259 importType: provide a error-less overload 2026-06-15 17:28:22 +02:00
Ivan Krysak 686dc0877a hasModuleAttr -> isCliftModule 2026-06-15 17:28:22 +02:00
Ivan Krysak 93e9b41769 EnforceABI: drop an unused class declaration 2026-06-15 17:28:22 +02:00
Ivan Krysak 53b868e48f PTML: drop unused interfaces 2026-06-15 17:28:22 +02:00
Ivan Krysak 81190634df ABI: drop unused interfaces 2026-06-15 17:28:22 +02:00
Ivan Krysak 529b36a91c ADT: drop unused interfaces 2026-06-15 17:28:22 +02:00
Ivan Krysak 5ddde903c5 emit-c-as-directory: move to new backend 2026-06-15 17:28:22 +02:00
Ivan Krysak 14ea4b6cd7 emit-c-as-single-file: move to new backend 2026-06-15 17:28:22 +02:00
Ivan Krysak 190405a77b Rename decompile-to-X pipes to emit-c-as-X
Note that the artifact names were intentionally left untouched.
2026-06-15 17:28:22 +02:00
Ivan Krysak 4381f86f31 emit-c: expose options 2026-06-15 17:28:22 +02:00
Ivan Krysak 7a10b14f68 Allow setting type emission options from pipeline 2026-06-15 17:28:22 +02:00
Ivan Krysak 1a349d1d38 emit-type-definition: expose options 2026-06-15 17:28:22 +02:00
Ivan Krysak 7ca3ee4893 emit-helper-header: expose options 2026-06-15 17:28:22 +02:00
Ivan Krysak a01969b790 emit-type-and-global-header: pipe configuration 2026-06-15 17:28:22 +02:00
Ivan Krysak c510881250 CEmissionPipeConfiguration: introduce 2026-06-15 17:28:22 +02:00
Ivan Krysak c122118e07 TLT: add a TODO 2026-06-15 17:28:22 +02:00
Ivan Krysak 8426cf96cb emit-type-definition: new pipeline 2026-06-15 17:28:22 +02:00
Ivan Krysak c11cc04768 CliftContainers: standardize context accessors 2026-06-15 17:28:22 +02:00
Ivan Krysak 12355dc51e emit-helper-header: new pipeline 2026-06-15 17:28:22 +02:00
Ivan Krysak c82a01f68b emit-type-and-global-header: new pipeline 2026-06-15 17:28:22 +02:00
Ivan Krysak 6f9f6cf593 Introduce PTMLCTypeBytesContainer 2026-06-15 17:28:22 +02:00
Ivan Krysak 93f6be619a import-segment-declarations: new pipeline 2026-06-15 17:28:22 +02:00
Ivan Krysak 9a0d984c14 import-function-declarations: new pipeline 2026-06-15 17:28:22 +02:00
Ivan Krysak b1dc230199 import-types: new pipeline 2026-06-15 17:28:22 +02:00
Ivan Krysak 2da35c1252 Clift: pull all the module creation in one place 2026-06-15 17:28:22 +02:00
Ivan Krysak bb71b0e5a6 Clift: pull all the context creation in one place 2026-06-15 17:28:22 +02:00
Ivan Krysak c4104388ea CliftEmitC: expose emitTypes 2026-06-15 17:28:22 +02:00
Ivan Krysak eb5c6938ef CliftEmitC: expose emitCommonIncludes 2026-06-15 17:28:22 +02:00
Ivan Krysak b9e5355d5a CliftEmitC: avoid uninitialized primitives 2026-06-15 17:28:22 +02:00
Ivan Krysak 57bbb7b962 Do not propagate model unnecessarily 2026-06-15 17:28:22 +02:00
Ivan Krysak ee5534c0ee Introduce single type emission helper 2026-06-15 17:28:22 +02:00
Ivan Krysak 29ff972daa Move the opaque type gatherer to model::Binary 2026-06-15 17:28:22 +02:00
Ivan Krysak 531fb0b439 emitTypeAndGlobalHeader: emit opaque types 2026-06-15 17:28:22 +02:00
Ivan Krysak 32b89d86f9 Clifter: Factor makeOpaqueStruct out 2026-06-15 17:28:22 +02:00
Ivan Krysak a12880aa27 Append legacy- to the old pipes 2026-06-15 17:28:22 +02:00
Ivan Krysak 4c6fe97059 abi::getDataModel: introduce 2026-06-15 11:47:41 +02:00
Ivan Krysak 659951620e Drop unnecessary includes 2026-06-15 11:47:41 +02:00
Ivan Krysak d22bd1cc58 CliftImportModel: introduce more bulk importers 2026-06-15 11:47:41 +02:00
Ivan Krysak ea785998ec Minor improvements 2026-06-15 11:47:41 +02:00
Alessandro Di Federico 6a594a9133 MFP: rename namespace MFP into mfp 2026-06-11 17:39:53 +02:00
Alessandro Di Federico d03e62c250 MFP: add ExtraState, MFPConfiguration, variant
Three closely-coupled changes that have to land together to keep
every caller compiling:

- Introduce a per-instance ExtraState recording surface (with a
  NoExtraState default) and thread it through applyTransferFunction.
- Replace getMaximalFixedPoint's positional arg list with a single
  MFPConfiguration struct, so callers spell out only the fields they
  need.
- Replace the EntryLabels pointer with an Entry/All/vector* variant
  so callers can ask for the graph entry, every node, or a custom
  list without juggling extra arguments.

Update every existing caller for the new signatures and switch
Liveness::GraphType to a plain Function* (with the inverse
GraphTraits selected at call sites).
2026-06-11 17:39:53 +02:00
Alessandro Di Federico 4150afc33f StructInitializers: add createCall; EmitBody flag
Split createReturn into a reusable createCall that emits the
struct-initializer call without wrapping it in a return. An EmitBody
flag lets callers create the declaration but skip the body, useful
when the body would later be stripped.
2026-06-11 17:39:53 +02:00
Alessandro Di Federico 51526e9777 ABI/Layout: move YAML traits to header
The YAML traits for Layout (and friends) move into Layout.h so callers
can serialize a Layout directly without pulling in Layout.cpp's
internals. As a result StackSpan gains default-initialized fields and
its operator+ is hoisted to a free function (with the symmetric
uint64+StackSpan overload) so it works with the YAML mapping.
2026-06-11 17:39:53 +02:00
Alessandro Di Federico fbe825d66a ABI/Clifter: drop SPTAR special case in returns
Drop the SPTAR-specific special case in layoutToLLVMFunctionType: all
ModelAggregate-returning functions now use the same array-of-i8 return
type. Clifter is updated accordingly to treat any aggregate return the
same way, removing the SPTAR-specific branches that were just dead
code after the type unification.
2026-06-11 17:39:53 +02:00
Alessandro Di Federico 726f2ea618 IRHelpers: getConstantArg honors signedness of T
Use getSExtValue/getZExtValue depending on whether T is signed, so
callers asking for a signed type get the sign-extended value.
2026-06-11 17:39:52 +02:00
Alessandro Di Federico 2a2ef04ec0 Minor changes
Comment refresh, formatting and small no-op tweaks across unrelated
files.
2026-06-11 17:39:52 +02:00
Pietro Fezzardi 197219673f STS: drop dependency from LVB in non-legacy mode
After we drop legacy mode, the only user of LocalVariableBuilder will be
SegregateStackAccesses. This is possible thanks to the fact that
dropping the legacy mode will demistify local variables and turn them
into plain allocas accessed via loads/stores. This will end the need for
a centralized place to deal with local variable creation, that is caused
by the various ad-hoc manipulations we've been doing for a long time in
legacy mode.
2026-06-03 16:33:15 +02:00