- Jul 29, 2022
-
-
Sunho Kim authored
Implements ADDR64 relocation using x86_64 edge kind. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D130178
-
Fangrui Song authored
combineEhSections has been called to remove EhInputSection.
-
Sunho Kim authored
Implements dllimport stubs using GOT table manager. Benefit of using GOT table manager is that we can just reuse jitlink-check architecture. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D130175
-
Hui Xie authored
implement `std::ranges::unique` and `std::ranges::unique_copy` Differential Revision: https://reviews.llvm.org/D130404
-
Rainer Orth authored
To make use of SPARC support in `getHostCPUName` as implemented by D130272 <https://reviews.llvm.org/D130272>, this patch uses it to handle `-mcpu=native` and `-mtune=native`. To match GCC, this patch rejects `-march` instead of silently treating it as a no-op. Tested on `sparcv9-sun-solaris2.11` and checking that those options are passed on as `-target-cpu` resp. `-tune-cpu` as expected. Differential Revision: https://reviews.llvm.org/D130273
-
Sunho Kim authored
Handles COFF import files of static archive. Changes static library genrator to build up object file map keyed by symbol name that excludes the symbols from dllimported symbols so that static generator will not be responsible for them. It exposes the list of dynamic libraries that need to be imported. Client should properly load the libraries in this list beforehand. Object file map is also an improvment from the past in terms of performance. Archive.findSym does a slow O(n) linear serach of symbol list to find the symbol. (we call findSym O(n) times, thus full time complexity is O(n^2); we were the only user of findSym function in fact) There is a room for improvements in how to load the libraries in the list. We currently just hand the responsibility over to the clinet. A better way would be let ORC read this list and hand them over to JITLink side that would also help validation (e.g. not trying to generate stub for non dllimported targets) Nevertheless, we will have to exclude the symbols from COFF import object file list and need a way to access this list, which this patch offers. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D129952
-
Rainer Orth authored
This is the Linux/sparc64 equivalent to D118021 <https://reviews.llvm.org/D118021>, necessary to provide an external implementation of atomics on 32-bit SPARC which LLVM cannot inline even with `-mcpu=v9` or an equivalent default. Tested on `sparc64-unknown-linux-gnu`. Differential Revision: https://reviews.llvm.org/D130569
-
Fangrui Song authored
-
Huan Nguyen authored
Disassembly and branch target analysis are not decoupled, so any analysis that depends on disassembly may not operate properly. In specific, analyzeJumpTable uses instruction bounds check property. A jump table was analyzed twice: (a) during disassembly, and (b) after disassembly, so there are potentially some mismatched results. In this update, functions that access JTs which fail the second check will be marked as ignored. Test Plan: ``` ninja check-bolt ``` Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D130431
-
Huan Nguyen authored
AllowStripped has not been used in BOLT. This option is replaced by actively detecting stripped binary. Test Plan: Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D130036
-
Huan Nguyen authored
Determine stripped status of a binary based on .symtab Test Plan: ``` ninja check-bolt ``` Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D130034
-
Weining Lu authored
-
Chuanqi Xu authored
According to [basic.def.odr]p14, the same redeclarations in different TU but not attached to a named module are allowed. But we didn't take care of concept decl for this condition. This patch tries to fix this problem. Reviewed By: ilya-biryukov Differention Revision: https://reviews.llvm.org/D130614
-
skc7 authored
[Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values Add the ability to put __attribute__((maybe_undef)) on function arguments. Clang codegen introduces a freeze instruction on the argument. Differential Revision: https://reviews.llvm.org/D130224
-
Chris Bieneman authored
HLSL Resource objects will have restrictions on use and codegen requirements. This patch is fairly minimal just adding the attribute with no spellings since it will only be attached by the HLSLExternalSemaSource. Depends on D1300017. Differential Revision: https://reviews.llvm.org/D130018
-
lewuathe authored
We can canonicalize consecutive complex.conj just by removing all conjugate operations. Reviewed By: pifon2a Differential Revision: https://reviews.llvm.org/D130684
-
sstwcw authored
Reviewed By: HazardyKnusperkeks, owenpan Differential Revision: https://reviews.llvm.org/D128709
-
sstwcw authored
These statements are like switch statements in C, but without the 'case' keyword in labels. How labels are parsed. In UnwrappedLineParser, the program tries to parse a statement every time it sees a colon. In TokenAnnotator, a colon that isn't part of an expression is annotated as a label. The token type `TT_GotoLabelColon` is added. We did not include Verilog in the name because we thought we would eventually have to fix the problem that case labels in C can't contain ternary conditional expressions and we would use that token type. The style is like below. Labels are on separate lines and indented by default. The linked style guide also has examples where labels and the corresponding statements are on the same lines. They are not supported for now. https://github.com/lowRISC/style-guides/blob/master/VerilogCodingStyle.md ``` case (state_q) StIdle: state_d = StA; StA: begin state_d = StB; end endcase ``` Differential Revision: https://reviews.llvm.org/D128714
-
sstwcw authored
Differential Revision: https://reviews.llvm.org/D128713
-
sstwcw authored
Now things inside hierarchies like modules and interfaces are indented. When the module header spans multiple lines, all except the first line are indented as continuations. We added the property `IsContinuation` to mark lines that should be indented this way. In order that the colons inside square brackets don't get labeled as `TT_ObjCMethodExpr`, we added a check to only use this type when the language is not Verilog. Differential Revision: https://reviews.llvm.org/D128712
-
sstwcw authored
Now stuff inside begin-end blocks get indented. Some tests are moved into FormatTestVerilog.Block from FormatTestVerilog.If because they have nothing to do with if statements. Reviewed By: HazardyKnusperkeks, owenpan Differential Revision: https://reviews.llvm.org/D128711
-
sstwcw authored
Reviewed By: HazardyKnusperkeks Differential Revision: https://reviews.llvm.org/D126845
-
Nico Weber authored
A symbol `$ld$previous$/Another$1.2.3$1$3.0$14.0$_xxx$` means "pretend symbol `_xxx` is in dylib `/Another` with version `1.2.3` if the deployment target is between `3.0` and `14.0` and we're targeting platform `1` (ie macOS)". This means dylibs can now inject synthetic dylibs into the link, so DylibFile needs to grow a 3rd constructor. The only other interesting thing is that such an injected dylib counts as a use of the original dylib. This patch gets this mostly right (if _only_ `$ld$previous` symbols are used from a dylib, we don't add a dep on the dylib itself, matching ld64), but one case where we don't match ld64 yet is that ld64 even omits the original dylib when linking it with `-needed-l`. Lld currently still adds a load command for the original dylib in that case. (That's for a future patch.) Fixes #56074. Differential Revision: https://reviews.llvm.org/D130725
-
Changpeng Fang authored
Summary: Flat scratch load of D16 type by default has tied vdst_in operand (with vdst). This should be taken care of at the time of "removeOperand" in eliminateFrameIndex. Otherwise we will hit an assert saying "Cannot move tied operands". This patch unties vdst_in before the move, and retie it with vdst afterwards. Reviewers: arsenm, foad Differential Revision: https://reviews.llvm.org/D130537
-
Francis Visoiu Mistrih authored
Use a function to distribute transposes. Preparation for future patches.
-
Vincent Lee authored
Linking fails when targeting `x86_64-apple-darwin` for runtimes. The issue is that LLD strictly assumes the target architecture be present in the tbd files (which isn't always true). For example, when targeting `x86_64h`, it should work with `x86_64` because they are ABI compatible. This is also inline with what ld64 does. An environment variable (which ld64 also supports) is also added to preserve the existing behavior of strict architecture matching. Reviewed By: #lld-macho, int3 Differential Revision: https://reviews.llvm.org/D130683
-
tlattner authored
-
V Donaldson authored
-
John Ericson authored
We don't need to recompute the list LLVMConfig.cmake provides us. When LLVM is being built, the list is two elements long: generated headers and headers from source. When LLVM is already built,the list is one element long: the installed header directory containing both generated and hand-written sources. Reviewed By: sebastian-ne Differential Revision: https://reviews.llvm.org/D130553
-
Slava Gurevich authored
- Fix a typo in the function that never returns a significant value - Add unit tests for the getters/setters in SBBreakpointLocation - Verified the newly added unit test succeeds after the fix: llvm-lit -sv lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py Differential Revision: https://reviews.llvm.org/D130660
-
Shafik Yaghmour authored
[Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values DR2338 clarified that it was undefined behavior to set the value outside the range of the enumerations values for an enum without a fixed underlying type. We should diagnose this with a constant expression context. Differential Revision: https://reviews.llvm.org/D130058
-
Felipe de Azevedo Piovezan authored
Currently, the LLVM IR -> MIR translator fails to translate dbg.values whose first argument is a null pointer. However, in other portions of the code, such pointers are always lowered to the constant zero, for example see IRTranslator::Translate(Constant, Register). This patch addresses the limitation by following the same approach of lowering null pointers to zero. A prior test was checking that null pointers were always lowered to $noreg; this test is changed to check for zero, and the previous behavior is now checked by introducing a dbg.value whose first argument is the address of a global variable. Differential Revision: https://reviews.llvm.org/D130721
-
Jez Ng authored
We were previously doing it after LTO, which did have the desired effect of having the un-exported symbols marked as private extern in the final output binary, but doing it before LTO creates more optimization opportunities. One observable difference is that LTO can now elide un-exported symbols entirely, so they may not even be present as private externs in the output. This is also what ld64 implements. Reviewed By: #lld-macho, thevinster Differential Revision: https://reviews.llvm.org/D130429
-
Felipe de Azevedo Piovezan authored
The getOperand method already returns a Constant when it is called on a ConstantExpression, as such the cast is not needed. To prevent a type mismatch between the different return statements of the lambda, the lambda return type is explicitly provided. Differential Revision: https://reviews.llvm.org/D130719
-
Jacques Pienaar authored
Currently DefaultValuedAttr is confusingly actually default valued & optional but that was an artifact of development and longstanding TODO to address. Add new attribute that matches this behavior for cases where that is actually the desired behavior before addressing TODO (e.g., this is an incremental step to fixing DefaultValuedAttr). Differential Revision: https://reviews.llvm.org/D130679
-
Anshil Gandhi authored
When register pressure tracking is disabled, the scheduler attempts to load pressures at SReg_32 and VGPR_32. This causes an index out of bounds error. This patch fixes this issue by disabling the initialization of RPTracker when not needed. NFC Reviewed By: rampitec, kerbowa, arsenm Differential Revision: https://reviews.llvm.org/D129322
-
Denis Fatkulin authored
There's no a space symbol between trailing return type `auto` and left brace `{`. The simpliest examles of code to reproduce the issue: ``` []() -> auto {} ``` and ``` auto foo() -> auto {} ``` Depends on D130299 Reviewed By: HazardyKnusperkeks, curdeius, owenpan Differential Revision: https://reviews.llvm.org/D130417 -
Markus Böck authored
-
Greg Clayton authored
Checking if a path is absolute can be expensive and currently the result is not cached in the FileSpec object. This patch adds caching and also code to clear the cache if the file is modified. Differential Revision: https://reviews.llvm.org/D130396
-
Greg Clayton authored
[NFC] Improve FileSpec internal APIs and usage in preparation for adding caching of resolved/absolute. Resubmission of https://reviews.llvm.org/D130309 with the 2 patches that fixed the linux buildbot, and new windows fixes. The FileSpec APIs allow users to modify instance variables directly by getting a non const reference to the directory and filename instance variables. This makes it impossible to control all of the times the FileSpec object is modified so we can clear cached member variables like m_resolved and with an upcoming patch caching if the file is relative or absolute. This patch modifies the APIs of FileSpec so no one can modify the directory or filename instance variables directly by adding set accessors and by removing the get accessors that are non const. Many clients were using FileSpec::GetCString(...) which returned a unique C string from a ConstString'ified version of the result of GetPath() which returned a std::string. This caused many locations to use this convenient function incorrectly and could cause many strings to be added to the constant string pool that didn't need to. Most clients were converted to using FileSpec::GetPath().c_str() when possible. Other clients were modified to use the newly renamed version of this function which returns an actualy ConstString: ConstString FileSpec::GetPathAsConstString(bool denormalize = true) const; This avoids the issue where people were getting an already uniqued "const char *" that came from a ConstString only to put the "const char *" back into a "ConstString" object. By returning the ConstString instead of a "const char *" clients can be more efficient with the result. The patch: - Removes the non const GetDirectory() and GetFilename() get accessors - Adds set accessors to replace the above functions: SetDirectory() and SetFilename(). - Adds ClearDirectory() and ClearFilename() to replace usage of the FileSpec::GetDirectory().Clear()/FileSpec::GetFilename().Clear() call sites - Fixed all incorrect usage of FileSpec::GetCString() to use FileSpec::GetPath().c_str() where appropriate, and updated other call sites that wanted a ConstString to use the newly returned ConstString appropriately and efficiently. Differential Revision: https://reviews.llvm.org/D130549
-