[libc] replace for loops with a call to memcpy in File (#165219)
Addresses `TODO`s in file.cpp by replacing data copies via for loops
with calls to inline_memcpy.
Signed-off-by: Shreeyash Pandey <shreeyash335 at gmail.com>
[MLIR][LLVM] Debug info: import debug records directly (#167812)
Effectively means we don't need to call into
`llvmModule->convertFromNewDbgValues()` anymore. Added a flag to allow
users to access the old behavior.
[utils] don't warn when setting rlimit fails on Solaris (#167921)
Solaris doesn't define RLIMIT_NPROC, so this is expected to fail there.
This fixes a test failure in llvm/utils/lit/tests/verbosity.py on
Solaris due to this unexpected warning being included in the lit output.
[Support] Prevent loss of file type flags when creating temporary (#167939)
Non-binary output files from the compiler need the `OF_Text` flag set
for encoding conversion to be performed correctly on z/OS.
---------
Co-authored-by: Tony Tao <tonytao at ca.ibm.com>
Clean up MachTask.mm's handling of m_exception_thread. (#167994)
This was getting joined in ShutDownExcecptionThread (sic) but not
cleared. So this function was not safe to call twice, since you aren't
supposed to join a thread twice. Sadly, this was called in
MachTask::Clear and MachProcess::Destroy, which are both called when you
tell debugserver to detach.
This didn't seem to cause problems IRL, but the most recent ASAN detects
this as an error and calls ASAN::Die, which was causing all the tests
that ran detach to fail.
I fixed that by moving the clear & test for m_exception_thread to
ShutDownExceptionThread. I also fixed the spelling of that routine. And
that routine was claiming to return a kern_return_t which no one was
checking. It actually returns a kern_return_t if there was a Mach
failure and a Posix error if there was a join failure. Since there's
really nothing you can do but exit if this fails, which is always what
you are in the process of doing when you call this, and since we have
already done all the useful logging in ShutDownExceptionThread, I just
removed the return value.
[AMDGPU][MC] Disallow nogds in ds_gws_* instructions (#166873)
The ds_gws_* instructions require gds as an operand. However, when nogds
is given, it is treated the same as gds. This patch fixes this to
disallow nogds.
[Flang][OpenMP] Fix defaultmap(none) being overly aggressive with symbol checks (#167806)
Currently we're picking up and complaining about builtin (and procedure)
symbols like null() when defaultmap(none) is set, so I've relaxed the
restriction a bit to allow for procedures and named constants to bypass
the restriction. It might be the case that we want to tighten it up
again in certain aspects in the future.
[AMDGPU] Use std::variant in ArgDescriptor. (#167992)
This replaces the 2 bool flags and the anonymous union. This also
removes an implicit conversion from Register to unsigned and a call to
MCRegister::id().
The ArgDescriptor constructor was always assigning the union through the
MCRegister field even for stack offsets.
The change to SIMachineFunctionInfo.h fixes a case where getRegister was
being called on an unset ArgDescriptor. Since it was only this case, it
seemed cleaner to fix it at the caller. The other option would be to
make getRegister() return MCRegister() for an unset ArgDescriptor.
[compiler-rt] [Darwin] Strip MTE tags from ASAN and TSAN (#166453)
ASAN and TSAN need to strip tags in order to compute the correct shadow
addresses.
rdar://163518624
[SLP]Enable Sub as a base instruction in copyables
Patch adds support for sub instructions as main instruction in copyables
elements. Also, adds a check if the base instruction is not profitable
for the selection if at least one instruction with the main opcode is
used as an immediate operand.
Reviewers: RKSimon, hiraditya
Reviewed By: RKSimon
Pull Request: https://github.com/llvm/llvm-project/pull/163231
[MergeICmp][profcheck] Propagate profile info (#167594)
Propagate branch weights in `mergeComparisons` : the probability of reaching the common "exit" BB (`bb_phi` in the description in `processPhi`)doesn't change, and is a disjunction over the probabilities of doing that from the blocks performing comparisons which are now being merged
Issue #147390
AMDGPU: Constrain readfirstlane operand when writing to m0 (#168004)
Fixes another verifier error after introducing AV registers.
Also fixes not clearing the subregister index if there was
one.
AMDGPU: Fix verifier error when waterfall call target is in AV register
This isn't an ideal fix; technically this should be an optimization path
we shouldn't need to go down. The base path where a copy will be inserted
is still broken.
The lit test changes are mostly regressions to be fixed later.
AMDGPU: Constrain readfirstlane operand when writing to m0
Fixes another verifier error after introducing AV registers.
Also fixes not clearing the subregister index if there was
one.
[TableGen] Split *GenRegisterInfo.inc. (#167700)
Reduces memory usage compiling backend sources, most notably for
AMDGPU by ~98 MB per source on average.
AMDGPUGenRegisterInfo.inc is tens of megabytes in size now, and
is even larger downstream. At the same time, it is included in
nearly all backend sources, typically just for a small portion of
its content, resulting in compilation being unnecessarily
memory-hungry, which in turn stresses buildbots and wastes their
resources.
Splitting .inc files also helps avoiding extra ccache misses
where changes in .td files don't cause changes in all parts of
what previously was a single .inc file.
It is thought that rather than building on top of the current
single-output-file design of TableGen, e.g., using `split-file`,
it would be more preferable to recognise the need for multi-file
outputs and give it a proper first-class support directly in
TableGen.
AArch64: rewrite the CSR compuation (#167967)
Rather than having a separate path for Darwin, and then a partial
handling for Windows, and then the remainder using its own path, unify
the three paths. Use a switch over the calling convention to avoid
having to check and handle the calling convention in a variety of
places. This simplifies the logic and avoids accidnetally missing a
calling convention (such as we had done with PreserveMost, PreserveAll
on Windows).
[lldb][nfc] Initialize m_initial_sp in ctor for UnwindAssemblyInstEmulation (#167914)
Also rename the "sp" suffix (originally intended to mean "Stack
Pointer") to "cfa", as "sp" generally means Shared Pointer.