- Apr 21, 2020
-
-
Johannes Doerfert authored
Before we kept the first applicable `ident_t*` during deduplication of runtime calls. The problem is that "first" is dependent on the iteration order of a DenseMap. Since the proper solution, which is to combine the information from all `ident_t*`, should be deterministic on its own, we will not try to make the iteration order deterministic. Instead, we will create a fresh `ident_t*` if there is not a unique existing `ident_t*` to pick.
-
Johannes Doerfert authored
The value type was a set before which can easily lead to excessive memory usage and copying. We use a pointer to a vector instead now.
-
Johannes Doerfert authored
-
Richard Smith authored
determining whether a statement expression has side-effects.
-
Richard Smith authored
PR45534: don't ignore unmodeled side-effects when constant-evaluating a call to __builtin_constant_p. Such side-effects should result in the call evaluating to 'false', even if we can still determine what value the argument expression will evaluate to.
-
Fangrui Song authored
Don't error on Config.KeepFileSymbols for COFF and Mach-O. Original description: GNU objcopy removes STT_FILE symbols for strip-debug operations, and keeps them for --discard-all operation. Match their behaviour for llvm-objcopy. Bug: https://github.com/android/ndk/issues/1212 Differential Revision: https://reviews.llvm.org/D76675
-
Yi Kong authored
GNU objcopy removes STT_FILE symbols for strip-debug operations, and keeps them for --discard-all operation. Match their behaviour for llvm-objcopy. Bug: https://github.com/android/ndk/issues/1212 Differential Revision: https://reviews.llvm.org/D76675
-
Shengchen Kan authored
-
Shengchen Kan authored
Summary: Before this patch, `relaxInstruction` takes three arguments, the first argument refers to the instruction before relaxation and the third argument is the output instruction after relaxation. There are two quite strange things: 1) The first argument's type is `const MCInst &`, the third argument's type is `MCInst &`, but they may be aliased to the same variable 2) The backends of ARM, AMDGPU, RISC-V, Hexagon assume that the third argument is a fresh uninitialized `MCInst` even if `relaxInstruction` may be called like `relaxInstruction(Relaxed, STI, Relaxed)` in a loop. In this patch, we drop the thrid argument, and let `relaxInstruction` directly modify the given instruction. Also, this patch fixes the bug https://bugs.llvm.org/show_bug.cgi?id=45580, which is introduced by D77851, and breaks the assumption of ARM, AMDGPU, RISC-V, Hexagon. Reviewers: Razer6, MaskRay, jyknight, asb, luismarques, enderby, rtaylor, colinl, bcain Reviewed By: Razer6, MaskRay, bcain Subscribers: bcain, nickdesaulniers, nathanchance, wuzish, annita.zhang, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, tpr, sbc100, jgravelle-google, kristof.beyls, hiraditya, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78364
-
Yonghong Song authored
For the test case in this patch like below struct t { int a; } __attribute__((preserve_access_index)); int foo(void *); int test(struct t *arg) { long param[1]; param[0] = (long)&arg->a; return foo(param); } The IR right before BPF SimplifyPatchable phase: %1:gpr = LD_imm64 @"llvm.t:0:0$0:0" %2:gpr = LDD killed %1:gpr, 0 %3:gpr = ADD_rr %0:gpr(tied-def 0), killed %2:gpr STD killed %3:gpr, %stack.0.param, 0 After SimplifyPatchable phase, the incorrect IR is generated: %1:gpr = LD_imm64 @"llvm.t:0:0$0:0" %3:gpr = ADD_rr %0:gpr(tied-def 0), killed %1:gpr CORE_MEM killed %3:gpr, 306, %0:gpr, @"llvm.t:0:0$0:0" Note that CORE_MEM pseudo op is introduced to encode memory operations related to CORE. In the above, we intend to check whether we have a store like *(%3:gpr + 0) = ... and if this is the case, we could replace it with *(%0:gpr + @"llvm.t:0:0$0:0"_ = ... Unfortunately, in the above, IR for the store is *(%stack.0.param + 0) = %3:gpr and transformation should not happen. Note that we won't have problem if the actual CORE dereference (arg->a) happens. This patch fixed the problem by skip CORE optimization if the use of ADD_rr result is not the base address of the store operation. Differential Revision: https://reviews.llvm.org/D78466 -
Mircea Trofin authored
Reviewers: dblaikie, craig.topper Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78528
-
Johannes Doerfert authored
We now also use the BumpPtrAllocator from the Attributor in the InformationCache. The lifetime of objects in either is pretty much the same and it should result in consistently good performance regardless of the allocator. Doing so requires to call more constructors manually but so far that does not seem to be problematic or messy. --- Single run of the Attributor module and then CGSCC pass (oldPM) for SPASS/clause.c (~10k LLVM-IR loc): Before: ``` calls to allocation functions: 615359 (368257/s) temporary memory allocations: 83315 (49859/s) peak heap memory consumption: 75.64MB peak RSS (including heaptrack overhead): 163.43MB total memory leaked: 269.04KB ``` After: ``` calls to allocation functions: 613042 (359555/s) temporary memory allocations: 83322 (48869/s) peak heap memory consumption: 75.64MB peak RSS (including heaptrack overhead): 162.92MB total memory leaked: 269.04KB ``` Difference: ``` calls to allocation functions: -2317 (-68147/s) temporary memory allocations: 7 (205/s) peak heap memory consumption: 2.23KB peak RSS (including heaptrack overhead): 0B total memory leaked: 0B ---
-
Johannes Doerfert authored
The windows bot reported a crash [0] which seems to not happen on other platforms. We disable the old pass manager cgscc runs while this is under investigation. [0] http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/23151
-
Dan Liew authored
Summary: 861b69fa (rdar://problem/58789439) while fixing symbolization for TSan completely broke ASan's runtime for the simulators. The problem with the previous patch is that the memory passed to `putenv()` was poisoned and when passed to `putenv()` it tripped an interceptor for `strchr()` which saw the memory was poisoned and raised an ASan issue. The memory was poisoned because `AtosSymbolizerProcess` objects are created using ASan's internal allocator. Memory from this allocator gets poisoned with `kAsanInternalHeapMagic`. To workaround this, this patch makes the memory for the environment variable entry a global variable that isn't poisoned. This pass also adds a `DCHECK(getenv(K_ATOS_ENV_VAR))` because the following DCHECK would crash because `internal_strcmp()` doesn't work on nullptr. rdar://problem/62067724 Reviewers: kubamracek, yln Subscribers: #sanitizers, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D78525
-
Shengchen Kan authored
-
Mircea Trofin authored
Reviewers: dblaikie, craig.topper Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78523
-
Chris Bieneman authored
This patch gets the asserts working correctly when LLVM_REVERSE_ITERATION=On by fixing the iterators returned by the DenseMap::find* methods so that they return well-formed iterators that work with reverse iteration, and satisfy the assertions.
-
David Blaikie authored
Recommits c51b45e3 Reverted in b350c666 due to some (Google-internal) regressions I cannot reproduce... (so we'll see if they reproduce this time around)
-
River Riddle authored
-
Sam Kerner authored
[dfsan] Fix a bug in strcasecmp() and strncasecmp(): Compare the lowercase versions of the characters when choosing a return value. Summary: Resolves this bug: https://bugs.llvm.org/show_bug.cgi?id=38369 Reviewers: morehouse, pcc Reviewed By: morehouse Subscribers: #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D78490
-
Sean Silva authored
The previous code result a mismatch between block argument types and predecessor successor args when a type conversion was needed in a multiblock case. It was assuming the replaced result types matched the region result types. Also, slighly improve the debug output from the inliner. Differential Revision: https://reviews.llvm.org/D78415
-
Alexander Shaposhnikov authored
Copy LC_ENCRYPT_INFO/LC_ENCRYPT_INFO_64 load commands. Test plan: make check-all Differential revision: https://reviews.llvm.org/D78339
-
Pavel Iliin authored
-
Eric Christopher authored
creation string. Differential Revision: https://reviews.llvm.org/D78519
-
Chris Bieneman authored
This should resolve the failures from 31282d39.
-
Chris Bieneman authored
A recent change (4e86e5ee), broke `LLVM_REVERSE_ITERATION` for DenseMaps by adding an assert. It is valid to de-reference and increment one step behind `End` when reverse iteration is enabled because `End` is actually the start of the pointer bucket.
-
Sriraman Tallam authored
With clang option -funique-internal-linkage-symbols, symbols with internal linkage get names with the module hash appended. Differential Revision: https://reviews.llvm.org/D78243
-
Christopher Tetreault authored
Reviewers: efriedma, sdesmalen, hfinkel, david-arm, fpetrogalli Reviewed By: efriedma, fpetrogalli Subscribers: wuzish, nemanjai, tschuett, hiraditya, kbarton, rkruppe, psnobl, shchenz, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77900
-
Christopher Tetreault authored
Reviewers: efriedma, ahatanak, sdesmalen, c-rhodes, david-arm Reviewed By: efriedma Subscribers: dexonsmith, sdardis, arichardson, tschuett, hiraditya, jrtc27, atanasyan, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77906
-
David Green authored
-
Piotr Sobczak authored
This reverts commit 728b878d. D76417 has caused vgpr count to go up significantly in real-world graphics content.
-
Louis Dionne authored
This reverts commit 20fd6243, which broke the C++03 build bot. I'll have another stab at this after fixing those failures.
-
Christopher Tetreault authored
Reviewers: efriedma, sdesmalen, jnspaulsson, jonpa Reviewed By: efriedma Subscribers: tschuett, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77898
-
Andrew Litteken authored
- Adding changes to support comments on outlined functions with outlining for the conditions through which it was outlined (e.g. Thunks, Tail calls) - Adapts the emitFunctionHeader to print out a comment next to the header if the target specifies it based on information in MachineFunctionInfo - Adds mir test for function annotiation Differential Revision: https://reviews.llvm.org/D78062
-
Jonas Devlieghere authored
Several SB API functions return strings using (char*, size_t) output arguments. During capture, we serialize an empty string for the char* because the memory can be uninitialized. During active replay, we have custom replay redirects that ensure that we don't override the buffer from which we're reading, but rather write to a buffer on the heap with the given length. This is sufficient for the active reproducer use case, where we only care about the side effects of the API calls, not the values actually returned. This approach does not not work for passive replay because here we ignore all the incoming arguments, and re-execute the current function with the arguments deserialized from the reproducer. This means that these function will update the deserialized copy of the arguments, rather than whatever was passed in by the SWIG wrapper. To solve this problem, this patch extends the reproducer instrumentation to handle this special case for passive replay. We nog ignore the replayer in the registry and the incoming char pointer, and instead reinvoke the current method on the deserialized class, and populate the output argument. Differential revision: https://reviews.llvm.org/D77759
-
Craig Topper authored
This is breaking the clang build. This reverts commit 897409fb.
-
Jacques Pienaar authored
Summary: Generate method to generate a DictionaryAttr with attribute values of derived attribute. If a conversion back from the derived attribute C++ type to Attribute is not defined, then attempting to materialize such an op's derived attributes would result in runtime failure. This allows to treat derived attributes and attributes of an op in more uniform manner where needed. The derived attributes are not added to the operation but returned as new attribute instead. Differential Revision: https://reviews.llvm.org/D78302
-
Craig Topper authored
Differential Revision: https://reviews.llvm.org/D78443
-
Louis Dionne authored
When the new libc++ test format was enabled, warnings were accidentally dropped cause they were not part of the %{compile_flags} substitution. This commit adds them back, however `-Werror` is only used for non-verify tests (cause it doesn't make sense for verify tests).
-