[ORC] Move DylibManager impl out of SimpleRemoteEPC. (#188439)
This updates EPCGenericDylibManager to implement the DylibManager
interface, and drops the DylibManager implementation from
SimpleRemoteEPC. Since SimpleRemoteEPC already owned an
EPCGenericDylibManager it can simply provide that as its DylibManager
implementation. This change should not affect the behavior of
SimpleRemoteEPC from the perspective of API clients.
[lldb] Fix wrong arguments in MergeSections address mismatch warning (#188610)
The warning message intended to print the mismatched file addresses, but
was passing GetByteSize() instead of GetFileAddress() for both the
expected and actual values.
[ObjC] Fix -Wunused-variable
Inline the variable into the assertion given it is not used anywhere
else, has no side effects, and the variable name did not make anything
more clear.
[SLP][NFC] Refactor to prepare for constant stride stores (#185997)
Refactor to proceed addition of strided store chain vectorization.
Instead of iterating over one chain at a time, attempting all VFs for that given chain, we now iterate over VFs, trying each chain for the current VF. This will allow us to handle chains that share elements.
[ObjC] Emit number, array, and dictionary literals as constants (#185130)
When targeting runtimes that support constant literal classes, emit ObjC
literal expressions @(number), @[], and @{} as compile-time constant
data structures rather than runtime msgSend calls. This reduces code
size and runtime overhead at the cost of increased data segment size,
and avoids repeated heap allocation of equivalent literal objects.
The feature is not supported with the fragile ABI or GNU runtimes, where
it is automatically disabled.
The feature can be disabled altogether with -fno-objc-constant-literals,
or individually per literal kind:
-fno-constant-nsnumber-literals
-fno-constant-nsarray-literals
-fno-constant-nsdictionary-literals
Custom backing class names can be specified via:
-fconstant-array-class=<name>
[10 lines not shown]
Revert "[lldb] [windows] Fix warning about unused static functions" (#188626)
Reverts llvm/llvm-project#188531.
That change broke some buildbots, e.g.
https://lab.llvm.org/buildbot/#/builders/141/builds/16639.
Even though one of the static functions, `GetPathToExecutable`, only was
used by the function `AddPythonDLLToSearchPath` below, it turns out that
`GetModulePath` is used in another place as well, guarded by a different
ifdef.
[MLIR] Fix -Wunused-but-set-variable
Use a void cast given [[maybe_unused]] is a C23 extension and this is a
C file. The calls also have side effects so it does not make sense to
inline into the assertions.
[Support] [Windows] Silence warnings about anonymous unions (#188534)
When building in mingw mode with Clang, we currently get the
following warnings:
llvm-project/llvm/lib/Support/Windows/Path.inc:1720:5: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
1720 | struct {
| ^
llvm-project/llvm/lib/Support/Windows/Path.inc:1728:5: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
1728 | struct {
| ^
Since these declarations mirror parts of the Microsoft SDKs, we
don't want to deviate from it needlessly; instead add a pragma
to silence this diagnostic for this specific area.
[lldb] [windows] Fix warnings in ConnectionConPTYWindows (#188528)
This fixes the following warnings, when building in mingw mode:
llvm-project/lldb/source/Host/windows/ConnectionConPTYWindows.cpp:47:7: warning: field 'm_pty' will be initialized after base 'ConnectionGenericFile' [-Wreorder-ctor]
47 | : m_pty(pty), ConnectionGenericFile(pty->GetSTDOUTHandle(), false) {};
| ^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ConnectionGenericFile(pty->GetSTDOUTHandle(), false) m_pty(pty)
llvm-project/lldb/source/Host/windows/ConnectionConPTYWindows.cpp:47:74: warning: extra ';' outside of a function is incompatible with C++98 [-Wc++98-compat-extra-semi]
47 | : m_pty(pty), ConnectionGenericFile(pty->GetSTDOUTHandle(), false) {};
| ^
[lldb] Disallow SHARED_BUILD_TESTCASE for non-default self.build() (#188523)
Change `self.build(...)` to assert if called with arguments of any kind,
for tests which have `SHARED_BUILD_TESTCASE` enabled (the default).
This also changes all tests that began asserting with this change, tests
which call `self.build(...)` with arguments.
---------
Co-authored-by: Adrian Prantl <adrian.prantl at gmail.com>
[lldb] [windows] Fix warning about unused static functions (#188531)
This fixes warnings about unused static functions, if building without
LLDB_PYTHON_DLL_RELATIVE_PATH defined.
These two static functions are only used by the non-static function
AddPythonDLLToSearchPath below; include them in the ifdef enclosing it.
[SandboxVec] Fix -Wunused-variable
Mark it [[maybe_unused]] given it is only used if assertions are enabled
(i.e., NDEBUG is not defined). We don't inline it given the variable
being named provides tangibly more information to the reader.
[DirectX] Handle byte type in DXILBitcodeWriter (#187157)
The byte type was introduced to LLVM IR in #186888. DXILBitcodeWriter
needs to handle this type by generating valid LLVM 3.7 era bitcode,
which is as simple as treating byte equivalently to an integer.
[libc][docs] Add guide for implementing a function (#188499)
Added implementing_a_function.rst providing a checklist for adding a new
function to LLVM-libc.
Updated dev/index.rst to include the new guide in the toctree.
[libc][math] Switch log1pf to use the same log_eval from inverse hyperbolic functions. (#188388)
- Switch log1pf to use the same log_eval from inverse hyperbolic
functions.
- Optimize log_eval to use the same range reduction scheme as double
precision log
- Reduce the table size needed for log range reduction.
- This lower the overall latency of log1pf and inverse hyperbolic
functions.