- Apr 23, 2021
-
-
Wang, Pengfei authored
The previous condition in the assert was over strict. We ought to allow the same immidiate value being loaded more than once. The intention for the assert is to check the same AMX register uses multiple different immidiate shapes. So this fix supposes to be NFC. Reviewed By: LuoYuanke Differential Revision: https://reviews.llvm.org/D101124
-
Wang, Pengfei authored
We request no intersections between AMX instructions and their shapes' def when we insert ldtilecfg. However, this is not always ture resulting from not only users don't follow AMX API model, but also optimizations. This patch adds a mechanism that tries to hoist AMX shapes' def as well. It only hoists shapes inside a BB, we can improve it for cases across BBs in future. Currently, it only hoists shapes of which all sources' def above the first AMX instruction. We can improve for the case that only source that moves an immediate value to a register below AMX instruction. Differential Revision: https://reviews.llvm.org/D101067
-
Wang, Pengfei authored
Add __uintr_frame structure and use UIRET instruction for functions with x86 interrupt calling convention when UINTR is present. Reviewed By: LuoYuanke Differential Revision: https://reviews.llvm.org/D99708
-
Hsiangkai Wang authored
Differential Revision: https://reviews.llvm.org/D100819
-
Vitaly Buka authored
-
Serguei Katkov authored
This is mostly NFC except that for end of BB not previous slot is used. Idx is used to find a def of sibling live interval in that slot. The def on end of MBB and on previous slot of end MBB should be the same, so it should be NFC. Reviewers: reames, qcolombet, MatzeB, wmi, rnk Reviewed By: rnk Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D100922
-
Nico Weber authored
I first had a more invasive patch for this (D101069), but while trying to get that polished for review I realized that lld's current symbol merging semantics mean that only a very small code change is needed. So this goes with the smaller patch for now. This has no effect on projects that build with -fvisibility=hidden (e.g. chromium), since these see .private_extern symbols instead. It does have an effect on projects that build with -fvisibility-inlines-hidden (e.g. llvm) in -O2 builds, where LLVM's GlobalOpt pass will promote most inline functions from .weak_definition to .weak_def_can_be_hidden. Before this patch: % ls -l out/gn/bin/clang out/gn/lib/libclang.dylib -rwxr-xr-x 1 thakis staff 113059936 Apr 22 11:51 out/gn/bin/clang -rwxr-xr-x 1 thakis staff 86370064 Apr 22 11:51 out/gn/lib/libclang.dylib % out/gn/bin/llvm-objdump --macho --weak-bind out/gn/bin/clang | wc -l 8291 % out/gn/bin/llvm-objdump --macho --weak-bind out/gn/lib/libclang.dylib | wc -l 5698 With this patch: % ls -l out/gn/bin/clang out/gn/lib/libclang.dylib -rwxr-xr-x 1 thakis staff 111721096 Apr 22 11:55 out/gn/bin/clang -rwxr-xr-x 1 thakis staff 85291208 Apr 22 11:55 out/gn/lib/libclang.dylib thakis@MBP llvm-project % out/gn/bin/llvm-objdump --macho --weak-bind out/gn/bin/clang | wc -l 725 thakis@MBP llvm-project % out/gn/bin/llvm-objdump --macho --weak-bind out/gn/lib/libclang.dylib | wc -l 542 Linking clang becomes a tiny bit faster with this patch: x 100 0.67263818 0.77847815 0.69430709 0.69877208 0.017715892 + 100 0.67209601 0.73323393 0.68600798 0.68917346 0.012824377 Difference at 95.0% confidence -0.00959861 +/- 0.00428661 -1.37364% +/- 0.613449% (Student's t, pooled s = 0.0154648) This only happens if lld with the patch and lld without the patch are both linked with an lld with the patch or both linked with an lld without the patch (...or with ld64). I accidentally linked the lld with the patch with an lld without the patch and the other way round at first. In that setup, no difference is found. That makese sense, since having fewer weak imports will make the linked output a bit faster too. So not only does this make linking binaries such as clang a bit faster (since fewer exports need to be written to the export trie by lld), the linked output binary binary is also a bit faster (since dyld needs to process fewer dynamic imports). This also happens to fix the one `check-clang` failure when using lld as host linker, but mostly for silly reasons: See crbug.com/1183336, mostly comment 26. The real bug here is that c-index-test links all of LLVM both statically and dynamically, which is an ODR violation. Things just happen to work with this patch. So after this patch, check-clang, check-lld, check-llvm all pass with lld as host linker :) Differential Revision: https://reviews.llvm.org/D101080 -
Nico Weber authored
- __got is in --bind output, so print that too (makes the test a bit stronger) - WEAK_DEFINES, BINDS_TO_WEAK are in the mach-o header, so --private-header is enough, no need for --all-headers (makes the test a bit easier to work with when it fails) Differential Revision: https://reviews.llvm.org/D101065
-
Nico Weber authored
-
Vitaly Buka authored
-
Matt Arsenault authored
9931b1f7 switched this to checking for the two specific subtargets, instead of the dedicated feature. This broke supporting functions which force added the feature when emitting targets that do not actually support them. This stil does not work for the targets that use the gfx6/7 or gfx10 encodings.
-
Fangrui Song authored
The Linux kernel objtool diagnostic `call without frame pointer save/setup` arise in multiple instrumentation passes (asan/tsan/gcov). With the mechanism introduced in D100251, it's trivial to respect the command line -m[no-]omit-leaf-frame-pointer/-f[no-]omit-frame-pointer, so let's do it. Fix: https://github.com/ClangBuiltLinux/linux/issues/1236 (tsan) Fix: https://github.com/ClangBuiltLinux/linux/issues/1238 (asan) Also document the function attribute "frame-pointer" which is long overdue. Differential Revision: https://reviews.llvm.org/D101016
-
zoecarver authored
Adds the six new concept constrained comparisons. Differential Revision: https://reviews.llvm.org/D100429
-
Jon Chesterfield authored
This reverts commit 24c1ed3b.
-
Richard Smith authored
during overload resolution, even when calling a copy constructor.
-
Jonas Devlieghere authored
- The register encoding state in the JSON crashlog format changes. Update the parser accordingly. - Print the register state when printing the symbolicated thread.
-
Jez Ng authored
We had got it backwards... the minimum version of the target should be higher than the min version of the object files, presumably since new platforms are backwards-compatible with older formats. Fixes PR50078. The original commit (aa05439c) broke many tests that had inputs too new for our target platform (10.0). This commit changes the inputs to target 10.0, which was the simpler thing to do, but we should really just have our lit.local.cfg default to targeting 10.15... we're not likely to ever have proper support for the older versions anyway. I will follow up with a change to that effect. Differential Revision: https://reviews.llvm.org/D101114
-
Levy Hsu authored
RV32/64: grev grevi gorc gorci shfl shfli unshfl unshfli RV64 ONLY: grevw greviw gorcw gorciw shflw shfli (For non-existing shfliw) unshfli (For non-existing unshfliw) Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D100830 -
Jon Chesterfield authored
[clang][nfc] Split getOrCheckAMDGPUCodeObjectVersion Separates detection of deprecated or invalid code object version from returning the version. Written to avoid any behaviour change. Precursor to a revision of D98746. Reviewed By: yaxunl Differential Revision: https://reviews.llvm.org/D101077
-
Peter Collingbourne authored
It looks like there's some old version of gcc that doesn't like this static_assert (I couldn't reproduce the issue with gcc 8, 9 or 10). Work around the issue by only checking the static_assert under clang, which should provide sufficient coverage. Should hopefully fix this buildbot: https://lab.llvm.org/buildbot/#/builders/112/builds/5356
-
Yaxun (Sam) Liu authored
Remove the dependence on standard C++ header for overloaded math functions in HIP header since standard C++ header is not available for hipRTC. Reviewed by: Artem Belevich, Justin Lebar Differential Revision: https://reviews.llvm.org/D100794
-
Keith Smiley authored
This prints the rpaths for the given binary Reviewed By: kastiglione Differential Revision: https://reviews.llvm.org/D100681
-
Stephen Kelly authored
This reverts commit 907409a5. This caused a failure http://green.lab.llvm.org/green//job/lldb-cmake-standalone/2827/consoleFull#-210109660a1ca8a51-895e-46c6-af87-ce24fa4cd561 Assertion failed: (!CodeSynthesisContexts.empty() && "Cannot perform an instantiation without some context on the " "instantiation stack"), function SubstType, file /Users/buildslave/jenkins/workspace/lldb-cmake-standalone/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp, line 2071.
-
Peter Collingbourne authored
With AndroidSizeClassMap all of the LSBs are in the range 4-6 so we only need 2 bits of information per size class. Furthermore we have 32 size classes, which conveniently lets us fit all of the information into a 64-bit integer. Do so if possible so that we can avoid a table lookup entirely. Differential Revision: https://reviews.llvm.org/D101105
-
Heejin Ahn authored
Background: CFGStackify's [[ https://github.com/llvm/llvm-project/blob/398f25340000f26d648ebbc7eae9dc401ffc7d5f/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp#L1481-L1540 | fixEndsAtEndOfFunction ]] fixes block/loop/try's return type when the end of function is unreachable and the function return type is not void. So if a function returns i32 and `block`-`end` wraps the whole function, i.e., the `block`'s `end` is the last instruction of the function, the `block`'s return type should be i32 too: ``` block i32 ... end end_function ``` If there are consecutive `end`s, this signature has to be propagate to those blocks too, like: ``` block i32 ... block i32 ... end end end_function ``` This applies to `try`-`end` too: ``` try i32 ... catch ... end end_function ``` In case of `try`, we not only follow consecutive `end`s but also follow `catch`, because for the type of the whole `try` to be i32, both `try` and `catch` parts have to be i32: ``` try i32 ... block i32 ... end catch ... block i32 ... end end end_function ``` --- Previously we only handled consecutive `end`s or `end` before a `catch`. But now we have `delegate`, which serves like `end` for `try`-`delegate`. So we have to follow `delegate` too and mark its corresponding `try` as i32 (the function's return type): ``` try i32 ... catch ... try i32 ;; Here ... delegate N end end_function ``` Reviewed By: tlively Differential Revision: https://reviews.llvm.org/D101036
-
Heejin Ahn authored
This adds support for YAML serialization of `Params` and `Results` fields in `WebAssemblyMachineFunctionInfo`. Types are printed as `MVT`'s string representation. This is for writing MIR tests easier. The tests added are testing simple parsing and printing of `params` / `results` fields under `machineFunctionInfo`. Reviewed By: tlively Differential Revision: https://reviews.llvm.org/D101029
-
Heejin Ahn authored
This CL 1. Creates Utils/ directory under lib/Target/WebAssembly 2. Moves existing WebAssemblyUtilities.cpp|h into the Utils/ directory 3. Creates Utils/WebAssemblyTypeUtilities.cpp|h and put type declarataions and type conversion functions scattered in various places into this single place. It has been suggested several times that it is not easy to share utility functions between subdirectories (AsmParser, DIsassembler, MCTargetDesc, ...). Sometimes we ended up [[ https://reviews.llvm.org/D92840#2478863 | duplicating ]] the same function because of this. There are already other targets doing this: AArch64, AMDGPU, and ARM have Utils/ subdirectory under their target directory. This extracts the utility functions into a single directory Utils/ and make them sharable among all passes in WebAssembly/ and its subdirectories. Also I believe gathering all type-related conversion functionalities into a single place makes it more usable. (Actually I was working on another CL that uses various type conversion functions scattered in multiple places, which became the motivation for this CL.) Reviewed By: dschuff, aardappel Differential Revision: https://reviews.llvm.org/D100995
-
Jez Ng authored
We had got it backwards... the minimum version of the target should be higher than the min version of the object files, presumably since new platforms are backwards-compatible with older formats. Fixes PR50078. Reviewed By: #lld-macho, thakis Differential Revision: https://reviews.llvm.org/D101114
-
Jez Ng authored
Remove unnecessary default ctor + add `explicit` to others
-
peter klausler authored
The single source file reduction.cpp is a little large in terms of both source lines and generated text bytes, so split SUM, PRODUCT, FINDLOC, and MAXLOC/MAXVAL/MINLOC/MINVAL off into their own C++ source files that share a set of implementation function templates now in a common header. Differential Revision: https://reviews.llvm.org/D101111
-
Craig Topper authored
Add PromoteIntOp_FP_TO_XINT_SAT to type legalize the bit width operand from i32 to i64 for RV64. Add test cases for the saturating intrinsics for half/float/double and i32/i64. CodeGen is definitely not optimal. We can probably make use of the native behavior of fcvt instructions in many cases. Fixes PR50083
-
Krzysztof Parzyszek authored
Emit explicit any-extend to avoid weird tstbit sequences.
-
Stephen Kelly authored
This was previously excluded due to possible buildbot failures.
-
Elia Geretto authored
This patch is supposed to solve: https://bugs.llvm.org/show_bug.cgi?id=50075 The function `__dfsan_mem_transfer_callback` takes a `Len` argument of type `i64`; however, when processing a `MemTransferInst` such as `llvm.memcpy.p0i8.p0i8.i32`, the `len` argument has type `i32`. In order to make the type of `len` compatible with the one of the callback argument, this change zero-extends it when necessary. Reviewed By: stephan.yichao.zhao, gbalats Differential Revision: https://reviews.llvm.org/D101048
-
Petr Hosek authored
This reverts commit 6331680a because this breaks the compiler-rt build.
-
Nikita Popov authored
I accidentally dropped some check lines in my previous commit. Apparently update_test_checks no longer warns on label conflicts???
-
Nikita Popov authored
-
Krzysztof Parzyszek authored
'not' expands to checking for an xor with a -1 constant. Since this looks for a ConstantSDNode it will never match for a vector. Co-authored-by:
Craig Topper <craig.topper@sifive.com> Differential Revision: https://reviews.llvm.org/D100687
-
Fred Riss authored
A couple of our Instrumentation runtimes were gathering backtraces, storing it in a StructuredData array and later creating a HistoryThread using this data. By deafult HistoryThread will consider the history PCs as return addresses and thus will substract 1 from them to go to the call address. This is usually correct, but it's also wasteful as when we gather the backtraces ourselves, we have much better information to decide how to backtrace and symbolicate. This patch uses the new GetFrameCodeAddressForSymbolication() to gather the PCs that should be used for symbolication and configures the HistoryThread to just use those PCs as-is. (The MTC plugin was actaully applying a -1 itself and then the HistoryThread would do it again, so this actaully fixes a bug there.) rdar://77027680 Differential Revision: https://reviews.llvm.org/D101094
-