Alessandro Di Federico
060d26f212
Introduce getLocation(Instruction *)
2023-04-13 18:11:48 +02:00
Alessandro Di Federico
8c5f6628d1
Stop considering Instructions Taggable
...
Adding custom (i.e., non-dbg) metadata to Instructions has proven to be
too brittle.
2023-04-13 18:11:48 +02:00
Alessandro Di Federico
bce3555285
Drop CallToLifted tag
...
This commit drops the `CallToLifted` tag in favor of a
`getCallToIsolatedFunction` function which checks if the call has the
`IsolatedFunction` tag. The function also assumes that indirect calls
are calls to lifted functions.
2023-04-13 18:11:48 +02:00
Alessandro Di Federico
92b9ba5571
Import findPhiTreeLeaves
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
dc7f731bef
Mark build_PlainMetaAddress as const
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
995d44cf73
Implement Location::{parent,back}
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
52ee85f55f
Implement efa::BasicBlock::contains
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
6564fc0568
Minor changes
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
daafc6a1e7
AVI: handle SCEV's scSequentialUMinExpr
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
bcd374038c
s/zextOrSelf/zext/g
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
43fd690ea8
InaccessibleMemOnly: adopt MemoryEffects
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
e131817334
Drop usage of Type::getPointerElementType
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
f777ccc4d3
Replace llvm::sys::fs::F_None with OF_None
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
06f9bca598
Adopt {add,remove}FnAttribute
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
394111ed40
Add missing includes
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
d2caa1fad0
Make CreateLoad usages opaque pointers-compatible
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
dbcdad0a4d
Switch from llvm::Optional to std::optional
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
389342411a
Drop makeArrayRef
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
5ed9432a68
Fix ambiguous template function
...
Bumping LLVM version turned these into compiler errors.
2023-04-08 08:42:23 +02:00
Alessandro Di Federico
e3f9519ffc
Get rid of std::iterator
2023-04-08 08:42:23 +02:00
Alessandro Di Federico
74ae629853
Drop experimental from coroutines
2023-04-08 08:42:23 +02:00
Alessandro Di Federico
52521f8cac
Adopt more standard library's features
2023-04-08 08:42:23 +02:00
Alessandro Di Federico
b2f22c168f
Adopt clang-format 16
2023-04-08 08:42:23 +02:00
Pietro Fezzardi
ca1fd101db
Add opaque function to LLVM test helpers
...
This commits adds an opaque function that can be called by simple LLVM
IR snippets used in unit tests.
2023-04-06 14:25:18 +02:00
Kacper Kołodziej
e7bb7d09df
Rename getStrByAddress to getStringByAddress
...
We don't use abbreviations in names.
2023-04-04 09:30:09 +02:00
Pietro Fezzardi
4c2602e956
RawBinaryView: add getStrByAddress method
...
This method is similar to `getByAddress`, but it returns an
`llvm::StringRef`.
It is intended for those users that need to manipulate the bytes as
strings. In those cases, the `llvm::ArrayRef<uint8_t>` returned by
`getByAddress` is not suitable, because it triggers warnings due to
`uint8_t` not being the same as `char`.
2023-04-04 09:30:09 +02:00
Kacper Kołodziej
1b8801c9dc
Add RawBinaryView::isReadOnly method
...
isReadOnly returns true if segment which contains region defined with
MetaAddress and size is not writable.
2023-04-04 09:30:08 +02:00
Giacomo Vercesi
2e96e09f63
Drop analyze-all
...
Drop all the uses of analyzeAll and swap its use with the invocation of
the appropriate analysesList
2023-03-22 17:50:02 +01:00
Massimo Fioravanti
312e2e8d53
Add analyses lists
...
Introduces the possibility of specifiying lists of analyses as way to
give them coherent names.
2023-03-22 17:31:46 +01:00
Giacomo Vercesi
c7d13fd176
PipelineC: fix model verification clause
...
In the previous implementation of Model.verify an llvm::Error was
returned. Some call sites retained the logic associated with it. Fix
these with the correct logic.
Also fix an instance of `verify` that was missing an assert.
2023-03-20 16:20:06 +01:00
Giacomo Vercesi
3b94dfae4b
PipelineC: rework rp_error data type
...
Drop the use of unique_ptr within the rp_error data type and instead use
std::monostate. Also fix the functions to allow the use of `nullptr` as
the error parameter
2023-03-20 16:08:04 +01:00
Ivan Krysak
64856306c4
BinaryImporter: rework command line interface
2023-03-15 10:19:03 +01:00
Ivan Krysak
e84c76019a
ABI: introduce an additional definition option
...
The new option is `NoRegisterArgumentsCanComeAfterStackOnes`
If it's set to `true`, then no register argument can follow any stack
argument under the said abi, otherwise such "shuffling" of arguments
is allowed.
2023-03-15 10:19:03 +01:00
Ivan Krysak
4d21a88777
Model: remove an obsolete function conversion pass
2023-03-15 10:19:03 +01:00
Ivan Krysak
fba30712cc
ABI: introduce abi::FunctionType::filterTypes
2023-03-15 10:19:03 +01:00
Ivan Krysak
a0adafeab0
ABI: take advantage of register state deductions
...
This makes the conversions more robust, since everything can rely on
the same tools for filling in missing registers and ordering them based
on the ABI requirements.
2023-03-15 10:19:03 +01:00
Ivan Krysak
1d1003b7e5
ABI: introduce TypeBucket helper
2023-03-15 10:19:02 +01:00
Ivan Krysak
8a1d62728d
ABI: remove constexpr abi trait
2023-03-15 10:19:02 +01:00
Ivan Krysak
30b9234a04
abi::Definition: introduce a padding helper
2023-03-15 10:19:02 +01:00
Ivan Krysak
89b3def533
ABI: move RegisterOrder onto the runtime trait
2023-03-15 10:19:02 +01:00
Ivan Krysak
9e393578c9
ABI: move state deduction onto the runtime trait
2023-03-15 10:19:02 +01:00
Ivan Krysak
ce0d39a9a6
Model: document model::Type::size()
2023-03-15 10:19:02 +01:00
Ivan Krysak
84229d92b1
Model & ABI: make size and alignment stricter
2023-03-15 10:19:02 +01:00
Ivan Krysak
769e5c1cbe
ABI: add a natural alignment calculation helper
2023-03-15 10:19:02 +01:00
Ivan Krysak
8b675e131e
ABI: introduce runtime abi definition
2023-03-15 10:19:02 +01:00
Ivan Krysak
395191cdf1
ABI: use replaceReferencesIf when updating types
2023-03-15 10:19:02 +01:00
Ivan Krysak
bcca3ac8b7
TupleTree: introduce replaceReferencesIf
2023-03-15 10:19:02 +01:00
Ivan Krysak
9eb55f363b
STLExtras: introduce some c++20 invocable concepts
2023-03-15 10:19:02 +01:00
Ivan Krysak
01a05e2037
ABI: separate convertions based on the direction
2023-03-15 10:19:02 +01:00