- Feb 15, 2022
-
-
Jan Svoboda authored
This patch replaces a lot of index-based loops with iterators and ranges. Depends on D117566. Reviewed By: ahoppen Differential Revision: https://reviews.llvm.org/D119722
-
Jan Svoboda authored
This patch starts using the new iterator type in `LookupFileCacheInfo`. Depends on D117566. Reviewed By: ahoppen Differential Revision: https://reviews.llvm.org/D119721
-
Jan Svoboda authored
The `const DirectoryLookup *` out-parameter of `{HeaderSearch,Preprocessor}::LookupFile()` is assigned the most recently used search directory, which callers use to implement `#include_next`. From the function signature it's not obvious the `const DirectoryLookup *` is being used as an iterator. This patch introduces `ConstSearchDirIterator` to make that affordance obvious. This would've prevented a bug that occurred after initially landing D116750. Reviewed By: ahoppen Differential Revision: https://reviews.llvm.org/D117566 -
Jay Foad authored
Differential Revision: https://reviews.llvm.org/D119739
-
Jay Foad authored
Differential Revision: https://reviews.llvm.org/D119738
-
Nikita Popov authored
Other methods in ValueList generally pass Idx first, and it is more convention for assignment methods to have the target on the LHS rather than RHS.
-
Jan Svoboda authored
This patch addresses a FIXME and de-duplicates some `#include_next` logic Depends on D119714. Reviewed By: ahoppen Differential Revision: https://reviews.llvm.org/D119716
-
Jan Svoboda authored
While scanning dependencies of a TU that depends on a PCH, the scanner basically performs mixed implicit/explicit modular compilation. (Explicit modules come from the PCH.) This seems to trip up the global module index. This patch disables global module index in the dependency scanner. Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D118890
-
Jan Svoboda authored
The minimizer strips out single-line comments (introduced by `//`). This sequence of characters can also appear in `#include` or `#import` directives where they play the role of path separators. We already avoid stripping this character sequence for `#include` but not for `#import` (which has the same semantics). This patch makes it so `#import <A//A.h>` is not affected by minimization. Previously, we would incorrectly reduce it into `#import <A`. Reviewed By: arphaman Differential Revision: https://reviews.llvm.org/D119226
-
Jan Svoboda authored
The minimizer tries to squash multi-line macro definitions into single line. For that to work, contents of each line need to be separated by a space. Since we always strip leading whitespace on lines of a macro definition, the code currently tries to preserve exactly one space that appeared before the backslash. This means the following code: ``` #define FOO(BAR) \ #BAR \ baz ``` gets minimized into: ``` #define FOO(BAR) #BAR baz ``` However, if there are no spaces before the backslash on line 2: ``` #define FOO(BAR) \ #BAR\ baz ``` no space can be preserved, leading to (most likely) malformed macro definition: ``` #define FOO(BAR) #BARbaz ``` This patch makes sure we always put exactly one space at the end of line ending with a backslash. Reviewed By: arphaman Differential Revision: https://reviews.llvm.org/D119231
-
Jan Svoboda authored
`Preprocessor` exposes the search directory iterator via `GetCurDirLookup()` getter, which is only used in two static functions. To simplify reasoning about search directory iterators/references and to simplify the `Preprocessor` API, this patch makes the two static functions private member functions and removes the getter entirely. Depends D119708. Reviewed By: ahoppen, dexonsmith Differential Revision: https://reviews.llvm.org/D119714
-
Jan Svoboda authored
The purpose of the `FileNotFound` preprocessor callback was to add the ability to recover from failed header lookups. This was to support downstream project. However, injecting additional search path while performing header search can invalidate currently used iterators/references to `DirectoryLookup` in `Preprocessor` and `HeaderSearch`. The downstream project ended up maintaining a separate patch to further tweak the functionality. Since we don't have any upstream users nor open source downstream users, I'd like to remove this callback for good to prevent future misuse. I doubt there are any actual downstream users, since the functionality is definitely broken at the moment. Reviewed By: ahoppen Differential Revision: https://reviews.llvm.org/D119708
-
Nikita Popov authored
D116366 added a call to madvise() in Path.inc. Unfortunately, Illumos does not declare this function if _XOPEN_SOURCE is defined (which it is by default) and we need to provide the declaration manually. This is the same workaround used in sanitizers: https://github.com/llvm/llvm-project/blob/ee423d93ead39e94c2970b3cc7ef6e6faa75d10b/compiler-rt/lib/sanitizer_common/sanitizer_solaris.cpp#L77-L85 Differential Revision: https://reviews.llvm.org/D119695
-
Nikita Popov authored
This is step two of supporting autoupgrade of old bitcode to opaque pointers. Rather than tracking the element type ID of pointers in particular, track all type IDs that a type contains. This allows us to recover the element type in more complex situations, e.g. when we need to determine the pointer element type of a vector element or function type parameter. Differential Revision: https://reviews.llvm.org/D119339
-
Ivan Butygin authored
Also, it seems Khronos has changed html spec format so small adjustment to script was needed. Base op parsing is also probably broken. Differential Revision: https://reviews.llvm.org/D119678
-
serge-sans-paille authored
As usual with that header cleanup series, some implicit dependencies now need to be explicit: llvm/DebugInfo/DWARF/DWARFContext.h no longer includes: - "llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h" - "llvm/DebugInfo/DWARF/DWARFCompileUnit.h" - "llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h" - "llvm/DebugInfo/DWARF/DWARFDebugAranges.h" - "llvm/DebugInfo/DWARF/DWARFDebugFrame.h" - "llvm/DebugInfo/DWARF/DWARFDebugLoc.h" - "llvm/DebugInfo/DWARF/DWARFDebugMacro.h" - "llvm/DebugInfo/DWARF/DWARFGdbIndex.h" - "llvm/DebugInfo/DWARF/DWARFSection.h" - "llvm/DebugInfo/DWARF/DWARFTypeUnit.h" - "llvm/DebugInfo/DWARF/DWARFUnitIndex.h" Plus llvm/Support/Errc.h not included by a bunch of llvm/DebugInfo/DWARF/DWARF*.h files Preprocessed lines to build llvm on my setup: after: 1065629059 before: 1066621848 Which is a great diff! Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D119723
-
Bill Wendling authored
Reviewed By: nickdesaulniers Differential Revision: https://reviews.llvm.org/D119592
-
Pavel Labath authored
lldb reports (and lldbutil.continue_to_breakpoint returns) a stop reason even for suspended threads. Fix the test to expect that. This was making the test flaky, as most of the time, the two threads stop simultaneously, and the synchronization code is not executed.
-
Valentin Clement authored
This patch enables complex type in lowering. It is tested on function return types. This patch is part of the upstreaming effort from fir-dev branch. Depends on D119698 Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D119700 Co-authored-by:
Jean Perier <jperier@nvidia.com>
-
Valentin Clement authored
This patch enables scalar real type in lowering. It is tested on function return types. This patch is part of the upstreaming effort from fir-dev branch. Depends on D119698 Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D119699 Co-authored-by:
Jean Perier <jperier@nvidia.com>
-
Shraiysh Vaishay authored
These have been replaced by `hasCustomAssemblyFormat` and `hasVerifier` fields and aren't needed anymore. Ops deriving from `fir_IntegralSwitchTerminatorOp` and `region_Op` are not handled in this patch for ease of review. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D119776
-
Siva Chandra Reddy authored
Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D119458
-
Jonas Devlieghere authored
The symbolicator assumes that the first image in the image list is the main image. That isn't always the case. For JSON crashlogs we can use the procName to move the main image to the front of the list. rdar://83907760
-
Serguei Katkov authored
-
Serguei Katkov authored
Add traverse through gc.relocate in determining whether base is isExclusivelyDerivedFromNull OR ExclusivelyNull. Reviewers: reames, anna Reviewed By: reames, anna Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D119712
-
Min-Yih Hsu authored
The new encoder directive can be used to specify custom encoder for a single operand or slice. This is different from the EncoderMethod field within an Operand, which affects every operands in the target. In addition, this patch also changes the function signature of the encoder method -- a new argument, InsertPost, is added to both the default one (i.e. getMachineValue) and the custom one. This argument provides the bit position where the operand will eventually be inserted. Differential Revision: https://reviews.llvm.org/D119100
-
Brad Smith authored
Similar to D116843 for Gnu.cpp Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D119655
-
Brad Smith authored
Similar to D116843 for Gnu.cpp Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D119656
-
Yonghong Song authored
Kumar Kartikeya Dwivedi reported a bug ([1]) where BTF_KIND_TYPE_TAG types are not generated. Currently, BPF backend only generates BTF types which are used by the program, e.g., global variables, functions and some builtin functions. For example, suppose we have struct task_struct { ... struct task_group *sched_task_group; struct mm_struct *mm; ... pid_t pid; pid_t tgid; ... } If BPF program intends to access task_struct->pid and task_struct->tgid, there really no need to generate BTF types for struct task_group and mm_struct. In BPF backend, during BTF generation, when generating BTF for struct task_struct, if types for task_group and mm_struct have not been generated yet, a Fixup structure will be created, which will be reexamined later to instantiate into either a full type or a forward type. In current implementation, if we have something like struct foo { struct bar __tag1 *f; }; and when generating types for struct foo, struct bar type has not been generated, the __tag1 will be lost during later Fixup instantiation. This patch fixed this issue by properly handling btf_type_tag's during Fixup instantiation stage. [1] https://lore.kernel.org/bpf/20220210232411.pmhzj7v5uptqby7r@apollo.legion/ Differential Revision: https://reviews.llvm.org/D119799 -
Snehasish Kumar authored
This reverts commit e6999040. Update test to fix signed int comparison warning, fix whitespace in compiler-rt MIBEntryDef.inc file. Differential Revision: https://reviews.llvm.org/D117256
-
Hongtao Yu authored
Do not merge a context that is already duplicated into the base profile. Also fixing a typo caused by previous refactoring. Reviewed By: wenlei Differential Revision: https://reviews.llvm.org/D119735
-
Jun Zhang authored
This patch adds a missing test, covering the different kinds of floating-point literals, like hexadecimal floats, and testing extreme cases & normal cases. Differential Revision: https://reviews.llvm.org/D119528
-
Jim Ingham authored
One of the tests in this test setup was copied from a more complex test, and I didn't know if the setup or the subsequent parts of the test were the ones that fail on Linux. Looks like it was the latter, so let's mark this succeeding.
-
Mike Rice authored
Differential Revision: https://reviews.llvm.org/D119761
-
Jonas Devlieghere authored
Currently you can run the DWARF verifier on the linked dsymutil output. This patch extends this functionality and makes it possible to run the DWARF verifier on the input as well. A new option --verify-dwarf allows you to specify input, output, all and none. The existing --verify flag remains unchanged and acts and alias for --verify-dwarf=output. Input verification issues do not result in a non-zero exit code because dsymutil is capable of taking invalid DWARF as input and producing valid DWARF as output. Differential revision: https://reviews.llvm.org/D89216
-
Snehasish Kumar authored
This reverts commit 857ec0d0. Fixes -DLLVM_ENABLE_MODULES=On build by adding the new textual header to the modulemap file. Reviewed in https://reviews.llvm.org/D117722
-
Volodymyr Sapsai authored
For redeclaration chains we maintain an invariant of having only a single definition in the chain. In a single translation unit we make sure not to create duplicates. But modules are separate translation units and they can contain definitions for the same symbol independently. When we load such modules together, we need to demote duplicate definitions to keep the AST invariants. Some AST clients are interested in distinguishing declaration-that-was-demoted-from-definition and declaration-that-was-never-a-definition. For that purpose introducing `IsThisDeclarationADemotedDefinition`. No functional change intended. rdar://84677782 Differential Revision: https://reviews.llvm.org/D118855
-
Peter Klausler authored
Semantic analysis was emitting a bogus error message when a structure constructor contains a monomorphic value for a (limited) polymorphic component of a derived type. The type compatibility test was too strict; this patch relaxes it a little to allow values that could be assigned or passed to a variable or dummy argument with that type. Also add some quotes to an error message that was sometimes confusing without them, and remove a repeated space character from another. Differential Revision: https://reviews.llvm.org/D119744
-
Jim Ingham authored
Some dyld cross library stubs can have line information but no function. Make sure you check that you have a valid Function object before asking it questions. Differential Revision: https://reviews.llvm.org/D119297
-
Jim Ingham authored
This way if you have a long stack, you can issue "thread backtrace --count 10" and then subsequent <Return>-s will page you through the stack. This took a little more effort than just adding the repeat command, since the GetRepeatCommand API was returning a "const char *". That meant the command had to keep the repeat string alive, which is inconvenient. The original API returned either a nullptr, or a const char *, so I changed the private API to return an llvm::Optional<std::string>. Most of the patch is propagating that change. Also, there was a little thinko in fetching the repeat command. We don't fetch repeat commands for commands that aren't being added to history, which is in general reasonable. And we don't add repeat commands to the history - also reasonable. But we do want the repeat command to be able to generate the NEXT repeat command. So I adjusted the logic in HandleCommand to work that way. Differential Revision: https://reviews.llvm.org/D119046
-