- Nov 09, 2021
-
-
David CARLIER authored
getting the tls base address. unlike linux arm64, the tpidr_el0 returns always 0 (aka unused) thus using tpidrro_el0 instead clearing up the cpu id encoded in the lower bits. Reviewed-By: yln Differential Revision: https://reviews.llvm.org/D112866
-
Ard Biesheuvel authored
Currently, LOAD_STACK_GUARD on ARM is only implemented for Mach-O targets, and other targets rely on the generic support which may result in spilling of the stack canary value or address, or may cause it to be kept in a callee save register across function calls, which means they essentially get spilled as well, only by the callee when it wants to free up this register. So let's implement LOAD_STACK GUARD for other targets as well. This ensures that the load of the stack canary is rematerialized fully in the epilogue. This code was split off from D112768: [ARM] implement support for TLS register based stack protector for which it is a prerequisite. Reviewed By: nickdesaulniers Differential Revision: https://reviews.llvm.org/D112811
-
Arthur O'Dwyer authored
At this point, every supported compiler that claims a -std=c++17 mode should also support `if constexpr`. This was an issue for GCC 5 and GCC 6, but hasn't been an issue since GCC 7. (Our current minimum supported GCC version, IIUC, is GCC 10 or 11.) Differential Revision: https://reviews.llvm.org/D113348
-
Snehasish Kumar authored
This ensures that the c++ test gets the right CXXFLAGS if required.
-
Volodymyr Sapsai authored
Merge definition visibility the same way we do for other decls. Without the fix the added test emits `-Wobjc-method-access` as it cannot find a visible protocol. Make this warning `-Werror` so the test would fail when protocol visibility regresses. rdar://83600696 Differential Revision: https://reviews.llvm.org/D111860
-
Michael Liao authored
- CUDA cannot associate memory space with pointer types. Even though Clang could add extra attributes to specify the address space explicitly on a pointer type, it breaks the portability between Clang and NVCC. - This change proposes to assume the address space from a pointer from the assumption built upon target-specific address space predicates, such as `__isGlobal` from CUDA. E.g., ``` foo(float *p) { __builtin_assume(__isGlobal(p)); // From there, we could assume p is a global pointer instead of a // generic one. } ``` This makes the code portable without introducing the implementation-specific features. Note that NVCC starts to support __builtin_assume from version 11. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D112041 -
Chia-hung Duan authored
Generate static function for matching the type/attribute to reduce the memory footprint. Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D110199
-
Peter Klausler authored
When an array's shape involves references to symbols that are not invariant in a scope -- the classic example being a dummy array with an explicit shape involving other dummy arguments -- the compiler was creating shape expressions that referenced those symbols. This might be valid if those symbols are somehow captured and copied at each entry point to a subprogram, and the copies referenced in the shapes instead, but that's not the case. This patch introduces a new expression predicate IsScopeInvariantExpr(), which defines a class of expressions that contains constant expressions (in the sense that the standard uses that term) as well as references to items that may be safely accessed in a context-free way throughout their scopes. This includes dummy arguments that are INTENT(IN) and not VALUE, descriptor inquiries into descriptors that cannot change, and bare LEN type parameters within the definitions of derived types. The new predicate is then used in shape analysis to winnow out results that would have otherwise been contextual. Differential Revision: https://reviews.llvm.org/D113309
-
Adrian Prantl authored
-
Mogball authored
-
Fangrui Song authored
Like rLLD354040. Before: `error: unrecognized relocation Unknown (254)` Now: `error: unknown relocation (254) against symbol foo`
-
Jon Chesterfield authored
This reverts commit db81d8f6.
-
Jon Chesterfield authored
This reverts commit c499d690.
-
Martin Storsjö authored
Also remove a comment that seems to be left behind. Differential Revision: https://reviews.llvm.org/D113269
-
Martin Storsjö authored
This is needed for the paths to work when using forward slashes; this fixes the DirectoryWatcherTests unit tests. Also allocate missing space for the null terminator, which seems to have been missing all along (writing the terminator out of bounds). Differential Revision: https://reviews.llvm.org/D113264
-
Martin Storsjö authored
This fixes the following clang VFS tests, if `windows_slash` is the default style: Clang :: VFS/implicit-include.c Clang :: VFS/relative-path.c Clang-Unit :: Frontend/./FrontendTests.exe/CompilerInstance.DefaultVFSOverlayFromInvocation Also clarify a couple references to `Style::windows` into `Style::windows_backslash`, to make it clearer that each of them are opinionated in different directions (even if it doesn't matter for calls to e.g. `is_absolute`). Differential Revision: https://reviews.llvm.org/D113272
-
Sanjay Patel authored
This is a potential follow-up suggested in D113212.
-
Nikita Popov authored
InstCombine converts range tests of the form (X > C1 && X < C2) or (X < C1 || X > C2) into checks of the form (X + C3 < C4) or (X + C3 > C4). It is possible to express all range tests in either of these forms (with different choices of constants), but currently neither of them is considered canonical. We may have equivalent range tests using either ult or ugt. This proposes to canonicalize all range tests to use ult. An alternative would be to canonicalize to either ult or ugt depending on the specific constants involved -- e.g. in practice we currently generate ult for && style ranges and ugt for || style ranges when going through the insertRangeTest() helper. In fact, the "clamp like" fold was relying on this, which is why I had to tweak it to not assume whether inversion is needed based on just the predicate. Proof: https://alive2.llvm.org/ce/z/_SP_rQ Differential Revision: https://reviews.llvm.org/D113366
-
peter klausler authored
Component::CreatePointerDescriptor unconditionally expects a vector of subscripts to be passed as an argument, but is called from NAMELIST input with a null pointer. Make that argument a nullable pointer, move it to the end of the argument list, and give it a default value of nullptr. Differential Revision: https://reviews.llvm.org/D113312
-
Peter Klausler authored
Previously, jumps to labels in constructs from exterior statements would elicit only a warning. Upgrade these to errors unless the branch into the construct would enter into only DO, IF, and SELECT CASE constructs, whose interiors don't scope variables or have other set-up/tear-down semantics. Branches into these "safe" constructs are still errors if they're nested in an unsafe construct that doesn't also enclose the exterior branch statement. Differential Revision: https://reviews.llvm.org/D113310
-
Louis Dionne authored
-
Adrian Prantl authored
I am planning to upstream MachOObjectFile code to support Darwin chained fixups. In order to test the new parser features we need a way to produce correct (and incorrect) chained fixups. Right now the only tool that can produce them is the Darwin linker. To avoid having to check in binary files, this patch allows obj2yaml to print a hexdump of the raw LINKEDIT and DATA segment, which both allows to bootstrap the parser and enables us to easily create malformed inputs to test error handling in the parser. This patch adds two new options to obj2yaml: -raw-data-segment -raw-linkedit-segment Differential Revision: https://reviews.llvm.org/D113234
-
Benjamin Kramer authored
This is an empty object, but depending on your optimizer settings the compiler may emit a reference to the symbol.
-
Peter Klausler authored
A CHECK() in semantics is triggering when analyzing a program with an undefined derived type pointer because the CHECK is expecting a new error message to have been issued in a function but not allowing for the case that a diagnostic could have been produced earlier. Adjust the predicate. Differential Revision: https://reviews.llvm.org/D113307
-
James King authored
This provides better support for `LambdaCapture`s by making them first- class and allowing them to be bindable. In addition, this implements several `LambdaCapture`-related matchers. This does not update how lambdas are traversed. As a result, something like trying to match `lambdaCapture()` by itself will not work - it must be used as an inner matcher. Reviewed By: aaron.ballman, sammccall Differential Revision: https://reviews.llvm.org/D112491
-
Peter Klausler authored
The value of EPSILON() was off by one power of two due to my misreading of the standard; this patch corrects it. Confirmed by checking other Fortran compilers, which all agree. Differential Revision: https://reviews.llvm.org/D113308
-
Jon Chesterfield authored
-
Quinn Pham authored
[NFC] As part of using inclusive language within the llvm project, this patch replaces master with main in file/directory paths in llvm LIT tests. Reviewed By: bjope Differential Revision: https://reviews.llvm.org/D113190
-
Jon Chesterfield authored
Extension of D112504. Lower amdgpu printf to `__llvm_omp_vprintf` which takes the same const char*, void* arguments as cuda vprintf and also passes the size of the void* alloca which will be needed by a non-stub implementation of `__llvm_omp_vprintf` for amdgpu. This removes the amdgpu link error on any printf in a target region in favour of silently compiling code that doesn't print anything to stdout. The exact set of changes to check-openmp probably needs revision before commit Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D112680
-
Roger Kim authored
Removing unclear abbreviations. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D113215
-
Roger Kim authored
The existing code has unnecessary logic to indirectly pass errors through function calls. This diff gets rid of the fluff. Test Plan: Existing unit tests Reviewed By: jhenderson, drodriguez, alexander-shaposhnikov Differential Revision: https://reviews.llvm.org/D113301
-
Suraj Sudhir authored
Add pad_const field to tosa.pad. Add builders to enable optional construction of pad_const in pad op. Update documentation of tosa.clamp to match spec wording. Signed-off-by:
Suraj Sudhir <suraj.sudhir@arm.com> Reviewed By: rsuderman Differential Revision: https://reviews.llvm.org/D113322
-
Peter Klausler authored
When processing the devious NAMELIST input &group logarray = t t t = 666 / for LOGICAL::logarray(3) and INTEGER::t, the runtime library needs to do some look-ahead on the input stream to make sure that the last "t" on the first line is a truth value rather than an item name -- which in this case it is. This look-ahead was implemented in a previous patch but only worked for internal input cases; this patch implements look-ahead capabilities for input from an external file, too (and also adjusts repeated list-directed input items to use this infrastructure, too). Differential Revision: https://reviews.llvm.org/D113311 -
Andrzej Warzynski authored
Please note that the updated documentation reflects the design that we are working towards, but haven't implemented competely yet. We took this approach in order to provide a more holisitic and complete overview of the design. In particular, this document assumes that Flang's frontend and compiler driver can already generate code. This is still work-in-progress and is being developed on the `fir-dev` branch in the F18 repository [1]. [1] https://github.com/flang-compiler/f18-llvm-project/tree/fir-dev Differential Revision: https://reviews.llvm.org/D111573
-
hyeongyu kim authored
-
Michael Benfield authored
Differential Revision: https://reviews.llvm.org/D111833
-
Florian Hahn authored
All phi-like recipes should be at the beginning of a VPBasicBlock with no other recipes in between. Ensure that the recurrence-splicing recipe is not added between phi-like recipes, but after them. Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D111301
-
Craig Topper authored
These and MULHS/MULHU both default to Legal. Targets need to set the ones they don't support to Expand. I think MULHS/MULHU likely has priority in most places so this change probably isn't directly testable. I found it while looking at disabling MULHS/MULHU for nxvXi64 as required for Zve64x. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D113325
-
Jeff Niu authored
Declarative attribute and type formats with assembly formats. Define an `assemblyFormat` field in attribute and type defs with a `mnemonic` to generate a parser and printer. ```tablegen def MyAttr : AttrDef<MyDialect, "MyAttr"> { let parameters = (ins "int64_t":$count, "AffineMap":$map); let mnemonic = "my_attr"; let assemblyFormat = "`<` $count `,` $map `>`"; } ``` Use `struct` to define a comma-separated list of key-value pairs: ```tablegen def MyType : TypeDef<MyDialect, "MyType"> { let parameters = (ins "int":$one, "int":$two, "int":$three); let mnemonic = "my_attr"; let assemblyFormat = "`<` $three `:` struct($one, $two) `>`"; } ``` Use `struct(*)` to capture all parameters. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D111594 -
Lei Zhang authored
This avoids crashes when the pattern is applied to ops with tensor semantics. Reviewed By: ThomasRaoux Differential Revision: https://reviews.llvm.org/D113415
-