Alessandro Di Federico
8fd34ff0f7
pruneDICompileUnits: delegate to DIFinder
2023-04-14 08:36:05 +02:00
Alessandro Di Federico
40135aad97
Drop CSVAliasAnalysisPass
2023-04-13 18:11:48 +02:00
Alessandro Di Federico
060d26f212
Introduce getLocation(Instruction *)
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
624cf2f160
AVI: add GVN
...
We should be able to drop this soon.
2023-04-13 18:11:48 +02:00
Alessandro Di Federico
b5607efce0
struct_initializer: mark as pure
2023-04-13 18:11:48 +02:00
Alessandro Di Federico
98b92a5b01
Prevent merging calls to isolated functions
...
SimplifyCFG with instruction sinking enabled sometimes can merge two
call sites that are identical at LLVM IR level, but originally come from
two distinct addresses in the original binary.
The nomerge attribute prevents this type of problematic deduplication.
2023-04-13 18:11:48 +02:00
Alessandro Di Federico
79d9011b95
InlineHelpers: drop !dbg post-inlining
2023-04-13 18:11:48 +02:00
Alessandro Di Federico
401f731eda
AttachDebugInfo: color instructions with a visit
...
We used to only color instructions in the same BasicBlock as the call to
`newpc`. However, an instruction in the original binary can span
multiple BasicBlocks.
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
0c991af685
AVI: after function_call, jump to anypc
...
We used to jump to the dispatcher, however we only sink to an
unreachable `anypc`. We were threfore significantly complicating the CFG
in case of indirect function calls.
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
f313a72453
DropHelperCalls: pass in loaded CSVs, not pointers
...
We used to pass pointers to helper functions, but we just need to pass
the loaded value: no need to leak the pointer to the CSV.
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
19d59ffd73
Implement Segment::dump
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
cdf1654f36
CSAA: do not use ptr, use pointee type
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
bc4833078c
Fix InstCombine constructor invocation
...
In LLVM 12 the `InstCombine` constructor used to take a `bool`, in LLVM
16 it takes an integer. Implicit promotion was hiding this fact.
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
e73543e430
AsmCall: add parameter attribute for element type
...
Fix calls to inline assembly
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
a0c0cd9468
extractFromConstantStringPtr: no stripPointerCasts
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
f7f47ceac6
VariableManager: drop autodetection of ${ARCH}CPU
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
71f754f811
PDBImporter: declare our own FilterOptions
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
de90eea243
Adopt get{Max,}PointerSizeInBits
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
53715af613
Adopt {PassBuilder::,}OptimizationLevel::O2
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
0570db6873
Drop dead llvm::initialize* invocations
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
348ccec09b
Adopt new llvm::MCContext constructor
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
171ba353e5
Adopt llvm/{Support,MC}/TargetRegistry.h
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
6c115da619
Update pass names
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
4182a94346
Adopt MemoryEffects::none
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
a0fa150576
Drop usages of LoadInst::getPointerOperandType
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
7a08d51816
Drop usages of PointerType::getElementType
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
26765f3d84
Drop usages of getBasicBlockList
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
a99d54457b
Drop usages of getInstList
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
aa6a60c5b8
Adopt new InlineFunction prototype
2023-04-08 08:42:24 +02:00
Alessandro Di Federico
449e95021a
Replace CallBase::getNumArgOperands with arg_size
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
31b46de38c
Remove dead code and fix spurious warnings
...
Remove some dead code or introduce suppressions for spurious.
These are results of more accurate warnings in clang 16.
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
Massimo Fioravanti
fc3f106640
Pipeline: fix accidental container materialization
...
Pipeline lazy containers were incorrectly materialized when it was not
necessary.
2023-04-07 14:37:14 +02:00
Kacper Kołodziej
bbebdd44b4
Prefer String.empty() case first
2023-04-04 09:30:09 +02:00
Kacper Kołodziej
17b0ecd78a
Compare to nullptr instead of implicit cast
...
Prefer explicit comparing to nullptr instead of implicit casting pointer
to bool.
2023-04-04 09:30:09 +02:00
Pietro Fezzardi
8801fc3b33
Support empty strings in getUniqueString
...
This commit works around a quirk of
`llvm::ConstantDataArray::getString`, which returns a
`llvm::ConstantAggregateZero` for empty strings.
This quirk caused assertions in the previous implementation when passing
an empty `String` to `getUniqueString`.
2023-04-04 09:30:09 +02:00
Pietro Fezzardi
91af14007f
Assert non-empty namespace in getUniqueString
...
Using an empty namespace causes the creation of a named metadata with an
empty string as name.
`llvm::verifyModule` does not check for that, so the `Module` still
verifies, but the on-disk serialization generated by `AsmPrinter.cpp`
prints `"empty name"` instead of the metadata name, and if the
serialized `Module` is then reparsed it parses succesfully but it does
not verify anymore.
2023-04-04 09:30:09 +02:00
Pietro Fezzardi
ec17b36801
Fix attributes of build_PlainMetaAddress function
...
These allow it to be DCE'd and CSE'd if possible directly by LLVM
instead of requiring us to handle it esplicitly as a special case.
2023-04-04 09:30:09 +02:00