- Sep 29, 2021
-
-
wlei authored
Differential Revision: https://reviews.llvm.org/D109769
-
serge-sans-paille authored
(This is a recommit of 3d6f49a5 that should no longer break validation since bd379915). It is a common practice in glibc header to provide an inline redefinition of an existing function. It is especially the case for fortified function. Clang currently has an imperfect approach to the problem, using a combination of trivially recursive function detection and noinline attribute. Simplify the logic by suffixing these functions by `.inline` during codegen, so that they are not recognized as builtin by llvm. After that patch, clang passes all tests from https://github.com/serge-sans-paille/fortify-test-suite Differential Revision: https://reviews.llvm.org/D109967
-
Leonard Chan authored
Some tests with binary IDs would fail with error: no profile can be merged. This is because raw profiles could have unaligned headers when emitting binary IDs. This means padding should be emitted after binary IDs are emitted to ensure everything else is aligned. This patch adds padding after each binary ID to ensure the next binary ID size is 8-byte aligned. This also adds extra checks to ensure we aren't reading corrupted data when printing binary IDs. Differential Revision: https://reviews.llvm.org/D110365
-
Aaron Ballman authored
This reverts commit c0687e19. There are testing failures being caught by bots. See http://45.33.8.238/linux/56886/step_8.txt as an example.
-
Sanjay Patel authored
-
Akira Hatanaka authored
-
Kevin Athey authored
This reverts commit 3d6f49a5. Broke bot: https://lab.llvm.org/buildbot/#/builders/5/builds/12360
-
Artem Belevich authored
This allows clang to work on Linux distributions like Debian where <CUDA-PATH>/include may be a symlink to /usr/include. We only need `cuda_wrappers` to be present before the standard C++ library headers. The CUDA SDK headers themselves do not need to be found that early. This addresses https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=995122 mentioned in post-commit comments on D108247 Differential Revision: https://reviews.llvm.org/D110596
-
Vitaly Buka authored
-
Siva Chandra Reddy authored
Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D110611
-
Roman Gareev authored
multiplication The following code modifies elements of the array D. for (i = 0; i < _PB_NI; i++) for (j = 0; j < _PB_NJ; j++) { for (k = 0; k < _PB_NK; k++) { double Mul = A[i][k] * B[k][j]; D[i][j][k] += Mul; C[i][j] += Mul; } } Nevertheless, the code is recognised as a matrix-matrix multiplication, since the second and third dimensions of D are accessed with non-zero strides. This fixes the typo, which was made during the translation to C++ bindings (https://reviews.llvm.org/D35845). Reviewed By: Michael Kruse <llvm@meinersbur.de> Differential Revision: https://reviews.llvm.org/D110491 -
Jozef Lawrynowicz authored
The -mmcu= option accepts a generic MCU named "msp430", which sets the CPU to msp430 and disables hardware multiply support. The current purpose of accepting this value is to allow -mmcu= to be used as an alias for -mcpu=, however there are some downsides to doing this. -mmcu= provides additional features that will interfere with the expected behavior if the user tries to to use it as an alias for -mcpu=. -mmcu=msp430 will conflict with -mhwmult=, since the "msp430" MCU is defined to have no hardware multiply support, so the user will not be able to set an explicit hardware multiply version. -mmcu=msp430 will put "-Tmsp430.ld" on the linker command line, however TI's support files do not provide a linker script with this name and so the user would have to explicitly create it. Differential Revision: https://reviews.llvm.org/D108299
-
David Blaikie authored
Otherwise we're losing type information for these functions.
-
Lang Hames authored
The slab allocator is frequently used in -noexec tests where we want a consistent memory layout. In this context we also want to set the effective page size, rather than using the page size of the host process, since not all systems use the same page size. The -slab-page-size option allows us to set the page size for such tests. The -slab-page-size option will also be honored in exec mode when using the slab allocator, but will trigger an error if the requested size is not a multiple of the actual process page size. This option was motivated by test failures on a ppc64 bot that was returning zero from sys::Process::getPageSize(), so it also contains a check for errors and zero results from that function if the -slab-page-size option is absent. Existing slab allocator tests will be updated to use this option in a follow-up commit so that we can point the failing bot at this commit and observe errors associated with sys::Process::getPageSize().
-
Lang Hames authored
MachO doesn't have a '.text.startup' -- this is just plain unsupported.
-
Michael Jones authored
Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D110581
-
Adrian Prantl authored
This patch improves the effectiveness of BDCE's debug info salvaging by processing the instructions in reverse order and delaying dropAllReferences until after debug info salvaging. This allows salvaging of entire chains of deleted instructions! Previously we would remove all references from an instruction, which would make it impossible to use that instruction to salvage a later instruction in the instruction stream, because its operands were already removed. Differential Revision: https://reviews.llvm.org/D110568
-
Adrian Prantl authored
This patch improves the effectiveness of ADCE's debug info salvaging by processing the instructions in reverse order and delaying dropAllReferences until after debug info salvaging. This allows salvaging of entire chains of deleted instructions! Previously we would remove all references from an instruction, which would make it impossible to use that instruction to salvage a later instruction in the instruction stream, because its operands were already removed. Differential Revision: https://reviews.llvm.org/D110462
-
Adrian Prantl authored
This patch enables debug info salvaging for truncating/extending ptr int conversions. The testcase uncovered a bug in adce, which is addressed separately. rdar://80227769 Differential Revision: https://reviews.llvm.org/D110461
-
Paul Robinson authored
There are two sets of new/delete functions, one with Windows/MSVC mangling and one with Itanium mangling. Mark one set or the other as unavailable depending on the target. Split the test malloc-free-delete.ll into three parts: malloc-free.dll for the C API tests, new-delete-itanium.ll and new-delete-msvc.ll for the target-specific new/delete tests. Differential Revision: https://reviews.llvm.org/D110419
-
Simon Pilgrim authored
-
Yuanfang Chen authored
(This relands 59337263 and makes sure comma operator diagnostics are suppressed in a SFINAE context.) While at it, add the diagnosis message "left operand of comma operator has no effect" (used by GCC) for comma operator. This also makes Clang diagnose in the constant evaluation context which aligns with GCC/MSVC behavior. (https://godbolt.org/z/7zxb8Tx96) Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D103938
-
Fangrui Song authored
* Add a newline before `DYNAMIC RELOCATION RECORDS` (see D101796) * Add the missing `OFFSET TYPE VALUE` line * Align columns Note: llvm-readobj/ELFDumper.cpp `loadDynamicTable` has sophisticated PT_DYNAMIC code which is unavailable in llvm-objdump. Reviewed By: jhenderson, Higuoxing Differential Revision: https://reviews.llvm.org/D110595
-
Alex Richardson authored
This commit is the InstCombine follow-up to the previous constant-folding change that enables noticeable optimizations for CHERI-enabled targets. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D110247
-
Alex Richardson authored
I was looking at some missed optimizations in CHERI-enabled targets and noticed that we weren't removing vtable indirection for calls via known pointers-to-members. The underlying reason for this is that we represent pointers-to-function-members as {i8 addrspace(200)*, i64} and generate the constant offsets using (gep i8 null, <index>). We use a constant GEP here since inttoptr should be avoided for CHERI capabilities. The pointer-to-member call uses ptrtoint to extract the index, and due to this missing fold we can't infer the actual value loaded from the vtable. This is the initial constant folding change for this pattern, I will add an InstCombine fold as a follow-up. We could fold all inbounds GEP to null (and therefore the ptrtoint to zero) since zero is the only valid offset for an inbounds GEP. If the offset is not zero, that GEP is poison and therefore returning 0 is valid (https://alive2.llvm.org/ce/z/Gzb5iH). However, Clang currently generates inbounds GEPs on NULL for hand-written offsetof() expressions, so this could lead to miscompilations. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D110245 -
Alex Richardson authored
Differential Revision: https://reviews.llvm.org/D110244
-
Alex Richardson authored
I am looking at constant-folding changes that could affect these tests, so check that it emits the expected global value instead of just checking that it doesn't crash.
-
Alex Richardson authored
Looking at this test I did not see why MinGW was using a different command line until I looked at the git history. Add a comment explaining what this RUN line is actually testing. Also add two more RUN lines to show that indirectly passed member pointers don't inhibit the optimization.
-
Alex Richardson authored
This works just fine even if the Arm backend is not built.
-
Alex Richardson authored
-
Alex Richardson authored
When using a datalayout that has pointer index width != pointer size this code triggers an assertion in Value::stripAndAccumulateConstantOffsets(). I encountered this this while compiling FreeBSD for CHERI-RISC-V. Also update LoadsTest.cpp to use a DataLayout with index width != pointer width to ensure this case is tested. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D110406
-
Alex Richardson authored
On MIPS, functions with exception handling code emits an additional temporary label at the start of the function (due to UseAssignmentForEHBegin): _Z8do_catchv: # @_Z8do_catchv .Ltmp3: .set .Lfunc_begin0, .Ltmp3 .cfi_startproc .cfi_personality 128, DW.ref.__gxx_personality_v0 .cfi_lsda 0, .Lexception0 .frame $c11,48,$c17 .mask 0x00000000,0 .fmask 0x00000000,0 .set noreorder .set nomacro .set noat # %bb.0: # %entry The `[^:]*` regex was terminating the search after .Ltmp<N>: and therefore not detecting functions with exception handling. Reviewed By: atanasyan, MaskRay Differential Revision: https://reviews.llvm.org/D100027 -
Alex Richardson authored
Show that we fail to generate CHECK lines for MIPS64 functions with EH. Differential Revision: https://reviews.llvm.org/D110408
-
Arthur O'Dwyer authored
There's really no reason to even have two different enums here, but *definitely* we shouldn't have *three*, and they don't need so many synonymous enumerator values. Differential Revision: https://reviews.llvm.org/D110516
-
Roman Lebedev authored
The only sched models that for cpu's that support avx2 but not avx512 are: haswell, broadwell, skylake, zen1-3 For this tuple, measuring becomes problematic since there's a lot of spilling going on, but apparently all these memory ops do not affect worst-case estimate at all here. For load we have: https://godbolt.org/z/5qGb9odP6 - for intels `Block RThroughput: <=106.0`; for ryzens, `Block RThroughput: <=34.8` So pick cost of `106`. For store we have: https://godbolt.org/z/KrWcv4Ph7 - for intels `Block RThroughput: =58.0`; for ryzens, `Block RThroughput: <=20.5` So pick cost of `58`. I'm directly using the shuffling asm the llc produced, without any manual fixups that may be needed to ensure sequential execution. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D110593
-
Roman Lebedev authored
The only sched models that for cpu's that support avx2 but not avx512 are: haswell, broadwell, skylake, zen1-3 For load we have: https://godbolt.org/z/3Tc5s897j - for intels `Block RThroughput: =39.0`; for ryzens, `Block RThroughput: <=13.5` So pick cost of `39`. For store we have: https://godbolt.org/z/fo1h9E67e - for intels `Block RThroughput: =21.0`; for ryzens, `Block RThroughput: <=12.0` So pick cost of `21`. I'm directly using the shuffling asm the llc produced, without any manual fixups that may be needed to ensure sequential execution. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D110592
-
Roman Lebedev authored
The only sched models that for cpu's that support avx2 but not avx512 are: haswell, broadwell, skylake, zen1-3 For load we have: https://godbolt.org/z/1Wcaf9c7T - for intels `Block RThroughput: =9.0`; for ryzens, `Block RThroughput: <=4.5` So pick cost of `9`. For store we have: https://godbolt.org/z/1Wcaf9c7T - for intels `Block RThroughput: =15.0`; for ryzens, `Block RThroughput: <=6.0` So pick cost of `15`. I'm directly using the shuffling asm the llc produced, without any manual fixups that may be needed to ensure sequential execution. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D110591
-
Roman Lebedev authored
The only sched models that for cpu's that support avx2 but not avx512 are: haswell, broadwell, skylake, zen1-3 For load we have: https://godbolt.org/z/bhscej4WM - for intels `Block RThroughput: =13.0`; for ryzens, `Block RThroughput: <=7.0` So pick cost of `13`. For store we have: https://godbolt.org/z/Yf4Pfnxbq - for intels `Block RThroughput: =10.0`; for ryzens, `Block RThroughput: <=3.5` So pick cost of `10`. I'm directly using the shuffling asm the llc produced, without any manual fixups that may be needed to ensure sequential execution. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D110590
-
wlei authored
Similar to https://reviews.llvm.org/D110465, we can compute function size on-demand for the functions that's hit by samples. Here we leverage the raw range samples' address to compute a set of sample hit function. Then `BinarySizeContextTracker` just works on those function range for the size. Reviewed By: hoy Differential Revision: https://reviews.llvm.org/D110466
-
wlei authored
Previously we do symbolization for all the functions and actually we only need the symbols that's hit by the samples. This can significantly speed up the time for large size binary. Optimization for per-inliner will come along with next patch. Reviewed By: hoy, wenlei Differential Revision: https://reviews.llvm.org/D110465
-