- Jan 18, 2020
-
-
Matt Arsenault authored
Currently there are 4 different mechanisms for controlling denormal flushing behavior, and about as many equivalent frontend controls. - AMDGPU uses the fp32-denormals and fp64-f16-denormals subtarget features - NVPTX uses the nvptx-f32ftz attribute - ARM directly uses the denormal-fp-math attribute - Other targets indirectly use denormal-fp-math in one DAGCombine - cl-denorms-are-zero has a corresponding denorms-are-zero attribute AMDGPU wants a distinct control for f32 flushing from f16/f64, and as far as I can tell the same is true for NVPTX (based on the attribute name). Work on consolidating these into the denormal-fp-math attribute, and a new type specific denormal-fp-math-f32 variant. Only ARM seems to support the two different flush modes, so this is overkill for the other use cases. Ideally we would error on the unsupported positive-zero mode on other targets from somewhere. Move the logic for selecting the flush mode into the compiler driver, instead of handling it in cc1. denormal-fp-math/denormal-fp-math-f32 are now both cc1 flags, but denormal-fp-math-f32 is not yet exposed as a user flag. -cl-denorms-are-zero, -fcuda-flush-denormals-to-zero and -fno-cuda-flush-denormals-to-zero will be mapped to -fp-denormal-math-f32=ieee or preserve-sign rather than the old attributes. Stop emitting the denorms-are-zero attribute for the OpenCL flag. It has no in-tree users. The meaning would also be target dependent, such as the AMDGPU choice to treat this as only meaning allow flushing of f32 and not f16 or f64. The naming is also potentially confusing, since DAZ in other contexts refers to instructions implicitly treating input denormals as zero, not necessarily flushing output denormals to zero. This also does not attempt to change the behavior for the current attribute. The LangRef now states that the default is ieee behavior, but this is inaccurate for the current implementation. The clang handling is slightly hacky to avoid touching the existing denormal-fp-math uses. Fixing this will be left for a future patch. AMDGPU is still using the subtarget feature to control the denormal mode, but the new attribute are now emitted. A future change will switch this and remove the subtarget features.
-
Richard Smith authored
A TemplateIdAnnotation represents only a template-id, not a nested-name-specifier plus a template-id. Don't make a redundant copy of the CXXScopeSpec and store it on the template-id annotation. This slightly improves error recovery by more properly handling the case where we would form an invalid CXXScopeSpec while parsing a typename specifier, instead of accidentally putting the token stream into a broken "annot_template_id with a scope specifier, but with no preceding annot_cxxscope token" state.
-
Petr Hosek authored
This is an alternative to the continous mode that was implemented in D68351. This mode relies on padding and the ability to mmap a file over the existing mapping which is generally only available on POSIX systems and isn't suitable for other platforms. This change instead introduces the ability to relocate counters at runtime using a level of indirection. On every counter access, we add a bias to the counter address. This bias is stored in a symbol that's provided by the profile runtime and is initially set to zero, meaning no relocation. The runtime can mmap the profile into memory at abitrary location, and set bias to the offset between the original and the new counter location, at which point every subsequent counter access will be to the new location, which allows updating profile directly akin to the continous mode. The advantage of this implementation is that doesn't require any special OS support. The disadvantage is the extra overhead due to additional instructions required for each counter access (overhead both in terms of binary size and performance) plus duplication of counters (i.e. one copy in the binary itself and another copy that's mmapped). Differential Revision: https://reviews.llvm.org/D69740
-
- Jan 17, 2020
-
-
Sergej Jaskiewicz authored
Summary: Depends on D72847 Reviewers: vvereschaka, aorlov, andreil99 Reviewed By: vvereschaka Subscribers: mgorny, kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72850
-
Ian Levesque authored
Extend -fxray-instrumentation-bundle to split function-entry and function-exit into two separate options, so that it is possible to instrument only function entry or only function exit. For use cases that only care about one or the other this will save significant overhead and code size. Differential Revision: https://reviews.llvm.org/D72890
-
Ian Levesque authored
XRay allows tuning by minimum function size, but also always instruments functions with loops in them. If the minimum function size is set to a large value the loop instrumention ends up causing most functions to be instrumented anyway. This adds a new flag, -fxray-ignore-loops, to disable the loop detection logic. Differential Revision: https://reviews.llvm.org/D72873
-
Adrian Prantl authored
[this re-applies c0176916 with the correct commit message and phabricator link] This addresses point 1 of PR44213. https://bugs.llvm.org/show_bug.cgi?id=44213 The DW_AT_LLVM_sysroot attribute is used for Clang module debug info, to allow LLDB to import a Clang module from source. Currently it is part of each DW_TAG_module, however, it is the same for all modules in a compile unit. It is more efficient and less ambiguous to store it once in the DW_TAG_compile_unit. This should have no effect on DWARF consumers other than LLDB. Differential Revision: https://reviews.llvm.org/D71732
-
Adrian Prantl authored
This reverts commit 12e47947. I accidentally landed this patch with the wrong commit message ...
-
Alexey Bataev authored
Emit more precise debug locations for the OpenMP outlined regions.
-
Alina Sbirlea authored
-
Fangrui Song authored
llvm-nm on Linux prints 0 line while llvm-nm on macOS prints 1 line.
-
Sanne Wouda authored
Summary: When compiling with -munwind-tables, the SEH filter funclet needs the uwtable function attribute, which gets automatically added if we use SetInternalFunctionAttributes. The filter funclet is internal so this seems appropriate. Reviewers: rnk Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72786
-
Fangrui Song authored
-
Fangrui Song authored
-
Francis Visoiu Mistrih authored
After D69825, the output of clang -### when running in process can be prefixed by ' (in-process)'. Skip it.
-
Adrian Prantl authored
This is a purely cosmetic change that is NFC in terms of the binary output. I bugs me that I called the attribute DW_AT_LLVM_isysroot since the "i" is an artifact of GCC command line option syntax (-isysroot is in the category of -i options) and doesn't carry any useful information otherwise. This attribute only appears in Clang module debug info. Differential Revision: https://reviews.llvm.org/D71722
-
Yitzhak Mandelbaum authored
Summary: Currently, an attempt to rewrite source code inside a macro expansion succeeds, but results in empty text, rather than failing with an error. This patch restructures to the code to explicitly validate ranges before attempting to edit them. Reviewers: gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72274
-
Dmitri Gribenko authored
RecursiveASTVisitor expects TraverseDecl to be implemented by subclasses.
-
Gabor Horvath authored
Right now every dataflow algorithm uses its own worklist implementation. This is a first step to reduce this duplication. Some upcoming algorithms such as the lifetime analysis is going to use the factored out implementations. Differential Revision: https://reviews.llvm.org/D72380
-
Martin Probst authored
Summary: tslint and tsc (the TypeScript compiler itself) use comment pragmas of the style: // tslint:disable-next-line:foo // @ts-ignore These must not be wrapped and must stay on their own line, in isolation. For tslint, this required adding it to the pragma regexp. The comments starting with `@` are already left alone, but this change adds test coverage for them. Reviewers: krasimir Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72907
-
Krasimir Georgiev authored
Summary: Revision a75f8d98 fixed spacing for operators, but caused the const and non-const versions to diverge: ``` // With Style.PointerAlignment = FormatStyle::PAS_Left: struct A { operator char*() { return ""; } operator const char *() const { return ""; } }; ``` The code was checking if the type specifier was directly preceded by `operator`. However there could be comments and `const/volatile` in between. Reviewers: mprobst Reviewed By: mprobst Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72911
-
Martin Probst authored
Summary: Including `do`, `for`, and `while`, `if`, `else`, `try`, `catch`, in addition to the previously handled fields. The unit test explicitly uses methods, but this code path handles both fields and methods. Reviewers: krasimir Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72827
-
serge-sans-paille authored
Glibc issue: https://sourceware.org/bugzilla/show_bug.cgi?id=25399 The fix consist in considering the missing function as a builtin lowered to a nop. Differential Revision: https://reviews.llvm.org/D72869
-
serge-sans-paille authored
This reverts commit 3d210ed3. See https://reviews.llvm.org/D71082 for the patch and discussion that make it possible to reapply this patch.
-
Richard Smith authored
-
Richard Smith authored
-
Volodymyr Sapsai authored
Partially reverts 0a2be46c as it turned out to cause redundant module rebuilds in multi-process incremental builds. When a module was getting out of date, all compilation processes started at the same time were marking it as `ToBuild`. So each process was building the same module instead of checking if it was built by someone else and using that result. In addition to the work duplication, contention on the same .pcm file wasn't making builds faster. Note that for a single-process build this change would cause redundant module reads and validations. But reading a module is faster than building it and multi-process builds are more common than single-process. So I'm willing to make such a trade-off. rdar://problem/54395127 Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D72860
-
Nico Weber authored
When LLVM_APPEND_VC_REV=OFF is set, the current git hash is no longer embedded into binaries (mostly for --version output). Without it, most binaries need to relink after every single commit, even if they didn't change otherwise (due to, say, a documentation-only commit). LLVM_APPEND_VC_REV is ON by default, so this doesn't change the default behavior of anything. With this, all clients of GenerateVersionFromVCS.cmake honor LLVM_APPEND_VC_REV. Differential Revision: https://reviews.llvm.org/D72855
-
David Blaikie authored
PointerLikeTypeTraits: Standardize NumLowBitsAvailable on static constexpr rather than anonymous enum This is (more?) usable by GDB pretty printers and seems nicer to write. There's one tricky caveat that in C++14 (LLVM's codebase today) the static constexpr member declaration is not a definition - so odr use of this constant requires an out of line definition, which won't be provided (that'd make all these trait classes more annoyidng/expensive to maintain). But the use of this constant in the library implementation is/should always be in a non-odr context - only two unit tests needed to be touched to cope with this/avoid odr using these constants. Based on/expanded from D72590 by Christian Sigg.
-
Alexey Bataev authored
Need to disable emission of RTTI descriptors for NVPTX devices to be able to use dynamic classes without unresolved symbols at link stage.
-
Matt Arsenault authored
-
- Jan 16, 2020
-
-
Krzysztof Parzyszek authored
-
Alexey Bataev authored
generation function, NFC.
-
Krzysztof Parzyszek authored
In addition to that, use target features to validate intrinsic availability on a given target.
-
Ulrich Weigand authored
Use floating-point instead of integer zero constants to avoid creating implicit conversions, which currently cause suboptimal code to be generated with -ffp-exception-behavior=strict. NFC otherwise.
-
Mircea Trofin authored
Summary: The old pass manager separated speed optimization and size optimization levels into two unsigned values. Coallescing both in an enum in the new pass manager may lead to unintentional casts and comparisons. In particular, taking a look at how the loop unroll passes were constructed previously, the Os/Oz are now (==new pass manager) treated just like O3, likely unintentionally. This change disallows raw comparisons between optimization levels, to avoid such unintended effects. As an effect, the O{s|z} behavior changes for loop unrolling and loop unroll and jam, matching O2 rather than O3. The change also parameterizes the threshold values used for loop unrolling, primarily to aid testing. Reviewers: tejohnson, davidxl Reviewed By: tejohnson Subscribers: zzheng, ychen, mehdi_amini, hiraditya, steven_wu, dexonsmith, dang, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D72547
-
Krzysztof Parzyszek authored
-
Krzysztof Parzyszek authored
-
Nico Weber authored
$URL$ is an SVN keyword substitution enabled via `svn propset svn:keywords "URL" tools/clang/lib/Basic/Version.cpp`. Now that we no longer use SVN, it's no longer being replaced by anything, and we no longer offer svn exports. So remove the $URL$-specific logic. The "cfe" path prefix removal also no longer makes sense now that we're on git: Both CLANG_REPOSITORY and LLVM_REPOSITORY are usually set to https://github.com/llvm/llvm-project.git So remove that too, and remove the "llvm" prefix removal for symmetry. With the github url, "llvm" _is_ found in the string, but not in the place the function expected. Nobody noticed since the llvm repository path is only used if CLANG_REVISION and LLVM_REVISION are different, which in the git monorepo world they never should be. (I might remove the "// Support LLVM in a separate repository" block in a separate commit.) Differential Revision: https://reviews.llvm.org/D72848
-
Krzysztof Parzyszek authored
-