- Mar 27, 2022
-
-
Hirochika Matsumoto authored
Extracted from D122077.
-
Iain Sandoe authored
We wish to support emitting a pre-processed output for an importable header unit, that can be consumed to produce the same header units as the original source. This means that ee need to find the original filename used to produce the re-preprocessed output, so that it can be assigned as the module name. This is peeked from the first line of the pre-processed source when the action sets up the files. Differential Revision: https://reviews.llvm.org/D121098
-
Phoebe Wang authored
This is used for f16 emulation. We emulate f16 for SSE2 targets and above. Refactoring makes the future code to be more clean. Reviewed By: LuoYuanke Differential Revision: https://reviews.llvm.org/D122475
-
Luo, Yuanke authored
In DAGISel, the parameter alignment only have 4 bits to hold the value. The encode(alignment) would plus the value by 1, so the max aligment that ISel can support is 2^14. This patch verify align attribute for parameter. Differential Revision: https://reviews.llvm.org/D122130
-
Shengchen Kan authored
[X86][tablgen] Extract common functions in X86EVEX2VEXTablesEmitter.cpp and X86FoldTablesEmitter.cpp to avoid duplicated code. NFC
-
Luo, Yuanke authored
In DAGISel, the parameter alignment only have 4 bits to hold the value. The encode(alignment) would plus the shift value by 1, so the max aligment ISel can support is 2^14. This patch verify the parameter and return value for alignment. Differential Revision: https://reviews.llvm.org/D121898
-
Shengchen Kan authored
[X86][tablgen] Remove PointerLikeRegClass from isRegisterOperand b/c getRegOperandSize crashes for it. NFCI
-
David Green authored
The default expansion for buildvectors is to extract each element and insert them into a new vector. That involves a lot of copying to/from the GPR registers. TLB3 and TLB4 can be relatively slow instructions with the mask needing to be loaded from a constant pool, but they should always be better than all the moves to/from GPRs. Differential Revision: https://reviews.llvm.org/D121137
-
Martin Storsjö authored
In practice, Windows paths can use either backslashes or forward slashes. This fixes an issue reported downstream at https://github.com/mstorsjo/llvm-mingw/issues/266. Differential Revision: https://reviews.llvm.org/D122389
-
Martin Storsjö authored
Some signal handlers were set up within an !_MSC_VER condition, i.e. omitted in MSVC builds but included in mingw builds. Previously sigtstp_handler was defined in all builds, but since 4bcadd66 / D120320 it's only defined non platforms other than Windows. Change the condition to !_WIN32 for consistency between the MSVC and mingw builds, fixing the build for mingw. Differential Revision: https://reviews.llvm.org/D122486
-
Lang Hames authored
-
Lang Hames authored
Now opens with advice on what to do, rather than what *not* to do.
-
Alisamar Husain authored
Now the decoded thread has Append methods that provide more flexibility in terms of the underlying data structure that represents the instructions. In this case, we are able to represent the sporadic errors as map and thus reduce the size of each instruction. Differential Revision: https://reviews.llvm.org/D122293
-
Iain Sandoe authored
For header units we build the top level module directly from the header that it represents and macros defined in this TU need to be emitted (when such a definition is live at the end of the TU). Differential Revision: https://reviews.llvm.org/D121097
-
LLVM GN Syncbot authored
-
Shengchen Kan authored
Any `X86Inst` has a name.
-
- Mar 26, 2022
-
-
Mark de Wever authored
Instead of using a temporary `string` in `__vformat_to_wrapped` use a new generic iterator. This aids to reduce the number of template instantions and avoids using a `string` to buffer the entire formatted output. This changes the type of `format_context` and `wformat_context`, this can still be done since the code isn't ABI stable yet. Several approaches have been evaluated: - Using a __output_buffer base class with: - a put function to store the buffer in its internal buffer - a virtual flush function to copy the internal buffer to the output - Using a `function` to forward the output operation to the output buffer, much like the next method. - Using a type erased function point to store the data in the buffer. The last version resulted in the best performance. For some cases there's still a loss of speed over the original method. This loss many becomes apparent when large strings are copied to a pointer like iterator, before the compiler optimized this using `memcpy`. Reviewed By: ldionne, vitaut, #libc Differential Revision: https://reviews.llvm.org/D110495
-
Shengchen Kan authored
The comment for `HasVEX_L` is updated.
-
Shengchen Kan authored
To make it more like hasVEX_L and hasEVEX_K, etc.
-
Shengchen Kan authored
1. Add comments to explain why we set `isAsmParserOnly` for XACQUIRE and XRELEASE 2. Check `X86Inst` in the constructor of `RecognizableInstrBase` so that we can avoid the case where one of it's field is not initialized but accessed by user. (e.g. in X86EVEX2VEXTablesEmitter.cpp) 3. Move `Rec` from `RecognizableInstrBase` to `RecognizableInstr` to reduce size of `RecognizableInstrBase` 4. Remove out-of-date comments for shouldBeEmitted() (filter() was removed) 5. Add a basic field `IsAsmParserOnly` and remove the field `ShouldBeEmitted` b/c we can deduce it w/ little overhead
-
Aaron Ballman authored
In C, assignment expressions result in an rvalue whose type is the type of the lhs of the assignment after it undergoes lvalue to rvalue conversion. lvalue to rvalue conversion in C strips all qualifiers including _Atomic. We used getUnqualifiedType() which does not strip the _Atomic qualifier when we should have used getAtomicUnqualifiedType(). This corrects the usage and adds some comments to getUnqualifiedType() to make it more clear that it does not strip _Atomic and that's on purpose (see C11 6.2.5p27). This addresses Issue 48742.
-
Mark de Wever authored
D117296 removed wording for __builtin_assume, D120205 restored the wording, but the last sentence was only partly restored. This restores the rest of the last sentence. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D122423
-
xndcn authored
Differential Revision: https://reviews.llvm.org/D122368
-
zhongyunde authored
Now, perform last active true vector combine only where we're extracting from a flag-setting operation. But in fact, the last active extracting will output LASTB + WHILELS, and the WHILELS itself is a flag-setting operation, so precommit this case to test the potentially further optimization. Reviewed By: paulwalker-arm Differential Revision: https://reviews.llvm.org/D122453
-
Shengchen Kan authored
In fact, an instruction can not be emitted to disassemble table when `isAsmParserOnly` is true, so `isAsmParserOnly=true` implies `ShouldBeEmitted=false`. We check `isAsmParserOnly` in X86FoldTablesEmitter.cpp at a early stage b/c none of them is foldable.
-
Iain Sandoe authored
This is support for the user-facing options to create importable header units from headers in the user or system search paths (or to be given an absolute path). This means that an incomplete header path will be passed by the driver and the lookup carried out using the search paths present when the front end is run. To support this, we introduce file fypes for c++-{user,system,header-unit}-header. These terms are the same as the ones used by GCC, to minimise the differences for tooling (and users). The preprocessor checks for headers before issuing a warning for "#pragma once" in a header build. We ensure that the importable header units are recognised as headers in order to avoid such warnings. Differential Revision: https://reviews.llvm.org/D121096 -
Shengchen Kan authored
Also, some code in constructor of `RecognizableInstrBase` is formatted.
-
Shengchen Kan authored
[X86][tablgen] Move fields Name, Is64Bit, Is32Bit, Operands from RecognizableInstrBase to RecognizableInstr, NFCI These four fields are not used by any user of `RecognizableInstrBase`, so we can move them to `RecognizableInstr` to avoid unnecessary construction.
-
Fangrui Song authored
-
Fangrui Song authored
-
Fangrui Song authored
The default argument true is error-prone: I think many would think the default is false.
-
Fangrui Song authored
See `D119309` for the guideline (-target, -no-canonical-prefixes, unneeded -o with -###).
-
Ben Shi authored
Reviewed By: aykevl Differential Revision: https://reviews.llvm.org/D115618
-
Fangrui Song authored
-
Shengchen Kan authored
-
Joseph Huber authored
-
Shilei Tian authored
As we mentioned in the code comments for function `ResourcePoolTy::release`, at some point there could be two identical resources on the two sides of `Next` mark. It is usually not an issue, unless the following case: 1. Some resources are not returned. 2. We need to iterate the pool and free the element. That will cause double free, which is the case for event pool. Since we don't release events hold by the data map, it can happen that the `Next` mark is not reset, and we have two identical items in the pool. When the pool is destroyed, we will call `cuEventDestroy` twice on the same event. In the best case, we can only observe CUDA errors. In the worst case, it can cause internal failures in CUDART and further crash. This patch fixes the issue by tracking all resources that have been given using an `unordered_set`. We don't remove it when a resource is returned. When the pool is destroyed, we merge the pool (a `vector`) and the set. In this way, we can make sure that the set contains all resources allocated from the device. We just need to iterate the set and free the resource accordingly. For now, only event pool is set to use it. Stream pool is not because we can make sure all streams are returned when the plugin is destroyed. Someone might be wondering, why don't we release all events hold in the data map. That is because, plugins are determined to be destroyed *before* `libomptarget`. If we can somehow make the plugin outlast `libomptarget`, life will be much easier. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D122014
-
Joseph Huber authored
This patch adds the necessary AMDGPU calling convention to the ctor / dtor kernels. These are fundamentally device kenels called by the host on image load. Without this calling convention information the AMDGPU plugin is unable to identify them. Depends on D122504 Fixes #54091 Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D122515
-
Joseph Huber authored
The default construction of constructor functions by LLVM tends to make them have internal linkage. When we call a ctor / dtor function in the target region we are actually creating a kernel that is called at registration. Because the ctor is a kernel we need to make sure it's externally visible so we can actually call it. This prevented AMDGPU from correctly using constructors while NVPTX could use them simply because it ignored internal visibility. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D122504
-
Shengchen Kan authored
Address comments in D122477 b/c `getMnemonic` is common to X86 and may be used in more than one place.
-