- Mar 29, 2022
-
-
Paul Kirth authored
Reimplements MisExpect diagnostics from D66324 to reconstruct its original checking methodology only using MD_prof branch_weights metadata. New checks rely on 2 invariants: 1) For frontend instrumentation, MD_prof branch_weights will always be populated before llvm.expect intrinsics are lowered. 2) for IR and sample profiling, llvm.expect intrinsics will always be lowered before branch_weights are populated from the IR profiles. These invariants allow the checking to assume how the existing branch weights are populated depending on the profiling method used, and emit the correct diagnostics. If these invariants are ever invalidated, the MisExpect related checks would need to be updated, potentially by re-introducing MD_misexpect metadata, and ensuring it always will be transformed the same way as branch_weights in other optimization passes. Frontend based profiling is now enabled without using LLVM Args, by introducing a new CodeGen option, and checking if the -Wmisexpect flag has been passed on the command line. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D115907
-
Benjamin Kramer authored
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:472:16: warning: enumeration value 'HLSL' not handled in switch [-Wswitch] switch (IK.getLanguage()) { ^ -
Fangrui Song authored
.eh_frame pieces may be dropped due to GC/ICF. When --emit-relocs adds relocations against .eh_frame, the offsets need to be adjusted. Use the same way as MergeInputSection with a special case handling outSecOff==-1 for an invalid piece (see eh-frame-marker.s). This exposes an issue in mips64-eh-abs-reloc.s that we don't reliably handle anyway. Just add --no-check-dynamic-relocations to paper over it. Original patch by Ayrton Muñoz Differential Revision: https://reviews.llvm.org/D122459
-
Alina Sbirlea authored
Seeing a test failure with asan in Halide generated code, reverting while I investigate. Differential Revision: https://reviews.llvm.org/D121987
-
Fangrui Song authored
* Improve eh-frame-merge.s * Delete invalid .eh_frame+5 test in ehframe-relocation.s
-
Jacques Pienaar authored
Been >2 weeks since flipped to Both, following update procedure and flipping to prefixed.
-
James Y Knight authored
This builtin returns the address of a global instance of the `std::source_location::__impl` type, which must be defined (with an appropriate shape) before calling the builtin. It will be used to implement std::source_location in libc++ in a future change. The builtin is compatible with GCC's implementation, and libstdc++'s usage. An intentional divergence is that GCC declares the builtin's return type to be `const void*` (for ease-of-implementation reasons), while Clang uses the actual type, `const std::source_location::__impl*`. In order to support this new functionality, I've also added a new 'UnnamedGlobalConstantDecl'. This artificial Decl is modeled after MSGuidDecl, and is used to represent a generic concept of an lvalue constant with global scope, deduplicated by its value. It's possible that MSGuidDecl itself, or some of the other similar sorts of things in Clang might be able to be refactored onto this more-generic concept, but there's enough special-case weirdness in MSGuidDecl that I gave up attempting to share code there, at least for now. Finally, for compatibility with libstdc++'s <source_location> header, I've added a second exception to the "cannot cast from void* to T* in constant evaluation" rule. This seems a bit distasteful, but feels like the best available option. Reviewers: aaron.ballman, erichkeane Differential Revision: https://reviews.llvm.org/D120159
-
Jacques Pienaar authored
Been >2 weeks since flipped to Both, following update procedure and flipping to prefixed.
-
Geoffrey Martin-Noble authored
There's a vulnerability in 1.2.11: https://twitter.com/taviso/status/1508438583484452866 Differential Revision: https://reviews.llvm.org/D122619
-
Pierre d'Herbemont authored
Calling an ObjC method from a C function marked with the 'enforce_tcb' attribute did not produce a warning. Now it does, and on top of that Objective-C methods can participate in TCBs themselves. Differential Revision: https://reviews.llvm.org/D122343
-
Aaron Puchert authored
First of all, this is the convention: all other tools have their dependencies private. While it does not have an effect on linking (there is no linking against executables), it does have an effect on exporting: having the targets private allows installing the tools without the libraries in a statically linked build, or a build against libclang-cpp.so. Reviewed By: v.g.vassilev Differential Revision: https://reviews.llvm.org/D122546
-
David Blaikie authored
Not sure if this could use more testing, but hopefully this is adequate.
-
Danny Mösch authored
This is a fix for #53963. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D122544
-
owenca authored
Fixes #54513 Differential Revision: https://reviews.llvm.org/D122548
-
Chris Bieneman authored
Bringing in HLSL as a language as well as language options for each of the HLSL language standards. While the HLSL language is unimplemented, this patch adds the HLSL-specific preprocessor defines which enables testing of the command line options through the driver. Reviewed By: pete, rnk Differential Revision: https://reviews.llvm.org/D122087
-
Emil Kieri authored
This patch makes -version valid, and --version invalid, for flang-new -fc1. The invocation flang-new --version remains valid. This behaviour is consistent with clang (and with clang -cc1 and clang -cc1as). Previously, flang-new -fc1 accepted --version (as per Options.td), but the frontend driver acutally checks for -version. As a result, flang-new -fc1 --version triggered no action, emitted no message, and stalled waiting for standard input. Fixes #51438 Reviewed By: PeteSteinfeld, awarzynski Differential Revision: https://reviews.llvm.org/D122542
-
Fangrui Song authored
STB_GNU_UNIQUE should be treated in a way similar to STB_GLOBAL. This fixes an "Invalid Binding" failure in an LLVM_ENABLE_ASSERTIONS=on build for source files like glibc elf/tst-unique1mod1.c . This bug has been benign so far because (a) Clang does not produce %gnu_unique_object by itself (b) a non-assertion build likely picks the STB_GLOBAL code path anyway.
-
LLVM GN Syncbot authored
-
chenglin.bi authored
select (~a | c), a, b -> and a, (or c, b) https://alive2.llvm.org/ce/z/bnDobs select (~c & b), a, b -> and b, (or a, c) https://alive2.llvm.org/ce/z/k2jJHJ Differential Revision: https://reviews.llvm.org/D122152
-
Nico Weber authored
In a recent run, temp files got created in /tmp/lit-tmp-2wcrtcx1/foo-xxx.o. Since the tmp path contained "crt", this made a few tests fail: http://45.33.8.238/linux/72221/step_7.txt Not allowing '/' as path of the file name prevents this. Differential Revision: https://reviews.llvm.org/D122547
-
lipracer authored
The change of https://reviews.llvm.org/D121513#3411651 has caused a build error when building with clang: /mnt/vss/_work/1/llvm-project/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp:599:26: error: extra ';' outside of a function is incompatible with C++98 [-Werror,-Wc++98-compat-extra-semi] ReduceFolder(ReduceAllOp); Reviewed By: hpmorgan, Mogball Differential Revision: https://reviews.llvm.org/D122599
-
Chris Bieneman authored
This change adds a stub DirectX target for clang to enable targeting dxil targets. Reviewed By: pete Differential Revision: https://reviews.llvm.org/D122085
-
Craig Topper authored
Modified DAGCombiner to pass the shift the bittest input and the shift amount to hasBitTest. This matches the other call to hasBitTest in TargetLowering.h This is an alternative to D122454. Reviewed By: luismarques Differential Revision: https://reviews.llvm.org/D122458
-
Sanjay Patel authored
Issue #54554
-
Mogball authored
Adds another pointer to the union in RegionRange to allow RegionRange to work on ArrayRef<Region *> (i.e. vectors of Region *). Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D122514
-
Mogball authored
(This was a TODO from the initial patch). The control-flow sink utility accepts a callback that is used to sink an operation into a region. The `moveIntoRegion` is called on the same operation and region that return true for `shouldMoveIntoRegion`. The callback must preserve the dominance of the operation within the region. In the default control-flow sink implementation, this is moving the operation to the start of the entry block. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D122445
-
Changpeng Fang authored
Summary: hasHostcallPtr() and hasHeapPtr() are only used in metadata emit. However, we can use the corresponding function attributes directly instead introducing the functions. Reviewers: arsenm Differential Revision: https://reviews.llvm.org/D122600
-
Volodymyr Sapsai authored
-
https://reviews.llvm.org/D82549zhijian authored
Summary: Address post-commit review comments in the https://reviews.llvm.org/D82549, including changed file name from llvm/test/tools/llvm-readobj/XCOFF/xcoff-auxiliary-header.test --> llvm/test/tools/llvm-readobj/XCOFF/auxiliary-header.test replaced macro define by using lambda function. added a helper function to reduce the duplicated check and print error code. Reviewer : James Henderson Differential Revision: https://reviews.llvm.org/D116220
-
Roland McGrath authored
Use Fuchsia's zx_system_get_features API to determine whether LSE atomics are available on the machine. Reviewed By: abrachet Differential Revision: https://reviews.llvm.org/D118839
-
Aaron Ballman authored
Previously, we would instantiate the UDL by marking the function as referenced and potentially binding to a temporary; this skipped transforming the call when the UDL was dependent on a template parameter. Now, we defer all the work to instantiating the call expression for the UDL. This ensures that constant evaluation occurs at compile time rather than deferring until runtime. Fixes Issue 54578.
-
Chris Bieneman authored
This is the bare minimum needed to get the DirectX target compiling, but does not actually do anything. Reviewed By: pete, rnk, arsenm, jaebaek Differential Revision: https://reviews.llvm.org/D122080
-
Eric Li authored
-
Peter Klausler authored
Implement constant folding for the intrinsic function NEAREST() and the related functions IEEE_NEXT_AFTER(), IEEE_NEXT_UP(), and IEEE_NEXT_DOWN(). Differential Revision: https://reviews.llvm.org/D122510
-
Joseph Huber authored
The changes in D122444 caused OpenMP programs built with the LLVM_ENABLE_RUNTIMES options to stop finding the libraries. We generally expect to link against the libraries associated with the clang installation itself but we no longer implicitly included that directory. This patch adds in the include path of the clang installations library to ensure we can find them. Reviewed By: jdoerfert, MaskRay Differential Revision: https://reviews.llvm.org/D122592
-
Jacques Pienaar authored
This has been on _Both for a couple of weeks. Flip usages in core with intention to flip flag to _Prefixed in follow up. Needed to add a couple of helper methods in AffineOps and Linalg to facilitate a pure flag flip in follow up as some of these classes are used in templates and so sensitive to Vector dialect changes. Differential Revision: https://reviews.llvm.org/D122151
-
Nathan Sidwell authored
The OutputBuffer class tries to present a NUL-terminated string API to consumers. But several of them would prefer a StringView. In particular the Microsoft demangler, juggles between NUL-terminated and StringView, which is confusing. This adds a StringView conversion, and adjusts the Demanglers that can benefit from that. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D120990
-
Akira Hatanaka authored
Differential Revision: https://reviews.llvm.org/D122425
-
Mogball authored
- Adds default implementations of `isDefinedOutsideOfLoop` and `moveOutOfLoop` since 99% of all implementations of these functions were identical - `moveOutOfLoop` takes one operation and doesn't return anything anymore. 100% of all implementations of this function would always return `success` and uses would either respond with a pass failure or an `llvm_unreachable`.
-
Craig Topper authored
This as an alternative version of D120641. Starting from the code here https://repo.hca.bsc.es/gitlab/rferrer/llvm-epi/-/raw/EPI/llvm/lib/Target/RISCV/RISCVISelLowering.cpp but with some modifications to how the interim types are calculated, and adding support for f16. Still need to add fptosi for mask vectors. Lots of masked isel patterns added so we can pass the mask through the type changes. Reviewed By: frasercrmck, arcbbb Differential Revision: https://reviews.llvm.org/D122512
-