- Feb 26, 2022
-
-
Christopher Di Bella authored
libc++ has started splicing standard library headers into much more fine-grained content for maintainability. It's very likely that outdated and naive tooling (some of which is outside of LLVM's scope) will suggest users include things such as <__ranges/access.h> instead of <ranges>, and Hyrum's law suggests that users will eventually begin to rely on this without the help of tooling. As such, this commit intends to protect users from themselves, by making it a hard error for anyone outside of the standard library to include libc++ detail headers. Differential Revision: https://reviews.llvm.org/D106124
-
Fangrui Song authored
See https://reviews.llvm.org/D120305#3347094
-
Craig Topper authored
This doesn't appear to be used and it would be a layering violation if it was.
-
Evgeniy Brevnov authored
Currently, SLP can insert "shuffle" instruction beween PHI and Landing pad instruction. The problem is demonstrated by LIT test. The solution is to adjust insertion point once we are done with PHI generation. Differential Revision: https://reviews.llvm.org/D120552
-
Fangrui Song authored
This works with glibc crt1.o (its crt1.o is essentially Scrt1.o plus (if static PIE is supported for the arch) _dl_relocate_static_pie) but looks wacky. musl crt1.o is not built with an explicit -fno-pic/-fpie/-fpic. If it was built with a non-default-pie GCC/Clang, the linker might complain about absolute relocations referencing _init/_fini for the -pie link: ``` ld: error: relocation R_X86_64_32 cannot be used against symbol '_fini'; recompile with -fPIC >>> defined in obj/crt/crt1.o >>> referenced by crt1.c >>> obj/crt/crt1.o:(_start_c) ```
-
Joao Moreira authored
https://github.com/ClangBuiltLinux/linux/issues/1606 When GNU_PROPERTY_X86_FEATURE_1_IBT is enabled, ld.lld will create .plt output section even if there is no PLT entry. Fix this by implementing IBTPltSection::isNeeded instead of using the default code path (which always returns true). Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D120600
-
Med Ismail Bennani authored
This checks `m_fs` before dereferencing it to access its`isLocal` method. rdar://67410058 Signed-off-by:
Med Ismail Bennani <medismail.bennani@gmail.com>
-
Med Ismail Bennani authored
This patch relands commit 3e3e79a9, and fixes the memory sanitizer issue described in D120284, by removing the output arguments from the LLDB_INSTRUMENT_VA invocation. Differential Revision: https://reviews.llvm.org/D120599 Signed-off-by:
Med Ismail Bennani <medismail.bennani@gmail.com>
-
Med Ismail Bennani authored
This patch should fix the test failure on scripted_crashlog_json.test. The failure is happening because crash reporter will obfuscate the executable path in the crashlog, if it is located inside the user's home directory and replace it with `/USER/*/` as a placeholder. To fix that, we can patch the placeholder with the executable path before loading the crashlog in lldb. This also fixes a bug where we would create another target when loading the crashlog in a scripted process, even if lldb already had a target for it. Now, crashlog will only create a target if there is none in lldb. Differential Revision: https://reviews.llvm.org/D120598 Signed-off-by:
Med Ismail Bennani <medismail.bennani@gmail.com>
-
Fangrui Song authored
* For `-###`, `-o %t.o` is unnecessary if we don't specifically test the output filename. * --target= is the canonical spelling. -target is a legacy spelling which unfortunately cannot be removed because there are too many uses. * -no-canonical-prefixes uses the dereferenced absolute path for the cc1 command. For most tests "-cc1" is sufficient to identify the command line, no need to specifically test the "clang" command, and -no-canonical-prefixes can removed. * --unwindlib= is the preferred spelling. -u is a short option taking a value, which means a -uwindlib= typo cannot be detected. I recommend that you take a look at linux-cross.cpp. Testing include paths and library paths in one RUN line is sometimes more readable than having separate include/library tests. Having separate RUN lines for misc features like -fdata-sections (`aix-data-sections.c`) is wasteful. It may be better testing multiple options in a single RUN command. Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D119309
-
Adrian Prantl authored
This reverts commit 2cd9a86d.
-
Aart Bik authored
Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D120500
-
Aart Bik authored
Removed TODO now that we support scalars properly Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D120590
-
Reid Kleckner authored
IMO the BPF backend shouldn't read random source files referenced from debug info. I filed llvm.org/pr54092 about this.
-
Elia Geretto authored
This PR fixes the tests for the `OptimizerLast` extension point in the new pass manager. The extension point uses module passes, but it was being tested with a function pass. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D120581
-
Elia Geretto authored
This PR adds two extension points to the default LTO pipeline in PassBuilder, one at the beginning and one at the end. These two extension points already existed in the old pass manager, the aim is to replicate the same functionality in the new one. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D120491
-
Bixia Zheng authored
The PyTACO DSL doesn't support reduction to scalars. This change enhances the MLIR-PyTACO implementation to support reduction to scalars. Extend an existing test to show the syntax of reduction to scalars and two methods to retrieve the scalar values. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D120572
-
Reid Kleckner authored
Follow up to 1e396aff. On some standard library configurations these have a dependency on the complete type of SymbolizableModule.
-
Amanieu d'Antras authored
These aliases are produced by MergeFunctions and need to be mangled according to the calling convention of the function they are pointing to instead of defaulting to the C calling convention. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D120382
-
Xiaodong Liu authored
Reviewed By: ro, MaskRay Differential Revision: https://reviews.llvm.org/D120381
-
Martin Storsjö authored
According to POSIX.1 (and Glibc docs, and Microsoft docs), the wctob function returns EOF on error, not WEOF. (And wctob_l should consequently do the same.) The previous misconception about what this function returns on errors seems to stem from incorrect documentation in macOS, stemming from BSD docs with the same issue. The corresponding documentation bug in FreeBSD was fixed in 2012 in https://github.com/freebsd/freebsd-src/commit/945aab90991bdaeabeb6ef25112975a96c01dd4e, but it hasn't been fixed for macOS yet. The issue seems to only be a documentation issue; the implementation on macOS actually does use EOF, not WEOF: https://opensource.apple.com/source/Libc/Libc-1439.40.11/locale/FreeBSD/wctob.c.auto.html On most Unices, EOF and WEOF are the same value, but on Windows, EOF is -1, while WEOF is (unsigned short)0xFFFF. By fixing this, two tests start passing on Windows. Differential Revision: https://reviews.llvm.org/D120088
-
Martin Storsjö authored
On Windows, the en_US.UTF-8 locale returns `n_sign_posn == 0`, which means that the sign for a negative currency is parentheses around the whole value, instead of a leading minus. Differential Revision: https://reviews.llvm.org/D120549
-
Jonas Devlieghere authored
Instead of checking whether TARGET_OS_IPHONE is set to 1, the current code just check the existence of TARGET_OS_IPHONE, which either always succeeds or always fails, depending on whether you have TargetConditionals.h included.
-
Jonas Devlieghere authored
Ensure we copy the symbol table for MH_PRELOAD Mach-Os, which don't have a LINKEDIT segment, but (can) have a symbol table. rdar://88919473 Differential revision: https://reviews.llvm.org/D120583
-
Adrian Prantl authored
This is part of a series of patches to upstream support for Mach-O chained fixups. Differential Revision: https://reviews.llvm.org/D113725
-
Adrian Prantl authored
This fixes a bug that happens when using -fdebug-prefix-map to remap an absolute path to a relative path. Since the path was absolute before remapping, it is safe to assume that concatenating the remapped working directory would be wrong. Differential Revision: https://reviews.llvm.org/D113718
-
owenca authored
Differential Revision: https://reviews.llvm.org/D120503
-
Jameson Nash authored
I noticed randomly that the only reason these tests from rG8e679823 seemed to still be failing is that they are missing CHECK lines. I don't know anymore than that they don't appear to crash or assert when I ran them today. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D115377
-
Yaxun (Sam) Liu authored
match pattern should match lld.exe on windows Reviewed by: Shangwu Yao Differential Revision: https://reviews.llvm.org/D120563
-
Valentin Clement authored
This handles the lowering of the logical comparison to `arith.cmpi` operation. The logical operations `.OR.`, `.AND.` and `.NOT.` are lowered to `arith.ori`, `arith.andi` and `arith.xori` This patch is part of the upstreaming effort from fir-dev branch. Depends on D120559 Reviewed By: schweitz, rovka Differential Revision: https://reviews.llvm.org/D120560 Co-authored-by:
Eric Schweitz <eschweitz@nvidia.com> Co-authored-by:
Jean Perier <jperier@nvidia.com>
-
Valentin Clement authored
This patch handles the lowering of real comparison operations. The real comparison operations are lowered to `arith.cmpf` operation. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: PeteSteinfeld, schweitz Differential Revision: https://reviews.llvm.org/D120561 Co-authored-by:
Eric Schweitz <eschweitz@nvidia.com> Co-authored-by:
Jean Perier <jperier@nvidia.com>
-
Valentin Clement authored
This patch handles the lowering of comprison operator between integers. The comparison is lowered to a `arith.cmpi` operation. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: PeteSteinfeld, schweitz, rovka Differential Revision: https://reviews.llvm.org/D120559 Co-authored-by:
Eric Schweitz <eschweitz@nvidia.com> Co-authored-by:
Jean Perier <jperier@nvidia.com>
-
Fangrui Song authored
The no-pic large code model style `movabsq $callback, %rsi` does not work with -pie.
-
Hanhan Wang authored
This extends TileAndFuse to handle distribution on tensors. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D120441
-
Craig Topper authored
This was a test for an infinite loop so the CHECK lines don't really matter, but they'd get generated the next time someone runs the script on the file so might as well do it while I'm touching it.
-
Jameson Nash authored
Seems like this can be const, since Passes shouldn't modify it. Reviewed By: wsmoses Differential Revision: https://reviews.llvm.org/D120518
-
Diego Caballero authored
The AVX2 lowering for transpose operations is only applicable to f32 vector types. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D120427
-
Diego Caballero authored
The existing AVX2 lowering patterns for the transpose op only triggers if the input vector is 2-D. This patch extends the patterns to trigger for n-D vectors which are effectively 2-D vectors (e.g., vector<1x4x1x8x1). The main constraint for the generalized AVX2 patterns to be applicable to these vectors is that the dimensions that are greater than one must be transposed. Otherwise, the existing patterns are not applicable. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D119505
-
Fangrui Song authored
ctfconvert seems to use REL-format `.rel.SUNW_dof` for 32-bit architectures. ``` Binary file usr/ports/lang/perl5.32/work/perl-5.32.1/dtrace_mini.o matches [alfredo.junior@dell-a ~/tmp/llvm-bug]$ readelf -r dtrace_mini.o Relocation section (.rel.SUNW_dof): r_offset r_info r_type st_value st_name 00000184 0000281a R_PPC_REL32 00000000 $dtrace1772974259.Perl_dtrace_probe_load ``` Support R_PPC_REL32 to fix `ld.lld: error: drti.c:(.SUNW_dof+0x4E4): internal linker error: cannot read addend for relocation R_PPC_REL32`. While here, add some common relocation types for AArch64, PPC, and PPC64. We perform minimum tests. Reviewed By: adalava, arichardson Differential Revision: https://reviews.llvm.org/D120535
-
Chia-hung Duan authored
This change gives explicit order of verifier execution and adds `hasRegionVerifier` and `verifyWithRegions` to increase the granularity of verifier classification. The orders are as below, 1. InternalOpTrait will be verified first, they can be run independently. 2. `verifyInvariants` which is constructed by ODS, it verifies the type, attributes, .etc. 3. Other Traits/Interfaces that have marked their verifier as `verifyTrait` or `verifyWithRegions=0`. 4. Custom verifier which is defined in the op and has marked `hasVerifier=1` If an operation has regions, then it may have the second phase, 5. Traits/Interfaces that have marked their verifier as `verifyRegionTrait` or `verifyWithRegions=1`. This implies the verifier needs to access the operations in its regions. 6. Custom verifier which is defined in the op and has marked `hasRegionVerifier=1` Note that the second phase will be run after the operations in the region are verified. Based on the verification order, you will be able to avoid verifying duplicate things. Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D116789
-