- May 30, 2024
-
-
Mehdi Amini authored
Flang triggers some OOM on Windows CI right now. This is disruptive to MLIR and LLVM changes that don't touch Flang, as such we disable building Flang on Windows only for these PR that don't touch flang. The testing on Linux is unchanged, and the post-merge Windows testing is still fully covering here.
-
Florian Mayer authored
-
William Junda Huang authored
Add option to generate additional debug info for expression dereferencing pointer to pointers. (#81545) Such expression does not correspond to a variable in the source code thus does not have a debug location. When the user collects perf data on the program, if the intermediate memory load instruction is sampled, it could not be attributed to any variable/class member, which causes the sampling results to be under-counted. This patch adds an option `-fdebug_info_for_pointer_type` to generate a psuedo variable and its debug info for intermediate expression with pointer dereferencing, so that perf data collected on the instruction of that expression can be attributed to the correct class member. This is a prototype so comments are needed.
-
Fangrui Song authored
... as flags have changed. This allows us to revisit the `osd->osec.hasInputSections` condition in `getRankProximity` (originally introduced as `Sec->Live` in https://reviews.llvm.org/D61197).
-
Igor Kudrin authored
Without a linker script, `--orphan-handling=error` or `=warn` reports all input sections, including even well-known sections like `.text`, `.bss`, `.dynamic`, or `.symtab`. However, in this case, no sections should be considered orphans because they all are placed with the same default rules. This patch suppresses errors/warnings for placing orphan sections if no linker script with the `SECTIONS` command is provided. The proposed behavior matches GNU gold. GNU ld in the same scenario only reports sections that are not in its default linker script, thus, it avoids complaining about `.text` and similar.
-
Kazu Hirata authored
This patch fixes: llvm/include/llvm/Analysis/LoopAccessAnalysis.h:381:8: error: no template named 'variant' in namespace 'std'
-
Jonas Devlieghere authored
Remove setupterm workaround on macOS which caused an issues after the removal of the terminfo dependency. There's a comment that explains why the workaround is present, but neither Jim nor I were able to reproduce the issue by setting TERM to vt100.
-
Florian Hahn authored
This avoids unnecessarily passing a number of parameters, and avoids needing to add extra parameters in the future.
-
David Blaikie authored
Complete C++ type information can be quite expensive - and there's limited value in representing every member function, even those that can't be called (we don't do similarly for every non-member function anyway). So add a flag to opt out of this behavior for experimenting with this more terse behavior. I think Sony already does this by default, so perhaps with a change to the defaults, Sony can migrate to this rather than a downstream patch. This breaks current debuggers in some expected ways - but those breakages are visible without this feature too. Consider member function template instantiations - they can't be consistently enumerated in every translation unit: a.h: ``` struct t1 { template <int i> static int f1() { return i; } }; namespace ns { template <int i> int f1() { return i; } } // namespace ns ``` a.cpp: ``` void f1() { t1::f1<0>(); ns::f1<0>(); } ``` b.cpp: ``` void f1(); int main() { f1(); t1::f1<1>(); ns::f1<1>(); } ``` ``` (gdb) p ns::f1<0>() $1 = 0 (gdb) p ns::f1<1>() $2 = 1 (gdb) p t1::f1<0>() Couldn't find method t1::f1<0> (gdb) p t1::f1<1>() $3 = 1 (gdb) s f1 () at a.cpp:3 3 t1::f1<0>(); (gdb) p t1::f1<0>() $4 = 0 (gdb) p t1::f1<1>() Couldn't find method t1::f1<1> (gdb) ``` (other similar non-canonical features are implicit special members (copy/move ctor/assignment operator, default ctor) and nested types (eg: pimpl idiom, where the nested type is declared-but-not-defined in one TU, and defined in another TU)) lldb can't parse the template expressions above, so I'm not sure how to test it there, but I'd guess it has similar problems. ( https://stackoverflow.com/questions/64602475/how-to-print-value-returned-by-template-member-function-in-gdb-lldb-debugging so... I guess that's just totally not supported in lldb, how unfortunate. And implicit special members are instantiated implicitly by lldb, so missing those doesn't tickle the same issue) Some very rudimentary numbers for a clang debug build: .debug_info section size: -g: 476MiB -g -fdebug-types-section: 357MiB -g -gomit-unreferenced-members: 340MiB Though it also means a major reduction in .debug_str size, -fdebug-types-section doesn't reduce string usage (so the first two examples have the same .debug_str size, 247MiB), down to 175MiB. So for total clang binary size (I don't have a quick "debug section size reduction" on-hand): 1.45 (no type units) GiB -> 1.34 -> 1.22, so it saves about 120MiB of binary size. Also open to any riffing on the flag name for sure. @probinson - would this be an accurate upstreaming of your internal handling/would you use this functionality? If it wouldn't be useful to you, it's maybe not worth adding upstream yet - not sure we'll use it at Google, but if it was useful to you folks and meant other folks could test with it it seemed maybe useful. Original Differential Revision: https://reviews.llvm.org/D152017 -
S. Bharadwaj Yadavalli authored
Add an initial design document for TableGen specification of DXIL Operations.
-
gulfemsavrun authored
Reverts llvm/llvm-project#87550 because it broke `TestDAP*` lldb tests. https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64-rbe/b8746585790559468897/overview
-
Florian Hahn authored
This reduces the need for explicitly passing it through multiple layers of function calls.
-
Mircea Trofin authored
Odd indenting.
-
Luke Lau authored
-
Mehdi Amini authored
Reverts llvm/llvm-project#93595 This broke the gcc-7 bot.
-
PiJoules authored
This reverts commit 7832769d. This was reverted prior due to a test failure on the windows builder. I think this was because we didn't specify the triple and assumed windows. The other tests use the full triple specifying linux, so we follow suite here. --- We are using PLTs for cortex-m33 which only supports thumb. More specifically, this is for a very restricted use case. There's no MMU so there's no sharing of virtual addresses between two processes, but this is fine. The MCU is used for running [chre nanoapps](https://android.googlesource.com/platform/system/chre/+/HEAD/doc/nanoapp_overview.md) for android. Each nanoapp is a shared library (but effectively acts as an executable containing a test suite) that is loaded and run on the MCU one binary at a time and there's only one process running at a time, so we ensure that the same text segment cannot be shared by two different running executables. GNU LD supports thumb PLTs but we want to migrate to a clang toolchain and use LLD, so thumb PLTs are needed.
-
PiJoules authored
Prior, the reltable we create was "reltable." + FuncName which can result in multiple tables named "reltable." + FuncName + ".{number}" if we substitute multiple tables in a function. Since we replace the original global, it makes it easier to just take over the original global's name. Functionally, this doesn't change the IR emitted, just global names. This is a subset of PR 93355 that I'm breaking into multiple patches. -
Luke Lau authored
So we don't have to thread through some common arguments, and to allow some methods to access state in an upcoming patch.
-
Mingming Liu authored
- `llvm/**/ProfileData/**/*` intends to cover `llvm/include/llvm/ProfileData/` and `llvm/lib/ProfileData/` - `llvm/**/SampleProfile*` intends to cover a bunch of SamplePGO files and their headers. For example, `SampleProfile.cpp`, `SampleProfileMatcher.cpp`, `SampleProfileProbe.cpp` - `llvm/**/CodeGen/MIRSampleProfile*` intends to cover MIRSampleProfile.cpp and its header. - `llvm/test/Transforms/SampleProfile/**/*` intends to cover unit tests. -
Luke Lau authored
The VNInfo id (called val no elsewhere it seems) and register is enough to uniquely identify AVL values, so try to store as little state as possible. This may also allow us to use dummy val nos in an upcoming patch when we don't have LiveIntervals.
-
Valentin Clement (バレンタイン クレメン) authored
MLIR LLMArrayType is using `unsigned` for the number of elements while LLVM ArrayType is using `uint64_t` https://github.com/llvm/llvm-project/blob/4ae896fe979b7db501cabde4b6b3504478958682/llvm/include/llvm/IR/DerivedTypes.h#L377 This leads to silent truncation when we use it for globals in flang. ``` program test integer(8), parameter :: large = 2**30 real, dimension(large) :: bigarray common /c/ bigarray bigarray(999) = 666 end ``` The above program would result in a segfault since the global would be of size 0 because of the silent truncation. ``` fir.global common @c_(dense<0> : vector<4294967296xi8>) : !fir.array<4294967296xi8> ``` became ``` llvm.mlir.global common @c_(dense<0> : vector<4294967296xi8>) {addr_space = 0 : i32} : !llvm.array<0 x i8> ``` This patch updates the definition of MLIR ArrayType to take `uint64_t` as argument of the number of elements to be compatible with LLVM.
-
Florian Mayer authored
In the reverted change, the order of the IR was dependent on the host compiler, because we inserted instructions in arguments to functions. Fix that, and also fix another problem with the test. This reverts commit 3313f288.
-
Matt Arsenault authored
This was only preserving the flags on the setcc, not the new select. This was missing presumably due to getSelect not having a flags argument until recently. Avoids regressions in a future commit.
-
Matheus Izvekov authored
This patch improves the preservation of qualifiers and loss of type sugar in TemplateNames. This problem is analogous to https://reviews.llvm.org/D112374 and this patch takes a very similar approach to that patch, except the impact here is much lesser. When a TemplateName was written bare, without qualifications, we wouldn't produce a QualifiedTemplate which could be used to disambiguate it from a Canonical TemplateName. This had effects in the TemplateName printer, which had workarounds to deal with this, and wouldn't print the TemplateName as-written in most situations. There are also some related fixes to help preserve this type sugar along the way into diagnostics, so that this patch can be properly tested. - Fix dropping the template keyword. - Fix type deduction to preserve sugar in TST TemplateNames.
-
Craig Topper authored
I plan to add support for multiple layers of vnclipu. For example, i32->i8 using 2 vnclipu instructions. First clipping to 65535, then clipping to 255. Similar for signed vnclip. This scales poorly if we need to add patterns with 2 or 3 truncates. Instead, move the code to DAGCombiner with new ISD opcodes to represent VCLIP(U). This patch just moves the existing patterns into DAG combine. Support for multiple truncates will as a follow up. A similar patch series will be made for the signed vnclip. -
Luke Lau authored
We no longer need to separate the passes now that #70549 is landed and this will unblock #89089. It's not strictly NFC because it will move coalescing before register allocation when -riscv-vsetvl-after-rvv-regalloc is disabled. But this makes it closer to the original behaviour.
-
Farzon Lotfi authored
This reverts commit b15a0a37. This should undo PR: https://github.com/llvm/llvm-project/pull/93314 will need to re-open https://github.com/llvm/llvm-project/issues/91421 wait for https://github.com/llvm/llvm-project/pull/90503 to land
-
Kazu Hirata authored
This patch teaches the V3 format to serialize Frames, call stacks, and IndexedMemProfRecords, in that order. I'm planning to use linear IDs for Frames. That is, Frames will be numbered 0, 1, 2, and so on in the order we serialize them. In turn, we will seialize the call stacks in terms of those linear IDs. Likewise, I'm planning to use linear IDs for call stacks and then serialize IndexedMemProfRecords in terms of those linear IDs for call stacks. With the new order, we can successively free data structures as we serialize them. That is, once we serialize Frames, we can free the Frames' data proper and just retain mappings from FrameIds to linear IDs. A similar story applies to call stacks.
-
Craig Topper authored
We checked the VL and mask of any additional TRUNCATE_VECTOR_VL nodes we peek through, but not the outermost. This moves the check to the outer node and then verifies all the additional nodes have the same VL and Mask. Stacked on #93574 -
Craig Topper authored
Despite the comment, this isn't used to size bit vectors or tables. That's done by VALUETYPE_SIZE. MAX_ALLOWED_VALUETYPE is only used by some static_asserts that compare it to VALUETYPE_SIZE. This patch removes it and most of the static_asserts. I left one where I compared VALUETYPE_SIZE to token which is the first type that isn't part of the VALUETYPE range. This isn't strictly needed, we'd probably catch duplication error from VTEmitter.cpp first.
-
Keith Smiley authored
-
aengelke authored
shouldRealignStack/canRealignStack are repeatedly called in PEI (through hasStackRealignment). Checking function attributes is expensive, so cache this data in the MachineFrameInfo, which had most data already. This slightly changes the semantics of `MachineFrameInfo::ForcedRealign` to be also true when the `stackrealign` attribute is set.
-
thetruestblue authored
Fix x86_64 lit feature. x86-target-arch not set for x86_64h x86-target-arch not set for x86_64.
-
Kazu Hirata authored
This patch fixes: llvm/lib/Target/X86/X86ISelLowering.cpp:50832:7: error: unused variable 'MemVT' [-Werror,-Wunused-variable]
-
Matheus Izvekov authored
This improves and unifies our approach to printing all template arguments. The same approach to printing types is extended to all TemplateArguments: A sugared version is printed in quotes, followed by printing the canonical form, unless they would print the same. Special improvements are done to add more detail to template template arguments. It's planned in a future patch to use this improved TemplateName printer for other places besides TemplateArguments. Note: The sugared/desugared printing does not show up for TemplateNames in tests yet, because we do a poor job of preserving their type sugar. This will be improved in a future patch.
-
Florian Mayer authored
This reverts commit 1f67f34a.
-
Florian Mayer authored
this will allow us to find offending objects in a symbolization step, like we can do with hwasan. needs matching changes in AOSP: https://android-review.git.corp.google.com/q/topic:%22stackhistorybuffer%22 Pull Request: https://github.com/llvm/llvm-project/pull/86356
-
Mingming Liu authored
This is a split of https://github.com/llvm/llvm-project/pull/93346 as discussed.
-
Hui authored
-
Miro Bucko authored
Moving CommandObjectMemoryFind::FastSearch() to Process::FindInMemory(). Plan to expose FindInMemory as public API in SBProcess.
-