- Jun 25, 2021
-
-
Martin Storsjö authored
Rename functions with the `xx_lower()` names to `xx_insensitive()`. This was requested during the review of D104218. Test names and variables in llvm/unittests/ADT/StringRefTest.cpp that refer to "lower" are renamed to "insensitive" correspondingly. Unused function aliases with the former method names are left in place (without any deprecation attributes) for transition purposes. All references within the monorepo will be changed (with essentially mechanical changes), and then the old names will be removed in a later commit. Also remove the superfluous method names at the start of doxygen comments, for the methods that are touched here. (There are more occurrances of this left in other methods though.) Also remove duplicate doxygen comments from the implementation file. Differential Revision: https://reviews.llvm.org/D104819
-
Krzysztof Parzyszek authored
-
Bob Haarman authored
Adds some more text to the documentation for the noimplicitfloat function attribute. Hopefully, this makes it clearer what qualifies an implicit vs. explicit float, without becoming overly long or going into target-specific details. Reviewed By: rnk, craig.topper Differential Revision: https://reviews.llvm.org/D104061
-
Jez Ng authored
We previously did this only for x86_64, but it turns out that arm64 needs this too -- see PR50791. Ultimately this is a hack, and we should avoid over-aligning strings that don't need it. I'm just having a hard time figuring out how ld64 is determining the right alignment. No new test for this since we were already testing this behavior for x86_64, and extending it to arm64 seems too trivial. Reviewed By: #lld-macho, thakis Differential Revision: https://reviews.llvm.org/D104835
-
Michael Kruse authored
Return true to indicate that the IR has changed if the nested pass manager has changed it. Fixes the ScopInliner tests in the LLVM_ENABLE_EXPENSIVE_CHECKS=ON configuration. Thanks to Alexandre Ganea for reporting.
-
Emily Shi authored
on arm64e, pointer auth would catch this access violation before asan. sign the function pointer so pointer auth will ignore this violation and let asan catch it in this test case. rdar://79652167 Reviewed By: delcypher Differential Revision: https://reviews.llvm.org/D104828
-
Nikita Popov authored
Rather than relying on pointer type equality (which, for a change, is silently incorrect with opaque pointers) check that the GEP source element types match.
-
Arthur Eubanks authored
We don't want to start updating tests to use opaque pointers until we're close to the opaque pointer transition. However, before the transition we want to run tests as if pointers are opaque pointers to see if there are any crashes. At some point when we have a flag to only create opaque pointers in the bitcode and textual IR readers, and when we have fixed all places that try to read a pointee type, this flag will be useless. However, until then, this can help us find issues more easily. Since the cl::opt is read into LLVMContext, we need to make sure LLVMContext is created after cl::ParseCommandLineOptions(). Previously ValueEnumerator would visit the value types of global values via the pointer type, but with opaque pointers we have to manually visit the value type. Reviewed By: nikic, dexonsmith Differential Revision: https://reviews.llvm.org/D103503
-
Arthur Eubanks authored
WPD currently assumes that there is a one to one correspondence between type test assume sequences and virtual calls. However, with -fstrict-vtable-pointers this may not be true. This ends up causing crashes when we try to optimize a virtual call more than once ( applyUniformRetValOpt()/applyUniqueRetValOpt()/applyVirtualConstProp()/applySingleImplDevirt()). applySingleImplDevirt() actually didn't previous crash because it would replace the devirtualized call with the same direct call. Adding an assert that the call is indirect causes the corresponding test to crash with the rest of the patch. This makes Chrome successfully build with -fstrict-vtable-pointers + WPD. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D104798
-
Seraphime Kirkovski authored
This introduces ReferenceAlignment style option modeled around PointerAlignment. Style implementors can specify Left, Right, Middle or Pointer to follow whatever the PointerAlignment option specifies. Differential Revision: https://reviews.llvm.org/D104096
-
Nemanja Ivanovic authored
When targeting CPUs that don't have LDBRX, we end up producing code that is very inefficient and large for this common idiom. This patch just optimizes it two 32-bit LWBRX instructions along with a merge. This fixes https://bugs.llvm.org/show_bug.cgi?id=49610 Differential revision: https://reviews.llvm.org/D104836
-
Nikita Popov authored
The whole transform can be dropped once we have fully transitioned to opaque pointers (as it's purpose is to remove no-op pointer casts). For now, make sure that it handles opaque pointers correctly.
-
Jonas Paulsson authored
- When emitting libcalls, do not only pass the calling convention from the function prototype but also the attributes. - Do not pass attributes from e.g. libc memcpy to llvm.memcpy. Review: Reid Kleckner, Eli Friedman, Arthur Eubanks Differential Revision: https://reviews.llvm.org/D103992
-
Björn Schäpers authored
This amends 64cf5eba.
-
Akira Hatanaka authored
copy/dispose helper functions We found out that these fake functions would cause clang to crash if the changes proposed in https://reviews.llvm.org/D98799 were made. The original patch was reverted in f681fd92 because debug locations were missing in the body of the block byref helper functions. This patch fixes the bug by calling CreateArtificial after the calls to StartFunction. Differential Revision: https://reviews.llvm.org/D104082
-
Roman Lebedev authored
-
Aakanksha Patil authored
Differential Revision: https://reviews.llvm.org/D104804
-
Roman Lebedev authored
Similar to what we already do for `ret` terminators. As noted by @rnk, clang seems to already generate a single `ret`/`resume`, so this isn't likely to cause widespread changes. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D104849
-
zoecarver authored
-
zoecarver authored
-
LLVM GN Syncbot authored
-
Christopher Di Bella authored
Moves: * `std::move`, `std::forward`, `std::declval`, and `std::swap` into `__utility/${FUNCTION_NAME}`. * `std::swap_ranges` and `std::iter_swap` into `__algorithm/${FUNCTION_NAME}` Differential Revision: https://reviews.llvm.org/D103734 -
Christopher Di Bella authored
Under the as-if rule, we can directly implement the array overload for `std::swap`. By removing this circular dependency where `swap` is implemented in terms of `swap_ranges` and `swap_ranges` is defined in terms of `swap`, we can split them into their own headers. This will: * limit the surface area in which Hyrum's law can bite us; * force users to include the correct headers; * make finding the definitions trivial (`swap` is a utility; `swap_ranges` is an algorithm). Differential Revision: https://reviews.llvm.org/D104760
-
Mehdi Amini authored
This is until we figure how to turn on the large code size model.
-
zoecarver authored
If the `data` member function is different enough, `ranges::data` won't pick it, so the range remains a contiguous_range.
-
zoecarver authored
Differential Revision: https://reviews.llvm.org/D104262
-
Roman Lebedev authored
Add an already somewhat-common resume block
-
Pablo Barrio authored
PACI*SP have the advantage that they are in HINT space, meaning they can be run successfully in hardware without PAuth support - they will just behave as a NOP. However, PACI*SP are also implicit landing pads (think of an extra BTI jc). Therefore, they allow indirect jumps of all kinds into them, potentially inserting new gadgets. This patch replaces PACI*SP by PACI* LR, SP when compiling explicitly for hardware with full PAuth support. PACI* is not in the HINT space, therefore it will fault when run in hardware without PAuth support, but it is also not a landing pad, making programs safer in newer HW. Differential Revision: https://reviews.llvm.org/D101920
-
Sanjay Patel authored
This puts it closer to the other undef query check and will avoid a potential ordering problem if we allow folding non-constant-int indexes.
-
Anna Thomas authored
Precommit tests from D104641. The patch will fix the callsites by dropping the context-sensitive attributes. Reviewed-By: Self
-
William S. Moses authored
This commit adds a canonicalization pass which inlines any single block execute region Differential Revision: https://reviews.llvm.org/D104865
-
Sanjay Patel authored
This is shown in: https://llvm.org/PR50817
-
Sanjay Patel authored
These are existing/missing simplifications, so the tests don't need the full power of InstCombine.
-
Craig Topper authored
We don't constant fold based on demanded bits elsewhere in SimplifyDemandedBits, so I don't think we should shrink them either. The affected ARM test changes because a constant become non-opaque and eventually enabled some constant folding. This no longer happens. I checked and InstCombine is able to simplify this test. I'm not sure exactly what it was trying to test. Reviewed By: lebedev.ri, dmgreen Differential Revision: https://reviews.llvm.org/D104832
-
Petr Hosek authored
This is a follow up to D102732 which also expands the logic to Darwin. Differential Revision: https://reviews.llvm.org/D104764
-
Anirudh Prasad authored
- Currently, the emitting of labels in the parsePrimaryExpr function is case independent. It just takes the identifier and emits it. - However, for HLASM the emitting of labels is case independent. We are emitting them in the upper case only, to enforce case independency. So we need to ensure that at the time of parsing the label we are emitting the upper case (in `parseAsHLASMLabel`), but also, when we are processing a PC-relative relocatable expression, we need to ensure we emit it in upper case (in `parsePrimaryExpr`) - To achieve this a new MCAsmInfo attribute has been introduced which corresponding targets can override if needed. Reviewed By: abhina.sreeskantharajan, uweigand Differential Revision: https://reviews.llvm.org/D104715
-
Geoffrey Martin-Noble authored
Updates Bazel build files to match https://github.com/llvm/llvm-project/commit/929189a499 Differential Revision: https://reviews.llvm.org/D104864
-
David Spickett authored
This new command looks much like "memory read" and mirrors its basic behaviour. (lldb) memory tag read new_buf_ptr new_buf_ptr+32 Logical tag: 0x9 Allocation tags: [0x900fffff7ffa000, 0x900fffff7ffa010): 0x9 [0x900fffff7ffa010, 0x900fffff7ffa020): 0x0 Important proprties: * The end address is optional and defaults to reading 1 tag if ommitted * It is an error to try to read tags if the architecture or process doesn't support it, or if the range asked for is not tagged. * It is an error to read an inverted range (end < begin) (logical tags are removed for this check so you can pass tagged addresses here) * The range will be expanded to fit the tagging granule, so you can get more tags than simply (end-begin)/granule size. Whatever you get back will always cover the original range. Reviewed By: omjavaid Differential Revision: https://reviews.llvm.org/D97285
-
Alex Zinenko authored
-
David Spickett authored
This adds GDB client support for the qMemTags packet which reads memory tags. Following the design which was recently committed to GDB. https://sourceware.org/gdb/current/onlinedocs/gdb/General-Query-Packets.html#General-Query-Packets (look for qMemTags) lldb commands will use the new Process methods GetMemoryTagManager and ReadMemoryTags. The former takes a range and checks that: * The current process architecture has an architecture plugin * That plugin provides a MemoryTagManager * That the range of memory requested lies in a tagged range (it will expand it to granules for you) If all that was true you get a MemoryTagManager you can give to ReadMemoryTags. This two step process is done to allow commands to get the tag manager without having to read tags as well. For example you might just want to remove a logical tag, or error early if a range with tagged addresses is inverted. Note that getting a MemoryTagManager doesn't mean that the process or a specific memory range is tagged. Those are seperate checks. Having a tag manager just means this architecture *could* have a tagging feature enabled. An architecture plugin has been added for AArch64 which will return a MemoryTagManagerAArch64MTE, which was added in a previous patch. Reviewed By: omjavaid Differential Revision: https://reviews.llvm.org/D95602
-