| #
6d52ea88 |
| 08-Feb-2022 |
Nikita Popov <[email protected]> |
[Bitcode] Prevent OOB read for invalid name size
|
| #
f4fca0fb |
| 07-Feb-2022 |
Nikita Popov <[email protected]> |
[Bitcode] Replace assertion with check
|
| #
fdf8cb97 |
| 07-Feb-2022 |
Nikita Popov <[email protected]> |
[Bitcode] Handle invalid data layout gracefully
|
| #
0c553bff |
| 07-Feb-2022 |
Nikita Popov <[email protected]> |
[Bitcode] Guard against out of bounds value reference
We should make sure that the value ID is in bounds, otherwise we will assert / read out of bounds.
|
| #
89017772 |
| 07-Feb-2022 |
Nikita Popov <[email protected]> |
[Bitcode] Don't assert on invalid attribute group record
Report an error instead.
|
| #
f392e9d2 |
| 04-Feb-2022 |
Nikita Popov <[email protected]> |
[BitcodeReader] Resolve error handling todo
If possible, forward the inner error instead of creating a new one.
|
| #
aa97bc11 |
| 21-Jan-2022 |
Nikita Popov <[email protected]> |
[NFC] Remove uses of PointerType::getElementType()
Instead use either Type::getPointerElementType() or Type::getNonOpaquePointerElementType().
This is part of D117885, in preparation for deprecatin
[NFC] Remove uses of PointerType::getElementType()
Instead use either Type::getPointerElementType() or Type::getNonOpaquePointerElementType().
This is part of D117885, in preparation for deprecating the API.
show more ...
|
|
Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3 |
|
| #
e95ad93e |
| 13-Jan-2022 |
minglotus-6 <[email protected]> |
[llvm-dis] Add an option `dump-thinlto-index-only` in llvm-dis to read ThinLTO minimized code only.
|
|
Revision tags: llvmorg-13.0.1-rc2 |
|
| #
d2cc6c2d |
| 03-Jan-2022 |
Serge Guelton <[email protected]> |
Use a sorted array instead of a map to store AttrBuilder string attributes
Using and std::map<SmallString, SmallString> for target dependent attributes is inefficient: it makes its constructor sligh
Use a sorted array instead of a map to store AttrBuilder string attributes
Using and std::map<SmallString, SmallString> for target dependent attributes is inefficient: it makes its constructor slightly heavier, and involves extra allocation for each new string attribute. Storing the attribute key/value as strings implies extra allocation/copy step.
Use a sorted vector instead. Given the low number of attributes generally involved, this is cheaper, as showcased by
https://llvm-compile-time-tracker.com/compare.php?from=5de322295f4ade692dc4f1823ae4450ad3c48af2&to=05bc480bf641a9e3b466619af43a2d123ee3f71d&stat=instructions
Differential Revision: https://reviews.llvm.org/D116599
show more ...
|
| #
e4d17799 |
| 07-Jan-2022 |
Nikita Popov <[email protected]> |
[IR] Add ConstraintInfo::hasArg() helper (NFC)
Checking whether a constraint corresponds to an argument is a recurring pattern.
|
| #
eddd5be1 |
| 06-Jan-2022 |
Nikita Popov <[email protected]> |
[BitCode] Autoupgrade inline asm elementtype attribute
This is the autoupgrade part of D116531. If old bitcode is missing the elementtype attribute for indirect inline asm constraints, automatically
[BitCode] Autoupgrade inline asm elementtype attribute
This is the autoupgrade part of D116531. If old bitcode is missing the elementtype attribute for indirect inline asm constraints, automatically add it. As usual, this only works when upgrading in typed mode, we haven't figured out upgrade in opaque mode yet.
show more ...
|
| #
62b16825 |
| 30-Dec-2021 |
Roman Lebedev <[email protected]> |
[Opaqueptrs][IR Serialization] Improve inlineasm [de]serialization
The bitcode reader expected that the pointers are typed, so that it can extract the function type for the assembly so `bitc::CST_CO
[Opaqueptrs][IR Serialization] Improve inlineasm [de]serialization
The bitcode reader expected that the pointers are typed, so that it can extract the function type for the assembly so `bitc::CST_CODE_INLINEASM` did not explicitly store said function type.
I'm not really sure how the upgrade path will look for existing bitcode, but i think we can easily support opaque pointers going forward, by simply storing the function type.
Reviewed By: #opaque-pointers, nikic
Differential Revision: https://reviews.llvm.org/D116341
show more ...
|
| #
a5337d6a |
| 30-Dec-2021 |
Roman Lebedev <[email protected]> |
[BitcodeReader] `bitc::CST_CODE_INLINEASM`: un-hardcode offsets
|
| #
d5a4d6a4 |
| 28-Dec-2021 |
Roman Lebedev <[email protected]> |
[BitcodeReader] propagateAttributeTypes(): fix opaque pointer handling
Can't get the pointee type of an opaque pointer, but in that case said attributes must already be typed, so just don't try to r
[BitcodeReader] propagateAttributeTypes(): fix opaque pointer handling
Can't get the pointee type of an opaque pointer, but in that case said attributes must already be typed, so just don't try to rewrite them if they already are.
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2 |
|
| #
5dc8aaac |
| 10-Aug-2021 |
Sami Tolvanen <[email protected]> |
[llvm][IR] Add no_cfi constant
With Control-Flow Integrity (CFI), the LowerTypeTests pass replaces function references with CFI jump table references, which is a problem for low-level code that need
[llvm][IR] Add no_cfi constant
With Control-Flow Integrity (CFI), the LowerTypeTests pass replaces function references with CFI jump table references, which is a problem for low-level code that needs the address of the actual function body.
For example, in the Linux kernel, the code that sets up interrupt handlers needs to take the address of the interrupt handler function instead of the CFI jump table, as the jump table may not even be mapped into memory when an interrupt is triggered.
This change adds the no_cfi constant type, which wraps function references in a value that LowerTypeTestsModule::replaceCfiUses does not replace.
Link: https://github.com/ClangBuiltLinux/linux/issues/1353
Reviewed By: nickdesaulniers, pcc
Differential Revision: https://reviews.llvm.org/D108478
show more ...
|
| #
18ab892f |
| 17-Dec-2021 |
Nikita Popov <[email protected]> |
[Bitcode] Avoid setting invalid comdat pointer (NFC)
Instead track global objects with implicit comdat in a separate set. The current approach of temporarily assigning an invalid comdat pointer is i
[Bitcode] Avoid setting invalid comdat pointer (NFC)
Instead track global objects with implicit comdat in a separate set. The current approach of temporarily assigning an invalid comdat pointer is incompatible with D115864.
show more ...
|
| #
09a704c5 |
| 10-Dec-2021 |
Mingming Liu <[email protected]> |
[LTO] Ignore unreachable virtual functions in WPD in hybrid LTO.
Differential Revision: https://reviews.llvm.org/D115492
|
| #
7787a8f1 |
| 14-Dec-2021 |
Kazu Hirata <[email protected]> |
[llvm] Use llvm::reverse (NFC)
|
| #
f6bce30c |
| 21-Nov-2021 |
Kazu Hirata <[email protected]> |
[llvm] Use range-based for loops (NFC)
|
| #
3c06920c |
| 08-Nov-2021 |
Kazu Hirata <[email protected]> |
[llvm] Use make_early_inc_range (NFC)
|
| #
848812a5 |
| 01-Nov-2021 |
Itay Bookstein <[email protected]> |
[Verifier] Add verification logic for GlobalIFuncs
Verify that the resolver exists, that it is a defined Function, and that its return type matches the ifunc's type. Add corresponding check to Bitco
[Verifier] Add verification logic for GlobalIFuncs
Verify that the resolver exists, that it is a defined Function, and that its return type matches the ifunc's type. Add corresponding check to BitcodeReader, change clang to emit the correct type, and fix tests to comply.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D112349
show more ...
|
| #
b12a864c |
| 25-Oct-2021 |
Duncan P. N. Exon Smith <[email protected]> |
Bitcode: Use Expected<T>::takeError() and moveInto() more, NFC
Avoid naming some Expected<T> values in the Bitcode reader by using takeError() and moveInto() more often. This follows the smaller set
Bitcode: Use Expected<T>::takeError() and moveInto() more, NFC
Avoid naming some Expected<T> values in the Bitcode reader by using takeError() and moveInto() more often. This follows the smaller set of changes included in 2410fb4616b2c08bbaddd44e6c11da8285fbd1d3.
show more ...
|
| #
2410fb46 |
| 21-Oct-2021 |
Duncan P. N. Exon Smith <[email protected]> |
Support: Use Expected<T>::moveInto() in a few places
These are some usage examples for `Expected<T>::moveInto()`.
Differential Revision: https://reviews.llvm.org/D112280
|
| #
08ed2160 |
| 20-Oct-2021 |
Itay Bookstein <[email protected]> |
[IR] Refactor GlobalIFunc to inherit from GlobalObject, Remove GlobalIndirectSymbol
As discussed in: * https://reviews.llvm.org/D94166 * https://lists.llvm.org/pipermail/llvm-dev/2020-September/1450
[IR] Refactor GlobalIFunc to inherit from GlobalObject, Remove GlobalIndirectSymbol
As discussed in: * https://reviews.llvm.org/D94166 * https://lists.llvm.org/pipermail/llvm-dev/2020-September/145031.html
The GlobalIndirectSymbol class lost most of its meaning in https://reviews.llvm.org/D109792, which disambiguated getBaseObject (now getAliaseeObject) between GlobalIFunc and everything else. In addition, as long as GlobalIFunc is not a GlobalObject and getAliaseeObject returns GlobalObjects, a GlobalAlias whose aliasee is a GlobalIFunc cannot currently be modeled properly. Creating aliases for GlobalIFuncs does happen in the wild (e.g. glibc). In addition, calling getAliaseeObject on a GlobalIFunc will currently return nullptr, which is undesirable because it should return the object itself for non-aliases.
This patch refactors the GlobalIFunc class to inherit directly from GlobalObject, and removes GlobalIndirectSymbol (while inlining the relevant parts into GlobalAlias and GlobalIFunc). This allows for calling getAliaseeObject() on a GlobalIFunc to return the GlobalIFunc itself, making getAliaseeObject() more consistent and enabling alias-to-ifunc to be properly modeled in the IR.
I exercised some judgement in the API clients of GlobalIndirectSymbol: some were 'monomorphized' for GlobalAlias and GlobalIFunc, and some remained shared (with the type adapted to become GlobalValue).
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D108872
show more ...
|
| #
778bf73d |
| 09-Oct-2021 |
william woodruff <[email protected]> |
[BitcodeReader] fix a logic error in vector type element validation
The current code checks whether the vector's element type is a valid structure element type, rather than a valid vector element ty
[BitcodeReader] fix a logic error in vector type element validation
The current code checks whether the vector's element type is a valid structure element type, rather than a valid vector element type. The two have separate implementations and but only accept very slightly different sets of types, which is probably why this wasn't caught before.
Differential Revision: https://reviews.llvm.org/D109655
show more ...
|