- Dec 02, 2020
-
-
Nico Weber authored
-
zhanghb97 authored
The test process of the ir_array_attributes.py depends on numpy. This patch checks numpy in Python bindings configuration. - Add NumPy in find_package as a required component to check numpy. - If numpy is found, print the version and include directory. Differential Revision: https://reviews.llvm.org/D92276
-
Nico Weber authored
-
River Riddle authored
-
Jianzhou Zhao authored
Reviewed-by: eugenis Differential Revision: https://reviews.llvm.org/D92275
-
Eric Leese authored
Under existing behavior discarded functions are relocated to have the start pc 0. This causes problems when debugging as they typically overlap the first function and lldb symbol resolution frequently chooses a discarded function instead of the correct one. Using the value -1 or -2 (depending on which DWARF section we are writing) is sufficient to prevent lldb from resolving to these symbols. Reviewed By: MaskRay, yurydelendik, sbc100 Differential Revision: https://reviews.llvm.org/D91803
-
Leonard Chan authored
This recommits fdbd84c6 whose initial build issues were fixed in 19bdc8e5.
-
Jessica Paquette authored
llvm/test/CodeGen/AArch64/GlobalISel/speculative-hardening-brcond.mir had a slash in its runline.
-
Vitaly Buka authored
-
Fangrui Song authored
In addition, disallow `-lto-new-pass-manager` (see D79371). Note: the ELF port has also adopted --no-lto-new-pass-manager Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D92422
-
Jessica Paquette authored
We are avoiding writing to WZR just about everywhere else. Also update the code to use MachineIRBuilder for the sake of consistency. We also didn't have a GlobalISel testcase for this path, so add a simple one now. Differential Revision: https://reviews.llvm.org/D90626
-
Richard Smith authored
caller. This function did not satisfy its documented contract: it only considered the first lookup result on each base path, not all lookup results. It also performed unnecessary memory allocations. This change results in a minor change to our representation: we now include overridden methods that are found by any derived-to-base path (not involving another override) in the list of overridden methods for a function, rather than filtering out functions from bases that are both direct virtual bases and indirect virtual bases for which the indirect virtual base path contains another override for the function. (That filtering rule is part of the class-scope name lookup rules, and doesn't really have much to do with enumerating overridden methods.) The users of the list of overridden methods do not appear to rely on this filtering having happened, and it's simpler to not do it.
-
Tom Stellard authored
-
Vitaly Buka authored
Avoid relocating DTV table and use linked list of mmap-ed pages. Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D92428
-
Vitaly Buka authored
-
Fangrui Song authored
So that instructions like `lla a5, (0xFF + end) - 4` (supported by GNU as) can be parsed. Add a missing test that an operand like `foo + foo` is not allowed. Reviewed By: jrtc27 Differential Revision: https://reviews.llvm.org/D92293
-
Nico Weber authored
- most importantly, fix a use-after-free when using thin archives, by putting the archive unique_ptr to the arena allocator. This ports D65565 to MachO - correctly demangle symbol namess from archives in diagnostics - add a test for thin archives -- it finds this UaF, but only when running it under asan (it also finds the demangling fix) - make forceLoadArchive() use addFile() with a bool to have the archive loading code in fewer places. no behavior change; matches COFF port a bit better Differential Revision: https://reviews.llvm.org/D92360
-
Leonard Chan authored
When handling a DSOLocalEquivalent operand change: - Remove assertion checking that the `To` type and current type are the same type. This is not always a requirement. - Add a missing bitcast from an old DSOLocalEquivalent to the type of the new one.
-
Jessica Paquette authored
Instead of falling back to selecting TB(N)Z when we fail to select an optimized compare against 0, select Bcc instead. Also simplify selectCompareBranch a little while we're here, because the logic was kind of hard to follow. At -O0, this is a 0.1% geomean code size improvement for CTMark. A simple example of where this can kick in is here: https://godbolt.org/z/4rra6P In the example above, GlobalISel currently produces a subs, cset, and tbnz. SelectionDAG, on the other hand, just emits a compare and b.le. Differential Revision: https://reviews.llvm.org/D92358
-
Tony authored
- Documantation for AMDGPU code object V4. - Documentation clarification for code object V2 and V3. - Documentation for the clang-offload-bundler. - Numerous other documentation clarifications. Change-Id: I338b327cc9e75da6c987b7e081b496402a5a020e Differential Revision: https://reviews.llvm.org/D92434
-
LLVM GN Syncbot authored
-
Arthur Eubanks authored
$ git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format
-
Arthur Eubanks authored
-
Eric Astor authored
Enable command-line defines as textmacros Reviewed By: thakis Differential Revision: https://reviews.llvm.org/D90059
-
River Riddle authored
PDL patterns are now supported via a new `PDLPatternModule` class. This class contains a ModuleOp with the pdl::PatternOp operations representing the patterns, as well as a collection of registered C++ functions for native constraints/creations/rewrites/etc. that may be invoked via the pdl patterns. Instances of this class are added to an OwningRewritePatternList in the same fashion as C++ RewritePatterns, i.e. via the `insert` method. The PDL bytecode is an in-memory representation of the PDL interpreter dialect that can be efficiently interpreted/executed. The representation of the bytecode boils down to a code array(for opcodes/memory locations/etc) and a memory buffer(for storing attributes/operations/values/any other data necessary). The bytecode operations are effectively a 1-1 mapping to the PDLInterp dialect operations, with a few exceptions in cases where the in-memory representation of the bytecode can be more efficient than the MLIR representation. For example, a generic `AreEqual` bytecode op can be used to represent AreEqualOp, CheckAttributeOp, and CheckTypeOp. The execution of the bytecode is split into two phases: matching and rewriting. When matching, all of the matched patterns are collected to avoid the overhead of re-running parts of the matcher. These matched patterns are then considered alongside the native C++ patterns, which rewrite immediately in-place via `RewritePattern::matchAndRewrite`, for the given root operation. When a PDL pattern is matched and has the highest benefit, it is passed back to the bytecode to execute its rewriter. Differential Revision: https://reviews.llvm.org/D89107
-
Jez Ng authored
This is the same logic that ld64 uses to determine which sections contain functions. This was added so that we could determine which STABS entries should be N_FUN. Reviewed By: clayborg Differential Revision: https://reviews.llvm.org/D92430
-
Jez Ng authored
This addresses a lot of the comments in {D89257}. Ideally it'd have been done in the same diff, but the commits in between make that difficult. This diff implements: * N_GSYM and N_STSYM, the STABS for global and static symbols * Has the STABS reflect the section IDs of their referent symbols * Ensures we don't fail when encountering absolute symbols or files with no debug info * Sorts STABS symbols by file to minimize the number of N_OSO entries Reviewed By: clayborg Differential Revision: https://reviews.llvm.org/D92366 -
Jez Ng authored
We should also set the modtime when running LTO. That will be done in a future diff, together with support for the `-object_path_lto` flag. Reviewed By: clayborg Differential Revision: https://reviews.llvm.org/D91318
-
Jez Ng authored
ld64 emits string tables which start with a space and a zero byte. We match its behavior here since some tools depend on it. Similar rationale as {D89561}. Reviewed By: #lld-macho, smeenai Differential Revision: https://reviews.llvm.org/D89639 -
Jez Ng authored
Symbols of the same type must be laid out contiguously: following ld64's lead, we choose to emit all local symbols first, then external symbols, and finally undefined symbols. For each symbol type, the LC_DYSYMTAB load command will record the range (start index and total number) of those symbols in the symbol table. This work was motivated by the fact that LLDB won't search for debug info if LC_DYSYMTAB says there are no local symbols (since STABS symbols are all local symbols). With this change, LLDB is now able to display the source lines at a given breakpoint when debugging our binaries. Some tests had to be updated due to local symbol names now appearing in `llvm-objdump`'s output. Reviewed By: #lld-macho, smeenai, clayborg Differential Revision: https://reviews.llvm.org/D89285
-
Jez Ng authored
Debug sections contain a large amount of data. In order not to bloat the size of the final binary, we remove them and instead emit STABS symbols for `dsymutil` and the debugger to locate their contents in the object files. With this diff, `dsymutil` is able to locate the debug info. However, we need a few more features before `lldb` is able to work well with our binaries -- e.g. having `LC_DYSYMTAB` accurately reflect the number of local symbols, emitting `LC_UUID`, and more. Those will be handled in follow-up diffs. Note also that the STABS we emit differ slightly from what ld64 does. First, we emit the path to the source file as one `N_SO` symbol instead of two. (`ld64` emits one `N_SO` for the dirname and one of the basename.) Second, we do not emit `N_BNSYM` and `N_ENSYM` STABS to mark the start and end of functions, because the `N_FUN` STABS already serve that purpose. @clayborg recommended these changes based on his knowledge of what the debugging tools look for. Additionally, this current implementation doesn't accurately reflect the size of function symbols. It uses the size of their containing sectioins as a proxy, but that is only accurate if `.subsections_with_symbols` is set, and if there isn't an `N_ALT_ENTRY` in that particular subsection. I think we have two options to solve this: 1. We can split up subsections by symbol even if `.subsections_with_symbols` is not set, but include constraints to ensure those subsections retain their order in the final output. This is `ld64`'s approach. 2. We could just add a `size` field to our `Symbol` class. This seems simpler, and I'm more inclined toward it, but I'm not sure if there are use cases that it doesn't handle well. As such I'm punting on the decision for now. Reviewed By: clayborg Differential Revision: https://reviews.llvm.org/D89257
-
Nico Weber authored
-
Mark Nauwelaerts authored
Reviewed By: MyDeveloperDay Differential Revision: https://reviews.llvm.org/D90534
-
Sam Clegg authored
Differential Revision: https://reviews.llvm.org/D92429
-
Louis Dionne authored
See https://reviews.llvm.org/rGa78aaa1ad512#962077 for details.
-
Eric Astor authored
Switch to OptParser for command-line handling Reviewed By: thakis Differential Revision: https://reviews.llvm.org/D90058
-
James Park authored
Fix MSVC warning when __forceinline is paired with inline. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D85264
-
Jez Ng authored
* Enable PIE by default if targeting 10.6 or above on x86-64. (The manpage says 10.7, but that actually applies only to i386, and in general varies based on the target platform. I didn't update the manpage because listing all the different behaviors would make for a pretty long description.) * Add support for `-no_pie` * Remove `HelpHidden` from `-pie` Reviewed By: thakis Differential Revision: https://reviews.llvm.org/D92362
-
David Blaikie authored
This reverts commit cf1c774d. This change caused several regressions in the gdb test suite - at least a sample of which was due to line zero instructions making breakpoints un-lined. I think they're worth investigating/understanding more (& possibly addressing) before moving forward with this change. Revert "[FastISel] NFC: Clean up unnecessary bookkeeping" This reverts commit 3fd39d36. Revert "[FastISel] NFC: Remove obsolete -fast-isel-sink-local-values option" This reverts commit a474657e. Revert "Remove static function unused after cf1c774d." This reverts commit dc35368c. Revert "[lldb] Fix TestThreadStepOut.py after "Flush local value map on every instruction"" This reverts commit 53a14a47.
-
Michał Górny authored
[Reenable TestReproducerAttach and TestThreadSpecificBpPlusCondition on FreeBSD -- both seem to pass correctly now.
-