- Jul 19, 2023
-
-
Jianjian GUAN authored
This patch fixes the failed test of verifyInstructionPredicates which is caused by verifyInstructionPredicates. verifyInstructionPredicates will add JMPk without checking the target predicate. Reviewed By: benshi001 Differential Revision: https://reviews.llvm.org/D155570
-
Jie Fu authored
/buildbot/worker/arc-folder/llvm-project/clang/tools/c-index-test/c-index-test.c:234: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas] /buildbot/worker/arc-folder/llvm-project/clang/tools/c-index-test/c-index-test.c:235: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas] /buildbot/worker/arc-folder/llvm-project/clang/tools/c-index-test/c-index-test.c:236:10: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual] /buildbot/worker/arc-folder/llvm-project/clang/tools/c-index-test/c-index-test.c:237:10: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual] /buildbot/worker/arc-folder/llvm-project/clang/tools/c-index-test/c-index-test.c:238: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas] /buildbot/worker/arc-folder/llvm-project/clang/tools/c-index-test/c-index-test.c:3765: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas] /buildbot/worker/arc-folder/llvm-project/clang/tools/c-index-test/c-index-test.c:3766: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas] /buildbot/worker/arc-folder/llvm-project/clang/tools/c-index-test/c-index-test.c:3767:10: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual] /buildbot/worker/arc-folder/llvm-project/clang/tools/c-index-test/c-index-test.c:3768: warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas]
-
Jake Egan authored
Missed this detail from D155199.
-
WANG Xuerui authored
The LA464 micro-architecture is very sensitive to alignment of hot code, with performance variation of up to ~12% in the go1 benchmark suite of the Go language (as observed by me during my work on the Go loong64 port). [[ https://go.dev/cl/479816 | Manual alignment of certain loops ]] and [[ https://go.dev/cl/479817 | automatic alignment of loop heads ]] helps a lot there, by reducing much of the random variation and generally increasing performance, so we naturally want to do the same here. Practically, LA464 is the only LoongArch micro-architecture in wide use, and we are currently supporting just that. The first "4" in "LA464" stands for "4-issue", in particular its instruction fetch and decode stages are 4-wide; so functions and branch targets should be preferably aligned to at least 16 bytes for best throughput. The Loongson team has benchmarked various combinations of function, loop, and branch target alignments with GCC. [[ https://gcc.gnu.org/pipermail/gcc-patches/2023-May/619980.html | The results ]] show that "16-byte label alignment together with 32-byte function alignment gives best results in terms of SPEC score". A "label" in GCC means a branch target; while we don't currently align branch targets, we do align loops, so in this patch we default to 32-byte function alignment and 16-byte loop alignment. Reviewed By: SixWeining Differential Revision: https://reviews.llvm.org/D148622
-
Jie Fu authored
/Users/jiefu/llvm-project/mlir/test/CAPI/ir.c:1120:18: error: cast from 'const void *' to 'unsigned char *' drops const qualifier [-Werror,-Wcast-qual] (uint8_t *)mlirDenseElementsAttrGetRawData(uint8Elements); ^ /Users/jiefu/llvm-project/mlir/test/CAPI/ir.c:1121:35: error: cast from 'const void *' to 'signed char *' drops const qualifier [-Werror,-Wcast-qual] int8_t *int8RawData = (int8_t *)mlirDenseElementsAttrGetRawData(int8Elements); ^ /Users/jiefu/llvm-project/mlir/test/CAPI/ir.c:1123:19: error: cast from 'const void *' to 'unsigned int *' drops const qualifier [-Werror,-Wcast-qual] (uint32_t *)mlirDenseElementsAttrGetRawData(uint32Elements); ^ /Users/jiefu/llvm-project/mlir/test/CAPI/ir.c:1125:18: error: cast from 'const void *' to 'int *' drops const qualifier [-Werror,-Wcast-qual] (int32_t *)mlirDenseElementsAttrGetRawData(int32Elements); ^ /Users/jiefu/llvm-project/mlir/test/CAPI/ir.c:1127:19: error: cast from 'const void *' to 'unsigned long long *' drops const qualifier [-Werror,-Wcast-qual] (uint64_t *)mlirDenseElementsAttrGetRawData(uint64Elements); ^ /Users/jiefu/llvm-project/mlir/test/CAPI/ir.c:1129:18: error: cast from 'const void *' to 'long long *' drops const qualifier [-Werror,-Wcast-qual] (int64_t *)mlirDenseElementsAttrGetRawData(int64Elements); ^ /Users/jiefu/llvm-project/mlir/test/CAPI/ir.c:1130:34: error: cast from 'const void *' to 'float *' drops const qualifier [-Werror,-Wcast-qual] float *floatRawData = (float *)mlirDenseElementsAttrGetRawData(floatElements); ^ /Users/jiefu/llvm-project/mlir/test/CAPI/ir.c:1132:17: error: cast from 'const void *' to 'double *' drops const qualifier [-Werror,-Wcast-qual] (double *)mlirDenseElementsAttrGetRawData(doubleElements); ^ /Users/jiefu/llvm-project/mlir/test/CAPI/ir.c:1134:19: error: cast from 'const void *' to 'unsigned short *' drops const qualifier [-Werror,-Wcast-qual] (uint16_t *)mlirDenseElementsAttrGetRawData(bf16Elements); ^ /Users/jiefu/llvm-project/mlir/test/CAPI/ir.c:1136:19: error: cast from 'const void *' to 'unsigned short *' drops const qualifier [-Werror,-Wcast-qual] (uint16_t *)mlirDenseElementsAttrGetRawData(f16Elements); ^ 10 errors generated. -
Jie Fu authored
/Users/jiefu/llvm-project/clang/tools/c-index-test/c-index-test.c:234:18: error: cast from 'const char *' to 'char *' drops const qualifier [-Werror,-Wcast-qual] free((char *)unsaved_files[i].Filename); ^ /Users/jiefu/llvm-project/clang/tools/c-index-test/c-index-test.c:235:18: error: cast from 'const char *' to 'char *' drops const qualifier [-Werror,-Wcast-qual] free((char *)unsaved_files[i].Contents); ^ /Users/jiefu/llvm-project/clang/tools/c-index-test/c-index-test.c:3762:32: error: cast from 'const char *' to 'void *' drops const qualifier [-Werror,-Wcast-qual] return (CXIdxClientContainer)"TU"; ^ 3 errors generated. -
eopXD authored
In D155502, we added code for the compiler to check GPR-s for f16 under zhinx. This commit adds code to hit the stack when we run out of GPR-s. With this patch and D155502, resolves #63922 Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D155507
-
Amir Ayupov authored
Pass the revision to checkout to (cmp-rev) as nfc-check-setup option. Simpifies the comparison against arbitrary commit, not just the previous one. Reviewed By: #bolt, rafauler Differential Revision: https://reviews.llvm.org/D155657
-
eopXD authored
The full multiply intrinsics are not included for EEW=64 in Zve64*. They require the V extension to be enabled. This commit improves diagnostic message from ``` <source>:4:10: error: call to undeclared function '__riscv_vsmul_vv_i64m1'; 4 | return __riscv_vsmul_vv_i64m1(op1, op2, __RISCV_VXRM_RNU, vl); ``` to ``` test.c:5:10: error: builtin requires: v 5 | return __riscv_vsmul_vv_i64m1(op1, op2, __RISCV_VXRM_RNU, vl); ``` Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D155416 -
Jake Egan authored
The file offset code is repeated in nearly identical form for every derivation of SectionEntry, so make it into a method in SectionEntry instead. Reviewed By: scott.linder Differential Revision: https://reviews.llvm.org/D155199
-
eopXD authored
(ELEN, LMUL) pairs of (8, mf8), (16, mf4), (32, mf2), (64, m1) requires at least `zve64x`. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D155414
-
Owen Pan authored
-
Akira Hatanaka authored
Using `L` for type `long` results in clang passing 64-bit integers to these intrinsics on LP64 operating systems. This isn't correct as the intrinsics accept 32-bit integers. Use `N` instead of `L` so that 32-bit integers are passed to the intrinsics on LP64 operating systems too. This is the same fix as the following two commits: 33703fb9 afa47c91 Differential Revision: https://reviews.llvm.org/D155012
-
LLVM GN Syncbot authored
-
Nico Weber authored
-
Nico Weber authored
-
Fangrui Song authored
for more efficient section content hashing. Also clean up the tests a bit and properly test the formatting of --print-icf-sections.
-
Johannes Doerfert authored
If we store a constant in an ICV it is easier for the optimizer to propagate it. Since we often use the full block for the thread limit and the parallel team size, we can instead replace that dynamic value with a constant that otherwise cannot occur, here 0.
-
Johannes Doerfert authored
We ended up with `llvm.assume(icmp ne ptr as(4) null, as(4) @str)` because the string in address space 4 was not known to be non-null. There is no need to create these assumes.
-
Alex MacLean authored
Disable this warning for specific cast in llvm_regcomp(). Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D153911
-
David Blaikie authored
Simpler to use ArrayRef directly here rather than a more generic/customizable range helper like iterator_range
-
Craig Topper authored
Remove template parameters that always have their default value.
-
Michael Maitland authored
[RISCV] Remove unused classes VPseudoTernary, VPseudoTernaryNoMaskNoPolicy, and VPseudoConversionW_V These classes are dead and can be removed. Differential Revision: https://reviews.llvm.org/D155634
-
Michael Jones authored
The amount of spaces to pad with is stored in the variable padding_spaces, previously the actual write calls used the same formula to calculate the value. This simplifies and clarifies the values by just reusing the variable. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D155113
-
Michael Jones authored
MPFR has a minimum precision of 2, but the strtofloat fuzz sometimes would request a precision of 1 for the case of the minimum subnormal. This patch tells the fuzzer to ignore any case where the precision would go below 2. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D155130
-
Po-yao Chang authored
1. Teach -Wuser-defined-literals to warn on using double underscores in literal suffix identifiers. 2. Add -Wdeprecated-literal-operator to warn about the use of the first grammar production of literal-operator-id, which defaults to off for now. Differential Revision: https://reviews.llvm.org/D152632
-
Matthew Voss authored
The unified LTO pipeline creates a single LTO bitcode structure that can be used by Thin or Full LTO. This means that the LTO mode can be chosen at link time and that all LTO bitcode produced by the pipeline is compatible, from an optimization perspective. This makes the behavior of LTO a bit more predictable by normalizing the set of LTO features supported by each LTO bitcode file. Example usage: clang -flto -funified-lto -fuse-ld=lld foo.c clang -flto=thin -funified-lto -fuse-ld=lld foo.c clang -c -flto -funified-lto foo.c # -flto={full,thin} are identical in terms of compilation actions clang -flto=thin -fuse-ld=lld foo.o # pass --lto=thin to ld.lld clang -c -flto -funified-lto foo.c clang -flto -fuse-ld=lld foo.o The RFC discussing the details and rational for this change is here: https://discourse.llvm.org/t/rfc-a-unified-lto-bitcode-frontend/61774 Differential Revision: https://reviews.llvm.org/D123805 -
Rashmi Mudduluru authored
Differential Revision: https://reviews.llvm.org/D155134
-
Rashmi Mudduluru authored
Differential Revision: https://reviews.llvm.org/D155304
-
Yitzhak Mandelbaum authored
[clang][dataflow] Add function to `WatchedLiteralsSolver` that reports whether the iteration limit has been reached. This change provides a centralized record of whether the solver is "exhausted". In general, once the solver is exhausted, further uses do not produce meaningful conclusions. Clients can use this information, for example, to choose to discard all results based on the solver, instead of trying to distinguish those reached before the limit was reached. Providing it at in the solver avoids the need to propagate it from each callsite to the client of the solver. Differential Revision: https://reviews.llvm.org/D155636
-
Amir Ayupov authored
Use layout order in YAML profile reading/writing. Preserve old behavior (DFS order) under `-profile-use-dfs` option. Reviewed By: spupyrev Differential Revision: https://reviews.llvm.org/D155514
-
Amir Ayupov authored
Rename to avoid collision with profile-use-dfs. Differential Revision: https://reviews.llvm.org/D155513
-
Owen Pan authored
If a non-keyword identifier is found in TypeNames, then a *, &, or && that follows it is annotated as TT_PointerOrReference. Differential Revision: https://reviews.llvm.org/D155273
-
Valentin Clement authored
Lower static array slices reduction with the correct type. Reviewed By: razvanlupusoru Differential Revision: https://reviews.llvm.org/D155519
-
Piotr Zegar authored
Functions declared explicitly with noexcept(false) or throw(exception) will be excluded from the analysis, as even though it is not recommended for functions like swap, main, move constructors and assignment operators, and destructors, it is a clear indication of the developer's intention and should be respected. Fixes: #40583, #55143 Reviewed By: carlosgalvezp Differential Revision: https://reviews.llvm.org/D153423
-
Sedenion authored
The problem was that the LevelIndentTracker remembered the indentation level of previous deeper levels when leaving a scope. Afterwards, when it entered again a deeper level, it blindly reused the previous indentation level. In case the --lines option was used such that the previous deeper level was not formatted, that previous level was whatever happened to be there in the source code. The formatter simply believed it. This is fixed by letting the LevelIndentTracker forget the previous deeper levels when stepping out of them (=> change in LevelIndentTracker::nextLine()). Note that this used to be the case until LLVM 14.0.6, but was changed in https://reviews.llvm.org/D129064 (#56352) to fix a crash. Our commit here essentially reverts that crash fix. It was incorrect/incomplete. Fixes #58464. Fixes #59178. Fixes #62799. Differential Revision: https://reviews.llvm.org/D151047
-
Daniil Suchkov authored
This pass doesn't take register classes into account, so it ends up trying to spill a non-GP register onto stack which is not correct.
-
Christopher Ferris authored
A few memtag tests were using EXPECT_DEBUG_DEATH which executes the statement unless NDEBUG is set. This meant the statement would cause an abort, but the EXPECT_DEATH part was not done. Change these to simply EXPECT_DEATH, these tests already verify that SCUDO_DEBUG is set before checking for DEATH. Reviewed By: Chia-hungDuan Differential Revision: https://reviews.llvm.org/D155538
-
Amanda Tang authored
Quick fix for a failing test in https://reviews.llvm.org/rG5267ed05bc4612e91409d63b4dbc4e01751acb75 Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D155637
-
Fangrui Song authored
ld.lld SHF_MERGE|SHF_STRINGS duplicate elimination is computation heavy and utilitizes llvm::xxHash64, a simplified version of XXH64. Externally many sources confirm that a new variant XXH3 is much faster. I have picked a few hash implementations and computed the proportion of time spent on hashing in the overall link time (a debug build of clang 16 on a machine using AMD Zen 2 architecture): * llvm::xxHash64: 3.63% * official XXH64 (`#define XXH_VECTOR XXH_SCALAR`): 3.53% * official XXH3_64bits (`#define XXH_VECTOR XXH_SCALAR`): 1.21% * official XXH3_64bits (default, essentially `XXH_SSE2`): 1.22% * this patch llvm::xxh3_64bits: 1.19% The remaining part of lld remains unchanged. Consequently, a lower ratio indicates that hashing is faster. Therefore, it is evident that XXH3 from xxhash is significantly faster than both the official version and our llvm::xxHash64. ( string length: count 1-3: 393434 4-8: 2084056 9-16: 2846249 17-128: 5598928 129-240: 1317989 241-: 328058...
-