- Jul 27, 2022
-
-
Tom Stellard authored
When there is a backport request, the GitHub Action that handles the backport will now automatically assign the issue to the user(s) who approved the commit in Phabricator and create an issue comment asking them to review the request. Reviewed By: thieta, kwk Differential Revision: https://reviews.llvm.org/D126423
-
Dmitry Vassiliev authored
This patch fixes the following error with MSVC 16.9.2 in case of NDEBUG and LLVM_ENABLE_DUMP: llvm/lib/CodeGen/CodeGenPrepare.cpp(2581): error C2872: 'ExtAddrMode': ambiguous symbol llvm/include/llvm/CodeGen/TargetInstrInfo.h(86): note: could be 'llvm::ExtAddrMode' llvm/lib/CodeGen/CodeGenPrepare.cpp(2447): note: or '`anonymous-namespace'::ExtAddrMode' llvm/lib/CodeGen/CodeGenPrepare.cpp(2581): error C2039: 'print': is not a member of 'llvm::ExtAddrMode' Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D130426
-
Tom Stellard authored
We started using the llvm/llvm-project-release-prs repo for backport pull requests, but since this repo is not a fork of llvm/llvm-project it will reject pull requests from other repos. In order to fix this, when ever someone uses the /branch command to request a branch be merged into the release branch, we first copy the branch to the llvm-project-release-prs repo and then create the pull request. Reviewed By: thieta Differential Revision: https://reviews.llvm.org/D126940
-
Fangrui Song authored
-
River Riddle authored
The current support was essentially the amount necessary to support replacing SymbolRefAttrs, but suffers from various deficiencies (both ergonomic and functional): * Replace crashes if unsupported This makes it really hard to use safely, given that you don't know if you are going to crash or not when using it. * Types aren't supported This seems like a simple missed addition when the attribute replacement support was originally added. * The ergonomics are weird It currently uses an index based replacement, which makes the implementations quite clunky. This commit refactors support to be a bit more ergonomic, and also adds support for types in the process. This was also a great oppurtunity to greatly simplify how replacement is done in the symbol table. Fixes #56355 Differential Revision: https://reviews.llvm.org/D130589
-
Fangrui Song authored
It manifests as an incorrect name in --print-archive-stats=.
-
Fangrui Song authored
-
Craig Topper authored
-
Argyrios Kyrtzidis authored
-
Argyrios Kyrtzidis authored
...instead of calling `llvm::sys::fs::current_path()` directly. Differential Revision: https://reviews.llvm.org/D130443
-
Danny Mösch authored
Fixes https://github.com/llvm/llvm-project/issues/55025. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D129596
-
Martin Sebor authored
Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D129224
-
Augusto Noronha authored
TestStackFromStdModule.py started failing due to f4fb72e6 (https://reviews.llvm.org/D128146), with a clang assertion failure: assert(isa<InjectedClassNameType>(Decl->TypeForDecl))
-
Jon Chesterfield authored
-
Tom Stellard authored
https://developercommunity.visualstudio.com/t/Prev-Issue---with-__assume-isnan-/1597317 This was causing unittest failures on Windows for the GitHub actions based CI we use in the release branches. Failed Tests (2): LLVM-Unit :: Support/./SupportTests.exe/FormatVariadicTest.BigTest LLVM-Unit :: Support/./SupportTests.exe/NativeFormatTest.BoundaryTests Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D129822
-
Sanjay Patel authored
This is an alternate to D129155 that uses TTI.haveFastSqrt() to avoid a potential miscompile for programs with reads of errno. Moving the transform to AggressiveInstCombine provides access to TTI. If a sqrt call has "nnan", that implies that the input argument is never negative because sqrt of {negative number} --> NAN. If the argument is never negative and the call can be lowered without a libcall, then we can assume that errno accesses are unchanged after lowering, so the call can be translated to the LLVM intrinsic (which is expected to become inline code). This affects codegen for targets like x86 that have sqrt instructions, but still have to conservatively assume that a libcall may be needed to set errno as shown in issue #52620 and issue #56383. This patch won't solve those examples - we will need to extend this to use CannotBeOrderedLessThanZero or similar, enhance that analysis for new operators, and/or deal with llvm.assume too. Differential Revision: https://reviews.llvm.org/D129167 -
Shilei Tian authored
Add the support for `atomic compare` and `atomic compare capture` in the release note of clang. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D129211
-
Danny Mösch authored
Without the "found declaration" it is later not possible to know where the operator declaration was brought into the scope calling it. The initial motivation for this fix came from #55095. However, this also has an influence on `clang -ast-dump` which now prints a `UsingShadow` attribute for operators only visible through `using` statements. Also, clangd now correctly references the `using` statement instead of the operator directly. Reviewed By: shafik Differential Revision: https://reviews.llvm.org/D129973
-
Walter Erquinigo authored
This diff move the logic of `GetControlFlowKind()` from Disassembler.cpp to DisassemblerLLVMC.cpp. Here's details: - Actual logic of GetControlFlowKind() move to `DisassemblerLLVMC.cpp`, and we can check underlying architecture using `DisassemblerScope` there. - With this change, passing 'triple' to `GetControlFlowKind()` is no more required. Reviewed By: wallace Differential Revision: https://reviews.llvm.org/D130320
-
Walter Erquinigo authored
- Decouple TSCs from trace items - Turn TSCs into events just like CPUs. The new name is HW clock tick, wich could be reused by other vendors. - Add a GetWallTime that returns the wall time that the trace plug-in can infer for each trace item. - For intel pt, we are doing the following interpolation: if an instruction takes less than 1 TSC, we use that duration, otherwise, we assume the instruction took 1 TSC. This helps us avoid having to handle context switches, changes to kernel, idle times, decoding errors, etc. We are just trying to show some approximation and not the real data. For the real data, TSCs are the way to go. Besides that, we are making sure that no two trace items will give the same interpolation value. Finally, we are using as time 0 the time at which tracing started. Sample output: ``` (lldb) r Process 750047 launched: '/home/wallace/a.out' (x86_64) Process 750047 stopped * thread #1, name = 'a.out', stop reason = breakpoint 1.1 frame #0: 0x0000000000402479 a.out`main at main.cpp:29:20 26 }; 27 28 int main() { -> 29 std::vector<int> vvv; 30 for (int i = 0; i < 100; i++) 31 vvv.push_back(i); 32 (lldb) process trace start -s 64kb -t --per-cpu (lldb) b 60 Breakpoint 2: where = a.out`main + 1689 at main.cpp:60:23, address = 0x0000000000402afe (lldb) c Process 750047 resuming Process 750047 stopped * thread #1, name = 'a.out', stop reason = breakpoint 2.1 frame #0: 0x0000000000402afe a.out`main at main.cpp:60:23 57 map<int, int> m; 58 m[3] = 4; 59 -> 60 map<string, string> m2; 61 m2["5"] = "6"; 62 63 std::vector<std::string> vs = {"2", "3"}; (lldb) thread trace dump instructions -t -f -e thread #1: tid = 750047 0: [379567.000 ns] (event) HW clock tick [48599428476224707] 1: [379569.000 ns] (event) CPU core changed [new CPU=2] 2: [390487.000 ns] (event) HW clock tick [48599428476246495] 3: [1602508.000 ns] (event) HW clock tick [48599428478664855] 4: [1662745.000 ns] (event) HW clock tick [48599428478785046] libc.so.6`malloc 5: [1662746.995 ns] 0x00007ffff7176660 endbr64 6: [1662748.991 ns] 0x00007ffff7176664 movq 0x32387d(%rip), %rax ; + 408 7: [1662750.986 ns] 0x00007ffff717666b pushq %r12 8: [1662752.981 ns] 0x00007ffff717666d pushq %rbp 9: [1662754.977 ns] 0x00007ffff717666e pushq %rbx 10: [1662756.972 ns] 0x00007ffff717666f movq (%rax), %rax 11: [1662758.967 ns] 0x00007ffff7176672 testq %rax, %rax 12: [1662760.963 ns] 0x00007ffff7176675 jne 0x9c7e0 ; <+384> 13: [1662762.958 ns] 0x00007ffff717667b leaq 0x17(%rdi), %rax 14: [1662764.953 ns] 0x00007ffff717667f cmpq $0x1f, %rax 15: [1662766.949 ns] 0x00007ffff7176683 ja 0x9c730 ; <+208> 16: [1662768.944 ns] 0x00007ffff7176730 andq $-0x10, %rax 17: [1662770.939 ns] 0x00007ffff7176734 cmpq $-0x41, %rax 18: [1662772.935 ns] 0x00007ffff7176738 seta %dl 19: [1662774.930 ns] 0x00007ffff717673b jmp 0x9c690 ; <+48> 20: [1662776.925 ns] 0x00007ffff7176690 cmpq %rdi, %rax 21: [1662778.921 ns] 0x00007ffff7176693 jb 0x9c7b0 ; <+336> 22: [1662780.916 ns] 0x00007ffff7176699 testb %dl, %dl 23: [1662782.911 ns] 0x00007ffff717669b jne 0x9c7b0 ; <+336> 24: [1662784.906 ns] 0x00007ffff71766a1 movq 0x3236c0(%rip), %r12 ; + 24 (lldb) thread trace dump instructions -t -f -e -J -c 4 [ { "id": 0, "timestamp_ns": "379567.000000", "event": "HW clock tick", "hwClock": 48599428476224707 }, { "id": 1, "timestamp_ns": "379569.000000", "event": "CPU core changed", "cpuId": 2 }, { "id": 2, "timestamp_ns": "390487.000000", "event": "HW clock tick", "hwClock": 48599428476246495 }, { "id": 3, "timestamp_ns": "1602508.000000", "event": "HW clock tick", "hwClock": 48599428478664855 }, { "id": 4, "timestamp_ns": "1662745.000000", "event": "HW clock tick", "hwClock": 48599428478785046 }, { "id": 5, "timestamp_ns": "1662746.995324", "loadAddress": "0x7ffff7176660", "module": "libc.so.6", "symbol": "malloc", "mnemonic": "endbr64" }, { "id": 6, "timestamp_ns": "1662748.990648", "loadAddress": "0x7ffff7176664", "module": "libc.so.6", "symbol": "malloc", "mnemonic": "movq" }, { "id": 7, "timestamp_ns": "1662750.985972", "loadAddress": "0x7ffff717666b", "module": "libc.so.6", "symbol": "malloc", "mnemonic": "pushq" }, { "id": 8, "timestamp_ns": "1662752.981296", "loadAddress": "0x7ffff717666d", "module": "libc.so.6", "symbol": "malloc", "mnemonic": "pushq" } ] ``` Differential Revision: https://reviews.llvm.org/D130054 -
Sanjay Patel authored
We already call the more general isImpliedCondition() (which calls isImpliedTrueByMatchingCmp() internally) from simplifyAndInst() and simplifyOrInst(). There was a difference visible with this change on a vector test before a925bef7, but I can't find any gaps now.
-
LLVM GN Syncbot authored
-
Blue Gaston authored
Currently, m{platform}-version-min is default flag used to set min deployment target within compilter-rt and sanitizers. However, clang uses flags -target and -mtargetos for setting target triple and minimum deployment targets. -mtargetos will be the preferred flag to set min version in the future and the ${platform}-version-min flag will not be used for future platforms. This change allows darwin platforms to use either ${platform}-min-version or -mtargetos without breaking lit test flags that allows for overriding the default min value in lit tests Tests using flags: 'darwin_min_target_with_tls_support', 'min_macos_deployment_target' will no longer fail if they use mtargetos instead of version-min. rdar://81028225 Differential Revision: https://reviews.llvm.org/D130542 -
Lambert, Jacob authored
This reverts commit 8348c409.
-
Francis Visoiu Mistrih authored
Assert when the extracted vector is wider than the row/column. Differential Revision: https://reviews.llvm.org/D130173
-
Craig Topper authored
These are aliases that allow the immediate offset to be ommitted. We had predicates for the RV64, RV32+F, and D versions, but not the base versions. I've also re-ordered them to share Predicate lines to improve readability.
-
Francis Visoiu Mistrih authored
The three loops have the same structure: index, header, latch.
-
Jessica Paquette authored
Allows us to select scalar instructions on AArch64. Differential Revision: https://reviews.llvm.org/D115381
-
Sam Estep authored
This patch adds initial support for context-sensitive analysis of simple functions whose definition is available in the translation unit, guarded by the `ContextSensitive` flag in the new `TransferOptions` struct. When this option is true, the `VisitCallExpr` case in the builtin transfer function has a fallthrough case which checks for a direct callee with a body. In that case, it constructs a CFG from that callee body, uses the new `pushCall` method on the `Environment` to make an environment to analyze the callee, and then calls `runDataflowAnalysis` with a `NoopAnalysis` (disabling context-sensitive analysis on that sub-analysis, to avoid problems with recursion). After the sub-analysis completes, the `Environment` from its exit block is simply assigned back to the environment at the callsite. The `pushCall` method (which currently only supports non-method functions with some restrictions) maps the `SourceLocation`s for all the parameters to the existing source locations for the corresponding arguments from the callsite. This patch adds a few tests to check that this context-sensitive analysis works on simple functions. More sophisticated functionality will be added later; the most important next step is to explicitly model context in some fields of the `DataflowAnalysisContext` class, as mentioned in a `FIXME` comment in the `pushCall` implementation. Reviewed By: ymandel, xazax.hun Differential Revision: https://reviews.llvm.org/D130306
-
Craig Topper authored
-Missing CHECK-NO-EXT and CHECK-NO-RV64 on subw. -Stray CHECK-NO-RV64 on c.slli. -c.slli used immediate 1 instead of RV64 only immediate like 63. -Missing CHECK-NO-EXT on c.srli and c.srai
-
Nico Weber authored
-
Jon Chesterfield authored
-
Sam Estep authored
Depends On D130305 This patch adds initial support for context-sensitive analysis of simple functions whose definition is available in the translation unit, guarded by the `ContextSensitive` flag in the new `TransferOptions` struct. When this option is true, the `VisitCallExpr` case in the builtin transfer function has a fallthrough case which checks for a direct callee with a body. In that case, it constructs a CFG from that callee body, uses the new `pushCall` method on the `Environment` to make an environment to analyze the callee, and then calls `runDataflowAnalysis` with a `NoopAnalysis` (disabling context-sensitive analysis on that sub-analysis, to avoid problems with recursion). After the sub-analysis completes, the `Environment` from its exit block is simply assigned back to the environment at the callsite. The `pushCall` method (which currently only supports non-method functions with some restrictions) first calls `initGlobalVars`, then maps the `SourceLocation`s for all the parameters to the existing source locations for the corresponding arguments from the callsite. This patch adds a few tests to check that this context-sensitive analysis works on simple functions. More sophisticated functionality will be added later; the most important next step is to explicitly model context in some fields of the `DataflowAnalysisContext` class, as mentioned in a `TODO` comment in the `pushCall` implementation. Reviewed By: ymandel, xazax.hun Differential Revision: https://reviews.llvm.org/D130306
-
Fangrui Song authored
-print-changed for new pass manager is handy beside -print-after-all. Port it to MachineFunctionPass. Note: lib/Passes/StandardInstrumentations.cpp implements a number of misc features. If we want to use them for codegen, we may need to lift some functionality to LLVMIR. Reviewed By: aeubanks, jamieschmeiser Differential Revision: https://reviews.llvm.org/D130434
-
Jim Ingham authored
This can cause a deadlock if other threads use the common pattern of "lock the StackFrameList, get a frame, lock the StackFrame." Differential Revision: https://reviews.llvm.org/D130524
-
Jacob Lambert authored
Lifting the core functionalities of the clang-offload-bundler into a user-facing library/API. This will allow online and JIT compilers to bundle and unbundle files without spawning a new process. This patch lifts the classes and functions used to implement the clang-offload-bundler into a separate OffloadBundler.cpp, and defines three top-level API functions in OfflaodBundler.h. BundleFiles() UnbundleFiles() UnbundleArchives() This patch also introduces a Config class that locally stores the previously global cl::opt options and arrays to allow users to call the APIs in a multi-threaded context, and introduces an OffloadBundler class to encapsulate the top-level API functions. We also lift the BundlerExecutable variable, which is specific to the clang-offload-bundler tool, from the API, and replace its use with an ObjcopyPath variable. This variable must be set in order to internally call llvm-objcopy. Finally, we move the API files from clang/tools/clang-offload-bundler into clang/lib/Driver and clang/include/clang/Driver. Differential Revision: https://reviews.llvm.org/D129873 -
Simon Pilgrim authored
This should fix a report on D130251 of an assert due to a bitwidth mismatch in APInt::isSubSetOf
-
Fangrui Song authored
These module flags use the Min merge behavior with a default value of zero, so we don't need to emit them if zero. Reviewed By: danielkiss Differential Revision: https://reviews.llvm.org/D130145
-
Dmitry Preobrazhensky authored
Summary of changes: - Update FLAT LDS syntax (see https://reviews.llvm.org/D125126)
-