- Aug 16, 2023
-
-
Michael Jones authored
Fuzzing revealed bugs in the %e and %g conversions. Since these are very similar, they are grouped together. Again, most of the bugs were related to rounding. As an example, previously the code to check if the number was truncated only worked for digits below the decimal point, due to it being originally designed for %f. This patch adds a mechanism to check the digits above the decimal point for both %e and %g. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D157536
-
Michael Jones authored
Fuzzing revealed several bugs in the %f float conversion. This patch fixes them. Most of these bugs are related to rounding, such as 1.999...999 being rounded to 2.999...999 instead of 2.000...000 due to rounding up not properly changing the nines to zeros. Additionally, much of the rounding infrastructure has been refactored out so it can be shared with the other conversions. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D157535
-
Michael Jones authored
The trailing zeroes were previously not counted when calculating the padding, which caused a high-precision number to get too much padding. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D157534
-
Michael Jones authored
In the same way that get_explicit_mantissa is used to get the mantissa with all the implicit bits spelled out, get_explicit_exponent gives you the exponent with the special cases handled. Mainly it handles the cases where the exponent is zero, which causes the exponent to either be 1 higher than expected, or just 0. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D157156
-
Justin Bogner authored
Rather than redefine --help, /help, -D, and /D, just use the existing options.
-
Augusto Noronha authored
This reverts commit 5d169572.
-
Stanislav Mekhanoshin authored
Differential Revision: https://reviews.llvm.org/D158030
-
Mehdi Amini authored
This reverts commit 02596693. This reverts commit 3c5b4dab. The build is broken: mlir/test/lib/Dialect/Test/TestOps.td:988:7: error: Value specified for template argument 'Pat:supplemental_results' is of type dag; expected type list<dag>: (addBenefit 10) def : Pat<(OpD $input), (OpF $input), [], (addBenefit 10)>; ^
-
Augusto Noronha authored
This patch picks up where https://reviews.llvm.org/D157159 left of, but allows for concurrent reads/writes, but protects setting up and tearing down the underlying Connection object. Differential Revision: https://reviews.llvm.org/D157760
-
Rashmi Mudduluru authored
Differential Revision: https://reviews.llvm.org/D157018
-
Ellis Hoag authored
Emit warnings when `InstrProfCorrelator` finds problems with debug info for lightweight instrumentation profile correlation. To prevent excessive printing, only emit the first 5 warnings. In addition, remove a diagnostic about missing debug info in `InstrProfiling.cpp`. Some compiler-generated functions, e.g., `__clang_call_terminate`, does not emit debug info and will fail a build if `-Werror` is used. This warning is not actionable by the user and I have not seen non-compiler-generated functions fail this test. Reviewed By: smeenai Differential Revision: https://reviews.llvm.org/D156006
-
Michael Buch authored
The usage of this variable was removed in `4f14c17d`. This is no longer used inside this file. Since the call to `GetPersistentExpressionStateForLanguage` has side-effects I marked this NFCI. But there is no good reason we need this here. Differential Revision: https://reviews.llvm.org/D157992
-
Michael Buch authored
Previously types such as `SmallVector<clang::Attr, 4> *` would trigger the assertion inside the `SmallVector` formatter: ``` assert self.type_size != 0 ``` This happens because `the_type.GetTemplateArgumentType(0)` returns `None` (since `the_type` is a pointer to the `SmallVector`). This patch dereferences `the_type` if it's a pointer type. We do this for references already. Differential Revision: https://reviews.llvm.org/D157961
-
Justin Bogner authored
-
Fangrui Song authored
-
Fangrui Song authored
-
Matt Arsenault authored
InstCombine already put these back together so there's no visible change in the -O1 test for the header.
-
Matt Arsenault authored
The name says it shouldn't be not inf, not eq inf.
-
max authored
I've been struggling with generating the C++ class declarations and definitions for custom attributes from TableGen, as described on this documentation page: https://mlir.llvm.org/docs/DefiningDialects/AttributesAndTypes/#adding-a-new-attribute-or-type-definition The code for custom types is automatically generated when the MLIR Dialect is added with `add_mlir_dialect()` in the CMake file. The same is not the case for custom attributes. I think people could benefit from learning how to adjsut their CMakeLists.txt to automatically generate the classes as described on that documentation page. This change adds the necessary information for this. makslevental on Discord was so kind to help me figure this out myself Reviewed By: makslevental Differential Revision: https://reviews.llvm.org/D155249
-
Justin Bogner authored
This is a big refactor of the clang driver's option handling to use the Visibility flags introduced in https://reviews.llvm.org/D157149. There are a few distinct parts, but they can't really be split into separate commits and still be made to compile. 1. We split out some of the flags in ClangFlags to ClangVisibility. Note that this does not include any subtractive flags. 2. We update the Flag definitions and OptIn/OptOut constructs in Options.td by hand. 3. We introduce and use a script, update_options_td_flags, to ease migration of flag definitions in Options.td, and we run that on Options.td. I intend to remove this later, but I'm committing it so that downstream forks can use the script to simplify merging. 4. We update calls to OptTable in the clang driver, cc1as, flang, and clangd to use the visibility APIs instead of Include/Exclude flags. 5. We deprecate the Include/Exclude APIs and add a release note. *if you are ...
-
Jian Cai authored
-
Ryan Burns authored
I don't have a test case for this but noticed this warning when including system headers with `-I` rather than `-isystem`. ``` In file included from <built-in>:1: In file included from /nix/store/jq6bpm0xmhnbffhs5rkxq4n88g5xi2zg-clang-wrapper-11.0.1/resource-root/include/__clang_cuda_runtime_wrapper.h:157: /nix/store/jq6bpm0xmhnbffhs5rkxq4n88g5xi2zg-clang-wrapper-11.0.1/resource-root/include/__clang_cuda_math.h:39:25: warning: extra tokens at end of #ifdef directive [-Wextra-tokens] ^ ``` Reviewed By: tra Differential Revision: https://reviews.llvm.org/D95299 -
Jian Cai authored
This adds a parameter SupplementalPatterns in tablegen class Pattern for postprocessing code. For example, this can be used to ensure ops are placed in the correct device by copying the atttributes that decide devicement placement in Tensorflow dialect to prevent performance regression. Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D157032
-
Jason Molenda authored
-
Jason Molenda authored
Some Apple firmware environments store the UUID of the main binary at a fixed address in low memory. Add that list of addresess to ProcessMachCore to check for a UUID, and try to load it. Differential Revision: https://reviews.llvm.org/D157756
-
Vitaly Buka authored
ScopedThread::Impl::HandleEvent checks that errno is unchanged. As is it's reproducible only with internal symbolizer, but I see no disadvantages in doing that for all symbolizers. Reviewed By: kstoimenov Differential Revision: https://reviews.llvm.org/D157945
-
Vitaly Buka authored
Reviewed By: kstoimenov Differential Revision: https://reviews.llvm.org/D157946
-
Gulfem Savrun Yeniceri authored
This reverts commit f8ad86c2 because it broke some downsteam tests reported in https://reviews.llvm.org/D156611.
-
serge-sans-paille authored
Recommit with test case updated. Differential Revision: https://reviews.llvm.org/D157814
-
serge-sans-paille authored
Recommit with test file updated. Differential Revision: https://reviews.llvm.org/D157808
-
LLVM GN Syncbot authored
-
Jason Molenda authored
On AArch64 systems, we may have different page table setups for low memory and high memory, and therefore a different number of bits used for addressing depending on which half of memory the address is in. This patch extends the qHostInfo and LC_NOTE "addrable bits" so that it can specify the number of addressing bits in high memory and in low memory separately. It builds on the patch I added in https://reviews.llvm.org/D151292 where Process tracks the separate address masks, and there is a user setting to set them manually. Differential Revision: https://reviews.llvm.org/D157667 rdar://113225907
-
Peiming Liu authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D158012
-
Justin Bogner authored
This updates the BoolOption family of option definitions to do the right thing with llvm::opt::Visibility. The only meaningful visibility at this point is llvm::opt::DefaultVis - in the interest of clarity we add an alias for this called "ClangOption" and update PosFlag, NegFlag, and BothFlags definitions to specify that. The updates to option definitions were done with the following three sed scripts (one to update Pos/NegFlag, one for BothFlags, and one that just cleans up whitespace a little): sed -E 's/((Pos|Neg)Flag<[A-Za-z]*, \[[^]]*\])(, "|>|,$)/\1, [ClangOption]\3/g' sed -E 's/(BothFlags<\[[^]]*\])(, ")/\1, [ClangOption], "/' sed -E 's/( *)((Pos|Neg)Flag<.*), ((Pos|Neg)Flag)/\1\2,\n\1\4/' These are idempotent and should be runnable on downstream versions of Options.td if needed to update any additional flags that are present. Differential Revision: https://reviews.llvm.org/D157150
-
Kazu Hirata authored
This patch fixes warnings like: lldb/source/Core/ModuleList.cpp:1086:3: error: 'scoped_lock' may not intend to support class template argument deduction [-Werror,-Wctad-maybe-unsupported]
-
Nikolas Klauser authored
Reviewed By: #libc, ldionne Spies: ldionne, libcxx-commits Differential Revision: https://reviews.llvm.org/D155136
-
Nikolas Klauser authored
This brings most of the enable_ifs in libc++ to the same style. It also has the nice side-effect of reducing the size of names of these symbols, since the depedent return type is shorter. Reviewed By: #libc, ldionne Spies: ldionne, libcxx-commits Differential Revision: https://reviews.llvm.org/D157736
-
Nikolas Klauser authored
GCC 13 has added __is_convertible(), so we don't need to keep the fallback implementation around. Reviewed By: #libc, Mordante Spies: Mordante, libcxx-commits Differential Revision: https://reviews.llvm.org/D157939
-
Kim Gräsman authored
The link syntax was missing a trailing underscore, and there was an extraneous backtick on the reference to IWYU's libcxx.imp. Reviewed By: #libc, philnik Spies: Mordante, libcxx-commits Differential Revision: https://reviews.llvm.org/D157784
-
Eric Christopher authored
-