-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CGData] llvm-cgdata #89884
[CGData] llvm-cgdata #89884
Conversation
031f7f0
to
d22358a
Compare
cl::values(clEnumValN(CD_Text, "text", "Text encoding"), | ||
clEnumValN(CD_Binary, "binary", "Binary encoding"))); | ||
|
||
cl::opt<bool> ShowCGDataVersion("cgdata-version", cl::init(false), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything wrong with simply using llvm-gcdata show --version
? Also, false
should already be the default.
cl::opt<bool> ShowCGDataVersion("cgdata-version", cl::init(false), | |
cl::opt<bool> ShowCGDataVersion("version", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything wrong with simply using
llvm-gcdata show --version
? Also,false
should already be the default.
I can't drop the prefix as it conflicts with the existing version flag to LLVM.
In fact, this code is similar to -profile-version
used for llvm-profdata
. So I left the code except deleting the initial value (false
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised there is a flag conflict if you are using a subcommand. But it makes sense to keep this consistent with -profile-version
.
b8942ba
to
1dbd111
Compare
Version1 = 1, | ||
CurrentVersion = CG_DATA_INDEX_VERSION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to also have a SubVersion - which is compatible within the same Version but data might be logically different (i.e. minor fixes, etc) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't anticipate many changes of this format in the future, and aim for simplicity. The code is largely modeled after the IRPGO profile -- https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/ProfileData/InstrProf.h#L1071
return Magic == IndexedCGData::Magic; | ||
} | ||
|
||
bool TextCodeGenDataReader::hasFormat(const MemoryBuffer &Buffer) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of this function is kind of confusing - or contradictory with description. Should it be something like hasAsciiFormat
- maybe I'm misinterpreting the usage ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description in the header is following, which is also modeled after the case of IRPGO -- https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/ProfileData/InstrProfReader.h#L252-L253
I'd like to keep them synced, and also I think it's clearer without it as this is a static function and the class name TextCodeGenDataReader
already implies we're interested in a text format here.
/// Return true if the given buffer is in text codegen data format.
static bool hasFormat(const MemoryBuffer &Buffer);
// remaining fields to allow back-patching later. | ||
COS.write(Header.Magic); | ||
COS.write32(Header.Version); | ||
COS.write32(Header.DataKind); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to add the ability to write some client-defined string metadata for the file ? Ex: module name, source hash, build system info, etc ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like the IRPGO case -- https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/ProfileData/InstrProf.h#L1117-L1124, I aim to maintain a simplified header while still capturing any discrepancies. Details such as the module name may change based on client usage and can be distinguished by using a different DataKind. I expect that these details can be encoded within their respective data blobs as needed.
@llvm/pr-subscribers-pgo Author: Kyungwoo Lee (kyulee-com) ChangesThe llvm-cgdata tool has been introduced to handle reading and writing of codegen data. This data includes an optimistic codegen summary that can be utilized to enhance subsequent codegen. Currently, the tool supports saving and restoring the outlined hash tree, facilitating machine function outlining across modules. Additional codegen summaries can be incorporated into separate sections as required. This patch primarily establishes basic support for the reader and writer, similar to llvm-profdata. The high-level operations of llvm-cgdata are as follows:
This depends on #89792. Patch is 63.01 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/89884.diff 21 Files Affected:
diff --git a/llvm/include/llvm/CodeGenData/CodeGenData.h b/llvm/include/llvm/CodeGenData/CodeGenData.h
new file mode 100644
index 0000000000000..f46dc0c28cbc7
--- /dev/null
+++ b/llvm/include/llvm/CodeGenData/CodeGenData.h
@@ -0,0 +1,202 @@
+//===- CodeGenData.h --------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains support for codegen data that has stable summary which
+// can be used to optimize the code in the subsequent codegen.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CODEGENDATA_CODEGENDATA_H
+#define LLVM_CODEGENDATA_CODEGENDATA_H
+
+#include "llvm/ADT/BitmaskEnum.h"
+#include "llvm/Bitcode/BitcodeReader.h"
+#include "llvm/CodeGenData/OutlinedHashTree.h"
+#include "llvm/CodeGenData/OutlinedHashTreeRecord.h"
+#include "llvm/IR/Module.h"
+#include "llvm/Object/ObjectFile.h"
+#include "llvm/Support/ErrorHandling.h"
+#include "llvm/TargetParser/Triple.h"
+#include <mutex>
+
+namespace llvm {
+
+enum CGDataSectKind {
+#define CG_DATA_SECT_ENTRY(Kind, SectNameCommon, SectNameCoff, Prefix) Kind,
+#include "llvm/CodeGenData/CodeGenData.inc"
+};
+
+std::string getCodeGenDataSectionName(CGDataSectKind CGSK,
+ Triple::ObjectFormatType OF,
+ bool AddSegmentInfo = true);
+
+enum class CGDataKind {
+ Unknown = 0x0,
+ // A function outlining info.
+ FunctionOutlinedHashTree = 0x1,
+ LLVM_MARK_AS_BITMASK_ENUM(/*LargestValue=*/FunctionOutlinedHashTree)
+};
+
+const std::error_category &cgdata_category();
+
+enum class cgdata_error {
+ success = 0,
+ eof,
+ bad_magic,
+ bad_header,
+ empty_cgdata,
+ malformed,
+ unsupported_version,
+};
+
+inline std::error_code make_error_code(cgdata_error E) {
+ return std::error_code(static_cast<int>(E), cgdata_category());
+}
+
+class CGDataError : public ErrorInfo<CGDataError> {
+public:
+ CGDataError(cgdata_error Err, const Twine &ErrStr = Twine())
+ : Err(Err), Msg(ErrStr.str()) {
+ assert(Err != cgdata_error::success && "Not an error");
+ }
+
+ std::string message() const override;
+
+ void log(raw_ostream &OS) const override { OS << message(); }
+
+ std::error_code convertToErrorCode() const override {
+ return make_error_code(Err);
+ }
+
+ cgdata_error get() const { return Err; }
+ const std::string &getMessage() const { return Msg; }
+
+ /// Consume an Error and return the raw enum value contained within it, and
+ /// the optional error message. The Error must either be a success value, or
+ /// contain a single CGDataError.
+ static std::pair<cgdata_error, std::string> take(Error E) {
+ auto Err = cgdata_error::success;
+ std::string Msg = "";
+ handleAllErrors(std::move(E), [&Err, &Msg](const CGDataError &IPE) {
+ assert(Err == cgdata_error::success && "Multiple errors encountered");
+ Err = IPE.get();
+ Msg = IPE.getMessage();
+ });
+ return {Err, Msg};
+ }
+
+ static char ID;
+
+private:
+ cgdata_error Err;
+ std::string Msg;
+};
+
+enum CGDataMode {
+ None,
+ Read,
+ Write,
+};
+
+class CodeGenData {
+ /// Global outlined hash tree that has oulined hash sequences across modules.
+ std::unique_ptr<OutlinedHashTree> PublishedHashTree;
+
+ /// This flag is set when -fcodegen-data-generate is passed.
+ /// Or, it can be mutated with -fcodegen-data-thinlto-two-rounds.
+ bool EmitCGData;
+
+ /// This is a singleton instance which is thread-safe. Unlike profile data
+ /// which is largely function-based, codegen data describes the whole module.
+ /// Therefore, this can be initialized once, and can be used across modules
+ /// instead of constructing the same one for each codegen backend.
+ static std::unique_ptr<CodeGenData> Instance;
+ static std::once_flag OnceFlag;
+
+ CodeGenData() = default;
+
+public:
+ ~CodeGenData() = default;
+
+ static CodeGenData &getInstance();
+
+ /// Returns true if we have a valid outlined hash tree.
+ bool hasOutlinedHashTree() {
+ return PublishedHashTree && !PublishedHashTree->empty();
+ }
+
+ /// Returns the outlined hash tree. This can be globally used in a read-only
+ /// manner.
+ const OutlinedHashTree *getOutlinedHashTree() {
+ return PublishedHashTree.get();
+ }
+
+ /// Returns true if we should write codegen data.
+ bool emitCGData() { return EmitCGData; }
+
+ /// Publish the (globally) merged or read outlined hash tree.
+ void publishOutlinedHashTree(std::unique_ptr<OutlinedHashTree> HashTree) {
+ PublishedHashTree = std::move(HashTree);
+ // Ensure we disable emitCGData as we do not want to read and write both.
+ EmitCGData = false;
+ }
+};
+
+namespace cgdata {
+
+inline bool hasOutlinedHashTree() {
+ return CodeGenData::getInstance().hasOutlinedHashTree();
+}
+
+inline const OutlinedHashTree *getOutlinedHashTree() {
+ return CodeGenData::getInstance().getOutlinedHashTree();
+}
+
+inline bool emitCGData() { return CodeGenData::getInstance().emitCGData(); }
+
+inline void
+publishOutlinedHashTree(std::unique_ptr<OutlinedHashTree> HashTree) {
+ CodeGenData::getInstance().publishOutlinedHashTree(std::move(HashTree));
+}
+
+void warn(Error E, StringRef Whence = "");
+void warn(Twine Message, std::string Whence = "", std::string Hint = "");
+
+} // end namespace cgdata
+
+namespace IndexedCGData {
+
+const uint64_t Magic = 0x81617461646763ff; // "\xffcgdata\x81"
+
+enum CGDataVersion {
+ // Version 1 is the first version. This version supports the outlined
+ // hash tree.
+ Version1 = 1,
+ CurrentVersion = CG_DATA_INDEX_VERSION
+};
+const uint64_t Version = CGDataVersion::CurrentVersion;
+
+struct Header {
+ uint64_t Magic;
+ uint32_t Version;
+ uint32_t DataKind;
+ uint64_t OutlinedHashTreeOffset;
+
+ // New fields should only be added at the end to ensure that the size
+ // computation is correct. The methods below need to be updated to ensure that
+ // the new field is read correctly.
+
+ // Reads a header struct from the buffer.
+ static Expected<Header> readFromBuffer(const unsigned char *Curr);
+};
+
+} // end namespace IndexedCGData
+
+} // end namespace llvm
+
+#endif // LLVM_CODEGEN_PREPARE_H
diff --git a/llvm/include/llvm/CodeGenData/CodeGenData.inc b/llvm/include/llvm/CodeGenData/CodeGenData.inc
new file mode 100644
index 0000000000000..5f6df5c0bf106
--- /dev/null
+++ b/llvm/include/llvm/CodeGenData/CodeGenData.inc
@@ -0,0 +1,46 @@
+/*===-- CodeGenData.inc ----------------------------------------*- C++ -*-=== *\
+|*
+|* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+|* See https://llvm.org/LICENSE.txt for license information.
+|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+|*
+\*===----------------------------------------------------------------------===*/
+/*
+ * This is the main file that defines all the data structure, signature,
+ * constant literals that are shared across compiler, host tools (reader/writer)
+ * to support codegen data.
+ *
+\*===----------------------------------------------------------------------===*/
+
+#ifdef CG_DATA_SECT_ENTRY
+#define CG_DATA_DEFINED
+CG_DATA_SECT_ENTRY(CG_outline, CG_DATA_QUOTE(CG_DATA_OUTLINE_COMMON),
+ CG_DATA_OUTLINE_COFF, "__DATA,")
+
+#undef CG_DATA_SECT_ENTRY
+#endif
+
+/* section name strings common to all targets other
+ than WIN32 */
+#define CG_DATA_OUTLINE_COMMON __llvm_outline
+/* Since cg data sections are not allocated, we don't need to
+ * access them at runtime.
+ */
+#define CG_DATA_OUTLINE_COFF ".loutline"
+
+#ifdef _WIN32
+/* Runtime section names and name strings. */
+#define CG_DATA_SECT_NAME CG_DATA_OUTLINE_COFF
+
+#else
+/* Runtime section names and name strings. */
+#define CG_DATA_SECT_NAME INSTR_PROF_QUOTE(CG_DATA_OUTLINE_COMMON)
+
+#endif
+
+/* Indexed codegen data format version (start from 1). */
+#define CG_DATA_INDEX_VERSION 1
+
+/* Helper macros. */
+#define CG_DATA_SIMPLE_QUOTE(x) #x
+#define CG_DATA_QUOTE(x) CG_DATA_SIMPLE_QUOTE(x)
diff --git a/llvm/include/llvm/CodeGenData/CodeGenDataReader.h b/llvm/include/llvm/CodeGenData/CodeGenDataReader.h
new file mode 100644
index 0000000000000..df4ae3ed24e79
--- /dev/null
+++ b/llvm/include/llvm/CodeGenData/CodeGenDataReader.h
@@ -0,0 +1,154 @@
+//===- CodeGenDataReader.h --------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains support for reading codegen data.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CODEGENDATA_CODEGENDATAREADER_H
+#define LLVM_CODEGENDATA_CODEGENDATAREADER_H
+
+#include "llvm/CodeGenData/CodeGenData.h"
+#include "llvm/CodeGenData/OutlinedHashTreeRecord.h"
+#include "llvm/Support/LineIterator.h"
+#include "llvm/Support/VirtualFileSystem.h"
+
+namespace llvm {
+
+class CodeGenDataReader {
+ cgdata_error LastError = cgdata_error::success;
+ std::string LastErrorMsg;
+
+public:
+ CodeGenDataReader() = default;
+ virtual ~CodeGenDataReader() = default;
+
+ /// Read the header. Required before reading first record.
+ virtual Error read() = 0;
+ /// Return the codegen data version.
+ virtual uint32_t getVersion() const = 0;
+ /// Return the codegen data kind.
+ virtual CGDataKind getDataKind() const = 0;
+ /// Return true if the data has an outlined hash tree.
+ virtual bool hasOutlinedHashTree() const = 0;
+ /// Return the outlined hash tree that is released from the reader.
+ std::unique_ptr<OutlinedHashTree> releaseOutlinedHashTree() {
+ return std::move(HashTreeRecord.HashTree);
+ }
+
+ /// Factory method to create an appropriately typed reader for the given
+ /// codegen data file path and file system.
+ static Expected<std::unique_ptr<CodeGenDataReader>>
+ create(const Twine &Path, vfs::FileSystem &FS);
+
+ /// Factory method to create an appropriately typed reader for the given
+ /// memory buffer.
+ static Expected<std::unique_ptr<CodeGenDataReader>>
+ create(std::unique_ptr<MemoryBuffer> Buffer);
+
+ /// Extract the cgdata embedded in sections from the given object file and
+ /// merge them into the GlobalOutlineRecord. This is a static helper that
+ /// is used by `llvm-cgdata merge` or ThinLTO's two-codegen rounds.
+ static Error mergeFromObjectFile(const object::ObjectFile *Obj,
+ OutlinedHashTreeRecord &GlobalOutlineRecord);
+
+protected:
+ /// The outlined hash tree that has been read. When it's released by
+ /// releaseOutlinedHashTree(), it's no longer valid.
+ OutlinedHashTreeRecord HashTreeRecord;
+
+ /// Set the current error and return same.
+ Error error(cgdata_error Err, const std::string &ErrMsg = "") {
+ LastError = Err;
+ LastErrorMsg = ErrMsg;
+ if (Err == cgdata_error::success)
+ return Error::success();
+ return make_error<CGDataError>(Err, ErrMsg);
+ }
+
+ Error error(Error &&E) {
+ handleAllErrors(std::move(E), [&](const CGDataError &IPE) {
+ LastError = IPE.get();
+ LastErrorMsg = IPE.getMessage();
+ });
+ return make_error<CGDataError>(LastError, LastErrorMsg);
+ }
+
+ /// Clear the current error and return a successful one.
+ Error success() { return error(cgdata_error::success); }
+};
+
+class IndexedCodeGenDataReader : public CodeGenDataReader {
+ /// The codegen data file contents.
+ std::unique_ptr<MemoryBuffer> DataBuffer;
+ /// The header
+ IndexedCGData::Header Header;
+
+public:
+ IndexedCodeGenDataReader(std::unique_ptr<MemoryBuffer> DataBuffer)
+ : DataBuffer(std::move(DataBuffer)) {}
+ IndexedCodeGenDataReader(const IndexedCodeGenDataReader &) = delete;
+ IndexedCodeGenDataReader &
+ operator=(const IndexedCodeGenDataReader &) = delete;
+
+ /// Return true if the given buffer is in binary codegen data format.
+ static bool hasFormat(const MemoryBuffer &Buffer);
+ /// Read the contents including the header.
+ Error read() override;
+ /// Return the codegen data version.
+ uint32_t getVersion() const override { return Header.Version; }
+ /// Return the codegen data kind.
+ CGDataKind getDataKind() const override {
+ return static_cast<CGDataKind>(Header.DataKind);
+ }
+ /// Return true if the header indicates the data has an outlined hash tree.
+ /// This does not mean that the data is still available.
+ bool hasOutlinedHashTree() const override {
+ return Header.DataKind &
+ static_cast<uint32_t>(CGDataKind::FunctionOutlinedHashTree);
+ }
+};
+
+/// This format is a simple text format that's suitable for test data.
+/// The header is a custom format starting with `:` per line to indicate which
+/// codegen data is recorded. `#` is used to indicate a comment.
+/// The subsequent data is a YAML format per each codegen data in order.
+/// Currently, it only has a function outlined hash tree.
+class TextCodeGenDataReader : public CodeGenDataReader {
+ /// The codegen data file contents.
+ std::unique_ptr<MemoryBuffer> DataBuffer;
+ /// Iterator over the profile data.
+ line_iterator Line;
+ /// Describe the kind of the codegen data.
+ CGDataKind DataKind = CGDataKind::Unknown;
+
+public:
+ TextCodeGenDataReader(std::unique_ptr<MemoryBuffer> DataBuffer_)
+ : DataBuffer(std::move(DataBuffer_)), Line(*DataBuffer, true, '#') {}
+ TextCodeGenDataReader(const TextCodeGenDataReader &) = delete;
+ TextCodeGenDataReader &operator=(const TextCodeGenDataReader &) = delete;
+
+ /// Return true if the given buffer is in text codegen data format.
+ static bool hasFormat(const MemoryBuffer &Buffer);
+ /// Read the contents including the header.
+ Error read() override;
+ /// Text format does not have version, so return 0.
+ uint32_t getVersion() const override { return 0; }
+ /// Return the codegen data kind.
+ CGDataKind getDataKind() const override { return DataKind; }
+ /// Return true if the header indicates the data has an outlined hash tree.
+ /// This does not mean that the data is still available.
+ bool hasOutlinedHashTree() const override {
+ return static_cast<uint32_t>(DataKind) &
+ static_cast<uint32_t>(CGDataKind::FunctionOutlinedHashTree);
+ }
+};
+
+} // end namespace llvm
+
+#endif // LLVM_CODEGENDATA_CODEGENDATAREADER_H
diff --git a/llvm/include/llvm/CodeGenData/CodeGenDataWriter.h b/llvm/include/llvm/CodeGenData/CodeGenDataWriter.h
new file mode 100644
index 0000000000000..e17ffc3482ec9
--- /dev/null
+++ b/llvm/include/llvm/CodeGenData/CodeGenDataWriter.h
@@ -0,0 +1,68 @@
+//===- CodeGenDataWriter.h --------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains support for writing codegen data.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CODEGENDATA_CODEGENDATAWRITER_H
+#define LLVM_CODEGENDATA_CODEGENDATAWRITER_H
+
+#include "llvm/CodeGenData/CodeGenData.h"
+#include "llvm/CodeGenData/OutlinedHashTreeRecord.h"
+#include "llvm/Support/Error.h"
+
+namespace llvm {
+
+class CGDataOStream;
+
+class CodeGenDataWriter {
+ /// The outlined hash tree to be written.
+ OutlinedHashTreeRecord HashTreeRecord;
+
+ /// A bit mask describing the kind of the codegen data.
+ CGDataKind DataKind = CGDataKind::Unknown;
+
+public:
+ CodeGenDataWriter() = default;
+ ~CodeGenDataWriter() = default;
+
+ /// Add the outlined hash tree record. The input Record is released.
+ void addRecord(OutlinedHashTreeRecord &Record);
+
+ /// Write the codegen data to \c OS
+ Error write(raw_fd_ostream &OS);
+
+ /// Write the codegen data in text format to \c OS
+ Error writeText(raw_fd_ostream &OS);
+
+ /// Return the attributes of the current CGData.
+ CGDataKind getCGDataKind() const { return DataKind; }
+
+ /// Return true if the header indicates the data has an outlined hash tree.
+ bool hasOutlinedHashTree() const {
+ return static_cast<uint32_t>(DataKind) &
+ static_cast<uint32_t>(CGDataKind::FunctionOutlinedHashTree);
+ }
+
+private:
+ /// The offset of the outlined hash tree in the file.
+ uint64_t OutlinedHashTreeOffset;
+
+ /// Write the codegen data header to \c COS
+ Error writeHeader(CGDataOStream &COS);
+
+ /// Write the codegen data header in text to \c OS
+ Error writeHeaderText(raw_fd_ostream &OS);
+
+ Error writeImpl(CGDataOStream &COS);
+};
+
+} // end namespace llvm
+
+#endif // LLVM_CODEGENDATA_CODEGENDATAWRITER_H
diff --git a/llvm/include/llvm/ProfileData/InstrProf.h b/llvm/include/llvm/ProfileData/InstrProf.h
index 9b34cb0b651f7..b41b4b9ca22d2 100644
--- a/llvm/include/llvm/ProfileData/InstrProf.h
+++ b/llvm/include/llvm/ProfileData/InstrProf.h
@@ -414,7 +414,7 @@ class InstrProfError : public ErrorInfo<InstrProfError> {
/// contain a single InstrProfError.
static std::pair<instrprof_error, std::string> take(Error E) {
auto Err = instrprof_error::success;
- std::string Msg = "";
+ std::string Msg;
handleAllErrors(std::move(E), [&Err, &Msg](const InstrProfError &IPE) {
assert(Err == instrprof_error::success && "Multiple errors encountered");
Err = IPE.get();
diff --git a/llvm/lib/CodeGenData/CMakeLists.txt b/llvm/lib/CodeGenData/CMakeLists.txt
index 3ba90f96cc86d..1156d53afb2e0 100644
--- a/llvm/lib/CodeGenData/CMakeLists.txt
+++ b/llvm/lib/CodeGenData/CMakeLists.txt
@@ -1,4 +1,7 @@
add_llvm_component_library(LLVMCodeGenData
+ CodeGenData.cpp
+ CodeGenDataReader.cpp
+ CodeGenDataWriter.cpp
OutlinedHashTree.cpp
OutlinedHashTreeRecord.cpp
diff --git a/llvm/lib/CodeGenData/CodeGenData.cpp b/llvm/lib/CodeGenData/CodeGenData.cpp
new file mode 100644
index 0000000000000..3bd21c97c7de7
--- /dev/null
+++ b/llvm/lib/CodeGenData/CodeGenData.cpp
@@ -0,0 +1,197 @@
+//===-- CodeGenData.cpp ---------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains support for codegen data that has stable summary which
+// can be used to optimize the code in the subsequent codegen.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/Bitcode/BitcodeWriter.h"
+#include "llvm/CodeGenData/CodeGenDataReader.h"
+#include "llvm/CodeGenData/OutlinedHashTreeRecord.h"
+#include "llvm/Object/ObjectFile.h"
+#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/FileSystem.h"
+#include "llvm/Support/WithColor.h"
+
+#define DEBUG_TYPE "cg-data"
+
+using namespace llvm;
+using namespace cgdata;
+
+static std::string getCGDataErrString(cgdata_error Err,
+ const std::string &ErrMsg = "") {
+ std::string Msg;
+ raw_string_ostream OS(Msg);
+
+ switch (Err) {
+ case cgdata_error::success:
+ OS << "success";
+ break;
+ case cgdata_error::eof:
+ OS << "end of File";
+ break;
+ case cgdata_error::bad_magic:
+ OS << "invalid codegen data (bad magic)";
+ break;
+ case cgdata_error::bad_header:
+ OS << "invalid codegen data (file header is corrupt)";
+ break;
+ case cgdata_error::empty_cgdata:
+ OS << "empty codegen data";
+ break;
+ case cgdata_error::malformed:
+ OS << "malformed codegen data";
+ break;
+ case cgdata_error::unsupported_version:
+ OS << "unsupported codegen data version";
+ break;
+ }
+
+ // If optional error message is not empty, append it to the message.
+ if (!ErrMsg.empty())
+ OS << ": " << ErrMsg;
+
+ return OS.str();
+}
+
+namespace {
+
+// FIXME: This cl...
[truncated]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you plan to add documentation for the tool and file format?
llvm/lib/CodeGenData/CodeGenData.cpp
Outdated
auto *CGD = new CodeGenData(); | ||
Instance.reset(CGD); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work as expected?
auto *CGD = new CodeGenData(); | |
Instance.reset(CGD); | |
Instance = std::make_unique(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, why not check if Instance
is null before creating it instead of using std::call_once
? Or does this need to work with multiple threads?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeGenData
constructor is private purposely, and I can't use make_unique<CodeGenData>
as its template expansion requires it public. Instead, I just combine these two lines by directly allocating and assigning toghether.
As for using call_once
, indeed this supports for working with multiple threads as (in-process) thinlto backends operate in parallel.
auto BufferOrErr = Filename.str() == "-" ? MemoryBuffer::getSTDIN() | ||
: FS.getBufferForFile(Filename); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto BufferOrErr = Filename.str() == "-" ? MemoryBuffer::getSTDIN() | |
: FS.getBufferForFile(Filename); | |
auto BufferOrErr = MemoryBuffer::getFileOrSTDIN(Filename) |
Or does this not work because you need to use FS
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the IRPGO case https://github.com/llvm/llvm-project/blob/main/llvm/lib/ProfileData/InstrProfReader.cpp#L73-L74, I want to keep FS
in case a custom file system is needed.
|
||
RUN: split-file %s %t | ||
|
||
# Synthesize two set of raw cgdata without the header (24 byte) from the indexed cgdata. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Synthesize two set of raw cgdata without the header (24 byte) from the indexed cgdata. | |
# Synthesize two sets of raw cgdata without the header (24 byte) from the indexed cgdata. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
|
||
namespace IndexedCGData { | ||
|
||
const uint64_t Magic = 0x81617461646763ff; // "\xffcgdata\x81" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we have a comment explaining the use of Magic
, something like An identifier for XYZ...
. Also what is the meaning of the hexadecimal in comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's useful to distinguish the file from an ascii text file by just looking at the header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added/expanded the comment.
As for the use of Magic, I keep its use only for the binary header, aligning with the IRPGO case. So, the ascii text file won't have this magic in the header.
The llvm-cgdata tool has been introduced to handle reading and writing of codegen data. This data includes an optimistic codegen summary that can be utilized to enhance subsequent codegen. Currently, the tool supports saving and restoring the outlined hash tree, facilitating machine function outlining across modules. Additional codegen summaries can be incorporated into separate sections as required. This patch primarily establishes basic support for the reader and writer, similar to llvm-profdata. The high-level operations of llvm-cgdata are as follows: 1. It reads local raw codegen data from a custom section (for example, __llvm_outline) embedded in native binary files 2. It merges local raw codegen data into an indexed codegen data, complete with a suitable header. 3. It handles reading and writing of the indexed codegen data into a standalone file.
- A missing header
This reverts commit d3fb41d and forward fix patches because of the issue explained in: llvm#89884 (comment). Revert "Fix tests for llvm#89884 (llvm#100061)" This reverts commit 67937a3. Revert "Fix build break for llvm#89884 (llvm#100050)" This reverts commit c33878c. Revert "[CGData] Fix -Wpessimizing-move in CodeGenDataReader.cpp (NFC)" This reverts commit 1f8b2b1.
Summary: The llvm-cgdata tool has been introduced to handle reading and writing of codegen data. This data includes an optimistic codegen summary that can be utilized to enhance subsequent codegen. Currently, the tool supports saving and restoring the outlined hash tree, facilitating machine function outlining across modules. Additional codegen summaries can be incorporated into separate sections as required. This patch primarily establishes basic support for the reader and writer, similar to llvm-profdata. The high-level operations of llvm-cgdata are as follows: 1. It reads local raw codegen data from a custom section (for example, __llvm_outline) embedded in native binary files 2. It merges local raw codegen data into an indexed codegen data, complete with a suitable header. 3. It handles reading and writing of the indexed codegen data into a standalone file. This depends on #89792. This is a patch for https://discourse.llvm.org/t/rfc-enhanced-machine-outliner-part-2-thinlto-nolto/78753. --------- Co-authored-by: Kyungwoo Lee <[email protected]> Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251410
Summary: - A missing header Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251146
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251106
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251302
This reverts commit d3fb41d and forward fix patches because of the issue explained in: #89884 (comment). Revert "Fix tests for #89884 (#100061)" This reverts commit 67937a3. Revert "Fix build break for #89884 (#100050)" This reverts commit c33878c. Revert "[CGData] Fix -Wpessimizing-move in CodeGenDataReader.cpp (NFC)" This reverts commit 1f8b2b1.
This is a tool to simplify testing. It generates a valid contextual profile file from a json representation. The tool is authored to allow for future evolution, e.g. if we want to support profile merging or other tasks, not necessarily scoped to testing.
This reverts commit d3fb41d and forward fix patches because of the issue explained in: llvm#89884 (comment). Revert "Fix tests for llvm#89884 (llvm#100061)" This reverts commit 67937a3. Revert "Fix build break for llvm#89884 (llvm#100050)" This reverts commit c33878c. Revert "[CGData] Fix -Wpessimizing-move in CodeGenDataReader.cpp (NFC)" This reverts commit 1f8b2b1. (cherry picked from commit 73d7897)
…3807 fa1653be3807 Merge pull request #120 from samjwu/rtd-condition 50a97b7ed748 SWDEV-475293 - strip --hip-path and --rocm-path for nvidia ac1c4e07e71e Add cookie magic as reason to search for device allocations. 4750015b9345 merge main into amd-staging 3db78fa1dd63 [NVPTX] Add Volta Load/Store Atomics (.relaxed, .acquire, .release) and Volatile (.mmio/.volatile) support (#99709) 0760aec54ca6 MTM: fix issues after cursory reading (#100404) 0891ccc0c68c [Frontend][OpenMP] Apply ompx_attribute to all allowing leaf constructs (#100370) f719a339a89b Mark assert-used-only variable as [[maybe_unused]] f729c09c3a56 MC: Inline createMachObjectWriter into MCAsmBackend 3902710a447c [NVPTX] Support fence instruction (#99649) fb1e077982e9 [NVPTX] Restore old va_list builtin type (#100438) 8d3252a89878 [libc++][spaceship] Implements X::iterator container requirements. (#99343) c628dbd030ff [Clang] Prevent null pointer dereference in designated initializer check (#97220) 2e57e6366677 [OpenMP][libomp] Fix tasking debug assert (#95823) 97839a8862bd [Driver] Clean up fp-contract handling in clang driver (#99723) ea222be0d926 [MC] Honour alignment directive fill value for non-intel (#100136) bb0300cf7ce5 [clang][Interp] Fix initializing array subobjects with This pointers 8fd9624cf729 [RISCV][CostModel] Test default lowering strategy for vector LD/ST cdc193459d90 Update the backporting docs (#100401) 0c274d527ae3 [RISCV][TTI] Add coverage of odd sized vector loads and stores 83fb0643f714 Adds a pseudonym to clang's windows mangler... (#97792) 7102592af740 [Offload] Repair and rename `llvm-omp-device-info` (to `-offload-`) (#100309) 5a53add85a6d [mlir] Add optimization attrs for gpu-to-llvmspv function declarations and calls (#99301) 5898a7f4954e [mlir][spirv] Update dependencies for #100138 (#100397) 046a17717d9c [libc++] Improve behavior when using relative path for LIBCXX_ASSERTION_HANDLER_FILE (#100157) 073c199ae79f [Clang][AST] Don't use canonical type when checking dependence in Type::isOverloadable (#98563) d85da4af4983 [X86] canCreateUndefOrPoisonForTargetNode - PMADDWD/PMADDUBSW intrinsics don't create poison af611a0a98fe [LinkerWrapper] Fix `-Xoffload-linker a=b` in offloading (#100270) 8c20d715c098 [Bazel][mlir] Fix Bazel for f83950ab8dfda1da882a6ef7b508639df251621a 2754c083cba1 LAA: mark LoopInfo pointer const (NFC) (#100373) c5abcb0521dd [X86][GlobalISel] Reorganize tests for G_PHI and support fp80 (#100047) 5bae81ba9e6d [CodeGen] Add an option to skip extTSP BB placement for huge functions. (#99310) 0c03b4ce1081 [InstCombine] Infer sub nuw from dominating conditions (#100164) 4e28d30e335e LV/Legality: update outdated comment for isInvariant (NFC) (#100366) e1a3aa8c0fb0 LV/Legality: fix style after cursory reading (NFC) (#100363) dd82a84e0eea [Clang] Fix an assertion failure introduced by #93430 (#100313) 8a7796128053 [Flang][Driver] Enable config file options (#100343) 7d787df5b932 [Clang][NFC] Simplify initialization of `OverloadCandidate` objects. (#100318) 8d8fa01a66d5 Reapply "[libc] Remove 'packaged' GPU build support (#100208)" 338c35aabfbe [clang][Interp] Fix calling variadic call operators 1195df25f4df [libc] Make the libc files always available to clang for the GPU (#100396) fbd303ba5dd9 [DAG] combineAndnp - fold ANDNP(x,PSHUFB(y,z)) -> PSHUFB(y,OR(z,x)) 9f08ae8d2dd1 [clang][Interp][NFC] Fix getting the record decl from a pointer type 59e1c6cd63eb Revert "[compiler-rt] Implement `DumpAllRegisters` for arm-linux and aarch64-linux (#99613)" e7a3aeb1f86b Revert "[compiler-rt] Move `endif` to correct place (#100342)" f83950ab8dfd [mlir][spirv] Implement vector unrolling for `convert-to-spirv` pass (#100138) 374bbc93bcb3 Revert "[tsan] Include unistd.h to declare gettid()" f2b6f0b5868d Revert "[tsan] Enable test on linux (#99659)" 4d19676de417 [BOLT] Add profile-use-pseudo-probes option 6c23f974d6fe [libc] Enable bind test for riscv (#100132) c4b66bf4d065 [AArch64] Implement INIT/ADJUST_TRAMPOLINE (#70267) 9d2dd009b607 [BOLT] Support more than two jump table parents 83ea7ce3a132 [BOLT][NFC] Track fragment relationships using EquivalenceClasses 1feef92a775d Fix lifetimebound for field access (#100197) 557a7b8ae319 [libc][math][c23] Fix totalorder and totalordermag smoke tests (#100354) 5b15d9c44181 [clang][OpenMP] Propoagate debug location to OMPIRBuilder reduction codegen (#100358) 1f5807eb359f [mlir][vector][nfc] Simplify `in_bounds` attr update (#100334) de8c4bef3329 [tsan] Include unistd.h to declare gettid() 0b36144aba8d [X86] Add 'clamp out of range index' variable shuffles test coverage from #96754 07688d13414d Revert "[LV] Add option to still enable the legacy cost model. (#99536)" 6da6772bf0a3 [AArch64][SME] Rewrite __arm_get_current_vg to preserve required registers (#100143) b9995a14f5de [MachineLoopInfo] Fix assertion failure on undef use operands (#100137) 2bb18e27b62c [gn build] Port e6c20e11e7bc 558a8953680f [compiler-rt] Move `endif` to correct place (#100342) 20957d20913b [AIX] Add -msave-reg-params to save arguments to stack (#97524) 4bb3a1e16f3a [clang] Define `ATOMIC_FLAG_INIT` correctly for C++. (#97534) 550b83d65875 Revert "[libc] Remove 'packaged' GPU build support (#100208)" 991460946886 Revert "[libc] Enable 'sscanf' on the GPU (#100211)" 929b474991ce [libcxx][test] Explain picolib unsupported in sort.pass.cpp 404071b05981 [SelectionDAG] Preserve volatile undef stores. (#99918) 445bb35f954e [libc] Enable 'sscanf' on the GPU (#100211) e1052faaf81b [AMDGPU][MC][NFC] Drop remaining -wavesize32/64 attributes in tests. (#100339) e6c20e11e7bc [AMDGPU] Move AMDGPUAsanInstrumentation outside of utils (#100323) 48e1eb4e6b07 [gn build] Port ddb75ca6062c 99c5140bb2b0 [gn build] Port 2ca300f914b1 c1c6ed83e9ac [libc] Remove 'packaged' GPU build support (#100208) 59eae919c938 [ValueTracking] Don't use CondContext in dataflow analysis of phi nodes (#100316) 559be8e2b55a Reapply "[FunctionAttrs] Determine underlying object by `getUnderlyingObjectAggressive` (#100102)" a5bc549c5058 [gn] port 73ac9536268f 9f10cf677620 merge main into amd-staging 68a0d0c76223 [flang][OpenMP] Handle common blocks in delayed privatization (#100317) 2ce865d49059 ARM: Avoid using MachineFunction::getMMI 1031335f2ee1 Revert "[libc++][math] Fix undue overflowing of `std::hypot(x,y,z)` (#93350)" 893a30396260 [clang][analyzer] Support `ownership_{returns,takes}` attributes (#98941) 05e95067eeaa [RISCV] Update combine-vmv.ll to have more foldable cases. NFC cba63c0f92d1 [MLIR][OpenMP] Keep -verify-openmp-ops output as dependency (#99638) aa53f0d6fd3e [ASTContext] Make the end of the switch case unreachable in `encodeTypeForFunctionPointerAuth` (#99763) d36edf8146cf [clang][Interp] Bail out on value dependent variable initializers f0bd705c9b6b [CodeGen] Restore MachineBlockPlacement block ordering (#99351) 71a848632e2f [libcxx][test] Update picolib xfails (#99631) cd82fee3918c [nsan] Fix `Wstring-conversion` error (#100328) 3cb5604d2c73 MachineOutliner: Use PM to query MachineModuleInfo (#99688) 7fad04e94b7b [LSR] Fix matching vscale immediates (#100080) 6a1b119035bd [AMDGPU] Add intrinsics for atomic struct buffer loads (#100140) 666e3326fedf [PAC] Define __builtin_ptrauth_type_discriminator (#100204) eff6250494b4 M68k: Remove hasDebugInfo check ba8126b6fef7 [LV] Mark dead instructions in loop as free. 9a258664024d CodeGen: Avoid using MachineFunction::getMMI in MachineModuleSlotTracker (#100310) 1ead51a86c6c [flang] fix C_PTR function result lowering (#100082) a3de21cac1fb [WebAssembly] Ofast pmin/pmax pattern matchers (#100107) ddf5725ef180 [nsan] Emit calls to optimized functions (#98900) 3993a47bb58f [PS4/PS5][Driver][DWARF] Always emit .debug_aranges for SCE tuning (#100160) c34d673b02ea [asan][cmake][test] Fix finding dynamic asan runtime lib (#100083) d09fc8f0b787 [compiler-rt][builtins] Fix `-Werror` build problem (#100312) fad17b43dbc0 [clang] replaced the usage of `asctime` with `std::put_time` (#99075) ef1c70d26b7e [compiler-rt] Implement `DumpAllRegisters` for arm-linux and aarch64-linux (#99613) ddb75ca6062c [AMDGPU] Utilities to asan instrument memory instructions. (#98863) 455990d18fe4 Reland "SelectionDAG: Avoid using MachineFunction::getMMI" (#99779) 63e179929e2c [ORC] Re-add test files that were accidentally left out of e7698a13e31. e7698a13e319 Re-apply "[ORC][JITLink] Treat common symbols as weak definitions." with fixes. dbe308c000f3 [clang][ExprConst] Allow non-literal types in C++23 (#100062) 63ae1e955007 [RISCV] Emit VP strided loads/stores in RISCVGatherScatterLowering (#98111) f4e8fbc5e90a [compiler-rt][nsan] Add lit config for tests (#100286) 9d45b450f26a [SimplifyLibCalls] Constant fold `remquo` (#99647) 7b619730d9e2 [clang][Interp][test] Try to make a test case work on Windows 2ae862b74b3b [ELF] Remove `consumeLabel` in ScriptLexer (#99567) 6461e537815f [Driver] Don't claim -c/-S 6942f1d5aa23 [MLIR][Linalg] Scalable Vectorization of Reduction on the Trailing Dimension (#97788) 2ca300f914b1 [GlobalIsel][NFC] Move cast code (#100196) cd1a2ede2f6a [llvm][CodeGen] Added a new restriction for II by pragma in window scheduler (#99448) 6810c05ccaee [RISCV] Update test for #99821 after #100116. NFC e386aacb747b [LoongArch] Fix codegen for ISD::ROTR (#100292) 2d6ff0c533aa [llvm][CodeGen] Added missing initialization failure information for window scheduler (#99449) d27ee36cdef2 [llvm][CodeGen] Fixed max cycle calculation with zero-cost instructions for window scheduler (#99454) 599f8e1120db Reland "[compiler-rt][X86] Use functions in cpuid.h instead of inline assembly (#97877)" b91c75fcaeea [RISCV] Add unit strided load/store to whole register peephole (#100116) c49837f5f688 Revert "[ORC][JITLink] Treat common symbols as weak definitions." 690dc4eff19c Add AsmParser::parseDecimalInteger. (#96255) 785d376d1231 [ORC][JITLink] Treat common symbols as weak definitions. 9d1d0cc0206a [LoongArch][test] Revert "Pre-commit for fix codegen for ISD::ROTR". NFC 7e160bbb4a4e merge main into amd-staging bc829b501d0f [LoongArch][test] Pre-commit for fix codegen for ISD::ROTR. NFC 0420d2f97eac [libc] Fix leftover debug commandline argument 26fa399012da [RegisterCoalescer] Fix SUBREG_TO_REG handling in the RegisterCoalescer. (#96839) 4f79ef4efff4 [libc++] Revert "Make std::pair trivially copyable if its members are (#89652)" (#100184) 52ebd8d0577e [tsan] Enable test on linux (#99659) 56535a090d91 [lldb] Don't crash when attaching to pid and no binaries found (#100287) ae1de3ea3c2d [Flang] Remove tests checking now removed 'libc-gpu.a` ea4a3480984c [BOLT][DWARF][NFC] Move initialization of DWOName outside of lambda (#99728) f9cf5393dc9b [libc][malloc] Align blocks to max_align_t. (#100279) f3f0d9928f98 Revert "[WebAssembly] Fix phi handling for Wasm SjLj (#99730)" 73ac9536268f [RISCV][compiler-rt] Small fixes for __riscv_feature_bits (#100158) ef8de68faebe [MLIR][DebugInfo] Enable the use of DILocalVariable DIFlags (#100190) 4f516aa04be6 [Clang] Make the GPU toolchains implicitly link `-lm` and `-lc` (#98170) adc59f4c58dd [Frontend][OpenMP] Fix typo in comment, NFC 3a51788b6801 [gn build] Port d64eccf4335e 51507046c0e3 [clang][OpenMP] Mark all SIMD regions as non-throwing (#100162) 2bf71b8bc851 [WebAssembly] Fix phi handling for Wasm SjLj (#99730) 39c23a31d2ab Revert "[lldb/Commands] Add `scripting template list` command with auto discovery" (#100273) 25f0381ba128 [libc][malloc] Reduce block overhead by 4 bytes plus alignment effects (#99945) fb55db5482dd [clang-doc] fix broken tests (#100260) 80d1c6acc013 Revert "[clang-doc] add ftime profiling" (#100251) 61dcc9fee8f3 [libc][math] Fix use of float16 not guarded by LIBC_TYPES_HAS_FLOAT16 (#100241) 7aa6598a244d [COFF] Add help text for /time flag to make it visible in /? output e7f8d4be5a5d [libc][math] Optimize maximum and minimum functions using builtins when available (#100002) caaba2a8839a [RISCV] Replace VNCLIP RISCVISD opcodes with TRUNCATE_VECTOR_VL_SSAT/USAT opcodes (#100173) 7868c04d97b4 [clang-doc] add ftime profiling (#97644) 0a6a3c152faf [PAC][compiler-rt][UBSan] Strip signed vptr instead of authenticating it (#100153) 5e97bfb09863 [msan] Add baseline output for neon_vst_float.ll (#100210) 541a63123756 [Clang] Mark test XFAIL until a fix is merged 8be1325cb190 [clang][test] Add function type discrimination tests to static destructor tests (#99604) ce811fb6d94e [NFCI][scudo] Remove unused variable 'MaxCount' (#100201) cbd5ba20d1fa [Modules] Don't search for modulemaps in the immediate sub-directories of search paths for recent Apple SDKs. (#100005) d0c8e268c1ed [libc++][Android] Fix Android bugs in the CI Dockerfile (#99623) 8bdc3d9ebb19 Revert "[libc][RISCV] Add naked attribute to setjmp/longjmp" (#100193) e858a921ac8d [msan] Add more NEON VST tests (#100189) cb0ead7888e5 [Clang] Add back in REQUIRES lines that were accidentally removed 14e20eebd13c [libc] Fix missing default value for errno config (#100175) bb60dd391f53 [VPlan] Only use force-target-instruction-cost for recipes with insts. 92a9d4831d5e [clang][headers] Including stddef.h always redefines NULL (#99727) d19e71db8a3d [clang/Lex/DependencyDirectivesScanner] Ignore import/include directives with missing filenames without failing the scan (#100126) 7cd7a1eab4da [BOLT][DWARF][NFC] Split processUnitDIE into two lambdas (#99957) cb1a3bb29ffc [MLGO][Infra] Add mlgo-utils to bump-version script (#100186) adbe24770182 Reapply "[Clang] Correctly forward `--cuda-path` to the nvlink wrapper (#100170)" 7d388aeabb34 Revert "[Clang] Correctly forward `--cuda-path` to the nvlink wrapper (#100170)" 055e43191122 [MemProf] Reduce cloning overhead by sharing nodes when possible (#99832) 7e1fcf5dd657 [Clang] Correctly forward `--cuda-path` to the nvlink wrapper (#100170) d7dfcf455c75 Merge "merge main into amd-staging" into amd-staging c444548bda39 Reapply "[SandboxIR] Implement BranchInst (#100063)" 795a47fb66b7 Suppress a redundant hardening check in basic_string_view::substr (#91804) eb90ac508b23 [MLGO] Bump MLGO utils version to 20 1c3a99c7397e [libc++] Add clang-20 to failing tests on Windows (#100119) c312a1a9c1be Revert "[SandboxIR] Implement BranchInst (#100063)" 735852f5ab9a [WebAssembly] Enable simd128 when relaxed-simd is set in AsmPrinter (#99803) 3993da23daa0 [SandboxIR] Implement BranchInst (#100063) 95ea37cd63f4 [scudo] Added LRU eviction policy to secondary cache. (#99409) 34e67ffe1947 [lldb] Drop LOG_CONS from openlog call. df741b222071 [HeaderSearch] Make a test independent of the local environment. (#100011) e64e745e8fb8 [libc++][libc++abi] Minor follow-up changes after ptrauth upstreaming (#87481) c92d9b06d45d [SPIRV][HLSL] Add lowering of frac to SPIR-V (#97111) 6a8c5a929599 [flang] Fix warning in build (#100134) 511823cbea2a [MC] Make *ObjectWriter final 1b60c38eee14 [libc++][NFC] Add comment about __builtin_verbose_trap per review comment e0649a5dfc6b [NVPTX] Fix internal indirect call prototypes not obeying the ABI (#100131) 0b262bbb5713 [clang][Interp] Properly reject StmtExprs with Stmt result 05b586be3d70 [libc][RISCV] Add naked attribute to setjmp/longjmp (#100036) 5fc9502f19a8 [SLP] NFC. ShuffleInstructionBuilder::add V1->getType() is always a FixedVectorType. (#99842) e6388fea3e19 [libc++][memory] Implements LWG3307. (#99776) 6cea8189b02b [libc++][vector] Updates LWG3778 status. (#99818) e59a619acf0b Clang: don't unnecessarily convert inline-asm operands to x86mmx in IR. (#98273) 43ca63149dfb [lldb/Commands] Add `scripting template list` command with auto discovery (#97273) 1c9085e37e1e [Sema] Default arguments for template parameters affect ContainsUnexpandedPacks (#99880) b316cebae1a4 [AMDGPU][MC] Improve error message for missing dim operand (#96588) 3a8a0b8faf86 [bazel] Update for new deps (#100166) 7395191e0eb0 [libc] Skip NaN death tests for asan build. (#100161) e9bb4e303b94 [libc++][doc] Update the release notes for LLVM 19. (#99061) 1c4091053a61 [bazel] Port cc7308a1563e5ebab4dffeb85deefdde61e6711a (#100163) 0ee0eeb4bb9b [flang] Enhance location information (#95862) 298a9223a57c [ARM] Create mapping symbols with non-unique names ca076f7a63f6 [LLVM] [MC] Update frame layout & CFI generation to handle frames larger than 2gb (#99263) 5623b06f30e5 [libc++][doc] Fixes building the release notes. fc832d5349e1 [AMDGPU] Implement llvm.lround intrinsic lowering. (#98970) f227dc9ca242 [UnifyLoopExits] Never generate phis of only `undef` values (#99924) ca102b2114fa lldb: android: fix missing Python import of urlparse in lldb test utilities (#99934) 1e58c9de75d3 [libc] Fix math tests for macos arm64. (#100060) a51d2632827b Adding warning for Master as it is deprecated in 5.2 (#98955) d0ca9f23e8f2 [libc++][string] Fixes shrink_to_fit. (#97961) ef1367faed1a [RISCV] Use vnclip(u) to handle fp_to_(s/u)int_sat that needs additional narrowing. (#100071) 87f2c25f3dad [lldb] Unify WaitForSetEvents and WaitForEventsToReset (#99997) c2e438675754 [libc++][vector<bool>] Tests shrink_to_fit requirement. (#98009) 3c8efd79283b [OpenMP] Ensure the actual kernel is annotated with launch bounds (#99927) df4fa47b57a7 [RISCV] Use MVT::changeVectorElementType. NFC b8d2b775f2fe [SelectionDAGBuilder] Avoid const_cast on call to matchSelectPattern. NFC (#100053) 4854e253590e [Offload] Re-enable tests that are now passing d64eccf4335e [clang] Split ObjectFilePCHContainerReader from ObjectFilePCHContainerWriter (#99599) a138d754cc18 [GlobalIsel] Fix tests for G_SCMP and G_UCMP (#100133) fd58e5088034 [RISCV] Reverse iteration/deletion structure in vsetvli coalescing [NFC] (#98936) d1e28e2a7bd4 [RISCV] Support __builtin_cpu_init and __builtin_cpu_supports (#99700) 0cf92b1a464e [gn build] Port e3b30bc55377 e3b30bc55377 [lld][InstrProf] Profile guided function order (#96268) b42fe6740ec6 [DAG] Add users of operand of simplified extract_vector_elt to worklist (#100074) 1a3cfe5b9dc9 [LinkerWrapper] Pass all files to the device linker (#97573) 9628777479a9 [libc++][math] Fix undue overflowing of `std::hypot(x,y,z)` (#93350) 58f3c5e69602 [lld-macho] Fix thunks for non-__text TEXT sections (#99052) 81e2a57b41de AMDGPU: Fix assembler asserting on expressions in vop3 instructions (#100103) 20fe2525ff97 [Utils] Updates to bump-version.py (#100089) b4ebf2d2872e [WebAssembly] Disable running `wasm-opt` on components (#98373) f8cdffab6026 [AArch64] Lower scalable i1 vector add reduction to cntp (#100118) decc2af6181b Add unhandled `Attribute::SanitizedPaddedGlobal` to a switch statement 6476a1d6865f Revert "[gn build] Port d3fb41dddc11 (llvm-cgdata)" f1b76c53b631 X86] combineConcatVectorOps - IsConcatFree - peek through bitcasts to find inplace subvectors. cd2214b360ff [Frontend][OpenMP] Add deduction guide for `ConstructCompositionT` 5589f2977117 [clang][Interp] Merge FunctionPointer into Pointer 37123e991540 Fix link error after cc7308a156 with shared libraries 63b382bbde59 [PowerPC] Add builtin_cpu_is P11 support (#99550) 1df4d866cca5 [PowerPC] Add support for -mcpu=pwr11 / -mtune=pwr11 (#99511) 94012df21969 merge main into amd-staging 1ebfc81a9119 [RISCV] Fix InsnCI register type (#100113) 25952ec64791 [X86] Add MMX nontemporal store pattern b97bc567160f [X86] Add MMX nontemporal store DAG test ec56790c3b27 [libcxx] don't `#include <cwchar>` if wide chars aren't enabled (#99911) cc7308a1563e [ctx_prof] Make the profile output analyzable by llvm-bcanalyzer (#99563) 1ee686a55aa6 Revert "[FunctionAttrs] Determine underlying object by `getUnderlyingObjectAggressive` (#100102)" a213edd32abf [FunctionAttrs] Determine underlying object by `getUnderlyingObjectAggressive` (#100102) c74730070a02 [clang][OpenMP] Move "loop" directive mapping from sema to codegen (#99905) 2eea9d6a2d1c [mlir] Rename memory attribute to memory_effects in llvmir dialect (#100108) 16f22c0fe6fa Fold `fma x, -1.0, y` into `fsub x, y` (#100106) eb9bf188918b [flang][OpenMP] Fix copyprivate semantic checks (#95799) 8ebe499e0776 [LLVM] Fix typo "depedent" 73d78973fe07 Revert "[CGData] llvm-cgdata (#89884)" ef7d46c7e6b3 Template Diagnostic Improvements (#99933) 4d5f81cad55b [APINotes] Support nested tags b60fec27fd1b [analyzer] Assume the result of 'fopen' can't alias with 'std{in,out,err}' (#100085) d5a614d44d4e [CodeGen][NFC] Fix documentation comments (#100092) 20d7fff5eaaa [clang][Interp] Fix atomic builtins with integral pointers a0971f027caa [Infra] Fix version-check workflow (#100090) 5bd38a98d758 [DAG] ComputeNumSignBits - subo_carry(x,x,c) -> bitwidth 'allsignbits' (#99935) fde27bd221c3 [mlir] Added new attributes to the llvm.call op in llvmir target (#99663) d89f3e8df316 [VPlan] Remove dead HeaderVPBB argument from addUsersInExitBlock (NFC). 363e036ac002 [AST] NFC: add an assertion for invariant of CXXFoldExpr c1b70fa5bfea Precommit vscale-fixups.ll test (NFC) b48819dbcdb4 Revert " [LICM] Fold associative binary ops to promote code hoisting (#81608)" f18dd9edec9c Reapply "[Clang][Interp] `__builtin_os_log_format_buffer_size` should be an unevaluated builtin (#99895)" dd23b3478905 [clang-tidy][performance-unnecessary-value-param] Make `handleMoveFix` virtual (#99867) 5f05d5ec8f9b Revert "[Clang][Interp] `__builtin_os_log_format_buffer_size` should be an unevaluated builtin (#99895)" b5fb7b209085 [PS5] Adopt new compiler-rt naming scheme for the profile library. (#99862) 10c6d6349e51 Clear release notes for upcoming LLVM 20 dev cycle 8f701b5df0ad Set version to 20.0.0git f2ccf80136a0 [LICM] Fold associative binary ops to promote code hoisting (#81608) 528a662d3a1e Fix sign of largest known divisor of div. (#100081) 430b2545032d [Clang] Do not attempt to access the `DefinitionData` of an incomplete type (#99998) 229e11855983 [AMDGPU] Codegen support for constrained multi-dword sloads (#96163) 7d0a5848f2c7 Revert "[llvm-cgdata] Remove `GENERATE_DRIVER` option" (#100078) a1d7da05d0e8 [AMDGPU][SILoadStoreOptimizer] Merge constrained sloads (#96162) 0998e3c4e66d [clang] Add method 'backupStr' to ASTContext (#99417) 2d2d6853cf3e [GlobalIsel][AArch64] Legalize G_SCMP and G_UCMP (#99820) 96d412135395 [llvm-cgdata] Remove `GENERATE_DRIVER` option (#100066) eeb7feb5e6f7 [AMDGPU] Define constrained multi-dword scalar load instructions. (#96161) 939a6624ac95 [AMDGPU] Implement workaround for GFX11.5 export priority (#99273) 6db5f4fd2a28 [Clang] Ignore empty FieldDecls when asking for the field number (#100040) 2dd82c5ac566 [clang-tidy][NFC] Added -fexceptions to const-correctness-values.cp 26c99c421794 [clang-tidy] fix misc-const-correctness to work with function-try-blocks (#99925) 2de1333af9a7 [clang][test][RISCV] Add missing test change from #99898 d59925c39856 [LoongArch] Fix test issue of init-loongarch.c 8a615bcf2f8c [LoongArch] Summary the release notes for LLVM 19 89d1eb67342d [LoongArch] Remove experimental `auto-vec` feature. (#100070) 2db576c8ef41 ELFObjectWriter: Remove unneeded subclasses fcec298087db [LoongArch] Support la664 (#100068) 70e7d26e5601 [RISCV] Mark zacas as experimental again due to unresolved ABI issue (#99898) 404ca229fb9e Replace |& with 2>&1 in ignore_free_hooks test. (#100004) f0fad9f3e00d Revert "[clang-tidy] fix misc-const-correctness to work with function-try-blocks" (#100069) 0a6233a68c7b [clang][ASTImporter] Fix import of anonymous enums if multiple are present (#99281) 566363981bb9 [analyzer] Model builtin-like functions as builtin functions (#99886) b2f5ac678f36 MCAssembler: Remove unused functions f017d89b22f7 MCAssembler: Move SubsectionsViaSymbols; to MCObjectWriter 5da431008222 [MLIR][LLVM] Always print variadic callee type (#99293) 019136e30fea [MLIR] Add f8E4M3 IEEE 754 type (#97118) ea486290aaa1 [clang][Interp] Calculate APValue offsets for base classes cd9e42cb0f2f [clang-tidy] fix misc-const-correctness to work with function-try-blocks (#99925) de2bfe009c6f [CSKY] Create mapping symbols with non-unique names f9c349fd4c9c [RISCV] Create mapping symbols with non-unique names 211494705b55 MCObjectStreamer: Remove an unneeded getBackendPtr test 5a1b9896ad5a [LoongArch] Support -march=la64v1.0 and -march=la64v1.1 (#100057) b4ef0ba24489 [LoongArch] Enable 128-bits vector by default (#100056) b830790547c3 [NFC] changes all run lines 786b491ef406 [Utils] Fix clang-tidy warning: Use boolean false, not 0 (NFC) (#99828) ee07547487a3 [NFC] make the case only require frontend bcf9fb9802ba [libc++][hardening] Use bounded iterators in std::vector and std::string (#78929) 99e6631e3096 MCAssembler: Remove getWriterPtr 7acd4dd1c040 [clang][Interp][NFC] Diagnose div by 0 more like the current interpreter eb2239299e51 MCAssembler: Move LinkerOptions to MachObjectWriter ae3c85a708dc MCAssembler: Move CGProfile to MCObjectWriter 9cc11b98a76c [mlir] [linalg] Add pattern to swap transpose with broadcast (#97063) d7e8a7487cd7 [AArch64][PAC] Lower auth/resign into checked sequence. (#79024) 67937a3f969a Fix tests for https://github.com/llvm/llvm-project/pull/89884 (#100061) b8721fa0afa6 [AArch64][PAC] Sign block addresses used in indirectbr. (#97647) 34ab855826b8 [clang][deps] Ignore import/include directives with missing filenames (#99520) 464ea880cf77 [LoongArch][CodeGen] Implement 128-bit and 256-bit vector shuffle. (#100054) 73ffeeab12d5 [SandboxIR] Implement SelectInst (#99996) 1eec5942a282 [CGData] Fix link error introduced in #89884 87c35d782795 [LoongArch][test] Add --relocation-model=pic option to psabi-restricted-scheduling. NFC d6905ea9b089 [Clang] Fix r-value binding that Windows doesn't like 219d80bcb734 MCAssembler: Move FileNames and CompilerVersion to MCObjectWriter e7a2405383e9 [libc] Remove workarounds for lack of functional NVPTX linker (#96972) baa883c3ad5d merge main into amd-staging b9205fa8caed Fix API names for variable sized operations 9e97f80cc5fe MCAssembler: Move Symvers to ELFObjectWriter adea9f936208 [gn build] Port d3fb41dddc11 (llvm-cgdata) 78735d8070a8 [gn] port 37d0568a6593a (clang-nvlink-wrapper) b5f23e56902e Revert "[Clang][Driver] Warn about `-c/-S` with `-fsyntax-only`" (#100052) c33878c5787c Fix build break for https://github.com/llvm/llvm-project/pull/89884 (#100050) 6049cd62871d [AArch64][PAC] Lower jump-tables using hardened pseudo. (#97666) 03e92bf4836e [SimplifyCFG] Fix LIT failure introduced in 3d494bfc7. (#100049) 4572efea90f2 [Clang][Interp] `__builtin_os_log_format_buffer_size` should be an unevaluated builtin (#99895) d251a328b809 [BOLT] Fix typo from alterantive to alternative (#99704) 1f8b2b146141 [CGData] Fix -Wpessimizing-move in CodeGenDataReader.cpp (NFC) 4dcd91aea385 [PAC] Implement authentication for C++ member function pointers (#99576) d3fb41dddc11 [CGData] llvm-cgdata (#89884) c473e75adeaf MCAssmembler: Move ELFHeaderEFlags to ELFObjectWriter f540160e9ce7 [libc] Remove leftover debugging in `clang-nvlink-wrapper` ad6685b252b9 Correct confusing headers in HLSLDocs (#100017) 9147147b5c19 [AIX] Detect `#pragma mc_func` (#99888) ba0744ed2cdf [libc][newheadergen]: yaml.load instead of safe_load (#100024) 624d3221d115 [Clang] Fix 'clang-nvlink-wrapper' not working w/o CUDA 41f6599ae1d4 [NFC][Offload] Move variables to where they are used (#99956) 03936534b520 [AMDGPU] Protect against null entries in ValMap 023c6454971d MCObjectWriter: Remove XCOFF specific virtual functions 3d494bfc7ff7 [SimplifyCFG] Increase budget for FoldTwoEntryPHINode() if the branch is unpredictable. (#98495) b6dbda67d8f6 [clang] Implement type/address discrimination of type_info vtable. (#99726) d4da96d6b1d5 Revert "[libc] New HeaderGen Switch Flip" (#100003) ab1722aaabb4 [Clang] Remove NetBSD/i386 workaround for FP eval method with older versions (#74025) e391ba07fabd [Clang] Fix incorrect value assignment in nvlink wrapper 37d0568a6593 [Clang] Introduce 'clang-nvlink-wrapper' to work around 'nvlink' (#96561) 40954d7f9bb3 [Fuchsia] Disable new hdrgen in Fuchsia toolchain build (#100001) 70c52b62c566 [MC] Export llvm::ELFObjectWriter db1d88137212 [mlir][spirv] Fix bug for `vector.broadcast` op in `convert-vector-to-spirv` pass (#99928) 7467f41a7d4b [SandboxIR] Implement ReturnInst (#99784) 173514ff1296 [libc] Disable epoll_pwait2 for now. (#99967) a1359f5ed446 [libc++][Android] Pass -no-metrics to emulator (#99627) d6ad4c2834a0 [GlobalISel] Reorder code in CombinerHelper::buildUDivUsingMul. NFC (#99565) b2060965fd57 [rtsan] Remove android support (#99964) 1efcc532bab5 [Clang][Driver] Warn about `-c/-S` with `-fsyntax-only` (#98607) 9da087147a6b [libc][NFC] clean up some includes (#99719) 93eb9ec36881 [libc] New HeaderGen Switch Flip (#99929) ae96bde89f00 [github][mlir] Add kuhar to code owners for vector IR (#99955) 25897ba420b9 [PGO] Sync InstrProfData.inc from llvm to compiler-rt (#99930) d48d4805f792 [clang-tidy][NFC] Fix tiny bug in areStatementsIdentical b8461769507d [compiler-rt] Moved cmake libatomic check to top level config-ix (#99437) b177ac4a44ec [compiler-rt][rtsan] Use sanitizer internal allocator during rtsan init to avoid segfault in dlsym (#98679) aac3a2a29159 [libc] Fix callback type in `exit_handlers.cpp` not matching (#97642) 6777c3400708 [DXIL][Doc] Update specification of TableGen DXIL properties (#99055) d2f42c737234 [mlir] Add unit test for RankedTensorType wrapper example. (#99789) 8972979c37b7 [libc] Updated header_generation.rst (#99712) 3cb82f49dc99 [SLP]Fix PR99899: Use canonical type instead of original vector of ptr. 9a8b0407fc16 Reapply "[lld] enable fixup chains by default (#79894)" (#99255) 9af0a0966c69 merge main into amd-staging e09032f7a36f [StackFrameLayoutAnalysis] Add basic Scalable stack slot output (#99883) e6fdecd29059 [VPlan] Drop references to Ingredient from VPWidenRecipe comments (NFC) bdee9b05ded9 Revert "[BOLT][DWARF][NFC] Split processUnitDIE into two lambdas" (#99904) 04d5003f59c1 [clang-tidy][DOC] Update check documentation da2f7201f3a2 [libc] Include cbrt in baremetal targets (#99916) a6341718967a [InstrPGO][TypeProf]Annotate vtable types when they are present in the profile (#99402) 3b24e5d450c0 Omit .debug_aranges if it is empty (#99897) d6e17d709697 [gn build] Port 50c4e0392a42 50c4e0392a42 [clang][test] Add missing test file to cmake (#99907) 52dd4dbb1ad3 [clang-tidy] `bugprone-exception-escape` didn't detech catching of an exception with pointer type by `void *` exception handler (#99773) bb8a74075b16 [lldb] Change GetStartSymbol to GetStartAddress in DynamicLoader (#99909) 2ef12b55b2a6 [clang] Fix the broken DeductionGuide ToolingTests after c7bfc41860a6abe5c92dc5afb47348b0c9e69963 735974e550da [builtins] Use __builtin_clzll for 64-bit types (#99874) 0eb719fef57e [AMDGPU] Fix build failure in raw.atomic.buffer.load tests (#99912) 9374216d4b2c Replace distutils.version with packaging.version since the former was deprecated in python 3.10 and removed in 3.12. (#99852) 9d76231fcd3f [clang-tidy] Ensure functions are anchored in the global namespace (for cert-err-33) (#99380) 315561c86778 [run-clang-tidy.py] Refactor, add progress indicator, add type hints (#89490) 511e93b96ee7 Handle constant "pointers" for `__atomic_always_lock_free`/`__atomic_is_lock_free`. (#99340) 146fd7cd454d [PAC][Driver] Support `pauthtest` ABI for AArch64 Linux triples (#97237) bee2654300a8 [Asan] Skip pre-split coroutine and noop coroutine frame (#99415) 0950533cff55 [RISCV] Move call to EmitLoweredCascadedSelect above some variable declarations. NFC d221662ed0cc [RISCV] In emitSelectPseudo, copy call frame size from LastSelectPseudo instead of MI. fa5971c298c9 [flang][debug] Generate correct name for external function. (#99510) 3f8d77bcc7f3 Revert "[AArch64][SVE] Improve code quality of vector unsigned/signed add reductions. (#97339)" f2eb7c7344a5 [test] Delete a redundant mapping symbol test 90569e02e63f [Support] Add Arm NEON implementation for `llvm::xxh3_64bits` (#99634) 1c798e0b077f [SelectionDAGBuilder][RISCV] Fix crash when using a memory constraint with scalable vector type. (#99821) c80b799e90c6 [libc] No need to use recursion in fcntl (#99893) 70843bf65800 [libc][math] Optimize copysign{,f,f16} and fabs{,f,f16} with builtins when available (#99037) 418922623673 [libc++] Update some C++23 statuses to "Nothing to do" or "Complete" (#99621) 3d7622ea0bd4 [libc++][ranges] LWG3618: Unnecessary `iter_move` for `transform_view::iterator` (#91809) ec966f699d26 [libcxx] [test] Make indentation more consistent in thousands_sep. NFC. (#99844) 0b12e185bd81 [clang-fuzzer-dictionary] Fix build failure with libfuzzer (#99871) 6911f823ad0e [libc] Fix invalid format specifier in benchmark 2c92335eb78f [RISCV] Copy call frame size when splitting basic block in emitSelectPseudo. (#99823) b1ca2a954643 [PGO] Sampled instrumentation in PGO to speed up instrumentation binary (#69535) ec7f8e11133f [AMDGPU] Add intrinsic for raw atomic buffer loads (#97707) 4010ddf780d9 [MC,AArch64] Create mapping symbols with non-unique names d7e185cca984 [OMPIRBuilder] - Handle dependencies in `createTarget` (#93977) 9da221d15ff7 [SLP][NFC]Remove incorrect attribure from the test, NFC. a5447613de6c [Flang][runtime] Add dependency to build FortranRuntime after flang-new (#99737) e9709899db7d [clang][OpenMP] Avoid names that hide existing variables, NFC 5ea38b86a301 [lit][NFC] Avoid unintended -EMPTY suffix in check prefix (#99690) 2b78303e3f78 [DAGCombiner] Freeze maybe poison operands when folding select to logic (#84924) cda5b2b4b843 [libc] Change fcntl cmd when only fcntl64 is available (#99675) 65825cd5431c [libc] Use `<assert.h>` in overlay mode for LIBC_ASSERT (#99875) 280b04f65a16 Record mainfile name in the Frontend time trace (#99866) 28e6095082d9 [libc] Add working entrypoints to riscv (#99885) 7ddcf7acf22a [libc] Change fsfilcnt_t and fsblkcnt_t to be 64-bits long (#99876) 2e6558b8bcda [flang][OpenMP] fix lastprivate for allocatables (#99686) ca3d4dfe0c88 [Metadata] Make range boundary variables unsigned (NFC) (#99338) 613d2c393992 [clang][Interp][NFC] Avoid hitting an assertion in invalid code d8e0b0d68547 [clang] Diagnose use of deprecated template alias (#97619) 83c2bfdacb05 [clang][dataflow] Handle this-capturing lambdas in field initializers. (#99519) 32cd18975d2e [GVN] Look through select/phi when determining underlying object (#99509) 091ec15bbebf [gn build] Port b15aa7f88c21 6f915f48c136 [gn build] Port af0d731b1298 8417f490be03 [gn build] Port 04760bfadb39 8ebe7e60f50c [DAGCombiner] Push freeze through SETCC and SELECT_CC (#64718) 6ae4014befbc [AArch64] Add a test for stack-frame-layout analysis of Scalable objects. NFC 3c459cfcaebd [Clang] Fix handling of qualified id-expressions in unevaluated contexts (#99807) bc4c3bf1b75f [libc] Remove special case handing around test case that was fixed aa99192bc650 [flang][OpenMP] Add TODO messages for partially implemented atomic types (#99817) cb528e59de6b [gn] port a41a4ac78294 e9974f02a302 [X86] canCreateUndefOrPoisonForTargetNode - PMADDWD/PMADDUBSW nodes don't create poison 05671cec6f73 [X86] Add tests showing failure to push freeze through SSE PMADD nodes 65e86a8f3fb4 [X86] combineConcatVectorOps - concat(bitcast(),bitcast()) -> bitcast(concat()) 0284b4b4b603 [Clang][NEON] Add neon target guard to intrinsics (#99870) a7fb25dd1fcc [AArch64] Fix broken check lines (NFC) 2f5dc596b571 [IncludeCleaner] Also check for spellings of physical headers (#99843) 5b8479bc28a8 [libc][CMake] Set library type of libc_diff_test_utils to STATIC (#99869) cffe1153f446 [llvm-dlltool] Use EXPORTAS name type for renamed imports on ARM64EC. (#99346) f39bd0a24e8a [AMDGPU] Do not print `kernel-resource-usage` information on non-kernels (#99720) c1622cae10c9 Revert "[Clang][NEON] Add neon target guard to intrinsics" (#99864) 73e1464aca3c merge main into amd-staging 15b41d207e15 [CodeGen] change prototype of regalloc filter function (#93525) dc82c774a74a [Clang][NEON] Add neon target guard to intrinsics (#98624) 462d08424161 [flang] fix sequence association of polymorphic actual arguments (#99294) bf08d0e1182c [flang] fix cg-rewrite DCE (#99653) 102d16809b2c [Analysis] Bail out for negative offsets in isDereferenceableAndAlignedInLoop (#99490) f406d83d9553 [DAG] widenCtPop - reuse existing SDLoc. NFC. ef2af7f85616 [AArch64][SME] Make use of Arm Optimised Routines in compiler-rt (#99326) 45c0decdda5e [LLD] [COFF] Zero-intialization & proper constructor invocation in COFF's Symbol (#98447) 85e742856261 [mlir][vector] Refactor vector-transfer-flatten.mlir (nfc) (3/n) (#95745) 46223b5eae1a libclc: add half version of 'sign' (#99841) 16e05919d948 [AArch64] Use isKnownNonZero to optimize eligible compares to cmn and ccmn (#96349) 2bc38dc30bc9 [analyzer] Improve bug report hashing, merge similar reports (#98621) 2e7899004338 Revert "[AArch64] Lower scalable i1 vector add reduction to cntp" (#99853) 01d783643aa7 [llvm-profgen] Add --sample-period to estimate absolute counts (#99826) f138b33ddd48 [XCOFF] refactor the XCOFF BeginSymName handling 4db11c1f6cd6 [AArch64] Lower scalable i1 vector add reduction to cntp (#99031) 7eb59a1ef98d [Bazel] Fix libc Bazel build for 29be889c2c9c9a92e7ed89bd71d141961517d7e5 20d38158ffbe [clang] Fix assertion failure in `injectEmbedTokens` (#99624) c7bfc41860a6 [Clang][NFCI] Prefer non-canonical template arguments for synthesized CTAD guides (#99840) 56ad7cc0126f [IR] Remove non-canonical matchings (#96763) 12762b8648d8 [Clang][Interp] Diagnose use sizeless vector type as the argument of `__builtin_vectorelements` (#99794) b15aa7f88c21 [ORC] Add unit test for MemoryFlags APIs, don't dereference end() iterator. 4c73b1a986bb [LoongArch] Recommit "Remove spurious mask operations from andn->icmp on 16 and 8 bit values" (#99798) 36d384b4ddb5 [mlir][Transforms][NFC] Dialect conversion: Simplify `EraseBlockRewrite` constructor (#99805) 10d720b5b438 [DeadStoreElimination] Add test for recent worklist revision (NFC) 6b9ac2a49514 [BranchFolding] Add a hook to override tail merge size (#99025) 8dafbb5fdd40 [RISCV] Remove unused function (NFC) 2873edd2867c [lld][RISCV] Add break to nested switch in `mergeAtomic` (#99762) f4d4ce1a3189 [RISCV] Add groupid/bitmask for RISC-V extension (#94440) f18fd6e3f9c3 [lld-macho] Use parallel algorithms in favor of `ThreadPool` (#99471) 58854facb30f [RISCV] Don't cost vector arithmetic fp ops as cheaper than scalar (#99594) 9d2f81ea85e4 [compiler-rt] fix couple of netbsd build warnings. (#99745) c91e85278cb8 Revert "[Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros" (#99838) 7b28cc0c59d2 AMDGPU: Query MachineModuleInfo from PM instead of MachineFunction (#99679) 57ccd42393b2 [PowerPC]fix XRAY failures in https://lab.llvm.org/buildbot/#/builders/145/builds/726 248fcab2fc9b [InstCombine] Do not use operand info in `replaceInInstruction` (#99492) 76321b9f08ef [llvm][Support] Implement raw_socket_stream::read with optional timeout (#92308) 47473bb981e8 merge main into amd-staging 324fea9baa90 [mlir][docs] Update documentation for canonicalize. (#99753) 197b14223238 [libc] Add N Threads Benchmark Helper (#99834) d15ada24b1fb [PAC] Incorrect codegen for constant global init with polymorphic MI (#99741) 43213002b99e [PowerPC] Support -fpatchable-function-entry (#92997) eaa07c00b10b [libc] Fix statvfs test case when SYS_statfs64 is used (#99827) 74a1ca504bf6 [libc][math] Update getpayload and fmul/fadd/fsub/ffma with NaN inputs. (#99812) 1a47f3f3db66 [MC] Compute fragment offsets eagerly 0387cd052b08 [clang-format] Fix a bug in annotating FunctionAnnotationRParen (#99802) a964f2e8a1e9 [libc] Improve Benchmark UI (#99796) 568845ae5065 [mlir] Add a ValueSemantics trait. (#99493) dcebe297367f [clang-format] Fix a bug in annotating StartOfName (#99791) 5c83498984dd [Transforms] Use range-based for loops (NFC) (#99607) 09a399a1ddbe [MC] Move VersionInfo to MachObjectWriter c1562374c8f2 [libc][math][c23] Add entrypoints and tests for dsqrt{l,f128} (#99815) ffcd7e98d93c [MC] Export llvm::SPIRVObjectTargetWriter and drop reliance on Mach-o specific VersionInfo d24e5995ae97 merge main into amd-staging 9539a7796094 [MC] Export llvm::WinCOFFObjectWriter and access it from MCWinCOFFStreamer 6db2465ce741 [Flang][Runtime] Fix implicit conversion warning when targeting 32bit… (#99465) ecaacd14c359 Reapply "Add source file name for template instantiations in -ftime-trace" (#99757) 6d0708f87546 [Offload] Add the first direct test of HSA functionality used by Offload a2af37555648 [MC] Move LOHContainer to MachObjectwriter 6717dc5c4763 *AsmBackend.cpp: Include StringSwitch.h e299b163c78d [MC] Move isPrivateExtern to MCSymbolMachO 7f017f0ab4fa [MC] Drop unnecessary MCSymbol::setExternal calls for ELF e9c851484bfe [MC] Remove unnecessary isVerboseAsm from createAsmTargetStreamer 8f14e39e59c9 [MC] Remove unnecessary isVerboseAsm from Target::AsmTargetStreamerCtorTy 233cca169237 [ARM,Hexagon] Ignore IsVerboseAsm parameter in favor of MCStreamer::isVerboseAsm() 867faeec054a [MC] Migrate to createAsmStreamer without unused bool parameters 14a543ea2a1a [mlir][test] Add comments in a test (nfc) (#99810) 7f17b6b740bd [MC] Migrate to new createAsmStreamer that avoids unused bool parameters af0f58cf1432 [libc][math][c23] Add entrypoints and tests for fsqrt{,l,f128} (#99669) c8c0b18b5d58 [LV] Update tests to not have dead interleave groups. f6eb89cdd02d [lldb][Windows] Fixed Host::Kill() (#99721) cbebacef5e12 [AArch64] Add UQXTN2 patterns ab2001b5a66b merge main into amd-staging 14ec4746cc34 [libc++] Makes `unique_ptr operator*() noexcept. (#98047) a41a4ac78294 [compiler-rt][RISCV] Implement __init_riscv_feature_bits (#85790) 05f986e143d3 [LV] Add tests for loops with switches. 0caf0c93e759 [llvm-profgen] Support creating profiles of arbitrary events (#99026) 9e69e6b8c32a [MC] createAsmStreamer: add overload without unused bool parameters 52e79ed1e078 [MC] MCAsmStreamer: use MCTargetOptions aefe411dae15 [LoongArch] Add a test for spurious mask removal. NFC f1422a86c4a8 [MC] Deprecate createMCObjectStreamer with 3 unused trailing bool 86e21e1af24f [BOLT] Remove unused bool arguments from createMCObjectStreamer callers 6c9086d13fa7 [AArch64] Support varargs for preserve_nonecc (#99434) b8220b986dcc [MC] Remove unused bool arguments from createMCObjectStreamer callers d69eb7b7ffb3 [MC] Move createMC{Object,Asm}Streamer to .cpp c8e69fa4a0bd [libc] Fix GPU 'printf' on strings with padding 1d5d18924d18 Revert "[LoongArch] Remove spurious mask operations from andn->icmp on 16 and 8 bit values" (#99792) 6895d20c26d0 merge main into amd-staging b828c13f3ceb [ELF] Delete peek2 in Lexer (#99790) ba9b5ff4f745 [ELF,test] Fix RUN line issue in defsym.s 7cbd89921bed [compiler-rt] lsan remove unneeded comma for pthread_atfork declaration. (#99788) ae2012d70182 [libc] Disable epoll_create fail test when SYS_epoll_create1 is used internally (#99785) 16c24a850d6c [libc] Disable bind test for riscv 2572a76f2305 Revert "Replace distutils.version with looseversion since the former was deprecated in python 3.10 and removed in 3.12." (#99786) efa833dd0f47 [ELF] Simplify readExpr. NFC c93554b82aa7 [ELF] Simplify ScriptLexer::consume. NFC a23efcc703ce [VPlan] Move VPInterleaveRecipe::execute to VPlanRecipes.cpp (NFC). 52a46bc31de2 [SandboxIR] Implement StoreInst (#99707) 28045ceab08d [ELF] Support (TYPE=<value>) beside output section address 1f00c4244602 [VPlan] Assert masked interleave accesses are allowed if needed (NFC) 569814e862a7 [libc] Implement pwait2 using pwait (#99781) cc2fb58639a6 [MC,ELF] Use loc from the directive for `.abort` (#99648) ce1a87437cc1 [clang-format] Fix a bug in annotating `*` in `#define`s (#99433) 98c0e55d9d31 Revert "SelectionDAG: Avoid using MachineFunction::getMMI" (#99777) 1492e5f1d5a6 Replace distutils.version with looseversion since the former was deprecated in python 3.10 and removed in 3.12. (#99549) c59ee7ec6275 Fix 40056: Prevent outlining of blocks with token type instructions (#99759) 2308c7f5c5b5 [libc] Enable most of the libc entrypoitns for riscv (#99771) 18f7ee5f1303 [MC] Remove unused Register*Streamer 12c9360e9d72 merge main into amd-staging 91bf0a073951 [libc] Added static casts to fix implicit conversion warnings in 32-bit systems f9dd885cb6e6 [libc++] Make std::pair trivially copyable if its members are (#89652) d1578848e99a Add logging for emit functions in BytecodeWriter.cpp (#99558) aa86f4f18549 [MC] Remove unnecessary DWARFMustBeAtTheEnd check 29be889c2c9c reland "[libc] implement cached process/thread identity (#98989)" (#99765) afbfb16d294a [libc++][TZDB] Implements zoned_time formatters. (#98347) 4d8e42ea6a89 [NVPTX] enforce signed 32 bit type for immediate offset (#99682) af0d731b1298 [libc++][math] Mathematical Special Functions: Hermite Polynomial (#89982) 5303ca1496fc [clang][Interp] Start computing APValue offsets 3c6ea7b7168f Remove 3DNow! from X86TargetParser. (#99352) 615b7eeaa94d Reapply "[LLVM][LTO] Factor out RTLib calls and allow them to be dropped (#98512)" 639560353408 [X86][MC] Check AdSize16 for 16-bit addressing (#99761) 56a9f7ce611b [clang][Interp] Pass ASTContext to toAPValue() 7d80ee5bdabb CodeGen: Use IR function to query Module instead of MachineModuleInfo (#99755) e77a01d79a48 [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (#90574) 710dab6e18ad [VPlan] Remove VPPredInstPHIRecipes without users after region merging. 54de554ab865 [Clang] Fix C library wrappers for offloading (#99716) d8116cfbd670 AsmPrinter: Avoid use of MachineFunction::getMMI (#99751) a03935b9841c M68k: Remove hasDebugInfo check when deciding to emit CFI (#99750) f65d7fdcf81f [libc++][vector] Fixes shrink_to_fit. (#97895) 48da8955f9a0 merge main into amd-staging b4f3a9662d30 X86: Avoid using MachineFunction::getMMI a8a7d62d0497 AArch64: Avoid using MachineFunction::getMMI 155f6b49d903 [clang][Interp] Fix reporting invalid new/delete expressions 62aa596ba19a [AMDGPU] Add no return image_sample intrinsics and instructions (#97542) bbd4af5da2b7 [mlir][Transforms] Dialect conversion: Simplify handling of dropped arguments (#97213) 0d26f65414af [clang][Interp] Emit diagnostics if final ltor conversion fails d386a5582b28 [libc] Make static_assert available even if NDEBUG is set (#99742) 867ff2d4268c [lit] Add a flag to disable lit time tests (#98270) c2019a37bdb1 SelectionDAG: Avoid using MachineFunction::getMMI (#99696) 79a8279edc2e [MC] Remove IncrementalLinkerCompatible parameters from create*WinCOFFStreamer b201ab8adc81 [MC] Move setIncrementalLinkerCompatible() calls to MCWinCOFFStreamer 06d2176d81ca [clang][Interp][NFC] Move global variable init case to the top 37be437b1237 [lld-macho] Fix erasing category names for ObjC categories (#99400) 96fb0ea4df27 [compiler-rt] remove unneeded comma for pthread_atfork declaration (#99739) 672cc8bce0a9 [GlobalISel] Allow customizing instruction-select pass 72d8c2737bb5 [Fuchsia] Remove linker flags from stage2 pass through (#99722) 5893b1e297f3 Reformat 168ecd706904 Revert "[bazel] Fix llvm:Core build (#99054)" e2965fe51216 Revert "[LLVM][LTO] Add missing dependency" 740161a9b98c Revert "[LLVM][LTO] Factor out RTLib calls and allow them to be dropped (#98512)" 2d756d9d4c89 [lld-macho,test] Adjust reproduce-thin-archive-objc.s d4dc8e4a85c4 Fixup for #95588, don't assume `align 8`. abaf13ad589d Revert "Reapply "Add source file name for template instantiations in -ftime-trace"" (#99731) cfc22605f61b InstrProf: Mark BiasLI as invariant. (#95588) 52c08d7ffd38 Revert "[lldb] Change lldb's breakpoint handling behavior (#96260)" a3ebb669d102 [libc][math]: updated math docs for newhdrgen (#99715) 4a739fb53cac [Clang] [docs] [MSVC] Add sections on `__forceinline` and intrinsic behaviour differences between Clang and MSVC (#99426) 6747f12931b7 [BOLT][DWARF][NFC] Split processUnitDIE into two lambdas (#99225) 05f0e86cc895 [lldb] Change lldb's breakpoint handling behavior (#96260) be7f1827ff18 [LV] Use llvm::all_of in LoopVectorizationCostModel::getMaximizedVFForTarget. NFC (#99585) 8bc02bf5c6e9 fix(bolt/**.py): fix comparison to None (#94012) 1ee8238f0eab [BOLT][test] Fix Filecheck typos (#93979) 7f563232d685 [bolt][Docs] fix missing option in cmake of stage3 in OptimizingClang.md (#93684) b172f4aabe79 [SandboxIR] Fix -Wunused-variable in SandboxIR.cpp (NFC) b686600a57f3 [BOLT] Skip instruction shortening (#93032) fada9227325b [LLDB][SBSaveCoreOptions] Fix TestProcessSaveCore (#99692) 56ffbd97fda1 [workflows] Avoid usage of access token in issue-write.yml (#94011) a2f61ba08beb [libc][math]fadd implementation (#99694) 84658fb82b67 Revert "[PS4/PS5][Driver][DWARF] Always emit .debug_aranges for SCE t… (#99711) 9e74f6600c37 [compiler-rt] dump registers for FreeBSD/i386 (#99702) 837d606458f0 [libc] Temporarily disable hypotf sNaN tests for NVPTX targets. (#99708) 9d03275550d3 [ASan][libc++] Turn off SSO annotations for Apple platforms (#96269) 2b371003d101 [mlir][docs] Update documentation for `vector.multi_reduction`. NFC (#99668) 63625f4406ac [SandboxIR] Implement LoadInst (#99597) d54ec64f6743 [BOLT][DWARF] Remove deprecated opt (#99575) ffda5212282b [libc++] Make libc++ forward-compatible with AppleClang's definition of __builtin_verbose_trap (#99529) 296a9563690f [BOLT] Match functions with call graph (#98125) 49ef0a8dc2d3 Revert "[NVPTX] Add Volta Load/Store Atomics (.relaxed, .acquire, .release) and Volatile (.mmio/.volatile) support" (#99695) 0ca98af7f96f Dump regs fbsd fix (#99676) f4dceb68ae11 Manual update of LLVM_MAIN_REVISION to 505391 9b02b75c4d03 [libc] Increase test timeout (#99678) a96c906102e8 [lldb/Target] Add GetStartSymbol method to DynamicLoader plugins (#99673) a8b90c835291 [libc][newheadergen]: adding entry_point testing (#99587) 0f0cfcff2ca6 CodeGen: Avoid some references to MachineFunction's getMMI (#99652) 54dab7dfcfdf [msan] Implement support for Arm NEON vst{2,3,4} instructions (#99360) a56f37d3bc46 [flang][Lower] get ultimate symbol when querying if pointer or allocatable (#99528) 9ba524427321 [LV] Add option to still enable the legacy cost model. (#99536) 2f8b64d327a2 [flang][runtime] Build ISO_FORTRAN_ENV to export kind arrays as linkable symbols (#95388) 22eb290a9696 [PS4/PS5][Driver][DWARF] Always emit .debug_aranges for SCE tuning (#99629) 04760bfadb39 [libc++][ranges] P1223R5: `find_last` (#99312) 09fec4688234 [AMDGPU][RFC] Combine asm and disasm tests. (#92895) 6e68b75e6634 [AMDGPU] Reland: Do not use original PHIs in coercion chains 1bdd761c4c12 [AArch64] Additional sqxtn and uqxtn tests. NFC 600d49375212 [AArch64] Remove superfluous sxtw in peephole opt (#96293) 2f8c78684697 [libc++] Refactor buildkite-pipeline.yml (#99483) da44c0695c0c [libc++][docs] Add tip for developers running the test suite on macOS (#99544) d1ca1d017fe2 [mlir] Makes `zip_shortest` an optional keyword in `transform.foreach` (#98492) 2d69c3628bb2 [tsan] Consume leading zeroes in a test d463617d7772 [PAC] Fix a crash when signing a pointer to a function with an incomplete enum parameter (#99595) cf50a84dc032 [PAC] Authenticate function pointers in UBSan type checks (#99590) ac11430983d0 [libc] Fix missing sysroot path for kernel headers when crosscompiling (#99588) 9d86722eeecb [TOSA] Add lowering for `tosa.sin` and `tosa.cos` (#99651) 4b9fab591916 [flang][OpenMP] Implement lastprivate with collapse (#99500) f9f6f5a9c774 [TBAA] Remove remaining entry BB in check lines for tbaa-pointers.c (2) 71e2b8df30ad [clang] NFC, simplify the code in CheckExprLifetime.cpp (#99637) 9da9127fec7b [libc][math] Fix signaling nan handling of hypot(f) and improve hypotf performance. (#99432) f1c27a9b269e Reapply "Add source file name for template instantiations in -ftime-trace" (#99545) f6e01b9ece1e [SLP]Do not trunc bv nodes, if the user is vectorized an requires wider type. 7e37d021022b [libc] Fix headers for statvfs implementation a14baec0f33e [clang] Emit constraint intrinsics for arc and hyperbolic trig clang builtins (#98949) def3944df822 [WebAssembly] Add Support for Arc and Hyperbolic trig llvm intrinsics (#98755) e2f463b5b64a [aarch64] Add hyperbolic and arc trig intrinsic lowering (#98937) c719d7b39048 [FMV][AArch64] Do not optimize away runtime checks for implied features (#99522) 4c28494e7842 [SLP][NFC]Add a test for incorrect minbitwidth analysis for trunc'ed bv, NFC. 38d0b2d174ef [mlir] New canonicalization patterns for shape.shape_of and tensor.reshape (#98531) 9145ffa134ed [clang][Interp] Only diagnose out of bounds enum values in C++ d1b96a3ee343 Config changes for azure devops CI needs 47c08fb8d79e [TBAA] Remove references to entry BB in check lines for tbaa-pointers.c d31603eefc2d [clang][Interp] Control InitStack activity state in visitInitList 8a79dc7e6f76 [APINotes] Support annotating C++ methods 007aa6d1b274 [SLP] Increase UsesLimit to 64 (#99467) 7d8375b86ee4 [clang][driver] Fix -print-libgcc-file-name on Darwin platforms (#98325) 7122b70cfc8e [clang] Fix underlying type of EmbedExpr (#99050) 7b60f2dcfbe1 [gn build] Port 176bf50cd244 176bf50cd244 [clang][NFC] Move Bounds Safety Sema code to `SemaBoundsSafety.cpp` (#99330) 123c036bd361 Recommit "[TBAA] Emit distinct TBAA tags for pointers with different depths,types. (#76612)" ef47bbb4715d [libc] Add AMDGPU Timing to CMake (#99603) 6da23b647ea0 [BoundsSafety] Add `-fexperimental-bounds-safety` CC1 and language option and use it to tweak `counted_by`'s semantics (#92623) fdfc49186318 [lldb] SHT_NOBITS sections type (#99044) e404eed24beb [clang] Add the `const` to all default lists in SemaAttr.cpp, NFC 243af2ff217f [LLDB][test] Improve SHELL detection on Windows in Makefile.rules (#99532) 42a7c424b650 [clang] Add `std::span` to the default gsl pointer annotation list. (#99622) 008df3cf85e9 [LV] Check isPredInst instead of isScalarWithPred in uniform analysis. (#98892) 098bd842a7e5 [ValueTracking] Let ComputeKnownSignBits handle (shl (zext X), C) (#97693) 812694c449b2 [ValueTracking] Pre-commit ComputeNumSignBits test for (shl (zext X), C) b8741cc185e8 [VPlan] Relax assertion retrieving a scalar from VPTransformState::get. 6b98ab95f0d3 [lld][ELF][LoongArch] Add support for R_LARCH_LE_{HI20,ADD,LO12}_R relocations 0f231567719c [LoongArch] Support parsing the `%le_{hi20,add,lo12}_r` modifiers 02cb5bcab4f5 [ADT] Teach set_intersect to erase with iterators (#99569) 5a45fed188dc [clang][NFC] Fix typo in `-Ofast` deprecation warning 6cc8774228a4 [CodeGen][ARM64EC] Add support for hybrid_patchable attribute. (#92965) 7f763b162ff0 [MLIR][OpenMP] NFC: Sort clause definitions (#99504) a27037becd1b [lldb] Forward-declare lldb-private::SaveCoreOptions 17f98baf704f [LV] Add test with users both demanding all lanes and first-lane-only. b7b0071680e6 [AArch64][SVE] Improve code quality of vector unsigned/signed add reductions. (#97339) 6235698f4782 [CVP] Add tests for range return attributes (NFC) d2e8b1d717c4 [CVP] Regenerate test checks (NFC) ac6061e08425 [Analysis] Add new function isDereferenceableReadOnlyLoop (#97292) 092dd9ca2d51 [AArch64] Remove redundant instructions in int-to-fp of lowest vector… (#98602) e5df657bbf38 [Sema] Fix assertion error in Sema::FindInstantiatedDecl (#96509) f0617d2def86 [libcxx][test] Remove picolib UNSUPPORTED for now.pass.cpp (#99503) 39185da16228 [Clang][AArch64] Add missing SME/SVE2.1 feature macros (#98285) e8fbefe15b10 [TLI] Add basic support for remquo libcall (#99611) 270f5e42b8da [LV] Add tests where uniform recipe gets predicated for scalable VFs. a6b204b82745 [lld][AArch64] Fix handling of SHT_REL relocation addends. (#98291) ae2e66b03b7a [AArch64] Use TargetStackID::ScalableVector instead of hard-coded values. NFC 3a7c187031ea [safestack] Support multilib testing (#98002) 25f4bd8872b2 AMDGPU: Clear kill flags after FoldZeroHighBits (#99582) c81366709574 [clang] Fix static analyzer concerns in #embed code (#99331) c248d05c6807 [Clang] make SVE types known to device targets too (#99446) 5c93a94f5ada [Clang][OpenMP] Add interchange directive (#93022) e6668b1be8ac [mlir][tosa] Use roundeven in TOSA cast splat constant op folding (#99484) 8d0cbef0eddb [ADT] Use range-based for loops (NFC) (#99605) cfe043cf99f7 [mlir][linalg] Restrict scalable vectorisation (#98639) 2df9fd7edb73 Fix diagnostics-dsym.test on mac-arm64 (#99399) a1d77caaabbb [test][PAC][clang] Add missing tests against linux triples (#99482) 90668d240417 [CVP][LVI] Add support for InsertElementInst in LVI (#99368) 6f710fef8381 [Doc] Update documentation for no-transitive-change (#96453) 55a7be55a5fc [AArch64,ELF] Use getCurrentSection().first in changeSection 377e1ebdd4ed [asan] Consume leading zeroes in a test 2f0910d2d744 [C++20] [Modules] Skip ODR checks if either declaration comes from GMF 3b78dfa10c4b [libc][libcxx] Support for building libc++ against LLVM libc (#99287) 2e5b4516b70b [DebugInfo][SimpleLoopUnswitch] Fix missing debug location updates for new terminators (#98789) 82af008d9891 [safestack] Various 32-bit Linux fixes (#99455) 79a0b665934a [BOLT] Add MC dependency for Profile 592233a962fc [TableGen][SelectionDAG] Make CheckValueTypeMatcher use MVT::SimpleValueType (#99537) 88e9bd822fe0 [X86][Driver] Enable feature zu for -mapxf 687fc08e7c77 [ADT] Use UnorderedElementsAre in SetOperationsTest.cpp (NFC) (#99596) f554dd7e7690 [GlobalIsel] import G_SCMP and G_UCMP (#99518) 871740761f15 [CodeGen] Remove checks for vectors in unsigned division prior to computing leading zeros (#99524) c905db67a05c [BOLT] Attach pseudo probes to blocks in YAML profile 6c3aa626b28d [MC][NFC] Use std::map for AddressProbesMap 9b007a199d65 [BOLT] Expose pseudo probe function checksum and GUID (#99389) 3023b15fb1ec [BOLT] Support POSSIBLE_PIC_FIXED_BRANCH 401d7bcabc0a [gn build] Port e475bb7ac33d e475bb7ac33d [libc++][memory] P1132R8: `out_ptr` - a scalable output pointer abstraction (#73618) 464920dadc7c Land "[llvm-objcopy] Add verification of added .note section format" 1df2e0c344f0 [clang codegen] Emit int TBAA metadata on FP math libcall expf (#96025) e1d0913a85d4 [bazel] Replace git_repository with http_archive. (#99422) 962d018234cb [clang] [hexagon] handle --unwindlib arg (#99552) cbbd15323469 [SandboxIR][Tracker] Track Instruction::moveBefore() (#99568) 98ebdd0ca9a7 [NFC][sanitizer] Fix `unused variable 'RegName'` warning d4b28fb7516c [compiler-rt] Cleanup use of COMPILER_RT_INCLUDE_TESTS (#98246) 467f96951c44 [compiler-rt] Fix a warning bf4347b3da31 [sanitizer_common] Use %p to print addresses (#98578) c0725804e6bc [ADT] Add unit tests for set_subtract (#99561) f304b8837307 [bazel] Port #98403 (#99592) 914a00a9c94b [bazel] Add support for pybind (#98398) 59441f29323c [sanitizer] Use strict-whitespace in tests 71ab0dc6f02b [docs] Fix goo.gl link in comment for 'Straight-line scalar optimizations' paper 9e4c236650ac [gn build] Port 4120570dc408 4120570dc408 [LLDB][SaveCore] Add SBSaveCoreOptions Object, and SBProcess::SaveCore() overload (#98403) 996d31c7ba84 [msan] Fix goo.gl link in comment for Valgrind paper bda1893a62b2 [compiler-rt] Add `DumpAllRegisters` impl (#99049) 0684db30a1e3 [flang] A nested STRUCTURE must declare entities (#99379) 043aca3990e3 [libc] newhdrgen: removed Include class (#99584) e73d51d3c8ea [flang] ASSOCIATE/SELECT TYPE entities aren't pointer/allocatable (#99364) 433e09cf2575 [bazel] Add filegroups for MLIR bindings sources (#98396) c675a9be63b6 Object: Don't error out on malformed bitcode files. adacb5010f5c [libc] Restore DECLS_FILE_PATH property (#99583) 40ed6ba016ea [flang][NFC] Document an intentional violation of the standard (#99073) 0004ca670a96 [libc] Removed __LIBC_CONST_ATTR attribute and updated math.yaml with the new math functions (#99571) 6c09a9bf6c62 [flang] Check assignment conformance for derived types (#99059) ef94732b4fa0 [llvm-lit] Resolve TypeError in built-in cat -v implementation (#98363) 202785708ed0 [flang][runtime] Clear leftTabLimit at in FinishReadingRecord (#98822) f1a8db1a1f93 [libc][newhdrgen] Remove redundant yaml prefixes (#99581) 1f6f97e2b64a [Clang] Loop over FieldDecls instead of all Decls (#99574) 8be714b6724f [sanitizer] Fix running sanitizer_set_report_path_test on Android (#99469) a41a4b8feda7 Revert "[mlir][ArmSME] Suppress potential unused warning (#99573)" (#99578) 05bce3f079b6 [mlir][ArmSME] Suppress potential unused warning (#99573) 6c6baf019a25 Revert "[clang][test] Split AArch64 target feature checks across multiple lines. NFC (#99365)" 99faa038c668 [mlir] Fix a warning 4afdcd98c5e2 [AArch64,test] Remove over reliance on section offsets and symbol indexes f61c9a9485cc [libc][CMake] Set library type of libcMPFRWrapper to STATIC (#99527) 2ec1a39bcb1a [flang][preprocessor] Handle initial "MACRO&" with no space (#98684) 19c9a1c2fd2c [LAA] Include IndirectUnsafe in ::isPossiblyBackward. ded35c0c3ad3 [vectorcombine] Pull sext/zext through reduce.or/and/xor (#99548) 4f786c682395 [SandboxIR][Tracker] Track Instruction::removeFromParent() (#99541) 50b5bb717ca5 [libc++] Add comment about matching standard version in apple-install-libcxx 719b2ac42e42 [libc++] Allow testing Apple's system library as it is installed (#99086) 06518cea3905 Revert "[clang][test] Split AArch64 target feature checks across multiple lines. NFC (#99365)" 427284754622 [clang][deps] Don't treat ObjC method args as module directives (#97654) af5352fe8e66 [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_buffer_store_*` (#99546) 415ca24f8e39 Revert "[libc] implement cached process/thread identity" (#99559) 5c9fc3cdd7ac [libc] implement cached process/thread identity (#98989) 05275b05ca58 fixup! [clang][test] Split AArch64 target feature checks across multiple lines. NFC (#99365) b1fd6f0996a9 [libc] newheadergen: cmake config newhdrgen (#99543) a0662176a9b4 [libc++] Speed up set_intersection() by fast-forwarding over ranges of non-matching elements with one-sided binary search. (#75230) eb7d54a84bd6 [msan] Precommit MSan Arm NEON vst tests with origin-tracking (#99555) 52d947b5c141 [LV] Remove unnecessary variable from InnerLoopVectorizer::createBitOrPointerCast. NFC 892c58cf7490 [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.buffer.load` (#99258) 82cca0c77e93 [IR] Unify max alignment for arguments with generic max align. (#99257) e2c3cd7f3d0c AMDGPU: Loop over the types for global_load_tr16 pats (NFC) (#99551) eed72d438126 [mlir][ArmSME] Support filling liveness 'holes' in the tile allocator (#98350) 5e8cd29d62a7 [RISCV] Add coverage for vector combine reduce(cast x) transformation f6f88f4b9963 [LLVM] Silence compiler-rt warning in runtimes build (#99525) 9527d77aefcf [mlir][spirv] Restructure code in `SPIRVConversion.cpp`. NFC. (#99393) 280d90d0fdb2 AMDGPU: Add back half and bfloat support for global_load_tr16 pats (#99540) 5431a31f8738 [clang-tidy][NFC] Fix gsl::not_null template parameter (#99472) 507c18b445ef [clang-tidy] Few tiny fixes after #99084 c5432d31cb33 [SandboxIR][Tracker] Track eraseFromParent() (#99431) 78e3bfc120c8 [LLDB][test] Drop OS/HOST_OS detection code from Makefile.rules (#99535) b37bdadbe784 [libc] newheadergen: adding h_def_file arg to test (#99397) 9fb049c8c6a7 [libc][math][c23] Add {f,d}mul{l,f128} and f16mul{,f,l,f128} C23 math functions (#98972) 04bcd74df73a Revert "Add source file name for template instantiations in -ftime-trace" (#99534) b2dcf62c514d [NVPTX] fix emission for i1 load and extload (#99392) ce8c43fe274f Fix assertion of null pointer samples in inline replay mode (#99378) 1c55586e9a47 [clang] Fix typo in comments 13a8f8d51962 [InferAttrs] Set attributes for `remainder` (#99521) 74e51e3efe1d Move the test to the correct folder. A test specified for a target should remain in its designated folder. 574dbe3e9cda suppresses unused variable warning (#99526) 3d69bbc35158 Allow MAY(R)? to accept the high components of register pairs (#98606) d06b55e79346 [Flang][Runtime] Improve runtime implementation of the RENAME intrinsic (#99445) 371777695fe1 [LV] Assert uniform recipes don't get predicated for when vectorizing. 06ab30b57450 [AMDGPU] Constant folding of llvm.amdgcn.trig.preop (#98562) 4bc8ae261b4a [HeterogeneousDWARF] Rebase HANDLE_DW_ macro check fe04aafe6c27 [MLIR][Affine] NFC. Expose affine loop tiling validity utility (#99459) 8c8e0ddae968 [clang][Interp][test] Use fixed triple in cxx11 test c0c157a51832 [BOLT][DWARF][NFC] Remove DWO ranges base (#99284) 77ac07444d32 Re-commit "[RISCV] Use Root instead of N throughout the worklist loop in combineBinOp_VLToVWBinOp_VL. (#99416)" 2bf91db0c743 [libc++] Use char_traits::copy while inserting when possible (#97201) 0ce11a1a763d [libc++] Add a release note about C++03 being frozen after LLVM 21 (#95894) 10627d20044c Revert "[RISCV] Use Root instead of N throughout the worklist loop in combineBinOp_VLToVWBinOp_VL. (#99416)" e45a5e4354c1 Merge "merge main into amd-staging" into amd-staging 342bd4b89355 [orc] Add the name of static archives to the name of their member objects (#99407) 0c4023ae3b64 [RISCV] Use Root instead of N throughout the worklist loop in combineBinOp_VLToVWBinOp_VL. (#99416) 9af3628ce740 [SystemZ] Fix transparent_union calling convention a2d309912a28 [FMV][AArch64] Do not emit ifunc resolver on use. (#97761) 2bdcfbe62cb9 [clang] Fix crash in concept deprecation (#98622) 497ea1d84951 [DAG] tryToFoldExtendSelectLoad - reuse existing SDLoc. NFC. 676efd0ffb71 Reapply 078198f310d5 "Index DebugVariables and some DILocations" f6b06b42a3f4 [PAC] Implement function pointer re-signing (#98847) 9711f6bda136 [GVN] Add additional tests for pointer replacement (NFC) 7d74ca9513a3 [ValueLattice] Support constant vectors in mergeIn() (#99466) 257a0d535ac0 [clang][Interp] Diagnose out-of-range casts to enum types c0c4ad5d9a6e [clang][test] Split AArch64 target feature checks across multiple lines. NFC (#99365) 47b63cd508f9 [lld-macho] Save all thin archive members in repro tarball (#97169) 5b9f0488209d [Offload][omptest] Fix assert error for API calls 1cc107234969 [GlobalIsel] Ad…
This reverts commit d3fb41d and forward fix patches because of the issue explained in: llvm#89884 (comment). Revert "Fix tests for llvm#89884 (llvm#100061)" This reverts commit 67937a3. Revert "Fix build break for llvm#89884 (llvm#100050)" This reverts commit c33878c. Revert "[CGData] Fix -Wpessimizing-move in CodeGenDataReader.cpp (NFC)" This reverts commit 1f8b2b1. (cherry picked from commit 73d7897)
Reland [CGData] llvm-cgdata #89884 using `Opt` instead of `cl` - Action options are required, `--convert`, `--show`, `--merge`. This was similar to sub-commands previously implemented, but having a prefix `--`. - `--format` option is added, which specifies `text` or `binary`. --------- Co-authored-by: Kyungwoo Lee <[email protected]>
* 'main' of https://github.com/llvm/llvm-project: (1385 commits) [llvm][NVPTX] Fix quadratic runtime in ProxyRegErasure (#105730) [ScalarizeMaskedMemIntr] Don't use a scalar mask on GPUs (#104842) [clang][NFC] order C++ standards in reverse in release notes (#104866) Revert "[clang] Merge lifetimebound and GSL code paths for lifetime analysis (#104906)" (#105752) [SandboxIR] Implement CatchReturnInst (#105605) [RISCV][TTI] Use legalized element types when costing casts (#105723) [LTO] Use a helper function to add a definition (NFC) (#105721) [Vectorize] Fix a warning Revert "[clang][rtsan] Introduce realtime sanitizer codegen and drive… (#105744) [NFC][ADT] Add reverse iterators and `value_type` to StringRef (#105579) [mlir][SCF]-Fix loop coalescing with iteration arguements (#105488) [compiler-rt][test] Change tests to remove the use of `unset` command in lit internal shell (#104880) [Clang] [Parser] Improve diagnostic for `friend concept` (#105121) [clang][rtsan] Introduce realtime sanitizer codegen and driver (#102622) [libunwind] Stop installing the mach-o module map (#105616) [VPlan] Fix typo in cb4efe1d. [VPlan] Don't trigger VF assertion if VPlan has extra simplifications. [LLD][COFF] Generate X64 thunks for ARM64EC entry points and patchable functions. (#105499) [VPlan] Factor out precomputing costs from LVP::cost (NFC). AMDGPU: Remove global/flat atomic fadd intrinics (#97051) [LTO] Introduce helper functions to add GUIDs to ImportList (NFC) (#105555) Revert "[MCA][X86] Add missing 512-bit vpscatterqd/vscatterqps schedu… (#105716) [libc] Fix locale structs with old headergen [libc] Add `ctype.h` locale variants (#102711) [NFC] [MLIR] [OpenMP] Fixing typo of clause. (#105712) [AMDGPU] Correctly insert s_nops for dst forwarding hazard (#100276) Fix dap stacktrace perf issue (#104874) [HLSL][SPIRV]Add SPIRV generation for HLSL dot (#104656) [libc] Fix leftover thread local [NFC] [Docs] add missing space [libc] Initial support for 'locale.h' in the LLVM libc (#102689) Revert " [libc] Add `ctype.h` locale variants (#102711)" [libc] Add `ctype.h` locale variants (#102711) [libc++] Fix transform_error.mandates.verify.cpp test on msvc (#104635) [VPlan] Move EVL memory recipes to VPlanRecipes.cpp (NFC) [Xtensa,test] Fix div.ll after #99981 [MCA][X86] Add missing 512-bit vpscatterqd/vscatterqps schedule data [MCA][X86] Add scatter instruction test coverage for #105675 [IR] Simplify comparisons with std::optional (NFC) (#105624) Recommit "[FunctionAttrs] deduce attr `cold` on functions if all CG paths call a `cold` function" [lldb] Change the two remaining SInt64 settings in Target to uint (#105460) [libc++] Adjust armv7 XFAIL target triple for the setfill_wchar_max test. (#105586) [clang][bytecode] Fix 'if consteval' in non-constant contexts (#104707) [NFC] [SCCP] remove unused functions (#105603) [WebAssembly] Change half-precision feature name to fp16. (#105434) [C23] Remove WG14 N2517 from the status page [bindings][ocaml] Add missing AtomicRMW operations (#105673) [MCA][X86] Add scatter instruction test coverage for #105675 [Driver] Add -Wa, options -mmapsyms={default,implicit} [CodeGen] Construct SmallVector with iterator ranges (NFC) (#105622) [lldb] Fix typos in ScriptedInterface.h [AMDGPU][GlobalISel] Disable fixed-point iteration in all Combiners (#105517) [AArch64,ELF] Allow implicit $d/$x at section beginning [AArch64] Fix a warning [Vectorize] Fix warnings Reland "[asan] Remove debug tracing from `report_globals` (#104404)" (#105601) [X86] Add BSR/BSF tests to check for implicit zero extension [AArch64] Lower aarch64_neon_saddlv via SADDLV nodes. (#103307) [lldb][test] Add a unit-test for importRecordLayoutFromOrigin [ARM] Fix missing ELF FPU attributes for fp-armv8-fullfp16-d16 (#105677) [lldb] Pick the correct architecutre when target and core file disagree (#105576) [Verifier] Make lrint and lround intrinsic cases concise. NFC (#105676) [SLP]Improve/fix subvectors in gather/buildvector nodes handling [DwarfEhPrepare] Assign dummy debug location for more inserted _Unwind_Resume calls (#105513) [RISCV][GISel] Implement canLowerReturn. (#105465) [AMDGPU] Generate checks for vector indexing. NFC. (#105668) [NFC] Replace bool <= bool comparison (#102948) [SLP]Do not count extractelement costs in unreachable/landing pad blocks. [SimplifyCFG] Fold switch over ucmp/scmp to icmp and br (#105636) [libc++] Post-LLVM19-release docs cleanup (#99667) [AArch64] optimise SVE cmp intrinsics with no active lanes (#104779) [RISCV] Introduce local peephole to reduce VLs based on demanded VL (#104689) [DAG][RISCV] Use vp_reduce_* when widening illegal types for reductions (#105455) [libc++][docs] Major update to the documentation [InstCombine] Handle logical op for and/or of icmp 0/-1 [InstCombine] Add more test variants with poison elements (NFC) [LLVM][CodeGen][SVE] Increase vector.insert test coverage. [PowerPC] Fix mask for __st[d/w/h/b]cx builtins (#104453) [Analysis] Teach ScalarEvolution::getRangeRef about more dereferenceable objects (#104778) [mlir][LLVM] Add support for constant struct with multiple fields (#102752) [mlir][OpenMP][NFC] clean up optional reduction region parsing (#105644) [InstCombine] Add more tests for foldLogOpOfMaskedICmps transform (NFC) [clang][bytecode] Allow adding offsets to function pointers (#105641) [Clang][Sema] Rebuild template parameters for out-of-line template definitions and partial specializations (#104030) [InstCombine] Fold `scmp(x -nsw y, 0)` to `scmp(x, y)` (#105583) [flang][OpenMP] use reduction alloc region (#102525) [mlir][OpenMP] Convert reduction alloc region to LLVMIR (#102524) [mlir][OpenMP] Add optional alloc region to reduction decl (#102522) [libc++] Add link to the Github conformance table from the documentation [libc++] Fix the documentation build [NFC][SetTheory] Refactor to use const pointers and range loops (#105544) [NFC][VPlan] Correct two typos in comments. [clang][bytecode] Fix void unary * operators (#105640) Revert "[lldb] Extend frame recognizers to hide frames from backtraces (#104523)" Revert "[lldb-dap] Mark hidden frames as "subtle" (#105457)" Revert "[lldb][swig] Use the correct variable in the return statement" [DebugInfo][NFC] Constify debug DbgVariableRecord::{isDbgValue,isDbgDeclare} (#105570) [cmake] Include GNUInstallDirs before using variables defined by it. (#83807) [AMDGPU] GFX12 VMEM loads can write VGPR results out of order (#105549) [AMDGPU] Add GFX12 test coverage for vmcnt flushing in loop headers (#105548) [AArch64][GlobalISel] Libcall i128 srem/urem and scalarize more vector types. [AArch64] Add GISel srem/urem tests of various sizes. NFC LSV: forbid load-cycles when vectorizing; fix bug (#104815) [X86] Allow speculative BSR/BSF instructions on targets with CMOV (#102885) [lit] Fix substitutions containing backslashes (#103042) [Dexter] Sanitize user details from git repo URL in dexter --version (#105533) [SimplifyCFG] Add tests for switch over cmp intrinsic (NFC) [libc++] Refactor the std::unique_lock tests (#102151) Fix logf128 tests to allow negative NaNs from (#104929) [MemCpyOpt] Avoid infinite loops in `MemCpyOptPass::processMemCpyMemCpyDependence` (#103218) [mlir][dataflow] Propagate errors from `visitOperation` (#105448) Enable logf128 constant folding for hosts with 128bit long double (#104929) [mlir][llvmir][debug] Correctly generate location for phi nodes. (#105534) [Sparc] Add flags to enable errata workaround pass for GR712RC and UT700 (#104742) [lldb][AIX] Updating XCOFF,PPC entry in LLDB ArchSpec (#105523) [mlir][cuda] NFC: Remove accidentally committed 'asd' file. (#105491) [clang] Merge lifetimebound and GSL code paths for lifetime analysis (#104906) [Xtensa] Implement lowering Mul/Div/Shift operations. (#99981) [clang][bytecode] Don't discard all void-typed expressions (#105625) Build SanitizerCommon if ctx_profile enabled (#105495) [InstCombine] Fold icmp over select of cmp more aggressively (#105536) [SPIR-V] Rework usage of virtual registers' types and classes (#104104) [ELF] Move target to Ctx. NFC [Transforms] Refactor CreateControlFlowHub (#103013) [asan][Darwin] Simplify test (#105599) [Transforms] Construct SmallVector with iterator ranges (NFC) (#105607) [Flang][Runtime] Fix type used to store result of typeInfo::Value::Ge… (#105589) [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (#102691) [clang][NFC] remove resolved issue from StandardCPlusPlusModules.rst (#105610) AMDGPU: Handle folding frame indexes into s_add_i32 (#101694) [RISCV][GISel] Correct registers classes in vector anyext.mir test. NFC [ELF] Move script into Ctx. NFC [ELF] LinkerScript: initialize dot. NFC [RISCV][GISel] Correct registers classes in vector sext/zext.mir tests. NFC [ELF] Remove unneeded script->. NFC [ELF] Move mainPart to Ctx. NFC [Symbolizer, DebugInfo] Clean up LLVMSymbolizer API: const string& -> StringRef (#104541) [flang][NFC] Move OpenMP related passes into a separate directory (#104732) [RISCV] Add CSRs and an instruction for Smctr and Ssctr extensions. (#105148) [SandboxIR] Implement FuncletPadInst, CatchPadInst and CleanupInst (#105294) [lldb-dap] Skip the lldb-dap output test on windows, it seems all the lldb-dap tests are disabled on windows. (#105604) [libc] Fix accidentally using system file on GPU [llvm][nsan] Skip function declarations (#105598) Handle #dbg_values in SROA. (#94070) Revert "Speculative fix for asan/TestCases/Darwin/cstring_section.c" [BPF] introduce __attribute__((bpf_fastcall)) (#105417) [SandboxIR] Simplify matchers in ShuffleVectorInst unit test (NFC) (#105596) [compiler-rt][test] Added REQUIRES:shell to fuzzer test with for-loop (#105557) [ctx_prof] API to get the instrumentation of a BB (#105468) [lldb] Speculative fix for trap_frame_sym_ctx.test [LTO] Compare std::optional<ImportKind> directly with ImportKind (NFC) (#105561) [LTO] Use enum class for ImportFailureReason (NFC) (#105564) [flang][runtime] Add build-time flags to runtime to adjust SELECTED_x_KIND() (#105575) [libc] Add `scanf` support to the GPU build (#104812) [SandboxIR] Add tracking for `ShuffleVectorInst::setShuffleMask`. (#105590) [NFC][TableGen] Change global variables from anonymous NS to static (#105504) [SandboxIR] Fix use-of-uninitialized in ShuffleVectorInst unit test. (#105592) [InstCombine] Fold `sext(A < B) + zext(A > B)` into `ucmp/scmp(A, B)` (#103833) Revert "[Coroutines] [NFCI] Don't search the DILocalVariable for __promise when constructing the debug varaible for __coro_frame" Revert "[Coroutines] Fix -Wunused-variable in CoroFrame.cpp (NFC)" Revert "[Coroutines] Salvage the debug information for coroutine frames within optimizations" [mlir] Add nodiscard attribute to allowsUnregisteredDialects (#105530) [libc++] Mark LWG3404 as implemented [lldb-dap] When sending a DAP Output Event break each message into separate lines. (#105456) [RFC][flang] Replace special symbols in uniqued global names. (#104859) [libc++] Improve the granularity of status tracking from Github issues [ADT] Add `isPunct` to StringExtras (#105461) [SandboxIR] Add ShuffleVectorInst (#104891) [AArch64] Add SVE lowering of fixed-length UABD/SABD (#104991) [SLP]Try to keep scalars, used in phi nodes, if phi nodes from same block are vectorized. [SLP]Fix PR105120: fix the order of phi nodes vectorization. [CGData] Fix tests for sed without using options (#105546) [flang][OpenMP] Follow-up to build-breakage fix (#102028) [NFC][ADT] Remove << operators from StringRefTest (#105500) [lldb-dap] Implement `StepGranularity` for "next" and "step-in" (#105464) [Docs] Update Loop Optimization WG call. [gn build] Port a6bae5cb3791 [AMDGPU] Split GCNSubtarget into its own file. NFC. (#105525) [ctx_prof] Profile flatterner (#104539) [libc][docs] Update docs to reflect new headergen (#102381) [clang] [test] Use lit Syntax for Environment Variables in Clang subproject (#102647) [RISCV] Minor style fixes in lowerVectorMaskVecReduction [nfc] [libc++] Standardize how we track removed and superseded papers [libc++][NFC] A few mechanical adjustments to capitalization in status files [LLDB][Minidump] Fix ProcessMinidump::GetMemoryRegions to include 64b regions when /proc/pid maps are missing. (#101086) Scalarize the vector inputs to llvm.lround intrinsic by default. (#101054) [AArch64] Set scalar fneg to free for fnmul (#104814) [libcxx] Add cache file for the GPU build (#99348) [Offload] Improve error reporting on memory faults (#104254) [bazel] Fix mlir build broken by 681ae097. (#105552) [CGData] Rename CodeGenDataTests to CGDataTests (#105463) [ELF,test] Enhance hip-section-layout.s [clang-format] Use double hyphen for multiple-letter flags (#100978) [mlir] [tablegen] Make `hasSummary` and `hasDescription` useful (#105531) [flang][Driver] Remove misleading test comment (#105528) [MLIR][OpenMP] Add missing OpenMP to LLVM conversion patterns (#104440) [flang][debug] Allow non default array lower bounds. (#104467) [DAGCombiner] Fix ReplaceAllUsesOfValueWith mutation bug in visitFREEZE (#104924) Fix bug with -ffp-contract=fast-honor-pragmas (#104857) [RISCV] Add coverage for fp reductions of <2^N-1 x FP> vectors [AMDGPU][True16][MC] added VOPC realtrue/faketrue flag and fake16 instructions (#104739) [libc++] Enable C++23 and C++26 issues to be synchronized [gn] port 7ad7f8f7a3d4 Speculative fix for asan/TestCases/Darwin/cstring_section.c [libc++] Mark C++14 as complete and remove the status pages (#105514) [AArch64] Bail out for scalable vecs in areExtractShuffleVectors (#105484) [LTO] Use a range-based for loop (NFC) (#105467) [LTO] Use DenseSet in computeLTOCacheKey (NFC) (#105466) Revert "[flang][NFC] Move OpenMP related passes into a separate directory (#104732)" [AArch64] Add support for ACTLR_EL12 system register (#105497) [InstCombine] Add tests for icmp of select of cmp (NFC) [NFC][ADT] Format StringRefTest.cpp to fit in 80 columns. (#105502) [flang][NFC] Move OpenMP related passes into a separate directory (#104732) [libcxx] Add `LIBCXX_HAS_TERMINAL_AVAILABLE` CMake option to disable `print` terminal checks (#99259) [clang] Diagnose functions with too many parameters (#104833) [mlir][memref]: Allow collapse dummy strided unit dim (#103719) [lldb][swig] Use the correct variable in the return statement [libc++] Avoid -Wzero-as-null-pointer-constant in operator<=> (#79465) [llvm-reduce] Disable fixpoint verification in InstCombine [libc++] Refactor the tests for mutex, recursive mutex and their timed counterparts (#104852) [Clang] fix generic lambda inside requires-clause of friend function template (#99813) Revert "[asan] Remove debug tracing from `report_globals` (#104404)" [analyzer] Limit `isTainted()` by skipping complicated symbols (#105493) [clang][CodeGen][SPIR-V][AMDGPU] Tweak AMDGCNSPIRV ABI to allow for the correct handling of aggregates passed to kernels / functions. (#102776) [InstCombine] Extend Fold of Zero-extended Bit Test (#102100) [LLVM][VPlan] Keep all VPBlend masks until VPlan transformation. (#104015) [gn build] Port 0cff3e85db00 [NFC][Support] Move ModRef/MemoryEffects printers to their own file (#105367) [NFC][ADT] Add unit test for llvm::mismatch. (#105459) LAA: pre-commit tests for stride-versioning (#97570) [VPlan] Only use selectVectorizationFactor for cross-check (NFCI). (#103033) [SPIR-V] Sort basic blocks to match the SPIR-V spec (#102929) [DAG] Add select_cc -> abd folds (#102137) [MLIR][mesh] moving shardinginterfaceimpl for tensor to tensor extension lib (#104913) AMDGPU: Remove flat/global atomic fadd v2bf16 intrinsics (#97050) [InstCombine] Remove some of the complexity-based canonicalization (#91185) [PS5][Driver] Link main components with -pie by default (#102901) [bazel] Port a3d41879ecf5690a73f9226951d3856c7faa34a4 [gn build] Port 6c189eaea994 [Clang][NFCI] Cleanup the fix for default function argument substitution (#104911) [AMDGPU][True16][test] added missing true16 flag in gfx12 asm vop1 (#104884) [RISCV] Make EmitRISCVCpuSupports accept multiple features (#104917) [AArch64] Add SME peephole optimizer pass (#104612) [RISCV] Remove experimental for Ssqosid ext (#105476) Revert "[LLVM] [X86] Fix integer overflows in frame layout for huge frames (#101840)" [llvm][test] Write temporary files into a temporary directory [GlobalIsel] Push cast through build vector (#104634) [Clang] Implement CWG2351 `void{}` (#78060) [VPlan] Introduce explicit ExtractFromEnd recipes for live-outs. (#100658) [gn build] Port 7c4cadfc4333 [mlir][vector] Add more tests for ConvertVectorToLLVM (5/n) (#104784) [mlir][Linalg] Bugfix for folder of `linalg.transpose` (#102888) [RISCV] Add Hazard3 Core as taped out for RP2350 (#102452) [X86][AVX10.2] Support AVX10.2-CONVERT new instructions. (#101600) [Flang][Runtime] Handle missing definitions in <cfenv> (#101242) [compiler-rt] Reland "SetThreadName implementation for Fuchsia" (#105179) [LAA] Collect loop guards only once in MemoryDepChecker (NFCI). [ELF] Move ppc64noTocRelax to Ctx. NFC [clang-repl] Fix printing preprocessed tokens and macros (#104964) [mlir][ODS] Optionally generate public C++ functions for type constraints (#104577) [Driver] Use llvm::make_range(std::pair) (NFC) (#105470) Revert "[AArch64] Optimize when storing symmetry constants" (#105474) [llvm][DWARFLinker] Don't attach DW_AT_dwo_id to CUs (#105186) [lldb-dap] Mark hidden frames as "subtle" (#105457) [clang][bytecode] Fix diagnostic in final ltor cast (#105292) [clang-repl] [codegen] Reduce the state in TBAA. NFC for static compilation. (#98138) [CMake] Update CMake cache file for the ARM/Aarch64 cross toolchain builds. NFC. (#103552) Revert "[FunctionAttrs] deduce attr `cold` on functions if all CG paths call a `cold` function" [AMDGPU] Update instrumentAddress method to support aligned size and unusual size accesses. (#104804) [BOLT] Improve BinaryFunction::inferFallThroughCounts() (#105450) [lldb][test] Workaround older systems that lack gettid (#104831) [LTO] Teach computeLTOCacheKey to return std::string (NFC) (#105331) [gn build] Port c8a678b1e486 [gn build] Port 55d744eea361 [ELF,test] Improve error-handling-script-linux.test [gn] tblgen opts for llvm-cgdata [MLIR][MathDialect] fix fp32 promotion crash when encounters scf.if (#104451) Reland "[gn build] Port d3fb41dddc11 (llvm-cgdata)" RISC-V: Add fminimumnum and fmaximumnum support (#104411) [mlir] Fix -Wunused-result in ElementwiseOpFusion.cpp (NFC) [RISCV][GISel] Merge RISCVCallLowering::lowerReturnVal into RISCVCallLowering::lowerReturn. NFC [AArch64] Basic SVE PCS support for handling scalable vectors on Darwin. Fix KCFI types for generated functions with integer normalization (#104826) [RISCV] Add coverage for int reductions of <3 x i8> vectors Revert "[RISCV][GISel] Allow >2*XLen integers in isSupportedReturnType." [DirectX] Register a few DXIL passes with the new PM [RISCV][GISel] Allow >2*XLen integers in isSupportedReturnType. [mlir][linalg] Improve getPreservedProducerResults estimation in ElementwiseOpFusion (#104409) [lldb] Extend frame recognizers to hide frames from backtraces (#104523) [RISCV][GISel] Split LoadStoreActions in LoadActions and StoreActions. [lldb][test] XFAIL TestAnonNamespaceParamFunc.cpp on Windows [FunctionAttrs] deduce attr `cold` on functions if all CG paths call a `cold` function [FunctionAttrs] Add tests for deducing attr `cold` on functions; NFC [DXIL][Analysis] Update test to match comment. NFC (#105409) [flang] Fix test on ppc64le & aarch64 (#105439) [bazel] Add missing dependencies for c8a678b1e4863df2845b1305849534047f10caf1 [RISCV][GISel] Remove s32 support for G_ABS on RV64. [TableGen] Rework `EmitIntrinsicToBuiltinMap` (#104681) [libc] move newheadergen back to safe_load (#105374) [cmake] Set up llvm-ml as ASM_MASM tool in WinMsvc.cmake (#104903) [libc] Include startup code when installing all (#105203) [DAG][RISCV] Use vp.<binop> when widening illegal types for binops which can trap (#105214) [BOLT] Reduce CFI warning verbosity (#105336) [flang] Disable part of failing test (temporary) (#105350) AMDGPU: Temporarily stop adding AtomicExpand to new PM passes [OpenMP] Temporarily disable test to keep bots green [Clang] Re-land Overflow Pattern Exclusions (#104889) [RISCV][GISel] Remove s32 support on RV64 for DIV, and REM. (#102519) [flang] Disable failing test (#105327) [NFC] Fix a typo in InternalsManual: ActOnCXX -> ActOnXXX (#105207) [NFC] Fixed two typos: "__builin_" --> "__builtin_" (#98782) [flang] Re-enable date_and_time intrinsic test (NFC) (#104967) [clang] Support -Wa, options -mmsa and -mno-msa (#99615) AMDGPU/NewPM: Start filling out addIRPasses (#102884) AMDGPU/NewPM: Fill out passes in addCodeGenPrepare (#102867) [SandboxIR] Implement CatchSwitchInst (#104652) clang/AMDGPU: Emit atomicrmw for flat/global atomic min/max f64 builtins (#96876) clang/AMDGPU: Emit atomicrmw for global/flat fadd v2bf16 builtins (#96875) clang/AMDGPU: Emit atomicrmw from flat_atomic_{f32|f64} builtins (#96874) [Driver,DXIL] Fix build [Attributor] Improve AAUnderlyingObjects (#104835) [flang] Fix IEEE_NEAREST_AFTER folding edge cases (#104846) [flang] Silence spurious error (#104821) [flang] Silence an inappropriate warning (#104685) [flang] Fix inheritance of IMPLICIT typing rules (#102692) [flang] More support for anonymous parent components in struct constr… (#102642) clang/AMDGPU: Emit atomicrmw from {global|flat}_atomic_fadd_v2f16 builtins (#96873) [lldb][test] Change unsupported cat -e to cat -v to work with lit internal shell (#104878) [llvm-lit][test] Updated built-in cat command tests (#104473) [mlir][gpu] Add extra value types for gpu::ShuffleOp (#104605) [AArch64][MachO] Add ptrauth ABI version to arm64e cpusubtype. (#104650) [libc++] Fix several double-moves in the code base (#104616) [lldb] Disable the API test TestCppBitfields on Windows (#105037) llvm.lround: Update verifier to validate support of vector types. (#98950) [mlir][sparse] support sparsification to coiterate operations. (#102546) Fix post-104491 (#105191) [mlir][tablegen] Fix tablegen bug with `Complex` class (#104974) [DirectX] Encapsulate DXILOpLowering's state into a class. NFC [ctx_prof] Add analysis utility to fetch ID of a callsite (#104491) [lldb] Fix windows debug build after 9d07f43 (#104896) [lldb][ClangExpressionParser] Implement ExternalSemaSource::ReadUndefinedButUsed (#104817) Revert "[compiler-rt][fuzzer] implements SetThreadName for fuchsia." (#105162) [lldb][ClangExpressionParser] Don't leak memory when multiplexing ExternalASTSources (#104799) [mlir][gpu] Add 'cluster_size' attribute to gpu.subgroup_reduce (#104851) [mlir][spirv] Support `gpu` in `convert-to-spirv` pass (#105010) [libc++][chono] Use hidden friends for leap_second comparison. (#104713) [OpenMP] Map `omp_default_mem_alloc` to global memory (#104790) [NFC][TableGen] Elminate use of isalpha/isdigit from TGLexer (#104837) [HLSL] Implement support for HLSL intrinsic - saturate (#104619) [RISCV] Add isel optimization for (and (sra y, c2), c1) to recover regression from #101751. (#104114) [bazel] Add missing deps in {Arith,DLTI}DialectTdFiles (#105091) [bazel] Port bf68e9047f62c22ca87f9a4a7c59a46b3de06abb (#104907) [Clang] CWG722: nullptr to ellipses (#104704) [RISCV] Add coverage for VP div[u]/rem[u] with non-power-of-2 vectors Recommit "[CodeGenPrepare] Folding `urem` with loop invariant value" [CodeGenPrepare][X86] Add tests for fixing `urem` transform; NFC Fix a warning for -Wcovered-switch-default (#105054) [OpenMP][FIX] Check for requirements early (#104836) [mlir] [irdl] Improve IRDL documentation (#104928) [CMake] Remove HAVE_LINK_H [Support] Remove unneeded __has_include fallback [docs] Fix typo in llvm.experimental.vector.compress code-block snippet [clang][ASTMatcher] Fix execution order of hasOperands submatchers (#104148) InferAddressSpaces: Factor replacement loop into function [NFC] (#104430) [DXIL][Analysis] Delete unnecessary test (#105025) [MLIR][EmitC] Allow ptrdiff_t as result in sub op (#104921) [NFC] Remove explicit bitcode enumeration from BitCodeFormat.rst (#102618) [NVPTX] Add elect.sync Intrinsic (#104780) [AMDGPU] Move AMDGPUMemoryUtils out of Utils. NFC. (#104930) [clang][OpenMP] Fix typo in comment, NFC [AArch64] fix buildbot by removing dead code [llvm-cgdata] Fix -Wcovered-switch-default (NFC) Reenable anon structs (#104922) [DXIL][Analysis] Add validator version to info collected by Module Metadata Analysis (#104828) Reland [CGData] llvm-cgdata #89884 (#101461) [CostModel][X86] Add missing costkinds for scalar CTLZ/CTTZ instructions [Driver] Make ffp-model=fast honor non-finite-values, introduce ffp-model=aggressive (#100453) [InstCombine] Thwart complexity-based canonicalization in test (NFC) [AArch64] Extend sxtw peephole to uxtw. (#104516) Reapply "[CycleAnalysis] Methods to verify cycles and their nesting. (#102300)" [AArch64] Optimize when storing symmetry constants (#93717) [lldb][Windows] Fixed the API test breakpoint_with_realpath_and_source_map (#104918) [SPARC] Remove assertions in printOperand for inline asm operands (#104692) [llvm][offload] Move AMDGPU offload utilities to LLVM (#102487) [AArch64][NEON] Extend faminmax patterns with fminnm/fmaxnm (#104766) [AArch64] Remove TargetParser CPU/Arch feature tests (#104587) [InstCombine] Adjust fixpoint error message (NFC) [LLVM] Add a C API for creating instructions with custom syncscopes. (#104775) [llvm-c] Add getters for LLVMContextRef for various types (#99087) [clang][NFC] Split invalid-cpu-note tests (#104601) [X86][AVX10] Fix unexpected error and warning when using intrinsic (#104781) [ScheduleDAG] Dirty height/depth in addPred/removePred even for latency zero (#102915) [gn build] Port 42067f26cd08 [X86] Use correct fp immediate types in _mm_set_ss/sd [X86] Add clang codegen test coverage for #104848 [SimplifyCFG] Add support for hoisting commutative instructions (#104805) [clang][bytecode] Fix discarding CompoundLiteralExprs (#104909) Revert "[CycleAnalysis] Methods to verify cycles and their nesting. (#102300)" [LLVM-Reduce] - Distinct Metadata Reduction (#104624) [clang][modules] Built-in modules are not correctly enabled for Mac Catalyst (#104872) [MLIR][DLTI] Introduce DLTIQueryInterface and impl for DLTI attrs (#104595) [Flang][OpenMP] Prevent re-composition of composite constructs (#102613) [BasicAA] Use nuw attribute of GEPs (#98608) [CycleAnalysis] Methods to verify cycles and their nesting. (#102300) [mlir][EmitC] Model lvalues as a type in EmitC (#91475) [mlir][EmitC] Do not convert illegal types in EmitC (#104571) [Clang][test] Add bytecode interpreter tests for floating comparison functions (#104703) [clang][bytecode] Fix initializing base casts (#104901) [mlir][ArmSME][docs] Update example (NFC) [llvm][GitHub] Fix formatting of new contributor comments [Coroutines] Salvage the debug information for coroutine frames within optimizations [lldb][AIX] 1. Avoid namespace collision on other platforms (#104679) [MLIR][Bufferize][NFC] Fix documentation typo (#104881) [LV] Simplify !UserVF.isZero() -> UserVF (NFC). [DataLayout] Refactor the rest of `parseSpecification` (#104545) [LLD][COFF] Detect weak reference cycles. (#104463) [MLIR][Python] remove unused init python file (#104890) [clang-doc] add support for block commands in clang-doc html output (#101108) [Coroutines] Fix -Wunused-variable in CoroFrame.cpp (NFC) [IR] Check that arguments of naked function are not used (#104757) [Coroutines] [NFCI] Don't search the DILocalVariable for __promise when constructing the debug varaible for __coro_frame [MLIR] Introduce a SelectLikeOpInterface (#104751) Revert "[scudo] Add partial chunk heuristic to retrieval algorithm." (#104894) [NVPTX] Fix bugs involving maximum/minimum and bf16 [SelectionDAG] Fix lowering of IEEE 754 2019 minimum/maximum [llvm-objcopy][WebAssembly] Allow --strip-debug to operate on relocatable files. (#102978) [lld][WebAssembly] Ignore local symbols when parsing lazy object files. (#104876) [clang][bytecode] Support ObjC blocks (#104551) Revert "[mlir] NFC: fix dependence of (Tensor|Linalg|MemRef|Complex) dialects on LLVM Dialect and LLVM Core in CMake build (#104832)" [ADT] Fix a minor build error (#104840) [Driver] Default -msmall-data-limit= to 0 and clean up code [docs] Revise the doc for __builtin_allow_runtime_check [MLIR][Transforms] Fix dialect conversion inverse mapping (#104648) [scudo] Add partial chunk heuristic to retrieval algorithm. (#104807) [mlir] NFC: fix dependence of (Tensor|Linalg|MemRef|Complex) dialects on LLVM Dialect and LLVM Core in CMake build (#104832) [offload] - Fix issue with standalone debug offload build (#104647) [ValueTracking] Handle incompatible types instead of asserting in `isKnownNonEqual`; NFC [AMDGPU] Add VOPD combine dependency tests. NFC. (#104841) [compiler-rt][fuzzer] implements SetThreadName for fuchsia. (#99953) [Support] Do not ignore unterminated open { in formatv (#104688) Reapply "[HWASan] symbolize stack overflows" (#102951) (#104036) Fix StartDebuggingRequestHandler/ReplModeRequestHandler in lldb-dap (#104824) Emit `BeginSourceFile` failure with `elog`. (#104845) [libc][NFC] Add sollya script to compute worst case range reduction. (#104803) Reland "[asan] Catch `initialization-order-fiasco` in modules without…" (#104730) [NFC][asan] Create `ModuleName` lazily (#104729) [asan] Better `___asan_gen_` names (#104728) [NFC][ADT] Add range wrapper for std::mismatch (#104838) [Clang] Fix ICE in SemaOpenMP with structured binding (#104822) [MC] Remove duplicate getFixupKindInfo calls. NFC [C++23] Fix infinite recursion (Clang 19.x regression) (#104829) AMDGPU/NewPM: Start implementing addCodeGenPrepare (#102816) [AMDGPU][Docs] DWARF aspace-aware base types Pre-commit AMDGPU tests for masked load/store/scatter/gather (#104645) [ADT] Add a missing call to a unique_function destructor after move (#98747) [ADT] Minor code cleanup in STLExtras.h (#104808) [libc++abi] Remove unnecessary dependency on std::unique_ptr (#73277) [clang] Increase the default expression nesting limit (#104717) [mlir][spirv] Fix incorrect metadata in SPIR-V Header (#104242) [ADT] Fix alignment check in unique_function constructor (#99403) LSV: fix style after cursory reading (NFC) (#104793) Revert "[BPF] introduce `__attribute__((bpf_fastcall))` (#101228)" [NFC][asan] Don't `cd` after `split-file` (#104727) [NFC][Instrumentation] Use `Twine` in `createPrivateGlobalForString` (#104726) [mlir][spirv] Add `GroupNonUniformBallotFindLSB` and `GroupNonUniformBallotFindMSB` ops (#104791) [GlobalISel] Bail out early for big-endian (#103310) [compiler-rt][nsan] Add more tests for shadow memory (#100906) [Flang] Fix test case for AIX(big-endian) system for issuing an extra message. (#104792) [asan] Change Apple back to fixed allocator base address (#104818) [NVPTX] Add conversion intrinsics from/to fp8 types (e4m3, e5m2) (#102969) [RISCV] Improve BCLRITwoBitsMaskHigh SDNodeXForm. NFC [clang][dataflow] Collect local variables referenced within a functio… (#104459) [AMDGPU][GlobalISel] Save a copy in one case of addrspacecast (#104789) [AMDGPU] Simplify, fix and improve known bits for mbcnt (#104768) [TableGen] Detect invalid -D arguments and fail (#102813) [DirectX] Disentangle DXIL.td's op types from LLVMType. NFC [Clang] Check constraints for an explicit instantiation of a member function (#104438) [DirectX] Differentiate between 0/1 overloads in the OpBuilder. NFC [docs] Add note about "Re-request review" (#104735) [lld][ELF] Combine uniqued small data sections (#104485) [BPF] introduce `__attribute__((bpf_fastcall))` (#101228) [SmallPtrSet] Optimize find/erase [PowerPC] Fix codegen for transparent_union function params (#101738) [llvm-mca] Add bottle-neck analysis to JSON output. (#90056) [lldb][Python] Silence GCC warning for modules error workaround [gn build] Port a56663591573 [gn build] Port a449b857241d [clang][bytecode] Discard NullToPointer cast SubExpr (#104782) [lldb] PopulatePrpsInfoTest can fail due to hardcoded priority value (#104617) [mlir][[spirv] Add support for math.log2 and math.log10 to GLSL/OpenCL SPIRV Backends (#104608) [lldb][test] Fix GCC warnings in TestGetControlFlowKindX86.cpp [TableGen] Resolve References at top level (#104578) [LLVM] [X86] Fix integer overflows in frame layout for huge frames (#101840) [lldb][ASTUtils] Remove unused SemaSourceWithPriorities::addSource API [lldb][test] Fix cast dropping const warnin in TestBreakpointSetCallback.cpp [SimplifyCFG] Add tests for hoisting of commutative instructions (NFC) [AMDGPU][R600] Move R600CodeGenPassBuilder into R600TargetMachine(NFC). (#103721) Revert "[clang][ExtractAPI] Stop dropping fields of nested anonymous record types when they aren't attached to variable declaration (#104600)" MathExtras: template'ize alignToPowerOf2 (#97814) [AMDGPU] Move AMDGPUCodeGenPassBuilder into AMDGPUTargetMachine(NFC) (#103720) [clang][ExtractAPI] Stop dropping fields of nested anonymous record types when they aren't attached to variable declaration (#104600) [Clang][NFC] Fix potential null dereference in encodeTypeForFunctionPointerAuth (#104737) [DebugInfo] Make tests SimplifyCFG-independent (NFC) [mlir][ArmSME] Remove XFAILs (#104758) [RISCV] Add vector and vector crypto to SiFiveP400 scheduler model (#102155) [clang][OpenMP] Diagnose badly-formed collapsed imperfect loop nests (#60678) (#101305) Require !windows instead of XFAIL'ing ubsan/TestCases/Integer/bit-int.c [clang][bytecode] Fix member pointers to IndirectFieldDecls (#104756) [AArch64] Add fneg(fmul) and fmul(fneg) tests. NFC [clang][bytecode] Use first FieldDecl instead of asserting (#104760) [DataLayout] Refactor parsing of i/f/v/a specifications (#104699) [X86] LowerABD - simplify i32/i64 to use sub+sub+cmov instead of repeating nodes via abs (#102174) [docs] Update a filename, fix indentation (#103018) [CostModel][X86] Add cost tests for scmp/ucmp intrinsics [NFC][SLP] Remove useless code of the schedule (#104697) [VPlan] Rename getBestPlanFor -> getPlanFor (NFC). [InstCombine] Fold `(x < y) ? -1 : zext(x != y)` into `u/scmp(x,y)` (#101049) [VPlan] Emit note when UserVF > MaxUserVF (NFCI). [LLVM][NewPM] Add C API for running the pipeline on a single function. (#103773) [mlir][vector] Populate sink patterns in apply_patterns.vector.reduction_to_contract (#104754) [lld][MachO] Fix a suspicous assert in SyntheticSections.cpp [PowerPC] Support -mno-red-zone option (#94581) [PAC][ELF][AArch64] Encode several ptrauth features in PAuth core info (#102508) [VPlan] Rename getBestVF -> computeBestVF (NFC). [MLIR][LLVM] Improve the noalias propagation during inlining (#104750) [LoongArch] Fix the assertion for atomic store with 'ptr' type [AArch64][SME] Return false from produceCompactUnwindFrame if VG save required. (#104588) [X86] Cleanup lowerShuffleWithUNPCK/PACK signatures to match (most) other lowerShuffle* methods. NFC. [X86] VPERM2*128 instructions aren't microcoded on znver1 [X86] VPERM2*128 instructions aren't microcoded on znver2 [VPlan] Move some LoopVectorizationPlanner helpers to VPlan.cpp (NFC). [mlir][docs] Update Bytecode documentation (#99854) [SimplifyCFG] Don't block sinking for allocas if no phi created (#104579) [LoongArch] Merge base and offset for LSX/LASX memory accesses (#104452) [RISCV] Make extension names lower case in RISCVISAInfo::checkDependency() error messages. [RISCV] Add helper functions to exploit similarity of some RISCVISAInfo::checkDependency() error strings. NFC [RISCV] Merge some ISA error reporting together and make some errors more precise. [RISCV] Simplify reserse fixed regs (#104736) [RISCV] Add more tests for RISCVISAInfo::checkDependency(). NFC [Sparc] Add errata workaround pass for GR712RC and UT700 (#103843) [TableGen] Print Error and not crash on dumping non-string values (#104568) [RISCV][MC] Support experimental extensions Zvbc32e and Zvkgs (#103709) Revert "[CodeGenPrepare] Folding `urem` with loop invariant value" [SelectionDAG][X86] Preserve unpredictable metadata for conditional branches in SelectionDAG, as well as JCCs generated by X86 backend. (#102101) [MLIR][Python] enhance python api for tensor.empty (#103087) [AMDGPU][NFC] Fix preload-kernarg.ll test after attributor move (#98840) [CodeGenPrepare] Folding `urem` with loop invariant value [CodeGenPrepare][X86] Add tests for folding `urem` with loop invariant value; NFC [MC] Remove ELFRelocationEntry::OriginalAddend [TLI] Add support for inferring attr `cold`/`noreturn` on `std::terminate` and `__cxa_throw` [DAG][PatternMatch] Add support for matchers with flags; NFC Update Clang version from 19 to 20 in scan-build.1. [clang-format] Change GNU style language standard to LS_Latest (#104669) [MIPS] Remove expensive LLVM_DEBUG relocation dump [MC] Add test that requires multiple relaxation steps [libc][gpu] Add Atan2 Benchmarks (#104708) [libc] Add single threaded kernel attributes to AMDGPU startup utility (#104651) [HIP] search fatbin symbols for libs passed by -l (#104638) [gn build] Port 0d150db214e2 [llvm][clang] Move RewriterBuffer to ADT. (#99770) [Clang] Do not allow `[[clang::lifetimebound]]` on explicit object member functions (#96113) [clang][OpenMP] Change /* ParamName */ to /*ParamName=*/, NFC [clang-tidy] Support member functions with modernize-use-std-print/format (#104675) [clang] fix divide by zero in ComplexExprEvaluator (#104666) [clang][OpenMP] Avoid multiple calls to getCurrentDirective in DSAChecker, NFC [clang][bytecode] Only booleans can be inverted [Flang]: Use actual endianness for Integer<80> (#103928) [libc++][docs] Fixing hyperlink for mathematical special function documentation (#104444) [InstSimplify] Simplify `uadd.sat(X, Y) u>= X + Y` and `usub.sat(X, Y) u<= X, Y` (#104698) [LV] Don't cost branches and conditions to empty blocks. [clang][test] Remove bytecode interpreter RUN line from test [Clang] warn on discarded [[nodiscard]] function results after casting in C (#104677) [GlobalISel] Add and use an Opcode variable and update match-table-cxx.td checks. NFC [Clang] `constexpr` builtin floating point classification / comparison functions (#94118) [clang][bytecode] IntPointer::atOffset() should append (#104686) [clang][bytecode][NFC] Improve Pointer::print() [RISCV] Remove unused tablegen classes from unratified Zbp instructions. NFC [PowerPC] Use MathExtras helpers to simplify code. NFC (#104691) [clang-tidy] Correct typo in ReleaseNotes.rst (#104674) [APInt] Replace enum with static constexpr member variables. NFC [MLIR][OpenMP] Fix MLIR->LLVM value matching in privatization logic (#103718) [VE] Use SelectionDAG::getSignedConstant/getAllOnesConstant. [gn build] Port 27a62ec72aed [LSR] Split the -lsr-term-fold transformation into it's own pass (#104234) [AArch64] Use SelectionDAG::getSignedConstant/getAllOnesConstant. [ARM] Use SelectonDAG::getSignedConstant. [SelectionDAG] Use getAllOnesConstant. [LLD] [MinGW] Recognize the -rpath option (#102886) [clang][bytecode] Fix shifting negative values (#104663) [flang] Handle Hollerith in data statement initialization in big endian (#103451) [clang][bytecode] Classify 1-bit unsigned integers as bool (#104662) [RISCV][MC] Make error message of CSR with wrong extension more detailed (#104424) [X86] Don't save/restore fp around longjmp instructions (#102556) AMDGPU: Add tonearest and towardzero roundings for intrinsic llvm.fptrunc.round (#104486) [libc] Fix type signature for strlcpy and strlcat (#104643) [AArch64] Add a check for invalid default features (#104435) [clang][NFC] Clean up `Sema` headers [NFC] Cleanup in ADT and Analysis headers. (#104484) [InstCombine] Avoid infinite loop when negating phi nodes (#104581) Add non-temporal support for LLVM masked loads (#104598) [AMDGPU] Disable inline constants for pseudo scalar transcendentals (#104395) [mlir][Transforms] Dialect conversion: Fix bug in `computeNecessaryMaterializations` (#104630) [RISCV] Use getAllOnesConstant/getSignedConstant. [SelectionDAG] Use getSignedConstant/getAllOnesConstant. [NFC][asan] Make 'Module &M' class member [AMDGPU][NFC] Remove duplicate code by using getAddressableLocalMemorySize (#104604) [CodeGen][asan] Use `%t` instead of `cd` in test Revert "[asan] Catch `initialization-order-fiasco` in modules without globals" (#104665) [SelectionDAG][X86] Use getAllOnesConstant. NFC (#104640) [LLVM][NVPTX] Add support for brkpt instruction (#104470) [asan] Catch `initialization-order-fiasco` in modules without globals (#104621) [RISCV] Remove feature implication from Zvknhb. [clang-format] Adjust requires clause wrapping (#101550) (#102078) [MC,AArch64] Remove unneeded STT_NOTYPE/STB_LOCAL code for mapping symbols and improve tests [NFC][DXIL] move replace/erase in DXIL intrinsic expansion to caller (#104626) [flang] Allow flexible name in llvm.ident (NFC) (#104543) [SandboxIR] Implement SwitchInst (#104641) [Clang] Fix sema checks thinking kernels aren't kernels (#104460) [asan] Pre-commit test with global constructor without any global (#104620) [clang-doc] add support for enums comments in html generation (#101282) Revert "[AArch64] Fold more load.x into load.i with large offset" [NFC][cxxabi] Apply `cp-to-llvm.sh` (#101970) [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (#104594) [Mips] Fix fast isel for i16 bswap. (#103398) [libc] Add missing math definitions for round and scal for GPU (#104636) [ScalarizeMaskedMemIntr] Optimize splat non-constant masks (#104537) [SandboxIR] Implement ConstantInt (#104639) [SLP]Fix PR104637: do not create new nodes for fully overlapped non-schedulable nodes [DataLayout] Refactor parsing of "p" specification (#104583) [flang][cuda] Remove run line Reland "[flang][cuda][driver] Make sure flang does not switch to cc1 (#104613)" Revert "Reland "[flang][cuda][driver] Make sure flang does not switch to cc1 (#104613)"" [SandboxIR][Tracker][NFC] GenericSetterWithIdx (#104615) Reland "[flang][cuda][driver] Make sure flang does not switch to cc1 (#104613)" [MC] Drop whitespace padding in AMDGPU combined asm/disasm tests. (#104433) [gn build] Port 7ff377ba60bf [InstrProf] Support conditional counter updates (#102542) [Analysis] Fix null ptr dereference when using WriteGraph without branch probability info (#104102) [DirectX] Revert specialized createOp methods part of #101250 [VPlan] Compute cost for most opcodes in VPWidenRecipe (NFCI). (#98764) [PowerPC] Do not merge TLS constants within PPCMergeStringPool.cpp (#94059) Revert "[flang][cuda][driver] Make sure flang does not switch to cc1" (#104632) [AArch64][MachO] Encode @AUTH to ARM64_RELOC_AUTHENTICATED_POINTER. [flang][cuda][driver] Make sure flang does not switch to cc1 (#104613) AMDGPU: Rename type helper functions in atomic handling [libc] Fix generated header definitions in cmake (#104628) [libcxx][fix] Rename incorrect filename variable [SDAG] Read-only intrinsics must have WillReturn and !Throws attributes to be treated as loads (#99999) Re-Apply "[DXIL][Analysis] Implement enough of DXILResourceAnalysis for buffers" (#104517) [SelectionDAGISel] Use getSignedConstant for OPC_EmitInteger. [DirectX] Add missing Analysis usage to DXILResourceMDWrapper [AArch64] Remove apple-a7-sysreg. (#102709) Revert "[libc] Disable old headergen checks unless enabled" (#104627) [LLD, MachO] Default objc_relative_method_lists on MacOS10.16+/iOS14+ (#104519) [Clang][OMPX] Add the code generation for multi-dim `thread_limit` clause (#102717) [lldb][test] Mark gtest cases as XFAIL if the test suite is XFAIL (#102986) [APINotes] Support fields of C/C++ structs [Attributor] Enable `AAAddressSpace` in `OpenMPOpt` (#104363) [HLSL] Change default linkage of HLSL functions to internal (#95331) [bazel] Fix cyclic dependencies for macos (#104528) [libc] Disable old headergen checks unless enabled (#104522) [SandboxIR] Implement AtomicRMWInst (#104529) [RISCV] Move vmv.v.v peephole from SelectionDAG to RISCVVectorPeephole (#100367) [nfc] Improve testability of PGOInstrumentationGen (#104490) [test] Prevent generation of the bigendian code inside clang test CodeGen/bit-int-ubsan.c (#104607) [TableGen] Refactor Intrinsic handling in TableGen (#103980) [mlir][emitc] Add 'emitc.switch' op to the dialect (#102331) [SelectionDAG][X86] Add SelectionDAG::getSignedConstant and use it in a few places. (#104555) [mlir][AMDGPU] Implement AMDGPU DPP operation in MLIR. (#89233) [RISCV] Allow YAML file to control multilib selection (#98856) [mlir][vector] Group re-order patterns together (#102856) [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (#104109) [HLSL] Flesh out basic type typedefs (#104479) [mlir][vector] Add more tests for ConvertVectorToLLVM (4/n) (#103391) [TableGen] Sign extend constants based on size for EmitIntegerMatcher. (#104550) [gn] Port AST/ByteCode #104552 [DAGCombiner] Remove TRUNCATE_(S/U)SAT_(S/U) from an assert that isn't tested. NFC (#104466) [RISCV] Don't support TRUNCATE_SSAT_U. (#104468) [Hexagon] Use range-based for loops (NFC) (#104538) [CodeGen] Use range-based for loops (NFC) (#104536) [Bazel] Port AST/ByteCode #104552 [mlir][linalg] Implement TilingInterface for winograd operators (#96184) [libc++][math] Fix acceptance of convertible types in `std::isnan()` and `std::isinf()` (#98952) [clang] Rename all AST/Interp stuff to AST/ByteCode (#104552) [mlir] [tosa] Bug fixes in shape inference pass (#104146) [libc++] Fix rejects-valid in std::span copy construction (#104500) [InstCombine] Handle commuted variant of sqrt transform [InstCombine] Thwart complexity-based canonicalization in sqrt test (NFC) [InstCombine] Preserve nsw in A + -B fold [InstCombine] Add nsw tests for A + -B fold (NFC) [include-cleaner] fix 32-bit buildbots after a426ffdee1ca7814f2684b6 [PhaseOrdering] Regenerate test checks (NFC) [InstCombine] Regenerate test checks (NFC) [X86] Fold extract_subvector(int_to_fp(x)) vXi32/vXf32 cases to match existing fp_to_int folds [InstCombine] Regenerate test checks (NFC) [mlir][spirv] Update documentation. NFC (#104584) [GlobalIsel] Revisit ext of ext. (#102769) [libc++] Fix backslash as root dir breaks lexically_relative, lexically_proximate and hash_value on Windows (#99780) [AArch64][GlobalISel] Disable fixed-point iteration in all Combiners [SLP][REVEC] Fix CreateInsertElement does not use the correct result if MinBWs applied. (#104558) Add FPMR register and update dependencies of FP8 instructions (#102910) [InstCombine] Fix incorrect zero ext in select of lshr/ashr fold [InstCombine] Add i128 test for select of lshr/ashr transform (NFC) [llvm-c] Add non-cstring versions of LLVMGetNamedFunction and LLVMGetNamedGlobal (#103396) [InstCombine] Fold an unsigned icmp of ucmp/scmp with a constant to an icmp of the original arguments (#104471) [clang][Interp] Fix classifying enum types (#104582) [clang] Add a new test for CWG2091 (#104573) [mlir][ArmSME][docs] Fix broken link (NFC) [compiler-rt] Stop using x86 builtin on AArch64 with GCC (#93890) [DataLayout] Refactor parsing of "ni" specification (#104546) [X86] SimplifyDemandedVectorEltsForTargetNode - reduce width of X86 conversions nodes when upper elements are not demanded. (#102882) [include-cleaner] Add handling for new/delete expressions (#104033) InferAddressSpaces: Convert test to generated checks [LAA] Use computeConstantDifference() (#103725) [SimplifyCFG] Add test for #104567 (NFC) [bazel] Port for 75cb9edf09fdc091e5bc0f3d46a96c2877735a39 [AMDGPU][NFC] AMDGPUUsage.rst: document corefile format (#104419) [lldb][NFC] Moved FindSchemeByProtocol() from Acceptor to Socket (#104439) [X86] lowerShuffleAsDecomposedShuffleMerge - don't lower to unpack+permute if either source is zero. [X86] Add shuffle tests for #104482 [clang][Interp][NFC] Remove Function::Loc [clang][NFC] Update `cxx_dr_status.html` [MLIR][GPU-LLVM] Add GPU to LLVM-SPV address space mapping (#102621) [DAG] SD Pattern Match: Operands patterns with VP Context (#103308) Revert "[clang][driver] Fix -print-target-triple OS version for apple targets" (#104563) [NFC][X86] Refactor: merge avx512_binop_all2 into avx512_binop_all (#104561) [RISCV] Merge bitrotate crash test into shuffle reverse tests. NFC [Passes] clang-format initialization files (NFC) [mlir][IR] Fix `checkFoldResult` error message (#104559) [RISCV] Merge shuffle reverse tests. NFC [RISCV] Use shufflevector in shuffle reverse tests. NFC [RISCV] Remove -riscv-v-vector-bits-max from reverse tests. NFC [flang][stack-arrays] Collect analysis results for OMP ws loops (#103590) [clang][Interp] Add scopes to conditional operator subexpressions (#104418) [RISCV] Simplify (srl (and X, Mask), Const) to TH_EXTU (#102802) [RISCV][NFC] Fix typo: "wererenamed" to "were renamed" (#104530) [RISCV] Lower fixed reverse vector_shuffles through vector_reverse (#104461) [asan] Fix build breakage from report_globals change [MLIR][test] Run SVE and SME Integration tests using qemu-aarch64 (#101568) [DAGCombiner] Don't let scalarizeBinOpOfSplats create illegal scalar MULHS/MULHU (#104518) [flang][cuda] Add version in libCufRuntime name (#104506) [mlir][tosa] Add missing check for new_shape of `tosa.reshape` (#104394) [Bitcode] Use range-based for loops (NFC) (#104534) [HLSL] update default validator version to 1.8. (#104040) [ScalarizeMaskedMemIntr] Pre-commit tests for splat optimizations (#104527) [Sparc] Remove dead code (NFC) (#104264) [Clang] [Sema] Error on reference types inside a union with msvc 1900+ (#102851) [Driver] Reject -Wa,-mrelax-relocations= for non-ELF [Analysis] Use a range-based for loop (NFC) (#104445) [llvm] Use llvm::any_of (NFC) (#104443) [PowerPC] Use range-based for loops (NFC) (#104410) [CodeGen] Use a range-based for loop (NFC) (#104408) [ORC] Gate testcase for 3e1d4ec671c on x86-64 and aarch64 target support. [builitins] Only try to use getauxval on Linux (#104047) [ORC] Add missing dependence on BinaryFormat library. [flang] Inline minval/maxval over elemental/designate (#103503) [Driver] Correctly handle -Wa,--crel -Wa,--no-crel [lldb] Correctly fix a usage of `PATH_MAX`, and fix unit tests (#104502) [gn build] Port 3e1d4ec671c5 [asan] Remove debug tracing from `report_globals` (#104404) [workflows] Add a new workflow for checking commit access qualifications (#93301) [Driver] Improve error message for -Wa,-x=unknown [SandboxIR] Implement UnaryOperator (#104509) [ORC] loadRelocatableObject: universal binary support, clearer errors (#104406) [RISCV] Use significant bits helpers in narrowing of build vectors [nfc] (#104511) [LLDB] Reapply #100443 SBSaveCore Thread list (#104497) [Driver] Reject -Wa,-mrelax-relocations= for non-x86 [docs] Stress out the branch naming scheme for Graphite. (#104499) [NFC][sanitizer] Use `UNLIKELY` in VReport/VPrintf (#104403) [asan] Reduce priority of "contiguous_container:" VPrintf (#104402) [libc] Make sure we have RISC-V f or d extension before using it (#104476) [Driver] Make CodeGenOptions name match MCTargetOptions names [Attributor][FIX] Ensure we do not use stale references (#104495) [libclang/python] Expose `clang_isBeforeInTranslationUnit` for `SourceRange.__contains__` [Clang] Add target triple to fix failing test (#104513) [clang][NFC] Fix table of contents in `Sema.h` [-Wunsafe-buffer-usage] Fix warning after #102953 [flang] Make sure range is valid (#104281) [MC] Replace hasAltEntry() with isMachO() MCAsmInfo: Replace some Mach-O specific check with isMachO(). NFC [asan] De-prioritize VReport `DTLS_Find` (#104401) Revert "[DXIL][Analysis] Implement enough of DXILResourceAnalysis for buffers" (#104504) [ubsan] Limit _BitInt ubsan tests to x86-64 platform only (#104494) Update load intrinsic attributes (#101562) [MC] Replace HasAggressiveSymbolFolding with SetDirectiveSuppressesReloc. NFC [SandboxIR] Implement BinaryOperator (#104121) [RISCV][GISel] Support nxv16p0 for RV32. (#101573) [nfc][ctx_prof] Remove the need for `PassBuilder` to know about `UseCtxProfile` (#104492) [Clang] [NFC] Rewrite constexpr vectors test to use element access (#102757) (lldb) Fix PATH_MAX for Windows (#104493) [libc] Add definition for `atan2l` on 64-bit long double platforms (#104489) Revert "[sanitizer] Remove GetCurrentThread nullness checks from Allocate" Reapply "Fix prctl to handle PR_GET_PDEATHSIG. (#101749)" (#104469) [-Wunsafe-buffer-usage] Fix a small bug recently found (#102953) [TargetLowering] Don't call SelectionDAG::getTargetLoweringInfo() from TargetLowering methods. NFC (#104197) [PowerPC][GlobalMerge] Enable GlobalMerge by default on AIX (#101226) [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (#101448) clang/AMDGPU: Emit atomicrmw for __builtin_amdgcn_global_atomic_fadd_{f32|f64} (#96872) [llvm-objdump] Fix a warning [bazel] Port 47721d46187f89c12a13d07b5857496301cf5d6e (#104481) [libc++] Remove the allocator<const T> extension (#102655) [Clang] handle both gnu and cpp11 attributes to ensure correct parsing inside extern block (#102864) [gn build] Port 47721d46187f [lldb] Realpath symlinks for breakpoints (#102223) llvm-objdump: ensure a MachO symbol isn't STAB before looking up secion (#86667) [test]Fix test error due to CRT dependency (#104462) [clang][Interp] Call move function for certain primitive types (#104437) [llvm-objdump] Print out xcoff file header for xcoff object file with option private-headers (#96350) [Clang] prevent null explicit object argument from being deduced (#104328) Revert "[Clang] Overflow Pattern Exclusions (#100272)" [flang][OpenMP] Fix 2 more regressions after #101009 (#101538) [InstCombine] Fold `ucmp/scmp(x, y) >> N` to `zext/sext(x < y)` when N is one less than the width of the result of `ucmp/scmp` (#104009) [bazel] Enable more lit self tests (#104285) Fix single thread stepping timeout race condition (#104195) [SPARC][Utilities] Add names for SPARC ELF flags in LLVM binary utilities (#102843) [SPARC][Driver] Add -m(no-)v8plus flags handling (#98713) [OpenMP] Add support for pause with omp_pause_stop_tool (#97100) Revert "[SLP][NFC]Remove unused using declarations, reduce mem usage in containers, NFC" [ValueTracking] Fix f16 fptosi range for large integers [InstSimplify] Add tests for f16 to i128 range (NFC) Revert "[Object][x86-64] Add support for `R_X86_64_GLOB_DAT` relocations. (#103029)" (#103497) [NFC] Fix spelling of "definitely". (#104455) [InstCombine][NFC] Add tests for shifts of constants by common factor (#103471) [OpenMP] Miscellaneous small code improvements (#95603) [clang][ExtractAPI] Emit environment component of target triple in SGF (#103273) [RISCV] Narrow indices to e16 for LMUL > 1 when lowering vector_reverse (#104427) [NFC] Fix code line exceeding 80 columns (#104428) [SLP][NFC]Remove unused using declarations, reduce mem usage in containers, NFC [Clang] Check explicit object parameter for defaulted operators properly (#100419) [LegalizeTypes][AMDGPU]: Allow for scalarization of insert_subvector (#104236) Allow optimization of __size_returning_new variants. (#102258) [SLP]Fix PR104422: Wrong value truncation [GlobalISel] Combiner: Fix warning after #102163 [SLP][NFC]Add a test with incorrect minbitwidth analysis for reduced operands [ubsan] Display correct runtime messages for negative _BitInt (#96240) Revert "[SLP][NFC]Remove unused using declarations, reduce mem usage in containers, NFC" [DataLayout] Extract loop body into a function to reduce nesting (NFC) (#104420) [clang][ExtractAPI] Compute inherited availability information (#103040) [CodeGen] Fix -Wcovered-switch-default in Combiner.cpp (NFC) [CompilerRT][Tests] Fix profile/darwin-proof-of-concept.c (#104237) [mlir][gpu] Fix typo in test filename (#104053) [LoongArch] Pre-commit tests for validating the merge base offset in vecotrs. NFC [AArch64] optimise SVE prefetch intrinsics with no active lanes (#103052) [AMDGPU] MCExpr printing helper with KnownBits support (#95951) [GlobalISel] Combiner: Observer-based DCE and retrying of combines [libcxx] Use `aligned_alloc` for testing instead of `posix_memalign` (#101748) [VPlan] Run VPlan optimizations on plans in native path. [clang][Interp] Use first field decl for Record field lookup (#104412) InferAddressSpaces: Restore non-instruction user check [AMDGPU][llvm-split] Fix another division by zero (#104421) Reapply "[lldb] Tolerate multiple compile units with the same DWO ID (#100577)" (#104041) [lldb-dap] Expose log path in extension settings (#103482) [clang][Interp] Pass callee decl to null_callee diagnostics (#104426) [llvm][CodeGen] Resolve issues when updating live intervals in window scheduler (#101945) [DataLayout] Add helper predicates to sort specifications (NFC) (#104417) InferAddressSpaces: Make getPredicatedAddrSpace less confusing (#104052) [AArch64] Fold more load.x into load.i with large offset [AArch64] merge index address with large offset into base address [AArch64] Add verification for MemOp immediate ranges (#97561) Revert "[Clang] [AST] Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (#102848)" [analyzer] Do not reason about locations passed as inline asm input (#103714) [NFC][mlir][scf] Fix misspelling of replace (#101683) Revert "Remove empty line." [mlir][Transforms] Dialect conversion: Build unresolved materialization for replaced ops (#101514) Remove empty line. [DirectX] Use a more consistent pass name for DXILTranslateMetadata [Flang][OpenMP] Move assert for wrapper syms and block args to genLoopNestOp (#103731) [clang][driver] Fix -print-target-triple OS version for apple targets (#104037) [bazel] Port for 141536544f4ec1d1bf24256157f4ff1a3bc07dae [DAG] Adding m_FPToUI and m_FPToSI to SDPatternMatch.h (#104044) [llvm][Docs] `_or_null` -> `_if_present` in Programmer's Manual (#98586) [MLIR][LLVM]: Add an IR utility to perform slice walking (#103053) [lldb][test] Mark sys_info zdump test unsupported on 32 bit Arm Linux [flang][test] Run Driver/fveclib-codegen.f90 for aarch64 and x86_64 (#103730) [lldb] Remove Phabricator usernames from Code Owners file (#102590) [DataLayout] Move '*AlignElem' structs and enum inside DataLayout (NFC) (#103723) [flang][test] Fix Lower/default-initialization-globals.f90 on SPARC (#103722) [mlir][test] XFAIL little-endian-only tests on SPARC (#103726) [UnitTests] Convert some data layout parsing tests to GTest (#104346) Fix warnings in #102848 [-Wunused-but-set-variable] [VPlan] Move VPWidenStoreRecipe::execute to VPlanRecipes.cpp (NFC). [include-cleaner] Remove two commented-out lines of code. [mlir][tosa] Add verifier for `tosa.table` (#103708) [X86][MC] Remove CMPCCXADD's CondCode flavor. (#103898) [ctx_prof] Remove an unneeded include in CtxProfAnalysis.cpp Intrinsic: introduce minimumnum and maximumnum for IR and SelectionDAG (#96649) Remove failing test until it can be fixed properly. [Clang][NFC] Move FindCountedByField into FieldDecl (#104235) Fix testcases. Use -emit-llvm and not -S. Use LABEL checking. [Clang] [AST] Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (#102848) [LLDB][OSX] Removed semi colon generating a warning during build (#104398) [OpenMP] Use range-based for loops (NFC) (#103511) [RISCV] Implement RISCVTTIImpl::shouldConsiderAddressTypePromotion for RISCV (#102560) [lld-macho] Fix crash: ObjC category merge + relative method lists (#104081) [ELF][NFC] Allow non-GotSection for addAddendOnlyRelocIfNonPreemptible (#104228) [ctx_prof] CtxProfAnalysis: populate module data (#102930) [sanitizer] Remove GetCurrentThread nullness checks from Allocate Remove '-emit-llvm' and use '-triple' Use clang_cc1 and specify the target explicitly. utils/git: Add linkify script. [mlir][MemRef] Add more ops to narrow type support, strided metadata expansion (#102228) [Clang] Overflow Pattern Exclusions (#100272) [Clang] Error on extraneous template headers by default. (#104046) [Sanitizers] Disable prctl test on Android. [RISCV] Don't combine (sext_inreg (fmv_x_anyexth X), i16) with Zhinx. Remove unused variable, and unneeded extract element instruction (#103489) [bazel] Port 4bac8fd8904904bc7d502f39851eef50b5afff73 (#104278) Reland "[flang][cuda] Use cuda runtime API #103488" [Clang] Add `__CLANG_GPU_DISABLE_MATH_WRAPPERS` macro for offloading math (#98234) [llvm-lit] Fix Unhashable TypeError when using lit's internal shell (#101590) [llvm-lit][test][NFC] Moved cat command tests into separate lit test file (#102366) [RISCV] Add signext attribute to return of fmv_x_w test in float-convert.ll. NFC [DXIL][Analysis] Implement enough of DXILResourceAnalysis for buffers Reapply "[Attributor][AMDGPU] Enable AAIndirectCallInfo for AMDAttributor (#100952)" [DXIL][Analysis] Boilerplate for DXILResourceAnalysis pass [mlir] Add bubbling patterns for non intersecting reshapes (#103401) Revert "[flang][cuda] Use cuda runtime API" (#104232) [libc++] Remove non-existent LWG issue from the .csv files [RISCV][GISel] Remove support for s32 G_VAARG on RV64. (#102533) [NVPTX] Add idp2a, idp4a intrinsics (#102763) [X86] Check if an invoked function clobbers fp or bp (#103446) [flang][cuda] Use cuda runtime API (#103488) [SLP][NFC]Remove unused using declarations, reduce mem usage in containers, NFC [TargetLowering] Remove unncessary null check. NFC [OpenMP] Fix buildbot failing on allocator test [clang] Turn -Wenum-constexpr-conversion into a hard error (#102364) [libcxx] Adjust inline assembly constraints for the AMDGPU target (#101747) [lld-macho] Make relative method lists work on x86-64 (#103905) [libcxx] Disable invalid `__start/__stop` reference on NVPTX (#99381) [libcxx] Add fallback to standard C when `unistd` is unavailable (#102005) [Clang] Fix 'nvlink-wrapper' not ignoring `-plugin` like lld does (#104056) [OpenMP] Implement 'omp_alloc' on the device (#102526) [vscode-mlir] Added per-LSP-server executable arguments (#79671) [flang] Read the extra field from the in box when doing reboxing (#102992) [HLSL] Split out the ROV attribute from the resource attribute, make it a new spellable attribute. (#102414) [libc++] Fix ambiguous constructors for std::complex and std::optional (#103409) AMDGPU: Avoid manually reconstructing atomicrmw (#103769) [libc] Fix 'float type' incorrectly being used as the return type [Clang] Adjust concept definition locus (#103867) [SandboxIR] Implement Instruction flags (#103343) [AArch64] Add some uxtw peephole tests. NFC AMDGPU: Stop promoting allocas with addrspacecast users (#104051) [NVPTX] Fix typo causing GCC warning (#103045) [attributes][-Wunsafe-buffer-usage] Support adding unsafe_buffer_usage attribute to struct fields (#101585) [RISCV][GISel] Support G_SEXT_INREG for Zbb. (#102682) [SystemZ][z/OS] Continuation of __ptr32 support (#103393) [X86] concat(permv3(x0,m0,y0),permv3(x0,m1,y0)) -> permv3(concat(x0,u),m3,concat(y0,u)) [X86] Add test coverage for #103564 [X86] combineEXTRACT_SUBVECTOR - treat oneuse extractions from loads as free [libcxx] Set `_LIBCPP_HAS_CLOCK_GETTIME` for GPU targets (#99243) Fix bazel build (#104054) CodeGen/NewPM: Add ExpandLarge* passes to isel IR passes (#102815) AMDGPU/NewPM: Fill out addPreISelPasses (#102814) [libc++] Add mechanical update to CxxPapers.rst to git-blame-ignore-revs [libc++] Mechanical adjustments for the C++14 Paper status files [LLDB][OSX] Add a fallback support exe directory (#103458) [TextAPI] Use range-based for loops (NFC) (#103530) [mlir][vector] Add tests for `populateSinkVectorBroadcastPatterns` (1/n) (#102286) [libc++] Remove duplicate C++17 LWG issues from the CSVs [clang] Implement `__builtin_is_implicit_lifetime()` (#101807) Fix prctl test to execute all test cases if the first condition fails. (#102987) Revert "[scudo] Separated committed and decommitted entries." (#104045) [SelectionDAG] Scalarize binary ops of splats be…
Reland [CGData] llvm-cgdata llvm#89884 using `Opt` instead of `cl` - Action options are required, `--convert`, `--show`, `--merge`. This was similar to sub-commands previously implemented, but having a prefix `--`. - `--format` option is added, which specifies `text` or `binary`. --------- Co-authored-by: Kyungwoo Lee <[email protected]>
This fixes a build break from [llvm/llvm-project] Reland [CGData] llvm-cgdata llvm#89884 (PR llvm#101461)
This fixes a build break from [llvm/llvm-project] Reland [CGData] llvm-cgdata llvm#89884 (PR llvm#101461)
This fixes a build break from [llvm/llvm-project] Reland [CGData] llvm-cgdata llvm#89884 (PR llvm#101461)
This fixes a build break from [llvm/llvm-project] Reland [CGData] llvm-cgdata llvm#89884 (PR llvm#101461)
This fixes a build break from [llvm/llvm-project] Reland [CGData] llvm-cgdata llvm#89884 (PR llvm#101461)
This fixes a build break from [llvm/llvm-project] Reland [CGData] llvm-cgdata llvm#89884 (PR llvm#101461)
This fixes a build break from [llvm/llvm-project] Reland [CGData] llvm-cgdata llvm#89884 (PR llvm#101461)
commit a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4 Author: Tobias Hieta <[email protected]> Date: Tue Sep 17 13:26:36 2024 +0200 Bump version to 19.1.0 (final) commit 560ed047d183348b341ffd4e27712c254d82f589 Author: Tobias Hieta <[email protected]> Date: Tue Sep 17 09:39:18 2024 +0200 Revert " [LoongArch][ISel] Check the number of sign bits in `PatGprGpr_32` (#107432)" This reverts commit 78654faa0c6d9dc2f72b81953b9cffbb7675755b. commit bd4ff65a601895ba816623cddb36ce466cceabe6 Author: Tobias Hieta <[email protected]> Date: Tue Sep 17 09:39:01 2024 +0200 Revert "[LoongArch] Eliminate the redundant sign extension of division (#107971)" This reverts commit d752f29fb333d47724484e08b32d6499cc1e460e. commit bdae3c487cbb2b4161e7fbb54a855f0ba55da61a Author: Zaara Syeda <[email protected]> Date: Tue Sep 10 14:14:01 2024 -0400 [PowerPC] Fix assert exposed by PR 95931 in LowerBITCAST (#108062) Hit Assertion failed: Num < NumOperands && "Invalid child # of SDNode!" Fix by checking opcode and value type before calling getOperand. (cherry picked from commit 22067a8eb43a7194e65913b47a9c724fde3ed68f) commit 149a150b50c112e26fc5acbdd58250c44ccd777f Author: Ganesh Gopalasubramanian <[email protected]> Date: Mon Sep 16 11:16:14 2024 +0000 [X86] AMD Zen 5 Initial enablement commit 82e85b62da3f62759ab94aecd0ebac61f3856719 Author: Brian Cain <[email protected]> Date: Fri Sep 13 17:10:03 2024 -0500 [lld] select a default eflags for hexagon (#108431) Empty archives are apparently routine in linux kernel builds, so instead of asserting, we should handle this case with a sane default value. (cherry picked from commit d1ba432533aafc52fc59158350af937a8b6b9538) commit 82f3a4a32d2500ab1e6c51e0d749ffbac9afb1fa Author: Konstantin Varlamov <[email protected]> Date: Fri Sep 13 01:26:57 2024 -0700 Guard an include of `<ostream>` in `<chrono>` with availability macro (#108429) This fixes a regression introduced in https://github.com/llvm/llvm-project/pull/96035. (cherry picked from commit 127c34948bd54e92ef2ee544e8bc42acecf321ad) commit a847b66a750291f8b63c03b9f355c6f4d09cdfe3 Author: Jonathon Penix <[email protected]> Date: Wed Sep 11 09:53:11 2024 -0700 [RISCV] Don't outline pcrel_lo when the function has a section prefix (#107943) GNU ld will error when encountering a pcrel_lo whose corresponding pcrel_hi is in a different section. [1] introduced a check to help prevent this issue by preventing outlining in a few circumstances. However, we can also hit this same issue when outlining from functions with prefixes ("hot"/"unlikely"/"unknown" from profile information, for example) as the outlined function might not have the same prefix, possibly resulting in a "paired" pcrel_lo and pcrel_hi ending up in different sections. To prevent this issue, take a similar approach as [1] and additionally prevent outlining when we see a pcrel_lo and the function has a prefix. [1] https://github.com/llvm/llvm-project/commit/96c85f80f0d615ffde0f85d8270e0a8c9f4e5430 Fixes #107520 (cherry picked from commit 866b93e6b33fac9a4bc62bbc32199bd98f434784) commit 6278084bc69a427cf7a610076817c420e3dc8594 Author: Nikolas Klauser <[email protected]> Date: Wed Sep 11 08:47:24 2024 +0200 [Clang] Fix crash due to invalid source location in __is_trivially_equality_comparable (#107815) Fixes #107777 (cherry picked from commit 6dbdb8430b492959c399a7809247424c6962902f) commit d752f29fb333d47724484e08b32d6499cc1e460e Author: hev <[email protected]> Date: Tue Sep 10 16:52:21 2024 +0800 [LoongArch] Eliminate the redundant sign extension of division (#107971) If all incoming values of `div.d` are sign-extended and all users only use the lower 32 bits, then convert them to W versions. Fixes: #107946 (cherry picked from commit 0f47e3aebdd2a4a938468a272ea4224552dbf176) commit 78654faa0c6d9dc2f72b81953b9cffbb7675755b Author: Yingwei Zheng <[email protected]> Date: Tue Sep 10 09:19:39 2024 +0800 [LoongArch][ISel] Check the number of sign bits in `PatGprGpr_32` (#107432) After https://github.com/llvm/llvm-project/pull/92205, LoongArch ISel selects `div.w` for `trunc i64 (sdiv i64 3202030857, (sext i32 X to i64)) to i32`. It is incorrect since `3202030857` is not a signed 32-bit constant. It will produce wrong result when `X == 2`: https://alive2.llvm.org/ce/z/pzfGZZ This patch adds additional `sexti32` checks to operands of `PatGprGpr_32`. Alive2 proof: https://alive2.llvm.org/ce/z/AkH5Mp Fix #107414. (cherry picked from commit a111f9119a5ec77c19a514ec09454218f739454f) commit f0010d131b79a1b401777aa32e96defc4a935c9d Author: R-Goc <[email protected]> Date: Wed Sep 4 20:10:36 2024 +0200 [Windows SEH] Fix crash on empty seh block (#107031) Fixes https://github.com/llvm/llvm-project/issues/105813 and https://github.com/llvm/llvm-project/issues/106915. Adds a check for the end of the iterator, which can be a sentinel. The issue was introduced in https://github.com/llvm/llvm-project/commit/0efe111365ae176671e01252d24028047d807a84 from what I can see, so along with the introduction of /EHa support. (cherry picked from commit 2e0ded3371f8d42f376bdfd4d70687537e36818e) commit 93998aff7662d9b3f94d9627179dffe342e2b399 Author: Jay Foad <[email protected]> Date: Tue Aug 27 17:09:40 2024 +0100 [AMDGPU] Fix sign confusion in performMulLoHiCombine (#105831) SMUL_LOHI and UMUL_LOHI are different operations because the high part of the result is different, so it is not OK to optimize the signed version to MUL_U24/MULHI_U24 or the unsigned version to MUL_I24/MULHI_I24. commit 373180b440d04dc3cc0f6111b06684d18779d7c8 Author: Alexey Bataev <[email protected]> Date: Thu Aug 15 07:21:10 2024 -0700 [SLP]Fix PR104422: Wrong value truncation The minbitwidth restrictions can be skipped only for immediate reduced values, for other nodes still need to check if external users allow bitwidth reduction. Fixes https://github.com/llvm/llvm-project/issues/104422 (cherry picked from commit 56140a8258a3498cfcd9f0f05c182457d43cbfd2) commit 32a8b56bbf0a3c7678d44ba690427915446a9a72 Author: Tom Stellard <[email protected]> Date: Thu Sep 12 09:50:57 2024 -0700 workflows/release-binaries: Fix automatic upload (#107315) (cherry picked from commit ab96409180aaad5417030f06a386253722a99d71) commit 8290ce0998788b6a575ed7b4988b093f48c25b3d Author: cor3ntin <[email protected]> Date: Tue Sep 3 20:36:15 2024 +0200 [Clang] Fix handling of placeholder variables name in init captures (#107055) We were incorrectly not deduplicating results when looking up `_` which, for a lambda init capture, would result in an ambiguous lookup. The same bug caused some diagnostic notes to be emitted twice. Fixes #107024 commit 327ca6c02f0dbf13dd6f039d30d320a7ba1456b8 Author: Owen Pan <[email protected]> Date: Thu Sep 5 23:59:11 2024 -0700 [clang-format] Correctly annotate braces in macro definition (#107352) This reverts commit 2d90e8f7402b0a8114978b6f014cfe76c96c94a1 and backports commit 616a8ce6203d8c7569266bfaf163e74df1f440ad. commit 2651d09ec9c4d87d09ae72d8bf42fab566fb02d0 Author: Hua Tian <[email protected]> Date: Thu Aug 15 19:03:27 2024 +0800 [llvm][CodeGen] Resolve issues when updating live intervals in window scheduler (#101945) Corrupted live interval information can cause window scheduling to crash in some cases. By adding the missing MBB's live interval information in the ModuloScheduleExpander, the information can be correctly analyzed in the window scheduler. (cherry picked from commit 43ba1097ee747b4ec5e757762ed0c9df6255a292) commit f64404e32187a6f45771e72e1b65e99be82acaba Author: Rainer Orth <[email protected]> Date: Sat Aug 3 22:18:11 2024 +0200 [builtins] Fix divtc3.c etc. compilation on Solaris/SPARC with gcc (#101662) `compiler-rt/lib/builtins/divtc3.c` and `multc3.c` don't compile on Solaris/sparcv9 with `gcc -m32`: ``` FAILED: projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-sparc.dir/divtc3.c.o [...] compiler-rt/lib/builtins/divtc3.c: In function ‘__divtc3’: compiler-rt/lib/builtins/divtc3.c:22:18: error: implicit declaration of function ‘__compiler_rt_logbtf’ [-Wimplicit-function-declaration] 22 | fp_t __logbw = __compiler_rt_logbtf( | ^~~~~~~~~~~~~~~~~~~~ ``` and many more. It turns out that while the definition of `__divtc3` is guarded with `CRT_HAS_F128`, the `__compiler_rt_logbtf` and other declarations use `CRT_HAS_128BIT && CRT_HAS_F128` as guard. This only shows up with `gcc` since, as documented in Issue #41838, `clang` violates the SPARC psABI in not using 128-bit `long double`, so this code path isn't used. Fixed by changing the guards to match. Tested on `sparcv9-sun-solaris2.11`. (cherry picked from commit 63a7786111c501920afc4cc27a4633f76cdaf803) commit bb79e7f668456473e13985a8f135cc3a45340fb5 Author: Nicolas van Kempen <[email protected]> Date: Mon Sep 9 07:12:46 2024 -0400 [clang][analyzer] Fix #embed crash (#107764) Fix #107724. (cherry picked from commit d84d9559bdc7aeb4ce14c251f6a3490c66db8d3a) commit 5e1a55eaa0bb592dd04f1b8474b8f064aded7b2e Author: Sander de Smalen <[email protected]> Date: Thu Sep 5 15:06:19 2024 +0100 [AArch64] Disable SVE paired ld1/st1 for callee-saves. The functionality to make use of SVE's load/store pair instructions for the callee-saves is broken because the offsets used in the instructions are incorrect. This is addressed by #105518 but given the complexity of this code and the subtleties around calculating the right offsets, we favour disabling the behaviour altogether for LLVM 19. This fix is critical for any programs being compiled with `+sme2`. commit 42f18eedc2cf2d1f64fd5d78fda376adf39a9b3d Author: Alexey Bataev <[email protected]> Date: Tue Sep 3 04:52:47 2024 -0700 [SLP]Fix PR107036: Check if the type of the user is sizable before requesting its size. Only some instructions should be considered as potentially reducing the size of the operands types, not all instructions should be considered. Fixes https://github.com/llvm/llvm-project/issues/107036 (cherry picked from commit f381cd069965dabfeb277f30a4e532d7fd498f6e) commit 11e2a1552f92ccb080d08083ceb71f7e6ed4db78 Author: Orlando Cazalet-Hyams <[email protected]> Date: Thu Aug 29 14:12:02 2024 +0100 [RemoveDIs] Fix spliceDebugInfo splice-to-end edge case (#105671) Fix #105571 which demonstrates an end() iterator dereference when performing a non-empty splice to end() from a region that ends at Src::end(). Rather than calling Instruction::adoptDbgRecords from Dest, create a marker (which takes an iterator) and absorbDebugValues onto that. The "absorb" variant doesn't clean up the source marker, which in this case we know is a trailing marker, so we have to do that manually. (cherry picked from commit 43661a1214353ea1773a711f403f8d1118e9ca0f) commit 64015eee93062b34df290338c45e87868fa750a9 Author: Hans Wennborg <[email protected]> Date: Mon Sep 9 10:56:37 2024 +0200 Release note about targets built in the Windows packages LLVM_TARGETS_TO_BUILD was set in #106059 commit 52e5a72e9200667e8a62436268fdaff4411f7216 Author: Sander de Smalen <[email protected]> Date: Thu Sep 5 17:54:57 2024 +0100 [AArch64] Remove redundant COPY from loadRegFromStackSlot (#107396) This removes a redundant 'COPY' instruction that #81716 probably forgot to remove. This redundant COPY led to an issue because because code in LiveRangeSplitting expects that the instruction emitted by `loadRegFromStackSlot` is an instruction that accesses memory, which isn't the case for the COPY instruction. (cherry picked from commit 91a3c6f3d66b866bcda8a0f7d4815bc8f2dbd86c) commit 5cf78453b3de39247364ddf97b1c18c011283948 Author: Yingwei Zheng <[email protected]> Date: Wed Sep 4 13:36:32 2024 +0800 [Clang][CodeGen] Don't emit assumptions if current block is unreachable. (#106936) Fixes https://github.com/llvm/llvm-project/issues/106898. When emitting an infinite loop, clang codegen will delete the whole block and leave builder's current block as nullptr: https://github.com/llvm/llvm-project/blob/837ee5b46a5f7f898f0de7e46a19600b896a0a1f/clang/lib/CodeGen/CGStmt.cpp#L597-L600 Then clang will create `zext (icmp slt %a, %b)` without parent block for `a < b`. It will crash here: https://github.com/llvm/llvm-project/blob/837ee5b46a5f7f898f0de7e46a19600b896a0a1f/clang/lib/CodeGen/CGExprScalar.cpp#L416-L420 Even if we disabled this optimization, it still crashes in `Builder.CreateAssumption`: https://github.com/llvm/llvm-project/blob/837ee5b46a5f7f898f0de7e46a19600b896a0a1f/llvm/lib/IR/IRBuilder.cpp#L551-L561 This patch disables assumptions emission if current block is null. (cherry picked from commit c94bd96c277e0b48e198fdc831bb576d9a04aced) commit 82a11e46ce87ea570358e4c25ee445929402a490 Author: cor3ntin <[email protected]> Date: Wed Sep 4 10:02:55 2024 +0200 [Clang] Workaround dependent source location issues (#106925) In #78436 we made some SourceLocExpr dependent to deal with the fact that their value should reflect the name of specialized function - rather than the rtemplate in which they are first used. However SourceLocExpr are unusual in two ways - They don't depend on template arguments - They morally depend on the context in which they are used (rather than called from). It's fair to say that this is quite novels and confuses clang. In particular, in some cases, we used to create dependent SourceLocExpr and never subsequently transform them, leaving dependent objects in instantiated functions types. To work around that we avoid replacing SourceLocExpr when we think they could remain dependent. It's certainly not perfect but it fixes a number of reported bugs, and seem to only affect scenarios in which the value of the SourceLocExpr does not matter (overload resolution). Fixes #106428 Fixes #81155 Fixes #80210 Fixes #85373 --------- Co-authored-by: Aaron Ballman <[email protected]> commit e657e0256509f6f665917904078a5389684fc716 Author: Tom Stellard <[email protected]> Date: Fri Jul 26 07:38:53 2024 -0700 workflows: Fix tag name for release sources job (#100752) (cherry picked from commit 3c2ce7088886a22ab8dc0e9488600c43644b5102) commit 8664666823b3eb8d96fde58f79d71d36bd7f9115 Author: Eli Friedman <[email protected]> Date: Thu Aug 1 16:18:20 2024 -0700 Fix codegen of consteval functions returning an empty class, and related issues (#93115) Fix codegen of consteval functions returning an empty class, and related issues If a class is empty, don't store it to memory: the store might overwrite useful data. Similarly, if a class has tail padding that might overlap other fields, don't store the tail padding to memory. The problem here turned out a bit more general than I initially thought: basically all uses of EmitAggregateStore were broken. Call lowering had a method that did mostly the right thing, though: CreateCoercedStore. Adapt CreateCoercedStore so it always does the conservatively right thing, and use it for both calls and ConstantExpr. Also, along the way, fix the "overlap" bit in AggValueSlot: the bit was set incorrectly for empty classes in some cases. Fixes #93040. (cherry picked from commit 1762e01cca0186f1862db561cfd9019164b8c654) commit 0c641568515a797473394694f05937e1f1913d87 Author: Tobias Hieta <[email protected]> Date: Tue Sep 3 16:09:11 2024 +0200 Bump version to 19.1.0-rc4 commit a01d631a1c2c3902b383b6491f27b72d63f6257b Author: Patryk Wychowaniec <[email protected]> Date: Fri Aug 30 16:50:56 2024 +0200 [AVR] Fix LLD test (#106739) Since we don't generate relocations for those, it doesn't make sense to assert them here; fallout of https://github.com/llvm/llvm-project/pull/106722. (cherry picked from commit a3816b5a573dbf57ba3082a919ca2de6b47257e9) commit 830b7ebac09ebef91671f0863986aee1a1d60e5e Author: Patryk Wychowaniec <[email protected]> Date: Fri Aug 30 15:25:54 2024 +0200 [AVR] Fix parsing & emitting relative jumps (#106722) Ever since 6859685a87ad093d60c8bed60b116143c0a684c7 (or, precisely, 84428dafc0941e3a31303fa1b286835ab2b8e234) relative jumps emitted by the AVR codegen are off by two bytes - this pull request fixes it. ## Abstract As compared to absolute jumps, relative jumps - such as rjmp, rcall or brsh - have an implied `pc+2` behavior; that is, `jmp 100` is `pc = 100`, but `rjmp 100` gets understood as `pc = pc + 100 + 2`. This is not reflected in the AVR codegen: https://github.com/llvm/llvm-project/blob/f95026dbf66e353128a3a3d7b55f3e52d5985535/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp#L89 ... which always emits relative jumps that are two bytes too far - or rather it _would_ emit such jumps if not for this check: https://github.com/llvm/llvm-project/blob/f95026dbf66e353128a3a3d7b55f3e52d5985535/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp#L517 ... which causes most of the relative jumps to be actually resolved late, by the linker, which applies the offsetting logic on its own, hiding the issue within LLVM. [Some time ago](https://github.com/llvm/llvm-project/commit/697a162fa63df328ec9ca334636c5e85390b2bf0) we've had a similar "jumps are off" problem that got solved by touching `shouldForceRelocation()`, but I think that has worked only by accident. It's exploited the fact that absolute vs relative jumps in the parsed assembly can be distinguished through a "side channel" check relying on the existence of labels (i.e. absolute jumps happen to named labels, but relative jumps are anonymous, so to say). This was an alright idea back then, but it got broken by 6859685a87ad093d60c8bed60b116143c0a684c7. I propose a different approach: - when emitting relative jumps, offset them by `-2` (well, `-1`, strictly speaking, because those instructions rely on right-shifted offset), - when parsing relative jumps, treat `.` as `+2` and read `rjmp .+1234` as `rjmp (1234 + 2)`. This approach seems to be sound and now we generate the same assembly as avr-gcc, which can be confirmed with: ```cpp // avr-gcc test.c -O3 && avr-objdump -d a.out int main() { asm( " foo:\n\t" " rjmp .+2\n\t" " rjmp .-2\n\t" " rjmp foo\n\t" " rjmp .+8\n\t" " rjmp end\n\t" " rjmp .+0\n\t" " end:\n\t" " rjmp .-4\n\t" " rjmp .-6\n\t" " x:\n\t" " rjmp x\n\t" " .short 0xc00f\n\t" ); } ``` avr-gcc is also how I got the opcodes for all new tests like `inst-brbc.s`, so we should be good. (cherry picked from commit 86a60e7f1e8f361f84ccb6e656e848dd4fbaa713) commit f3da9af3fd2696fbbe437dea599eda088fcb5592 Author: Jeremy Morse <[email protected]> Date: Mon Sep 2 11:56:40 2024 +0100 [DebugInfo][RemoveDIs] Find types hidden in DbgRecords (#106547) When serialising to textual IR, there can be constant Values referred to by DbgRecords that don't appear anywhere else, and have types hidden even deeper in side them. Enumerate these when enumerating all types. Test by Mikael Holmén. (cherry picked from commit 25f87f2d703178bb4bc13a62cb3df001b186cba2) commit 2d90e8f7402b0a8114978b6f014cfe76c96c94a1 Author: Owen Pan <[email protected]> Date: Mon Sep 2 01:40:13 2024 -0700 [clang-format] Correctly annotate braces in macro definition (#106662) Fixes #106418. (cherry picked from commit 0fa78b6c7bd43c2498700a98c47a02cf4fd06388) commit e594b284810c73b09da9436fdc6f1cbbfb4a7924 Author: Nikita Popov <[email protected]> Date: Wed Aug 28 12:54:14 2024 +0200 [IndVars] Check if WideInc available before trying to use it WideInc/WideIncExpr can be null. Previously this worked out because the comparison with WideIncExpr would fail. Now we have accesses to WideInc prior to that. Avoid the issue with an explicit check. Fixes https://github.com/llvm/llvm-project/issues/106239. (cherry picked from commit c9a5e1b665dbba898e9981fd7d48881947e6560e) commit e3abd19242dd908e6186639d091f6ecc219963f0 Author: Martin Storsjö <[email protected]> Date: Thu Aug 8 13:51:07 2024 +0300 [compiler-rt] Support building runtimes for Windows on arm32 (#101462) In these environments, the architecture name is armv7; recognize that and enable the relevant runtimes. Fix building the sanitizer_common library for this target, by using the right registers for the architecture - this is similar to what 0c391133c9201ef29273554a1505ef855ce17668 did for aarch64. (Still, address sanitizer doesn't support hooking functions at runtime on armv7 or aarch64 - but other runtimes such as ubsan do work.) (cherry picked from commit 5ea9dd8c7076270695a1d90b9c73718e7d95e0bf) commit 9b6180ed2ecbbb54f26caa78082e7b955a634117 Author: kadir çetinkaya <[email protected]> Date: Mon Sep 2 15:25:26 2024 +0200 [clangd] Update TidyFastChecks for release/19.x (#106354) Run for clang-tidy checks available in release/19.x branch. Some notable findings: - altera-id-dependent-backward-branch, stays slow with 13%. - misc-const-correctness become faster, going from 261% to 67%, but still above 8% threshold. - misc-header-include-cycle is a new SLOW check with 10% runtime implications - readability-container-size-empty went from 16% to 13%, still SLOW. (cherry picked from commit b47d7ce8121b1cb1923e879d58eaa1d63aeaaae2) commit d9cb501ec0012de5d4e1c6310df55f4e8af011a9 Author: Hans <[email protected]> Date: Mon Sep 2 15:04:13 2024 +0200 Win release packaging: Don't try to use rpmalloc for 32-bit x86 (#106969) because that doesn't work (results in `LINK : error LNK2001: unresolved external symbol malloc`). Based on the title of #91862 it was only intended for use in 64-bit builds. (cherry picked from commit ef26afcb88dcb5f2de79bfc3cf88a8ea10f230ec) commit 95fa0bee9314a878b3a58d748998c3b3ef42bd75 Author: Owen Pan <[email protected]> Date: Thu Aug 29 19:14:19 2024 -0700 [clang-format] Correctly identify token-pasted record names (#106484) See https://github.com/llvm/llvm-project/pull/89706#issuecomment-2315549955. (cherry picked from commit 7579787e05966f21684dd4b4a15b9deac13d09e1) commit 6d7e428df611861fb1f5151dea938ebfcc7b1363 Author: OverMighty <[email protected]> Date: Fri Aug 30 12:59:05 2024 +0200 [builtins] Fix missing main() function in float16/bfloat16 support checks (#104478) The CMake docs state that `check_c_source_compiles()` checks whether the supplied code "can be compiled as a C source file and linked as an executable (so it must contain at least a `main()` function)." https://cmake.org/cmake/help/v3.30/module/CheckCSourceCompiles.html In practice, this command is a wrapper around `try_compile()`: - https://gitlab.kitware.com/cmake/cmake/blob/2904ce00d2ed6ad5dac6d3459af62d8223e06ce0/Modules/CheckCSourceCompiles.cmake#L54 - https://gitlab.kitware.com/cmake/cmake/blob/2904ce00d2ed6ad5dac6d3459af62d8223e06ce0/Modules/Internal/CheckSourceCompiles.cmake#L101 When `CMAKE_SOURCE_DIR` is compiler-rt/lib/builtins/, `CMAKE_TRY_COMPILE_TARGET_TYPE` is set to `STATIC_LIBRARY`, so the checks for `float16` and `bfloat16` support work as intended in a Clang + compiler-rt runtime build for example, as it runs CMake recursively from that directory. However, when using llvm/ or compiler-rt/ as CMake source directory, as `CMAKE_TRY_COMPILE_TARGET_TYPE` defaults to `EXECUTABLE`, these checks will indeed fail if the code doesn't have a `main()` function. This results in LLVM using x86 SIMD registers when generating calls to builtins that, with Arch Linux's compiler-rt package for example, actually use a GPR for their argument or return value as they use `uint16_t` instead of `_Float16`. This had been caught in post-commit review: https://reviews.llvm.org/D145237#4521152. Use of the internal `CMAKE_C_COMPILER_WORKS` variable is not what hides the issue, however. PR #69842 tried to fix this by unconditionally setting `CMAKE_TRY_COMPILE_TARGET_TYPE` to `STATIC_LIBRARY`, but it apparently caused other issues, so it was reverted. This PR just adds a `main()` function in the checks, as per the CMake docs. (cherry picked from commit 68d8b3846ab1e6550910f2a9a685690eee558af2) commit f131edf6fbe8e2ab7306aba72698daa6153ec91e Author: Avi Kivity <[email protected]> Date: Mon Aug 26 17:56:45 2024 +0300 [Instrumentation] Fix EdgeCounts vector size in SetBranchWeights (#99064) (cherry picked from commit 46a4132e167aa44d8ec7776262ce2a0e6d47de59) commit 1ccd19c4b297e9a2bd1b2bb6bbb9d9ad2acbab40 Author: Owen Pan <[email protected]> Date: Fri Aug 30 19:23:45 2024 -0700 [clang-format] Correctly annotate braces in ObjC square brackets (#106654) See https://github.com/llvm/llvm-project/pull/88238#issuecomment-2316954781. (cherry picked from commit e0f2368cdeb7312973a92fb2d22199d1de540db8) commit 6f623478d48c171d59e95b25ea2aca49dca8f135 Author: Ties Stuij <[email protected]> Date: Tue Jul 23 14:09:34 2024 +0100 [libcxx] don't `#include <cwchar>` if wide chars aren't enabled (#99911) Pull request #96032 unconditionall adds the `cwchar` include in the `format` umbrella header. However support for wchar_t can be disabled in the build system (LIBCXX_ENABLE_WIDE_CHARACTERS). This patch guards against inclusion of `cwchar` in `format` by checking the `_LIBCPP_HAS_NO_WIDE_CHARACTERS` define. For clarity I've also merged the include header section that `cwchar` was in with the one above as they were both guarded by the same `#if` logic. (cherry picked from commit ec56790c3b27df4fa1513594ca9a74fd8ad5bf7f) commit e1be8cf8723e8577abaeef586ec4c39f30053913 Author: Orlando Cazalet-Hyams <[email protected]> Date: Wed Aug 28 14:20:33 2024 +0100 [RemoveDIs] Simplify spliceDebugInfo, fixing splice-to-end edge case (#105670) Not quite NFC, fixes splitBasicBlockBefore case when we split before an instruction with debug records (but without the headBit set, i.e., we are splitting before the instruction but after the debug records that come before it). splitBasicBlockBefore splices the instructions before the split point into a new block. Prior to this patch, the debug records would get shifted up to the front of the spliced instructions (as seen in the modified unittest - I believe the unittest was checking erroneous behaviour). We instead want to leave those debug records at the end of the spliced instructions. The functionality of the deleted `else if` branch is covered by the remaining `if` now that `DestMarker` is set to the trailing marker if `Dest` is `end()`. Previously the "===" markers were sometimes detached, now we always detach them and always reattach them. Note: `deleteTrailingDbgRecords` only "unlinks" the tailing marker from the block, it doesn't delete anything. The trailing marker is still cleaned up properly inside the final `if` body with `DestMarker->eraseFromParent();`. Part 1 of 2 needed for #105571 (cherry picked from commit f5815534d180c544bffd46f09c28b6fc334260fb) commit 894ec4e3a1d56a5dd5a8205b4fd734136db87cfd Author: Luke Shingles <[email protected]> Date: Thu Aug 29 11:09:07 2024 +0100 [analyzer] Add missing include <unordered_map> to llvm/lib/Support/Z3Solver.cpp (#106410) Resolves #106361. Adding #include <unordered_map> to llvm/lib/Support/Z3Solver.cpp fixes compilation errors for homebrew build on macOS with Xcode 14. https://github.com/Homebrew/homebrew-core/actions/runs/10604291631/job/29390993615?pr=181351 shows that this is resolved when the include is patched in (Linux CI failure is due to unrelated timeout). (cherry picked from commit fcb3a0485857c749d04ea234a8c3d629c62ab211) commit 03cc174e0307ec90091c31c621bd6cee4338c4da Author: Corentin Jabot <[email protected]> Date: Thu Aug 29 11:11:39 2024 +0200 Revert "[clang] fix broken canonicalization of DeducedTemplateSpecializationType (#95202)" This reverts commit 2e1ad93961a3f444659c5d02d800e3144acccdb4. Reverting #95202 in the 19.x branch Fixes #106182 The change in #95202 causes code to crash and there is no good way to backport a fix for that as there are ABI-impacting changes at play. Instead we revert #95202 in the 19x branch, fixing the regression and preserving the 18.x behavior (which is GCC's behavior) https://github.com/llvm/llvm-project/pull/106335#discussion_r1735174841 commit c8c66e01d83323a3db57fade24befb26b0e6fe84 Author: Chuanqi Xu <[email protected]> Date: Thu Aug 29 15:42:57 2024 +0800 [C++20] [Modules] Don't insert class not in named modules to PendingEmittingVTables (#106501) Close https://github.com/llvm/llvm-project/issues/102933 The root cause of the issue is an oversight in https://github.com/llvm/llvm-project/pull/102287 that I didn't notice that PendingEmittingVTables should only accept classes in named modules. (cherry picked from commit 47615ff2347a8be429404285de3b1c03b411e7af) commit 72a74e44ef6f27c10a2da55fa67bde22d52516c6 Author: Tom Stellard <[email protected]> Date: Wed Aug 28 22:18:08 2024 -0700 workflows/release-tasks: Pass required secrets to all called workflows (#106286) Called workflows don't have access to secrets by default, so we need to explicitly pass secrets that we use. (cherry picked from commit 9d81e7e36e33aecdee05fef551c0652abafaa052) commit bac3db3c8b41c921d8ec895a9dc89ce310a670cb Author: Owen Pan <[email protected]> Date: Wed Aug 28 18:23:54 2024 -0700 [clang-format] Revert "[clang-format][NFC] Delete TT_LambdaArrow (#70… (#105923) …519)" This reverts commit e00d32afb9d33a1eca48e2b041c9688436706c5b and adds a test for lambda arrow SplitPenalty. Fixes #105480. commit 491375504831aae3da85ffb288ca3c8b3c94b1ea Author: Joseph Huber <[email protected]> Date: Tue Aug 6 21:33:25 2024 -0500 Revert "[LinkerWrapper] Extend with usual pass options (#96704)" (#102226) This reverts commit 90ccf2187332ff900d46a58a27cb0353577d37cb. Fixes: https://github.com/llvm/llvm-project/issues/100212 (cherry picked from commit 030ee841a9c9fbbd6e7c001e751737381da01f7b) Conflicts: clang/test/Driver/linker-wrapper-passes.c commit f88180bbc489a587954adfce40cc5c90adc74962 Author: Krasimir Georgiev <[email protected]> Date: Wed Aug 28 13:45:17 2024 +0200 [clang-format] js handle anonymous classes (#106242) Addresses a regression in JavaScript when formatting anonymous classes. --------- Co-authored-by: Owen Pan <[email protected]> (cherry picked from commit 77d63cfd18aa6643544cf7acd5ee287689d54cca) commit 9ec54c307b6151b1ddb3f7fe3b7cba4d9309b26c Author: Owen Pan <[email protected]> Date: Tue Aug 27 19:13:27 2024 -0700 [clang-format] Fix misalignments of pointers in angle brackets (#106013) Fixes #105898. (cherry picked from commit 656d5aa95825515a55ded61f19d41053c850c82d) commit 32927ca57e805681fa93ed913c0f0d3c075563b7 Author: Alexander Richardson <[email protected]> Date: Tue Aug 27 15:37:24 2024 -0700 [compiler-rt] Fix definition of `usize` on 32-bit Windows 32-bit Windows uses `unsigned int` for uintptr_t and size_t. Commit 18e06e3e2f3d47433e1ed323b8725c76035fc1ac changed uptr to unsigned long, so it no longer matches the real size_t/uintptr_t and therefore the current definition of usize result in: `error C2821: first formal parameter to 'operator new' must be 'size_t'` However, the real problem is that uptr is wrong to work around the fact that we have local SIZE_T and SSIZE_T typedefs that trample on the basetsd.h definitions of the same name and therefore need to match exactly. Unlike size_t/ssize_t the uppercase ones always use unsigned long (even on 32-bit). This commit works around the build breakage by keeping the existing definitions of uptr/sptr and just changing usize. A follow-up change will attempt to fix this properly. Fixes: https://github.com/llvm/llvm-project/issues/101998 Reviewed By: mstorsjo Pull Request: https://github.com/llvm/llvm-project/pull/106151 (cherry picked from commit bb27dd853a713866c025a94ead8f03a1e25d1b6e) commit 6883c490e04a0f681b95e32eaa74aa82458bdb28 Author: Louis Dionne <[email protected]> Date: Tue Aug 27 14:22:25 2024 -0400 [libc++] Add missing include to three_way_comp_ref_type.h We were using a `_LIBCPP_ASSERT_FOO` macro without including `<__assert>`. rdar://134425695 (cherry picked from commit 0df78123fdaed39d5135c2e4f4628f515e6d549d) commit 52ab956704050302926e8afe1c7dbda4578acb9d Author: Younan Zhang <[email protected]> Date: Tue Aug 27 09:25:53 2024 +0800 [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (#89934) In the last patch #82310, we used template depths to tell if such alias decls contain lambdas, which is wrong because the lambda can also appear as a part of the default argument, and that would make `getTemplateInstantiationArgs` provide extra template arguments in undesired contexts. This leads to issue #89853. Moreover, our approach for https://github.com/llvm/llvm-project/issues/82104 was sadly wrong. We tried to teach `DeduceReturnType` to consider alias template arguments; however, giving these arguments in the context where they should have been substituted in a `TransformCallExpr` call is never correct. This patch addresses such problems by using a `RecursiveASTVisitor` to check if the lambda is contained by an alias `Decl`, as well as twiddling the lambda dependencies - we should also build a dependent lambda expression if the surrounding alias template arguments were dependent. Fixes #89853 Fixes #102760 Fixes #105885 (cherry picked from commit b412ec5d3924c7570c2c96106f95a92403a4e09b) commit 456006bc91c3d972f3c549b6296cad5e83630c7d Author: SpencerAbson <[email protected]> Date: Fri Aug 23 14:27:49 2024 +0100 [clang][AArch64] Add SME2.1 feature macros (#105657) (cherry picked from commit 2617023923175b0fd2a8cb94ad677c061c01627f) commit ed699666de2d82eab266bf41372175da73202834 Author: Zaara Syeda <[email protected]> Date: Thu Aug 22 09:55:46 2024 -0400 [PowerPC] Fix mask for __st[d/w/h/b]cx builtins (#104453) These builtins are currently returning CR0 which will have the format [0, 0, flag_true_if_saved, XER]. We only want to return flag_true_if_saved. This patch adds a shift to remove the XER bit before returning. (cherry picked from commit 327edbe07ab4370ceb20ea7c805f64950871d835) commit d9806ffe4e4d26de9c01f6b8ac0deae169b1d88d Author: Owen Pan <[email protected]> Date: Sat Aug 24 20:10:03 2024 -0700 [clang-format] Fix a misannotation of less/greater as angle brackets (#105941) Fixes #105877. (cherry picked from commit 0916ae49b89db6eb9eee9f6fee4f1a65fd9cdb74) commit 1b1ddb767e430a29c35c8b12760b7aa21f508d15 Author: Owen Pan <[email protected]> Date: Sat Aug 24 19:12:15 2024 -0700 [clang-format] Fix a misannotation of redundant r_paren as CastRParen (#105921) Fixes #105880. (cherry picked from commit 6bc225e0630f28e83290a43c3d9b25b057fc815a) commit 00ff55d61c765467e9a72c0fd570343d3cfb3b43 Author: Ian Anderson <[email protected]> Date: Thu Aug 22 13:44:58 2024 -0700 [libunwind] Stop installing the mach-o module map (#105616) libunwind shouldn't know that compact_unwind_encoding.h is part of a MachO module that it doesn't own. Delete the mach-o module map, and let whatever is in charge of the mach-o directory be the one to say how its module is organized and where compact_unwind_encoding.h fits in. (cherry picked from commit 172c4a4a147833f1c08df1555f3170aa9ccb6cbe) commit 09cca6b1897d501020c02769f9a937401f13e37a Author: Jay Foad <[email protected]> Date: Fri Aug 23 10:31:33 2024 +0100 [AMDGPU] Remove one case of vmcnt loop header flushing for GFX12 (#105550) When a loop contains a VMEM load whose result is only used outside the loop, do not bother to flush vmcnt in the loop head on GFX12. A wait for vmcnt will be required inside the loop anyway, because VMEM instructions can write their VGPR results out of order. (cherry picked from commit fa2dccb377d0b712223efe5b62e5fc633580a9e6) commit 441fb41cb487d286977b7e1cdabc3efe4c2010cf Author: Jay Foad <[email protected]> Date: Thu Aug 22 11:46:51 2024 +0100 [AMDGPU] GFX12 VMEM loads can write VGPR results out of order (#105549) Fix SIInsertWaitcnts to account for this by adding extra waits to avoid WAW dependencies. (cherry picked from commit 5506831f7bc8dc04ebe77f4d26940007bfb4ab39) commit daea6b9c40a1ee9d44f5658c182094147bb78340 Author: Jay Foad <[email protected]> Date: Thu Aug 22 11:42:57 2024 +0100 [AMDGPU] Add GFX12 test coverage for vmcnt flushing in loop headers (#105548) (cherry picked from commit 61194617ad7862f144e0f6db34175553e8c34763) commit 3f768dd6806aeca74bfdf21bde9135d96b137ef3 Author: Maciej Gabka <[email protected]> Date: Thu Aug 22 12:40:01 2024 +0000 Add release note about ABI implementation changes for _BitInt on Arm commit 45b149d2531948d2cc0e9d699a8e5371360a3bdf Author: Tim Gymnich <[email protected]> Date: Thu Aug 8 02:51:04 2024 +0200 [PowerPC] Respect endianness when bitcasting to fp128 (#95931) Fixes #92246 Match the behaviour of `bitcast v2i64 (BUILD_PAIR %lo %hi)` when encountering `bitcast fp128 (BUILD_PAIR %lo $hi)`. by inserting a missing swap of the arguments based on endianness. ### Current behaviour: **fp128** bitcast fp128 (BUILD_PAIR %lo $hi) => BUILD_FP128 %lo %hi BUILD_FP128 %lo %hi => MTVSRDD %hi %lo **v2i64** bitcast v2i64 (BUILD_PAIR %lo %hi) => BUILD_VECTOR %hi %lo BUILD_VECTOR %hi %lo => MTVSRDD %lo %hi (cherry picked from commit 408d82d352eb98e2d0a804c66d359cd7a49228fe) commit 40b076410194df3783b0c9cefa9f018fb190bdff Author: alx32 <[email protected]> Date: Wed Aug 14 19:30:41 2024 -0700 [lld-macho] Fix crash: ObjC category merge + relative method lists (#104081) A crash was happening when both ObjC Category Merging and Relative method lists were enabled. ObjC Category Merging creates new data sections and adds them by calling `addInputSection`. `addInputSection` uses the symbols within the added section to determine which container to actually add the section to. The issue is that ObjC Category merging is calling `addInputSection` before actually adding the relevant symbols the the added section. This causes `addInputSection` to add the `InputSection` to the wrong container, eventually resulting in a crash. To fix this, we ensure that ObjC Category Merging calls `addInputSection` only after the symbols have been added to the `InputSection`. (cherry picked from commit 0df91893efc752a76c7bbe6b063d66c8a2fa0d55) commit 78f97e22e5d87f9efc6b2c0ec76f60667458ca8a Author: Balazs Benics <[email protected]> Date: Wed Aug 21 14:24:56 2024 +0200 [analyzer] Limit `isTainted()` by skipping complicated symbols (#105493) As discussed in https://discourse.llvm.org/t/rfc-make-istainted-and-complex-symbols-friends/79570/10 Some `isTainted()` queries can blow up the analysis times, and effectively halt the analysis under specific workloads. We don't really have the time now to do a caching re-implementation of `isTainted()`, so we need to workaround the case. The workaround with the smallest blast radius was to limit what symbols `isTainted()` does the query (by walking the SymExpr). So far, the threshold 10 worked for us, but this value can be overridden using the "max-tainted-symbol-complexity" config value. This new option is "deprecated" from the getgo, as I expect this issue to be fixed within the next few months and I don't want users to override this value anyways. If they do, this message will let them know that they are on their own, and the next release may break them (as we no longer recognize this option if we drop it). Mitigates #89720 CPP-5414 (cherry picked from commit 848658955a9d2d42ea3e319d191e2dcd5d76c837) commit 54579830d81a67cfa52b90c34bcf9a631f53fcc5 Author: Kai Yan <[email protected]> Date: Mon Aug 5 17:44:05 2024 +0800 [llvm][CodeGen] Address the issue of multiple resource reservations In window scheduling (#101665) Address the issue of multiple resource reservations in window scheduling. commit 5a164a28e37fe3cda99236595167f7762b47c76d Author: Kai Yan <[email protected]> Date: Wed Jul 24 12:06:10 2024 +0800 [llvm][CodeGen] Fixed max cycle calculation with zero-cost instructions for window scheduler (#99454) We discovered some scheduling failures occurring when zero-cost instructions were involved. This issue will be addressed by this patch. commit 06d009789f771e8cef82714549c3136e320312be Author: Kai Yan <[email protected]> Date: Thu Jul 25 19:16:23 2024 +0800 [llvm][CodeGen] Fixed a bug in stall cycle calculation for window scheduler (#99451) Fixed a bug in stall cycle calculation. When a register defined by an instruction in the current iteration is used by an instruction in the next iteration, we have modified the number of stall cycle that need to be inserted. commit 7b86034dcb8c7fd7ea125cec43f0117cd4a428b6 Author: Kai Yan <[email protected]> Date: Wed Jul 24 12:11:58 2024 +0800 [llvm][CodeGen] Added a new restriction for II by pragma in window scheduler (#99448) Added a new restriction for window scheduling. Window scheduling is disabled when llvm.loop.pipeline.initiationinterval is set. commit e81188d58202ee7b887e48bc3e4b102fc5f45619 Author: Kai Yan <[email protected]> Date: Wed Jul 24 12:06:35 2024 +0800 [llvm][CodeGen] Added missing initialization failure information for window scheduler (#99449) Added missing initialization failure information for window scheduler. commit 816fde1cbb700ebcc8b3df81fb93d675c04c12cd Author: Michał Górny <[email protected]> Date: Thu Aug 29 20:57:25 2024 +0200 [clang] Install scan-build-py into plain "lib" directory (#106612) Install scan-build-py modules into the plain `lib` directory, without LLVM_LIBDIR_SUFFIX appended, to match the path expected by `intercept-build` executable. This fixes the program being unable to find its modules. Using unsuffixed path makes sense here, since Python modules are not subject to multilib. This change effectively reverts 1334e129a39cb427e7b855e9a711a3e7604e50e5. The commit in question changed the path without a clear justification ("does not respect the given prefix") and the Python code was never modified to actually work with the change. Fixes #106608 (cherry picked from commit 0c4cf79defe30d43279bf4526cdf32b6c7f8a197) commit c21b039178b2efd17bc4eef906ab7b3a07cab288 Author: Tom Stellard <[email protected]> Date: Fri Aug 30 19:46:33 2024 -0700 workflows/release-binaries: Remove .git/config file from artifacts (#106310) The .git/config file contains an auth token that can be leaked if the .git directory is included in a workflow artifact. (cherry picked from commit ef50970204384643acca42ba4c7ca8f14865a0c2) commit eba1ef5a1b7a84ed1954797dcd6d6f073b1f1a56 Author: Ahmed Bougacha <[email protected]> Date: Thu Aug 29 09:50:44 2024 -0700 [AArch64] Make apple-m4 armv8.7-a again (from armv9.2-a). (#106312) This is a partial revert of c66e1d6f3429. Even though that allowed us to declare v9.2-a support without picking up SVE2 in both the backend and the driver, the frontend itself still enabled SVE via the arch version's default extensions. Avoid that by reverting back to v8.7-a while we look into longer-term solutions. (cherry picked from commit e5e38ddf1b8043324175868831da21e941c00aff) commit 1b643dbad74986718460f28347cbd17085402383 Author: Hans <[email protected]> Date: Thu Aug 29 13:54:30 2024 +0200 Restrict LLVM_TARGETS_TO_BUILD in Windows release packaging (#106059) When including all targets, some files become too large for the NSIS installer to handle. Fixes #101994 (cherry picked from commit 2a28df66dc3f7ff5b6233241837854acefb68d77) commit 53c43bab2077644ecf152bebffd921572e418692 Author: Nathan Ridge <[email protected]> Date: Sun Aug 25 02:10:45 2024 -0400 [clangd] Add clangd 19 release notes commit 5f744ee5c770d7332740bb6247f961e7d99ee359 Author: Dan Gohman <[email protected]> Date: Thu Aug 22 08:13:20 2024 -0700 [DwarfEhPrepare] Assign dummy debug location for more inserted _Unwind_Resume calls (#105513) Similar to the fix for #57469, ensure that the other `_Unwind_Resume` call emitted by DwarfEHPrepare has a debug location if needed. This fixes https://github.com/nbdd0121/unwinding/issues/34. (cherry picked from commit e76db25832d6ac2d3a36769b26f982d9dee4b346) commit cfe8eb89cbb8b8d873579123555a5238d9ad502c Author: Simon Pilgrim <[email protected]> Date: Thu Aug 1 16:08:33 2024 +0100 [MCA][X86] Add missing 512-bit vpscatterqd/vscatterqps schedule data (REAPPLIED) This doesn't match uops.info yet - but it matches the existing vpscatterdq/vscatterqpd entries like uops.info says it should Reapplied with codegen fix for scatter-schedule.ll Fixes #105675 (cherry picked from commit cf6cd1fd67356ca0c2972992928592d2430043d2) commit 3ff9d92aae0945daa85ec6f85f05a3aeaaa9f962 Author: Yingwei Zheng <[email protected]> Date: Fri Aug 23 16:06:00 2024 +0800 [ConstraintElim] Fix miscompilation caused by PR97974 (#105790) Fixes https://github.com/llvm/llvm-project/issues/105785. (cherry picked from commit 85b6aac7c25f9d2a976a76045ace1e7afebb5965) commit 1241c762c165972690c4edfb82ec7421c1e64658 Author: Owen Pan <[email protected]> Date: Thu Aug 22 20:02:48 2024 -0700 [clang-format] Don't insert a space between :: and * (#105043) Also, don't insert a space after ::* for method pointers. See https://github.com/llvm/llvm-project/pull/86253#issuecomment-2298404887. Fixes #100841. (cherry picked from commit 714033a6bf3a81b1350f969ddd83bcd9fbb703e8) commit 1503d18171e569996bf3e107364b1f0fd5f750e9 Author: Simon Pilgrim <[email protected]> Date: Tue Aug 20 11:11:33 2024 +0100 [X86] Use correct fp immediate types in _mm_set_ss/sd Avoids implicit sint_to_fp which wasn't occurring on strict fp codegen Fixes #104848 (cherry picked from commit 6dcce422ca06601f2b00e85cc18c745ede245ca6) commit b6a562d90fa08543171bafbb9c897c03f6cf691f Author: Björn Pettersson <[email protected]> Date: Wed Aug 21 17:56:27 2024 +0200 [DAGCombiner] Fix ReplaceAllUsesOfValueWith mutation bug in visitFREEZE (#104924) In visitFREEZE we have been collecting a set/vector of MaybePoisonOperands that later was iterated over, applying a freeze to those operands. However, C-level fuzzy testing has discovered that the recursiveness of ReplaceAllUsesOfValueWith may cause later operands in the MaybePoisonOperands vector to be replaced when replacing an earlier operand. That would then turn up as Assertion `N1.getOpcode() != ISD::DELETED_NODE && "Operand is DELETED_NODE!"' failed. failures when trying to freeze those later operands. So we need to make sure that the vector with MaybePoisonOperands is mutated as well when needed. Or as the solution used in this patch, make sure to keep track of operand numbers that should be frozen instead of having a vector of SDValues. And then we can refetch the operands while iterating over operand numbers. The problem was seen after adding SELECT_CC to the set of operations including in "AllowMultipleMaybePoisonOperands". I'm not sure, but I guess that this could happen for other operations as well for which we allow multiple maybe poison operands. (cherry picked from commit 278fc8efdf004a1959a31bb4c208df5ee733d5c8) commit 43b455b2d2e5107e19d7d47e77ba513d1f9f5e2f Author: Carl Ritson <[email protected]> Date: Sat Aug 17 16:52:38 2024 +0900 [AMDGPU] Disable inline constants for pseudo scalar transcendentals (#104395) Prevent operand folding from inlining constants into pseudo scalar transcendental f16 instructions. However still allow literal constants. (cherry picked from commit fc6300a5f7ef430e4ec86d16be0b146de7fbd16b) commit 38f3dbefab0a4965abad99aa23eced96d5d8dc16 Author: Bryce Kahle <[email protected]> Date: Tue Aug 20 12:25:33 2024 -0700 use default intrinsic attrs for BPF packet loads The BPF packet load intrinsics lost attribute WillReturn due to 0b20c30. The attribute loss causes excessive bitshifting, resulting in previously working programs failing the BPF verifier due to instruction/complexity limits. cherry picked only the BPF changes from 99a10f1 Signed-off-by: Bryce Kahle <[email protected]> commit 6420a2ea06b6fc21547907eb447035be3e2b6b16 Author: Amy Kwan <[email protected]> Date: Tue Aug 20 10:30:09 2024 -0500 Add AIX/PPC Clang/LLVM release notes for LLVM 19. commit 8ea372d8b628b0a11016f5282d47c372e3843b93 Author: Koakuma <[email protected]> Date: Tue Aug 20 20:05:06 2024 +0700 [SPARC] Remove assertions in printOperand for inline asm operands (#104692) Inline asm operands could contain any kind of relocation, so remove the checks. Fixes https://github.com/llvm/llvm-project/issues/103493 (cherry picked from commit 576b7a781aac6b1d60a72248894b50e565e9185a) commit 9dc4bdf9fd1e4be051fe19998d64230d999b777d Author: Ian Anderson <[email protected]> Date: Tue Aug 20 03:29:11 2024 -0700 [clang][modules] Built-in modules are not correctly enabled for Mac Catalyst (#104872) Mac Catalyst is the iOS platform, but it builds against the macOS SDK and so it needs to be checking the macOS SDK version instead of the iOS one. Add tests against a greater-than SDK version just to make sure this works beyond the initially supporting SDKs. (cherry picked from commit b9864387d9d00e1d4888181460d05dbc92364d75) commit 9301cd5b57c09214256edf19753e2e047a5b5f91 Author: Rainer Orth <[email protected]> Date: Tue Jul 30 10:06:45 2024 +0200 [sanitizer_common] Make sanitizer_linux.cpp kernel_stat* handling Linux-specific fcd6bd5587cc376cd8f43b60d1c7d61fdfe0f535 broke the Solaris/sparcv9 buildbot: ``` compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:39:14: fatal error: 'asm/unistd.h' file not found 39 | # include <asm/unistd.h> | ^~~~~~~~~~~~~~ ``` That section should have been Linux-specific in the first place, which is what this patch does. Tested on sparcv9-sun-solaris2.11. (cherry picked from commit 16e9bb9cd7f50ae2ec7f29a80bc3b95f528bfdbf) commit 437434df21d839becb453f6821564662e9824f02 Author: Tobias Hieta <[email protected]> Date: Tue Aug 20 10:06:55 2024 +0200 Bump version to 19.1.0-rc3 commit 72d2932da5a7c70885a1fdfaa809ff1ede0984ff Author: John Brawn <[email protected]> Date: Thu Aug 8 11:20:09 2024 +0100 [libunwind] Fix problems caused by combining BTI and GCS (#102322) The libunwind assembly files need adjustment in order to work correctly when both BTI and GCS are both enabled (which will be the case when using -mbranch-protection=standard): * __libunwind_Registers_arm64_jumpto can't use br to jump to the return location, instead we need to use gcspush then ret. * Because we indirectly call __libunwind_Registers_arm64_jumpto it needs to start with bti jc. * We need to set the GCS GNU property bit when it's enabled. --------- Co-authored-by: Daniel Kiss <[email protected]> (cherry picked from commit 39529107b46032ef0875ac5b809ab5b60cd15a40) commit c3da16b094511e42022e534b5eb665dbc3f8db0f Author: John Brawn <[email protected]> Date: Mon Aug 5 18:54:05 2024 +0100 [libunwind] Be more careful about enabling GCS (#101973) We need both GCS to be enabled by the compiler (which we do by checking if __ARM_FEATURE_GCS_DEFAULT is defined) and for arm_acle.h to define the GCS intrinsics. Check the latter by checking if _CHKFEAT_GCS is defined. (cherry picked from commit c649194a71b47431f2eb2e041435d564e3b51072) commit 7e7e8125cfabf7daf5de63612e6f2c646dd8cad3 Author: John Brawn <[email protected]> Date: Sun Aug 4 13:27:12 2024 +0100 [libunwind] Add GCS support for AArch64 (#99335) AArch64 GCS (Guarded Control Stack) is similar enough to CET that we can re-use the existing code that is guarded by _LIBUNWIND_USE_CET, so long as we also add defines to locate the GCS stack and pop the entries from it. We also need the jumpto function to exit using br instead of ret, to prevent it from popping the GCS stack. GCS support is enabled using the LIBUNWIND_ENABLE_GCS cmake option. This enables -mbranch-protection=standard, which enables GCS. For the places we need to use GCS instructions we use the target attribute, as there's not a command-line option to enable a specific architecture extension. (cherry picked from commit b32aac4358c1f6639de7c453656cd74fbab75d71) commit 64b8514e6c1a663660fbb93ec7f623b3e40a2020 Author: Chuanqi Xu <[email protected]> Date: Thu Aug 8 13:14:09 2024 +0800 Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (#102287) Reland https://github.com/llvm/llvm-project/pull/75912 The differences of this PR between https://github.com/llvm/llvm-project/pull/75912 are: - Fixed a regression in `Decl::isInAnotherModuleUnit()` in DeclBase.cpp pointed by @mizvekov and add the corresponding test. - Fixed the regression in windows https://github.com/llvm/llvm-project/issues/97447. The changes are in `CodeGenModule::getVTableLinkage` from `clang/lib/CodeGen/CGVTables.cpp`. According to the feedbacks from MSVC devs, the linkage of vtables won't affected by modules. So I simply skipped the case for MSVC. Given this is more or less fundamental to the use of modules. I hope we can backport this to 19.x. (cherry picked from commit 847f9cb0e868c8ec34f9aa86fdf846f8c4e0388b) commit 3ffa5421ca657c04d4df170307c1f9a3c6293003 Author: Aaron Ballman <[email protected]> Date: Mon Aug 19 16:54:12 2024 -0400 [C++23] Fix infinite recursion (Clang 19.x regression) (#104829) d469794d0cdfd2fea50a6ce0c0e33abb242d744c was fixing an issue with triggering vtable instantiations, but it accidentally introduced infinite recursion when the type to be checked is the same as the type used in a base specifier or field declaration. Fixes #104802 (cherry picked from commit 435cb0dc5eca08cdd8d9ed0d887fa1693cc2bf33) commit 6dbc0e236b3e3a651302d079d1c64934976bc0b3 Author: Martin Storsjö <[email protected]> Date: Sun Aug 18 00:44:16 2024 +0300 [LLD] [MinGW] Recognize the -rpath option (#102886) GNU ld silently accepts the -rpath option for Windows targets, as a no-op. This has lead to some build systems (and users) passing this option while building for Windows/MinGW, even if Windows doesn't have any concept like rpath. Older versions of Conan did include -rpath in the pkg-config files it generated, see e.g. https://github.com/conan-io/conan/blob/17c58f0c61931f9de218ac571cd97a8e0befa68e/conans/client/generators/pkg_config.py#L104-L114 and https://github.com/conan-io/conan/blob/17c58f0c61931f9de218ac571cd97a8e0befa68e/conans/client/build/compiler_flags.py#L26-L34 - and see https://github.com/mstorsjo/llvm-mingw/issues/300 for user reports about this issue. Recognize the option in LLD for MinGW targets, to improve drop-in compatibility compared to GNU ld, but produce a warning to alert users that the option really has no effect for these targets. (cherry picked from commit 69f76c782b554a004078af6909c19a11e3846415) commit c1336c9e3bd6c0887ead386043c547b3a3ed76a9 Author: David Green <[email protected]> Date: Mon Aug 19 18:50:47 2024 +0100 [GlobalISel] Bail out early for big-endian (#103310) If we continue through the function we can currently hit crashes. We can bail out early and fall back to SDAG. Fixes #103032 (cherry picked from commit 05d17a1c705e1053f95b90aa37d91ce4f94a9287) commit 263965ebe237e2f82d714a12a8c9338b46237a33 Author: Tomas Matheson <[email protected]> Date: Sat Aug 17 13:36:40 2024 +0100 [AArch64] Add a check for invalid default features (#104435) This adds a check that all ExtensionWithMArch which are marked as implied features for an architecture are also present in the list of default features. It doesn't make sense to have something mandatory but not on by default. There were a number of existing cases that violated this rule, and some changes to which features are mandatory (indicated by the Implies field). This resulted in a bug where if a feature was marked as `Implies` but was not added to `DefaultExt`, then for `-march=base_arch+nofeat` the Driver would consider `feat` to have never been added and therefore would do nothing to disable it (no `-target-feature -feat` would be added, but the backend would enable the feature by default because of `Implies`). See clang/test/Driver/aarch64-negative-modifiers-for-default-features.c. Note that the processor definitions do not respect the architecture DefaultExts. These apply only when specifying `-march=<some architecture version>`. So when a feature is moved from `Implies` to `DefaultExts` on the Architecture definition, the feature needs to be added to all processor definitions (that are based on that architecture) in order to preserve the existing behaviour. I have checked the TRMs for many cases (see specific commit messages) but in other cases I have just kept the current behaviour and not tried to fix it. commit bb46c721211b901f7ab34551e4bb240308203da9 Author: Vladislav Khmelevsky <[email protected]> Date: Sat Jul 27 23:07:59 2024 +0400 release/19.x: [BOLT] Fix relocations handling Backport https://github.com/llvm/llvm-project/commit/097ddd3565f830e6cb9d0bb8ca66844b7f3f3cbb commit 8595e91b16dadc33fbb321cfd30b77f43f64e10e Author: Anton Korobeynikov <[email protected]> Date: Fri Aug 16 18:09:53 2024 -0700 Add some brief LLVM 19 release notes for Pointer Authentication ABI support. commit 9545ef53ebe8be2a53ef6f84626f52bed73c82ba Author: Craig Topper <[email protected]> Date: Fri Aug 16 14:54:51 2024 -0700 [Mips] Fix fast isel for i16 bswap. (#103398) We need to mask the SRL result to 8 bits before ORing in the SLL. This is needed in case bits 23:16 of the input aren't zero. They will have been shifted into bits 15:8. We don't need to AND the result with 0xffff. It's ok if the upper 16 bits of the register are garbage. Fixes #103035. (cherry picked from commit ebe7265b142f370f0a563fece5db22f57383ba2d) commit 6fcbfb8ebc9650a2ea184aac244d067efdbe441e Author: Sharadh Rajaraman <[email protected]> Date: Mon Aug 19 12:17:58 2024 +0100 [clang][driver] `TY_ModuleFile` should be a 'CXX' file type commit 38a591de66a86aaf523f78f8266a2d5f01a1b106 Author: Tulio Magno Quites Machado Filho <[email protected]> Date: Tue Aug 13 15:34:41 2024 -0300 [OpenMP][AArch64] Fix branch protection in microtasks (#102317) Start __kmp_invoke_microtask with PACBTI in order to identify the function as a valid branch target. Before returning, SP is authenticated. Also add the BTI and PAC markers to z_Linux_asm.S. With this patch, libomp.so can now be generated with DT_AARCH64_BTI_PLT when built with -mbranch-protection=standard. The implementation is based on the code available in compiler-rt. (cherry picked from commit 0aa22dcd2f6ec5f46b8ef18fee88066463734935) commit 6e3026883d77124e32a2a7be72c3361fba3e7457 Author: Mariya Podchishchaeva <[email protected]> Date: Mon Aug 12 09:08:46 2024 +0200 [clang] Avoid triggering vtable instantiation for C++23 constexpr dtor (#102605) In C++23 anything can be constexpr, including a dtor of a class whose members and bases don't have constexpr dtors. Avoid early triggering of vtable instantiation int this case. Fixes https://github.com/llvm/llvm-project/issues/102293 (cherry picked from commit d469794d0cdfd2fea50a6ce0c0e33abb242d744c) commit 8fbe69a407b2784c7e9d91a3c69daa9786b14391 Author: Hari Limaye <[email protected]> Date: Tue Aug 6 11:39:01 2024 +0100 [AArch64] Add streaming-mode stack hazard optimization remarks (#101695) Emit an optimization remark when objects in the stack frame may cause hazards in a streaming mode function. The analysis requires either the `aarch64-stack-hazard-size` or `aarch64-stack-hazard-remark-size` flag to be set by the user, with the former flag taking precedence. (cherry picked from commit a98a0dcf63f54c54c5601a34c9f8c10cde0162d6) commit b45f75295e3038ef79dce4ac63fbf95b659eebe5 Author: Piotr Zegar <[email protected]> Date: Thu Jul 25 17:26:01 2024 +0200 [clang-tidy] Fix crash in C language in readability-non-const-parameter (#100461) Fix crash that happen when redeclaration got different number of parameters than definition. Fixes #100340 (cherry picked from commit a27f816fe56af9cc7f4f296ad6c577f6ea64349f) commit 90f2d48965ca8a27f4b814ada987d169ca6a6f44 Author: Louis Dionne <[email protected]> Date: Fri Aug 16 11:08:34 2024 -0400 [libc++] Fix rejects-valid in std::span copy construction (#104500) Trying to copy-construct a std::span from another std::span holding an incomplete type would fail as we evaluate the SFINAE for the range-based constructor. The problem was that we checked for __is_std_span after checking for the range being a contiguous_range, which hard-errored because of arithmetic on a pointer to incomplete type. As a drive-by, refactor the whole test and format it. Fixes #104496 (cherry picked from commit 99696b35bc8a0054e0b0c1a26e8dd5049fa8c41b) commit 02cafa895c917a4b1726e64a5870877c95826be4 Author: Spencer Abson <[email protected]> Date: Fri Aug 16 14:39:43 2024 +0000 [AArch64] Adopt updated B16B16 target flags The enablement of SVE/SME non-widening BFloat16 instructions was recently changed in response to an architecture update, in which: - FEAT_SVE_B16B16 was weakened - FEAT_SME_B16B16 was introduced New flags, 'sve-b16b16' and 'sme-b16b16' were introduced to replace the existing 'b16b16'. This was acheived in the below two patches. - https://github.com/llvm/llvm-project/pull/101480 - https://github.com/llvm/llvm-project/pull/102501 Ideally, the interface change introduced here will be valid in LLVM-19. We do not see it necessary to back-port the entire change, but just to add 'sme-b16b16' and 'sve-b16b16' as aliases to the existing (and unchanged) 'b16b16' and 'sme2' flags which together cover all of these features. The predication of Bf16 variants of svmin/svminnm and svmax/svmaxnm is also fixed in this change. commit 9e90c40564e21dc5f1a12e08cfdf29305aaf9f50 Author: Gulfem Savrun Yeniceri <[email protected]> Date: Tue Jul 23 11:06:30 2024 +0000 Revert "[CGData] llvm-cgdata (#89884)" This reverts commit d3fb41dddc11b0ebc338a3b9e6a5ab7288ff7d1d and forward fix patches because of the issue explained in: https://github.com/llvm/llvm-project/pull/89884#issuecomment-2244348117. Revert "Fix tests for https://github.com/llvm/llvm-project/pull/89884 (#100061)" …
* [Metadata] Try to merge the first and last ranges. (#101860) Fixes #101859. If we have at least 2 ranges, we have to try to merge the last and first ones to handle the wrap range. (cherry picked from commit 4377656f2419a8eb18c01e86929b689dcf22b5d6) * InferAddressSpaces: Fix mishandling stores of pointers to themselves (#101877) (cherry picked from commit 3c483b887e5a32a0ddc0a52a467b31f74aad25bb) * [ARM] [Windows] Use IMAGE_SYM_CLASS_STATIC for private functions (#101828) For functions with private linkage, pick IMAGE_SYM_CLASS_STATIC rather than IMAGE_SYM_CLASS_EXTERNAL; GlobalValue::isInternalLinkage() only checks for InternalLinkage, while GlobalValue::isLocalLinkage() checks for both InternalLinkage and PrivateLinkage. This matches what the AArch64 target does, since commit 3406934e4db4bf95c230db072608ed062c13ad5b. This activates a preexisting fix for the AArch64 target from 1e7f592a890aad860605cf5220530b3744e107ba, for the ARM target as well. When a relocation points at a symbol, one usually can convey an offset to the symbol by encoding it as an immediate in the instruction. However, for the ARM and AArch64 branch instructions, the immediate stored in the instruction is ignored by MS link.exe (and lld-link matches this aspect). (It would be simple to extend lld-link to support it - but such object files would be incompatible with MS link.exe.) This was worked around by 1e7f592a890aad860605cf5220530b3744e107ba by emitting symbols into the object file symbol table, for temporary symbols that otherwise would have been omitted, if they have the class IMAGE_SYM_CLASS_STATIC, in order to avoid needing an offset in the relocated instruction. This change gives the symbols generated from functions with the IR level "private" linkage the right class, to activate that workaround. This fixes https://github.com/llvm/llvm-project/issues/100101, fixing code generation for coroutines for Windows on ARM. After the change in f78688134026686288a8d310b493d9327753a022, coroutines generate a function with private linkage, and calls to this function were previously broken for this target. (cherry picked from commit 8dd065d5bc81b0c8ab57f365bb169a5d92928f25) * Forward declare OSSpinLockLock on MacOS since it's not shipped on the system. (#101392) Fixes build errors on some SDKs. rdar://132607572 (cherry picked from commit 3a4c7cc56c07b2db9010c2228fc7cb2a43dd9b2d) * ReleaseNotes: lld/ELF: mention CREL * Bump version to 19.1.0-rc2 * [sanitizer_common][test] Fix SanitizerIoctl/KVM_GET_* tests on Linux/… (#100532) …sparc64 Two ioctl tests `FAIL` on Linux/sparc64 (both 32 and 64-bit): ``` SanitizerCommon-Unit :: ./Sanitizer-sparc-Test/SanitizerIoctl/KVM_GET_LAPIC SanitizerCommon-Unit :: ./Sanitizer-sparc-Test/SanitizerIoctl/KVM_GET_MP_STATE ``` like ``` compiler-rt/lib/sanitizer_common/tests/./Sanitizer-sparc-Test --gtest_filter=SanitizerIoctl.KVM_GET_LAPIC -- compiler-rt/lib/sanitizer_common/tests/sanitizer_ioctl_test.cpp:91: Failure Value of: res Actual: false Expected: true compiler-rt/lib/sanitizer_common/tests/sanitizer_ioctl_test.cpp:92: Failure Expected equality of these values: ioctl_desc::WRITE Which is: 2 desc.type Which is: 1 ``` The problem is that Linux/sparc64, like Linux/mips, uses a different layout for the `ioctl` `request` arg than most other Linux targets as can be seen in `sanitizer_platform_limits_posix.h` (`IOC_*`). Therefore, this patch makes the tests use the correct one. Tested on `sparc64-unknown-linux-gnu` and `x86_64-pc-linux-gnu`. (cherry picked from commit 9eefe065bb2752b0db9ed553d2406e9a15ce349e) * [sanitizer_common] Don't use syscall(SYS_clone) on Linux/sparc64 (#100534) ``` SanitizerCommon-Unit :: ./Sanitizer-sparc-Test/SanitizerCommon/StartSubprocessTest ``` and every single test using the `llvm-symbolizer` `FAIL` on Linux/sparc64 in a very weird way: when using `StartSubprocess`, there's a call to `internal_fork`, but we never reach `internal_execve`. `internal_fork` is implemented using `syscall(SYS_clone)`. The calling convention of that syscall already varies considerably between targets, but as documented in `clone(2)`, SPARC again is widely different. Instead of trying to match `glibc` here, this patch just calls `__fork`. Tested on `sparc64-unknown-linux-gnu` and `x86_64-pc-linux-gnu`. (cherry picked from commit 1c53b907bd6348138a59da270836fc9b4c161a07) * [sanitizer_common] Adjust signal_send.cpp for Linux/sparc64 (#100538) ``` SanitizerCommon-ubsan-sparc-Linux :: Linux/signal_send.cpp ``` currently `FAIL`s on Linux/sparc64 (32 and 64-bit). Instead of the expected values for `SIGUSR1` (`10`) and `SIGUSR1` (`12`), that target uses `30` and `31`. On Linux/x86_64, the signals get their values from `x86_64-linux-gnu/bits/signum-generic.h`, to be overridden in `x86_64-linux-gnu/bits/signum.h`. On Linux/sparc64 OTOH, the definitions are from `sparc64-linux-gnu/bits/signum-arch.h` and remain that way. There's no `signum.h` at all. The patch allows for both values. Tested on `sparc64-unknown-linux-gnu` and `x86_64-pc-linux-gnu`. (cherry picked from commit 7cecbdfe4eac3fd7268532426fb6b13e51b8720d) * [sanitizer_common] Fix internal_*stat on Linux/sparc64 (#101012) ``` SanitizerCommon-Unit :: ./Sanitizer-sparcv9-Test/SanitizerCommon/FileOps ``` `FAIL`s on 64-bit Linux/sparc64: ``` projects/compiler-rt/lib/sanitizer_common/tests/./Sanitizer-sparcv9-Test --gtest_filter=SanitizerCommon.FileOps -- compiler-rt/lib/sanitizer_common/tests/sanitizer_libc_test.cpp:144: Failure Expected equality of these values: len1 + len2 Which is: 10 fsize Which is: 1721875535 ``` The issue is similar to the mips64 case: the Linux/sparc64 `*stat` syscalls take a `struct kernel_stat64 *` arg. Also the syscalls actually used differ. This patch handles this, adopting the mips64 code to avoid too much duplication. Tested on `sparc64-unknown-linux-gnu` and `x86_64-pc-linux-gnu`. (cherry picked from commit fcd6bd5587cc376cd8f43b60d1c7d61fdfe0f535) * [ADT] Add `<cstdint>` to SmallVector (#101761) SmallVector uses `uint32_t`, `uint64_t` without including `<cstdint>` which fails to build w/ GCC 15 after a change in libstdc++ [0] [0] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3a817a4a5a6d94da9127af3be9f84a74e3076ee2 (cherry picked from commit 7e44305041d96b064c197216b931ae3917a34ac1) * [libc++][bit] Improves rotate functions. (#98032) Investigating #96612 shows our implementation was different from the Standard and could cause UB. Testing the codegen showed quite a bit of assembly generated for these functions. The functions have been written differently which allows Clang to optimize the code to use simple CPU rotate instructions. Fixes: https://github.com/llvm/llvm-project/issues/96612 * [AArch64] Avoid inlining if ZT0 needs preserving. (#101343) Inlining may result in different behaviour when the callee clobbers ZT0, because normally the call-site will have code to preserve ZT0. When inlining the function this code to preserve ZT0 will no longer be emitted, and so the resulting behaviour of the program is changed. (cherry picked from commit fb470db7b3a8ce6853e8bf17d235617a2fa79434) * [AArch64] Avoid NEON dot product in streaming[-compatible] functions (#101677) The NEON dot product is not valid in streaming mode. A follow-up patch will improve codegen for these operations. (cherry picked from commit 12937b1bfb23cca4731fa274f3358f7286cc6784) * [AArch64][SME] Rewrite __arm_sc_memset to remove invalid instruction (#101522) The implementation of __arm_sc_memset in compiler-rt contains a Neon dup instruction which is not valid in streaming mode. This patch rewrites the function, using an SVE mov instruction if available. (cherry picked from commit d6649f2d4871c4535ae0519920e36100748890c4) * [LLVM][TTI][SME] Allow optional auto-vectorisation for streaming functions. (#101679) The command line option enable-scalable-autovec-in-streaming-mode is used to enable scalable vectors but the same check is missing from enableScalableVectorization, which is blocking auto-vectorisation. (cherry picked from commit 7775a4882d7105fde7f7a81f3c72567d39afce45) * [Driver] Restrict Ofast deprecation help message to Clang (#101682) The discussion about this in Flang (https://discourse.llvm.org/t/rfc-deprecate-ofast-in-flang/80243) has not concluded hence restricting the deprecation only to Clang. (cherry picked from commit e60ee1f2d70bdb0ac87b09ae685d669d8543b7bd) * [Clang] SFINAE on mismatching pack length during constraint satisfaction checking (#101879) If a fold expanded constraint would expand packs of different size, it is not a valid pack expansion and it is not satisfied. This should not produce an error. Fixes #99430 (cherry picked from commit da380b26e4748ade5a8dba85b7df5e1c4eded8bc) * [Driver] Temporarily probe aarch64-linux-gnu GCC installation As the comment explains, `*Triples[]` lists are discouraged and not comprehensive anyway (e.g. aarch64-unknown-linux-gnu/aarch64-unknown-linux-musl/aarch64-amazon-linux do not work). Boost incorrectly specifies --target=arm64-pc-linux ("arm64" should not be used for Linux) and expects to probe "aarch64-linux-gnu". Add this temporary workaround for the 19.x releases. * workflows/release-tasks: Add missing permissions for release binaries (#102023) Now that the release binaries create artifact attestations, we need to ensure that we call the workflow with the correct permissions. (cherry picked from commit dc349a3f47882cdac7112c763d2964b59e77356a) * workflows/release-binaries: Give attestation artifacts a unique name (#102041) We need a different attestation for each supported architecture, so there artifacts all need to have a different name. The upload step is run on a Linux runner, so no matter which architecture's binary is being uploaded the runner.os and runner.arch variables would always be 'Linux' and 'X64' and so we can't use them for naming the artifact. (cherry picked from commit 3c8dadda3aa20b89fb5ad29ae31380d9594c3430) * [BinaryFormat] Disable MachOTest.UnalignedLC on SPARC (#100086) As discussed in Issue #86793, the `MachOTest.UnalignedLC` test dies with `SIGBUS` on SPARC, a strict-alignment target. It simply cannot work there. Besides, the test invokes undefined behaviour on big-endian targets, so this patch disables it on all of those. Tested on `sparcv9-sun-solaris2.11` and `amd64-pc-solaris2.11`. (cherry picked from commit 3a226dbe27ac7c7d935bc0968e84e31798a01207) * [LLDB] Add `<cstdint>` to AddressableBits (#102110) (cherry picked from commit bb59f04e7e75dcbe39f1bf952304a157f0035314) * [LAA] Refine stride checks for SCEVs during dependence analysis. (#99577) Update getDependenceDistanceStrideAndSize to reason about different combinations of strides directly and explicitly. Update getPtrStride to return 0 for invariant pointers. Then proceed by checking the strides. If either source or sink are not strided by a constant (i.e. not a non-wrapping AddRec) or invariant, the accesses may overlap with earlier or later iterations and we cannot generate runtime checks to disambiguate them. Otherwise they are either loop invariant or strided. In that case, we can generate a runtime check to disambiguate them. If both are strided by constants, we proceed as previously. This is an alternative to https://github.com/llvm/llvm-project/pull/99239 and also replaces additional checks if the underlying object is loop-invariant. Fixes https://github.com/llvm/llvm-project/issues/87189. PR: https://github.com/llvm/llvm-project/pull/99577 * [CalcSpillWeights] Avoid x87 excess precision influencing weight result Fixes #99396 The result of `VirtRegAuxInfo::weightCalcHelper` can be influenced by x87 excess precision, which can result in slightly different register choices when the compiler is hosted on x86_64 or i386. This leads to different object file output when cross-compiling to i386, or native. Similar to 7af3432e22b0, we need to add a `volatile` qualifier to the local `Weight` variable to force it onto the stack, and avoid the excess precision. Define `stack_float_t` in `MathExtras.h` for this purpose, and use it. (cherry picked from commit c80c09f3e380a0a2b00b36bebf72f43271a564c1) * [BOLT] Support map other function entry address (#101466) Allow BOLT to map the old address to a new binary address if the old address is the entry of the function. (cherry picked from commit 734c0488b6e69300adaf568f880f40b113ae02ca) * [lld][ARM] Fix assertion when mixing ARM and Thumb objects (#101985) Previously, we selected the Thumb2 PLT sequences if any input object is marked as not supporting the ARM ISA, which then causes assertion failures when calls from ARM code in other objects are seen. I think the intention here was to only use Thumb PLTs when the target does not have the ARM ISA available, signalled by no objects being marked as having it available. To do that we need to track which ISAs we have seen as we parse the build attributes, and defer the decision about PLTs until all input objects have been parsed. This bug was triggered by real code in picolibc, which have some versions of string.h functions built with Thumb2-only build attributes, so that they are compatible with v7-A, v7-R and v7-M. Fixes #99008. (cherry picked from commit a1c6467bd90905d52cf8f6162b60907f8e98a704) * [BOLT] Skip PLT search for zero-value weak reference symbols (#69136) Take a common weak reference pattern for example ``` __attribute__((weak)) void undef_weak_fun(); if (&undef_weak_fun) undef_weak_fun(); ``` In this case, an undefined weak symbol `undef_weak_fun` has an address of zero, and Bolt incorrectly changes the relocation for the corresponding symbol to symbol@PLT, leading to incorrect runtime behavior. (cherry picked from commit 6c8933e1a095028d648a5a26aecee0f569304dd0) * [AArch64] Don't replace dst of SWP instructions with (X|W)ZR (#102139) This change updates the AArch64DeadRegisterDefinition pass to ensure it does not replace the destination register of a SWP instruction with the zero register when its value is unused. This is necessary to ensure that the ordering of such instructions in relation to DMB.LD barries adheres to the definitions of the AArch64 Memory Model. The memory model states the following (ARMARM version DDI 0487K.a §B2.3.7): ``` Barrier-ordered-before An effect E1 is Barrier-ordered-before an effect E2 if one of the following applies: [...] * All of the following apply: - E1 is a Memory Read effect. - E1 is generated by an instruction whose destination register is not WZR or XZR. - E1 appears in program order before E3. - E3 is either a DMB LD effect or a DSB LD effect. - E3 appears in program order before E2. ``` Prior to this change, by replacing the destination register of such SWP instruction with WZR/XZR, the ordering relation described above was incorrectly removed from the generated code. The new behaviour is ensured in this patch by adding the relevant `SWP[L](B|H|W|X)` instructions to list in the `atomicReadDroppedOnZero` predicate, which already covered the `LD<Op>` instructions that are subject to the same effect. Fixes #68428. (cherry picked from commit beb37e2e22b549b361be7269a52a3715649e956a) * [clang][modules] Enable built-in modules for the upcoming Apple releases (#102239) The upcoming Apple SDK releases will support the clang built-in headers being in the clang built-in modules: stop passing -fbuiltin-headers-in-system-modules for those SDK versions. (cherry picked from commit 961639962251de7428c3fe93fa17cfa6ab3c561a) * [Driver] Fix a warning This patch fixes: clang/lib/Driver/ToolChains/Darwin.cpp:2937:3: error: default label in switch which covers all enumeration values [-Werror,-Wcovered-switch-default] (cherry picked from commit 0f1361baf650641a59aaa1710d7a0b7b02f2e56d) * [AIX]export function descriptor symbols related to template functions. (#101920) This fixes regressions caused by https://github.com/llvm/llvm-project/pull/97526 After that patch, all undefined references to DS symbol are removed. This makes DS symbols(for template functions) have no reference in some cases. So extract_symbols.py does not export these DS symbols for these cases. On AIX, exporting the function descriptor depends on references to the function descriptor itself and the function entry symbol. Without this fix, on AIX, we get: ``` rtld: 0712-001 Symbol _ZN4llvm15SmallVectorBaseIjE13mallocForGrowEPvmmRm was referenced from module llvm-project/build/unittests/Passes/Plugins/TestPlugin.so(), but a runtime definition of the symbol was not found. ``` (cherry picked from commit 396343f17b1182ff8ed698beac3f9b93b1d9dabd) * [clang-format] Fix a bug in annotating CastRParen (#102261) Fixes #102102. (cherry picked from commit 8c7a038f9029c675f2a52ff5e85f7b6005ec7b3e) * [clang] Fix crash when #embed used in a compound literal (#102304) Fixes https://github.com/llvm/llvm-project/issues/102248 (cherry picked from commit 3606d69d0b57dc1d23a4362e376e7ad27f650c27) * [AMDGPU] Fix folding clamp into pseudo scalar instructions (#100568) Clamp is canonically a v_max* instruction with a VGPR dst. Folding clamp into a pseudo scalar instruction can cause issues due to a change in regbank. We fix this with a copy. (cherry picked from commit 817cd726454f01e990cd84e5e1d339b120b5ebaa) * Revert "[LLVM] Silence compiler-rt warning in runtimes build (#99525)" This patch broke LLVM Flang build on Windows. PR #100202 This reverts commit f6f88f4b99638821af803d1911ab6a7dac04880b. (cherry picked from commit 73d862e478738675f5d919c6a196429acd7b5f50) * [TBAA] Do not rewrite TBAA if exists, always null out `!tbaa.struct` Retrieve `!tbaa` metadata via `!tbaa.struct` in `adjustForAccess` unless it already exists, as struct-path aware `MDNodes` emitted via `new-struct-path-tbaa` may be leveraged. As `!tbaa.struct` carries memcpy padding semantics among struct fields and `!tbaa` is already meant to aid to alias semantics, it should be possible to zero out `!tbaa.struct` once the memcpy has been simplified. `SROA/tbaa-struct.ll` test has gone out of scope, as `!tbaa` has already replaced `!tbaa.struct` in SROA. Fixes: https://github.com/llvm/llvm-project/issues/95661. * [NFC][llvm][support] rename INFINITY in regcomp (#101758) since C23 this macro is defined by float.h, which clang implements in it's float.h since #96659 landed. However, regcomp.c in LLVMSupport happened to define it's own macro with that name, leading to problems when bootstrapping. This change renames the offending macro. (cherry picked from commit 899f648866affd011baae627752ba15baabc2ef9) * [ELF] .llvm.call-graph-profile: support CREL https://reviews.llvm.org/D105217 added RELA support. This patch adds CREL support. (cherry picked from commit 0766a59be3256e83a454a089f01215d6c7f94a48) * [ELF] scanRelocations: support .crel.eh_frame Follow-up to #98115. For EhInputSection, RelocationScanner::scan calls sortRels, which doesn't support the CREL iterator. We should set supportsCrel to false to ensure that the initial_location fields in .eh_frame FDEs are relocated. (cherry picked from commit a821fee312d15941174827a70cb534c2f2fe1177) * Revert "demangle function names in trace files (#87626)" This reverts commit 0fa20c55b58deb94090985a5c5ffda4d5ceb3cd1. Storing raw symbol names is generally preferred in profile files. Demangling might lose information. Language frontends might use demangling schemes not supported by LLVMDemangle (https://github.com/llvm/llvm-project/issues/45901#issuecomment-2008686663). In addition, calling `demangle` for each function has a significant performance overhead (#102222). I believe that even if we decide to provide a producer-side demangling, it would not be on by default. Pull Request: https://github.com/llvm/llvm-project/pull/102274 (cherry picked from commit 72b73e23b6c36537db730ebea00f92798108a6e5) * [AArch64] Add invalid 1 x vscale costs for reductions and reduction-operations. (#102105) The code-generator is currently not able to handle scalable vectors of <vscale x 1 x eltty>. The usual "fix" for this until it is supported is to mark the costs of loads/stores with an invalid cost, preventing the vectorizer from vectorizing at those factors. But on rare occasions loops do not contain load/stores, only reductions. So whilst this is still unsupported return an invalid cost to avoid selecting vscale x 1 VFs. The cost of a reduction is not currently used by the vectorizer so this adds the cost to the add/mul/and/or/xor or min/max that should feed the reduction. It includes reduction costs too, for completeness. This change will be removed when code-generation for these types is sufficiently reliable. Fixes #99760 (cherry picked from commit 0b745a10843fc85e579bbf459f78b3f43e7ab309) * [clang] Wire -fptrauth-returns to "ptrauth-returns" fn attribute. (#102416) We already ended up with -fptrauth-returns, the feature macro, the lang opt, and the actual backend lowering. The only part left is threading it all through PointerAuthOptions, to drive the addition of the "ptrauth-returns" attribute to generated functions. While there, do minor cleanup on ptrauth-function-attributes.c. This also adds ptrauth_key_return_address to ptrauth.h. (cherry picked from commit 2eb6e30fe83ccce3cf01e596e73fa6385facd44b) * [lldb] Move definition of SBSaveCoreOptions dtor out of header (#102539) This class is technically not usable in its current state. When you use it in a simple C++ project, your compiler will complain about an incomplete definition of SaveCoreOptions. Normally this isn't a problem, other classes in the SBAPI do this. The difference is that SBSaveCoreOptions has a default destructor in the header, so the compiler will attempt to generate the code for the destructor with an incomplete definition of the impl type. All methods for every class, including constructors and destructors, must have a separate implementation not in a header. (cherry picked from commit 101cf540e698529d3dd899d00111bcb654a3c12b) * [Clang] Define __cpp_pack_indexing (#101956) Following the discussion on #101448 this defines `__cpp_pack_indexing`. Since pack indexing is currently supported in all language modes, the feature test macro is also defined in all language modes. (cherry picked from commit c65afad9c58474a784633314e945c874ed06584a) * workflows/release-binaries-all: Pass secrets on to release-binaries workflow (#101866) A called workflow does not have access to secrets by default, so we need to explicitly pass any secret that we want to use. (cherry picked from commit 1fb1a5d8e2c5a0cbaeb39ead68352e5e55752a6d) * [clang][driver][clang-cl] Support `--precompile` and `-fmodule-*` options in Clang-CL (#98761) This PR is the first step in improving the situation for `clang-cl` detailed in [this LLVM Discourse thread](https://discourse.llvm.org/t/clang-cl-exe-support-for-c-modules/72257/28). There has been some work done in #89772. I believe this is somewhat orthogonal. This is a work-in-progress; the functionality has only been tested with the [basic 'Hello World' example](https://clang.llvm.org/docs/StandardCPlusPlusModules.html#quick-start), and proper test cases need to be written. I'd like some thoughts on this, thanks! Partially resolves #64118. (cherry picked from commit bd576fe34285c4dcd04837bf07a89a9c00e3cd5e) * workflows: Fix permissions for release-sources job (#100750) For reusable workflows, the called workflow cannot upgrade it's permissions, and since the default permission is none, we need to explicitly declare 'contents: read' when calling the release-sources workflow. Fixes the error: The workflow is requesting 'contents: read', but is only allowed 'contents: none'. (cherry picked from commit 82c2259aeb87f5cb418decfb6a1961287055e5d2) * [Arm][AArch64][Clang] Respect function's branch protection attributes. (#101978) Default attributes assigned to all functions according to the command line parameters. Some functions might have their own attributes and we need to set or remove attributes accordingly. Tests are updated to test this scenarios too. (cherry picked from commit 9e9fa00dcb9522db3f78d921eda6a18b9ee568bb) * [NFC][libc++][test][AIX] UnXFAIL LIT test transform.pass.cpp (#102338) Remove `XFAIL: LIBCXX-AIX-FIXME` from lit test `transform.pass.cpp` now that AIX system call `wcsxfrm`/`wcsxfrm_l` is fixed in AIX 7.2.5.8 and 7.3.2.2 and buildbot machines have been upgraded. Backported from commit cb5912a71061c6558bd4293596dcacc1ce0ca2f6 * [llvm-exegesis][unittests] Also disable SubprocessMemoryTest on SPARC (#102755) Three `llvm-exegesis` tests ``` LLVM-Unit :: tools/llvm-exegesis/./LLVMExegesisTests/SubprocessMemoryTest/DefinitionFillsCompletely LLVM-Unit :: tools/llvm-exegesis/./LLVMExegesisTests/SubprocessMemoryTest/MultipleDefinitions LLVM-Unit :: tools/llvm-exegesis/./LLVMExegesisTests/SubprocessMemoryTest/OneDefinition ``` `FAIL` on Linux/sparc64 like ``` llvm/unittests/tools/llvm-exegesis/X86/SubprocessMemoryTest.cpp:68: Failure Expected equality of these values: SharedMemoryMapping[I] Which is: '\0' ExpectedValue[I] Which is: '\xAA' (170) ``` It seems like this test only works on little-endian hosts: three sub-tests are already disabled on powerpc and s390x (both big-endian), and the fourth is additionally guarded against big-endian hosts (making the other guards unnecessary). However, since it's not been analyzed if this is really an endianess issue, this patch disables the whole test on powerpc and s390x as before adding sparc to the mix. Tested on `sparc64-unknown-linux-gnu` and `x86_64-pc-linux-gnu`. (cherry picked from commit a417083e27b155dc92b7f7271c0093aee0d7231c) * [clang-format] Fix a serious bug in `git clang-format -f` (#102629) With the --force (or -f) option, git-clang-format wipes out input files excluded by a .clang-format-ignore file if they have unstaged changes. This patch adds a hidden clang-format option --list-ignored that lists such excluded files for git-clang-format to filter out. Fixes #102459. (cherry picked from commit 986bc3d0719af653fecb77e8cfc59f39bec148fd) * [lldb] Fix crash when adding members to an "incomplete" type (#102116) This fixes a regression caused by delayed type definition searching (#96755 and friends): If we end up adding a member (e.g. a typedef) to a type that we've already attempted to complete (and failed), the resulting AST would end up inconsistent (we would start to "forcibly" complete it, but never finish it), and importing it into an expression AST would crash. This patch fixes this by detecting the situation and finishing the definition as well. (cherry picked from commit 57cd1000c9c93fd0e64352cfbc9fbbe5b8a8fcef) * [clang] Implement -fptrauth-auth-traps. (#102417) This provides -fptrauth-auth-traps, which at the frontend level only controls the addition of the "ptrauth-auth-traps" function attribute. The attribute in turn controls various aspects of backend codegen, by providing the guarantee that every "auth" operation generated will trap on failure. This can either be delegated to the hardware (if AArch64 FPAC is known to be available), in which case this attribute doesn't change codegen. Otherwise, if FPAC isn't available, this asks the backend to emit additional instructions to check and trap on auth failure. (cherry picked from commit d179acd0484bac30c5ebbbed4d29a4734d92ac93) * Revert "[libc++][math] Fix undue overflowing of `std::hypot(x,y,z)` (#93350)" This reverts commit 9628777479a970db5d0c2d0b456dac6633864760. More details in https://github.com/llvm/llvm-project/pull/93350, but this broke the PowerPC sanitizer bots. (cherry picked from commit 1031335f2ee1879737576fde3a3425ce0046e773) * [libc++][math] Fix undue overflowing of `std::hypot(x,y,z)` (#100820) This is in relation to mr #93350. It was merged to main, but reverted because of failing sanitizer builds on PowerPC. The fix includes replacing the hard-coded threshold constants (e.g. `__overflow_threshold`) for different floating-point sizes by a general computation using `std::ldexp`. Thus, it should now work for all architectures. This has the drawback of not being `constexpr` anymore as `std::ldexp` is not implemented as `constexpr` (even though the standard mandates it for C++23). Closes #92782 (cherry picked from commit 72825fde03aab3ce9eba2635b872144d1fb6b6b2) * [C++20] [Modules] Don't diagnose duplicated implicit decl in multiple named modules (#102423) Close https://github.com/llvm/llvm-project/issues/102360 Close https://github.com/llvm/llvm-project/issues/102349 http://eel.is/c++draft/basic.def.odr#15.3 makes it clear that the duplicated deinition are not allowed to be attached to named modules. But we need to filter the implicit declarations as user can do nothing about it and the diagnostic message is annoying. (cherry picked from commit e72d956b99e920b0fe2a7946eb3a51b9e889c73c) * [AIX] Revert `#pragma mc_func` check (#102919) https://github.com/llvm/llvm-project/pull/99888 added a specific diagnostic for `#pragma mc_func` on AIX. There are some disagreements on: 1. If the check should be on by default. Leaving the check off by default is dangerous, since it is difficult to be aware of such a check. Turning it on by default at the moment causes build failures on AIX. See https://github.com/llvm/llvm-project/pull/101336 for more details. 2. If the check can be made more general. See https://github.com/llvm/llvm-project/pull/101336#issuecomment-2269283906. This PR reverts this check from `main` so we can flush out these disagreements. (cherry picked from commit 123b6fcc70af17d81c903b839ffb55afc9a9728f) * [Clang][Sema] Make UnresolvedLookupExprs in class scope explicit specializations instantiation dependent (#100392) A class member named by an expression in a member function that may instantiate to a static _or_ non-static member is represented by a `UnresolvedLookupExpr` in order to defer the implicit transformation to a class member access expression until instantiation. Since `ASTContext::getDecltypeType` only creates a `DecltypeType` that has a `DependentDecltypeType` as its canonical type when the operand is instantiation dependent, and since we do not transform types unless they are instantiation dependent, we need to mark the `UnresolvedLookupExpr` as instantiation dependent in order to correctly build a `DecltypeType` using the expression as its operand with a `DependentDecltypeType` canonical type. Fixes #99873. (cherry picked from commit 55ea36002bd364518c20b3ce282640c920697bf7) * [libc++] Use a different smart ptr type alias (#102089) The `_SP` type is used by some C libraries and this alias could conflict with it. (cherry picked from commit 7951673d408ee64744d0b924a49db78e8243d876) * [CodeGen][ARM64EC] Define hybrid_patchable EXP thunk symbol as a function. (#102898) This is needed for MSVC link.exe to generate redirection metadata for hybrid patchable thunks. (cherry picked from commit d550ada5ab6cd6e49de71ac4c9aa27ced4c11de0) * [PPC][AIX] Save/restore r31 when using base pointer (#100182) When the base pointer r30 is used to hold the stack pointer, r30 is spilled in the prologue. On AIX registers are saved from highest to lowest, so r31 also needs to be saved. Fixes https://github.com/llvm/llvm-project/issues/96411 (cherry picked from commit d07f106e512c08455b76cc1889ee48318e73c810) * [clang-format] Fix annotation of braces enclosing stringification (#102998) Fixes #102937. (cherry picked from commit ee2359968fa307ef45254c816e14df33374168cd) * [clang][AArch64] Point the nofp ABI check diagnostics at the callee (#103392) ... whereever we have the Decl for it, and even when we don't keep the SourceLocation of it aimed at the call site. Fixes: #102983 (cherry picked from commit 019ef522756886caa258daf68d877f84abc1b878) * [libc++] Fix ambiguous constructors for std::complex and std::optional (#103409) Fixes #101960 (cherry picked from commit 4d08bb11eea5907fa9cdfe4c7bc9d5c91e79c6a7) * [Clang] Correctly forward `--cuda-path` to the nvlink wrapper (#100170) Summary: This was not forwarded properly as it would try to pass it to `nvlink`. Fixes https://github.com/llvm/llvm-project/issues/100168 (cherry picked from commit 7e1fcf5dd657d465c3fc846f56c6f9d3a4560b43) * [RISCV] Use experimental.vp.splat to splat specific vector length elements. (#101329) Previously, llvm IR is hard to create a scalable vector splat with a specific vector length, so we use riscv.vmv.v.x and riscv.vmv.v.f to do this work. But the two rvv intrinsics needs strict type constraint which can not support fixed vector types and illegal vector types. Using vp.splat could preserve old functionality and also generate more optimized code for vector types and illegal vectors. This patch also fixes crash for getEVT not serving ptr types. (cherry picked from commit 87af9ee870ad7ca93abced0b09459c3760dec891) * [Hexagon] Do not optimize address of another function's block (#101209) When the constant extender optimization pass encounters an instruction that uses an extended address pointing to another function's block, avoid adding the instruction to the extender list for the current machine function. Fixes https://github.com/llvm/llvm-project/issues/99714 (cherry picked from commit 68df06a0b2998765cb0a41353fcf0919bbf57ddb) * [AArch64] Add GCS release notes * Revert "[CGData] llvm-cgdata (#89884)" This reverts commit d3fb41dddc11b0ebc338a3b9e6a5ab7288ff7d1d and forward fix patches because of the issue explained in: https://github.com/llvm/llvm-project/pull/89884#issuecomment-2244348117. Revert "Fix tests for https://github.com/llvm/llvm-project/pull/89884 (#100061)" This reverts commit 67937a3f969aaf97a745a45281a0d22273bff713. Revert "Fix build break for https://github.com/llvm/llvm-project/pull/89884 (#100050)" This reverts commit c33878c5787c128234d533ad19d672dc3eea19a8. Revert "[CGData] Fix -Wpessimizing-move in CodeGenDataReader.cpp (NFC)" This reverts commit 1f8b2b146141f3563085a1acb77deb50857a636d. (cherry picked from commit 73d78973fe072438f0f73088f889c66845b2b51a) * [AArch64] Adopt updated B16B16 target flags The enablement of SVE/SME non-widening BFloat16 instructions was recently changed in response to an architecture update, in which: - FEAT_SVE_B16B16 was weakened - FEAT_SME_B16B16 was introduced New flags, 'sve-b16b16' and 'sme-b16b16' were introduced to replace the existing 'b16b16'. This was acheived in the below two patches. - https://github.com/llvm/llvm-project/pull/101480 - https://github.com/llvm/llvm-project/pull/102501 Ideally, the interface change introduced here will be valid in LLVM-19. We do not see it necessary to back-port the entire change, but just to add 'sme-b16b16' and 'sve-b16b16' as aliases to the existing (and unchanged) 'b16b16' and 'sme2' flags which together cover all of these features. The predication of Bf16 variants of svmin/svminnm and svmax/svmaxnm is also fixed in this change. * [libc++] Fix rejects-valid in std::span copy construction (#104500) Trying to copy-construct a std::span from another std::span holding an incomplete type would fail as we evaluate the SFINAE for the range-based constructor. The problem was that we checked for __is_std_span after checking for the range being a contiguous_range, which hard-errored because of arithmetic on a pointer to incomplete type. As a drive-by, refactor the whole test and format it. Fixes #104496 (cherry picked from commit 99696b35bc8a0054e0b0c1a26e8dd5049fa8c41b) * [clang-tidy] Fix crash in C language in readability-non-const-parameter (#100461) Fix crash that happen when redeclaration got different number of parameters than definition. Fixes #100340 (cherry picked from commit a27f816fe56af9cc7f4f296ad6c577f6ea64349f) * [AArch64] Add streaming-mode stack hazard optimization remarks (#101695) Emit an optimization remark when objects in the stack frame may cause hazards in a streaming mode function. The analysis requires either the `aarch64-stack-hazard-size` or `aarch64-stack-hazard-remark-size` flag to be set by the user, with the former flag taking precedence. (cherry picked from commit a98a0dcf63f54c54c5601a34c9f8c10cde0162d6) * [clang] Avoid triggering vtable instantiation for C++23 constexpr dtor (#102605) In C++23 anything can be constexpr, including a dtor of a class whose members and bases don't have constexpr dtors. Avoid early triggering of vtable instantiation int this case. Fixes https://github.com/llvm/llvm-project/issues/102293 (cherry picked from commit d469794d0cdfd2fea50a6ce0c0e33abb242d744c) * [OpenMP][AArch64] Fix branch protection in microtasks (#102317) Start __kmp_invoke_microtask with PACBTI in order to identify the function as a valid branch target. Before returning, SP is authenticated. Also add the BTI and PAC markers to z_Linux_asm.S. With this patch, libomp.so can now be generated with DT_AARCH64_BTI_PLT when built with -mbranch-protection=standard. The implementation is based on the code available in compiler-rt. (cherry picked from commit 0aa22dcd2f6ec5f46b8ef18fee88066463734935) * [clang][driver] `TY_ModuleFile` should be a 'CXX' file type * [Mips] Fix fast isel for i16 bswap. (#103398) We need to mask the SRL result to 8 bits before ORing in the SLL. This is needed in case bits 23:16 of the input aren't zero. They will have been shifted into bits 15:8. We don't need to AND the result with 0xffff. It's ok if the upper 16 bits of the register are garbage. Fixes #103035. (cherry picked from commit ebe7265b142f370f0a563fece5db22f57383ba2d) * Add some brief LLVM 19 release notes for Pointer Authentication ABI support. * release/19.x: [BOLT] Fix relocations handling Backport https://github.com/llvm/llvm-project/commit/097ddd3565f830e6cb9d0bb8ca66844b7f3f3cbb * [AArch64] Add a check for invalid default features (#104435) This adds a check that all ExtensionWithMArch which are marked as implied features for an architecture are also present in the list of default features. It doesn't make sense to have something mandatory but not on by default. There were a number of existing cases that violated this rule, and some changes to which features are mandatory (indicated by the Implies field). This resulted in a bug where if a feature was marked as `Implies` but was not added to `DefaultExt`, then for `-march=base_arch+nofeat` the Driver would consider `feat` to have never been added and therefore would do nothing to disable it (no `-target-feature -feat` would be added, but the backend would enable the feature by default because of `Implies`). See clang/test/Driver/aarch64-negative-modifiers-for-default-features.c. Note that the processor definitions do not respect the architecture DefaultExts. These apply only when specifying `-march=<some architecture version>`. So when a feature is moved from `Implies` to `DefaultExts` on the Architecture definition, the feature needs to be added to all processor definitions (that are based on that architecture) in order to preserve the existing behaviour. I have checked the TRMs for many cases (see specific commit messages) but in other cases I have just kept the current behaviour and not tried to fix it. * [GlobalISel] Bail out early for big-endian (#103310) If we continue through the function we can currently hit crashes. We can bail out early and fall back to SDAG. Fixes #103032 (cherry picked from commit 05d17a1c705e1053f95b90aa37d91ce4f94a9287) * [LLD] [MinGW] Recognize the -rpath option (#102886) GNU ld silently accepts the -rpath option for Windows targets, as a no-op. This has lead to some build systems (and users) passing this option while building for Windows/MinGW, even if Windows doesn't have any concept like rpath. Older versions of Conan did include -rpath in the pkg-config files it generated, see e.g. https://github.com/conan-io/conan/blob/17c58f0c61931f9de218ac571cd97a8e0befa68e/conans/client/generators/pkg_config.py#L104-L114 and https://github.com/conan-io/conan/blob/17c58f0c61931f9de218ac571cd97a8e0befa68e/conans/client/build/compiler_flags.py#L26-L34 - and see https://github.com/mstorsjo/llvm-mingw/issues/300 for user reports about this issue. Recognize the option in LLD for MinGW targets, to improve drop-in compatibility compared to GNU ld, but produce a warning to alert users that the option really has no effect for these targets. (cherry picked from commit 69f76c782b554a004078af6909c19a11e3846415) * [C++23] Fix infinite recursion (Clang 19.x regression) (#104829) d469794d0cdfd2fea50a6ce0c0e33abb242d744c was fixing an issue with triggering vtable instantiations, but it accidentally introduced infinite recursion when the type to be checked is the same as the type used in a base specifier or field declaration. Fixes #104802 (cherry picked from commit 435cb0dc5eca08cdd8d9ed0d887fa1693cc2bf33) * Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (#102287) Reland https://github.com/llvm/llvm-project/pull/75912 The differences of this PR between https://github.com/llvm/llvm-project/pull/75912 are: - Fixed a regression in `Decl::isInAnotherModuleUnit()` in DeclBase.cpp pointed by @mizvekov and add the corresponding test. - Fixed the regression in windows https://github.com/llvm/llvm-project/issues/97447. The changes are in `CodeGenModule::getVTableLinkage` from `clang/lib/CodeGen/CGVTables.cpp`. According to the feedbacks from MSVC devs, the linkage of vtables won't affected by modules. So I simply skipped the case for MSVC. Given this is more or less fundamental to the use of modules. I hope we can backport this to 19.x. (cherry picked from commit 847f9cb0e868c8ec34f9aa86fdf846f8c4e0388b) * [libunwind] Add GCS support for AArch64 (#99335) AArch64 GCS (Guarded Control Stack) is similar enough to CET that we can re-use the existing code that is guarded by _LIBUNWIND_USE_CET, so long as we also add defines to locate the GCS stack and pop the entries from it. We also need the jumpto function to exit using br instead of ret, to prevent it from popping the GCS stack. GCS support is enabled using the LIBUNWIND_ENABLE_GCS cmake option. This enables -mbranch-protection=standard, which enables GCS. For the places we need to use GCS instructions we use the target attribute, as there's not a command-line option to enable a specific architecture extension. (cherry picked from commit b32aac4358c1f6639de7c453656cd74fbab75d71) * [libunwind] Be more careful about enabling GCS (#101973) We need both GCS to be enabled by the compiler (which we do by checking if __ARM_FEATURE_GCS_DEFAULT is defined) and for arm_acle.h to define the GCS intrinsics. Check the latter by checking if _CHKFEAT_GCS is defined. (cherry picked from commit c649194a71b47431f2eb2e041435d564e3b51072) * [libunwind] Fix problems caused by combining BTI and GCS (#102322) The libunwind assembly files need adjustment in order to work correctly when both BTI and GCS are both enabled (which will be the case when using -mbranch-protection=standard): * __libunwind_Registers_arm64_jumpto can't use br to jump to the return location, instead we need to use gcspush then ret. * Because we indirectly call __libunwind_Registers_arm64_jumpto it needs to start with bti jc. * We need to set the GCS GNU property bit when it's enabled. --------- Co-authored-by: Daniel Kiss <[email protected]> (cherry picked from commit 39529107b46032ef0875ac5b809ab5b60cd15a40) * Bump version to 19.1.0-rc3 * [sanitizer_common] Make sanitizer_linux.cpp kernel_stat* handling Linux-specific fcd6bd5587cc376cd8f43b60d1c7d61fdfe0f535 broke the Solaris/sparcv9 buildbot: ``` compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:39:14: fatal error: 'asm/unistd.h' file not found 39 | # include <asm/unistd.h> | ^~~~~~~~~~~~~~ ``` That section should have been Linux-specific in the first place, which is what this patch does. Tested on sparcv9-sun-solaris2.11. (cherry picked from commit 16e9bb9cd7f50ae2ec7f29a80bc3b95f528bfdbf) * [clang][modules] Built-in modules are not correctly enabled for Mac Catalyst (#104872) Mac Catalyst is the iOS platform, but it builds against the macOS SDK and so it needs to be checking the macOS SDK version instead of the iOS one. Add tests against a greater-than SDK version just to make sure this works beyond the initially supporting SDKs. (cherry picked from commit b9864387d9d00e1d4888181460d05dbc92364d75) * [SPARC] Remove assertions in printOperand for inline asm operands (#104692) Inline asm operands could contain any kind of relocation, so remove the checks. Fixes https://github.com/llvm/llvm-project/issues/103493 (cherry picked from commit 576b7a781aac6b1d60a72248894b50e565e9185a) * Add AIX/PPC Clang/LLVM release notes for LLVM 19. * use default intrinsic attrs for BPF packet loads The BPF packet load intrinsics lost attribute WillReturn due to 0b20c30. The attribute loss causes excessive bitshifting, resulting in previously working programs failing the BPF verifier due to instruction/complexity limits. cherry picked only the BPF changes from 99a10f1 Signed-off-by: Bryce Kahle <[email protected]> * [AMDGPU] Disable inline constants for pseudo scalar transcendentals (#104395) Prevent operand folding from inlining constants into pseudo scalar transcendental f16 instructions. However still allow literal constants. (cherry picked from commit fc6300a5f7ef430e4ec86d16be0b146de7fbd16b) * [DAGCombiner] Fix ReplaceAllUsesOfValueWith mutation bug in visitFREEZE (#104924) In visitFREEZE we have been collecting a set/vector of MaybePoisonOperands that later was iterated over, applying a freeze to those operands. However, C-level fuzzy testing has discovered that the recursiveness of ReplaceAllUsesOfValueWith may cause later operands in the MaybePoisonOperands vector to be replaced when replacing an earlier operand. That would then turn up as Assertion `N1.getOpcode() != ISD::DELETED_NODE && "Operand is DELETED_NODE!"' failed. failures when trying to freeze those later operands. So we need to make sure that the vector with MaybePoisonOperands is mutated as well when needed. Or as the solution used in this patch, make sure to keep track of operand numbers that should be frozen instead of having a vector of SDValues. And then we can refetch the operands while iterating over operand numbers. The problem was seen after adding SELECT_CC to the set of operations including in "AllowMultipleMaybePoisonOperands". I'm not sure, but I guess that this could happen for other operations as well for which we allow multiple maybe poison operands. (cherry picked from commit 278fc8efdf004a1959a31bb4c208df5ee733d5c8) * [X86] Use correct fp immediate types in _mm_set_ss/sd Avoids implicit sint_to_fp which wasn't occurring on strict fp codegen Fixes #104848 (cherry picked from commit 6dcce422ca06601f2b00e85cc18c745ede245ca6) * [clang-format] Don't insert a space between :: and * (#105043) Also, don't insert a space after ::* for method pointers. See https://github.com/llvm/llvm-project/pull/86253#issuecomment-2298404887. Fixes #100841. (cherry picked from commit 714033a6bf3a81b1350f969ddd83bcd9fbb703e8) * [ConstraintElim] Fix miscompilation caused by PR97974 (#105790) Fixes https://github.com/llvm/llvm-project/issues/105785. (cherry picked from commit 85b6aac7c25f9d2a976a76045ace1e7afebb5965) * [MCA][X86] Add missing 512-bit vpscatterqd/vscatterqps schedule data (REAPPLIED) This doesn't match uops.info yet - but it matches the existing vpscatterdq/vscatterqpd entries like uops.info says it should Reapplied with codegen fix for scatter-schedule.ll Fixes #105675 (cherry picked from commit cf6cd1fd67356ca0c2972992928592d2430043d2) * [DwarfEhPrepare] Assign dummy debug location for more inserted _Unwind_Resume calls (#105513) Similar to the fix for #57469, ensure that the other `_Unwind_Resume` call emitted by DwarfEHPrepare has a debug location if needed. This fixes https://github.com/nbdd0121/unwinding/issues/34. (cherry picked from commit e76db25832d6ac2d3a36769b26f982d9dee4b346) * [clangd] Add clangd 19 release notes * Restrict LLVM_TARGETS_TO_BUILD in Windows release packaging (#106059) When including all targets, some files become too large for the NSIS installer to handle. Fixes #101994 (cherry picked from commit 2a28df66dc3f7ff5b6233241837854acefb68d77) * [AArch64] Make apple-m4 armv8.7-a again (from armv9.2-a). (#106312) This is a partial revert of c66e1d6f3429. Even though that allowed us to declare v9.2-a support without picking up SVE2 in both the backend and the driver, the frontend itself still enabled SVE via the arch version's default extensions. Avoid that by reverting back to v8.7-a while we look into longer-term solutions. (cherry picked from commit e5e38ddf1b8043324175868831da21e941c00aff) * workflows/release-binaries: Remove .git/config file from artifacts (#106310) The .git/config file contains an auth token that can be leaked if the .git directory is included in a workflow artifact. (cherry picked from commit ef50970204384643acca42ba4c7ca8f14865a0c2) * [clang] Install scan-build-py into plain "lib" directory (#106612) Install scan-build-py modules into the plain `lib` directory, without LLVM_LIBDIR_SUFFIX appended, to match the path expected by `intercept-build` executable. This fixes the program being unable to find its modules. Using unsuffixed path makes sense here, since Python modules are not subject to multilib. This change effectively reverts 1334e129a39cb427e7b855e9a711a3e7604e50e5. The commit in question changed the path without a clear justification ("does not respect the given prefix") and the Python code was never modified to actually work with the change. Fixes #106608 (cherry picked from commit 0c4cf79defe30d43279bf4526cdf32b6c7f8a197) * [llvm][CodeGen] Added missing initialization failure information for window scheduler (#99449) Added missing initialization failure information for window scheduler. * [llvm][CodeGen] Added a new restriction for II by pragma in window scheduler (#99448) Added a new restriction for window scheduling. Window scheduling is disabled when llvm.loop.pipeline.initiationinterval is set. * [llvm][CodeGen] Fixed a bug in stall cycle calculation for window scheduler (#99451) Fixed a bug in stall cycle calculation. When a register defined by an instruction in the current iteration is used by an instruction in the next iteration, we have modified the number of stall cycle that need to be inserted. * [llvm][CodeGen] Fixed max cycle calculation with zero-cost instructions for window scheduler (#99454) We discovered some scheduling failures occurring when zero-cost instructions were involved. This issue will be addressed by this patch. * [llvm][CodeGen] Address the issue of multiple resource reservations In window scheduling (#101665) Address the issue of multiple resource reservations in window scheduling. * [analyzer] Limit `isTainted()` by skipping complicated symbols (#105493) As discussed in https://discourse.llvm.org/t/rfc-make-istainted-and-complex-symbols-friends/79570/10 Some `isTainted()` queries can blow up the analysis times, and effectively halt the analysis under specific workloads. We don't really have the time now to do a caching re-implementation of `isTainted()`, so we need to workaround the case. The workaround with the smallest blast radius was to limit what symbols `isTainted()` does the query (by walking the SymExpr). So far, the threshold 10 worked for us, but this value can be overridden using the "max-tainted-symbol-complexity" config value. This new option is "deprecated" from the getgo, as I expect this issue to be fixed within the next few months and I don't want users to override this value anyways. If they do, this message will let them know that they are on their own, and the next release may break them (as we no longer recognize this option if we drop it). Mitigates #89720 CPP-5414 (cherry picked from commit 848658955a9d2d42ea3e319d191e2dcd5d76c837) * [lld-macho] Fix crash: ObjC category merge + relative method lists (#104081) A crash was happening when both ObjC Category Merging and Relative method lists were enabled. ObjC Category Merging creates new data sections and adds them by calling `addInputSection`. `addInputSection` uses the symbols within the added section to determine which container to actually add the section to. The issue is that ObjC Category merging is calling `addInputSection` before actually adding the relevant symbols the the added section. This causes `addInputSection` to add the `InputSection` to the wrong container, eventually resulting in a crash. To fix this, we ensure that ObjC Category Merging calls `addInputSection` only after the symbols have been added to the `InputSection`. (cherry picked from commit 0df91893efc752a76c7bbe6b063d66c8a2fa0d55) * [PowerPC] Respect endianness when bitcasting to fp128 (#95931) Fixes #92246 Match the behaviour of `bitcast v2i64 (BUILD_PAIR %lo %hi)` when encountering `bitcast fp128 (BUILD_PAIR %lo $hi)`. by inserting a missing swap of the arguments based on endianness. ### Current behaviour: **fp128** bitcast fp128 (BUILD_PAIR %lo $hi) => BUILD_FP128 %lo %hi BUILD_FP128 %lo %hi => MTVSRDD %hi %lo **v2i64** bitcast v2i64 (BUILD_PAIR %lo %hi) => BUILD_VECTOR %hi %lo BUILD_VECTOR %hi %lo => MTVSRDD %lo %hi (cherry picked from commit 408d82d352eb98e2d0a804c66d359cd7a49228fe) * Add release note about ABI implementation changes for _BitInt on Arm * [AMDGPU] Add GFX12 test coverage for vmcnt flushing in loop headers (#105548) (cherry picked from commit 61194617ad7862f144e0f6db34175553e8c34763) * [AMDGPU] GFX12 VMEM loads can write VGPR results out of order (#105549) Fix SIInsertWaitcnts to account for this by adding extra waits to avoid WAW dependencies. (cherry picked from commit 5506831f7bc8dc04ebe77f4d26940007bfb4ab39) * [AMDGPU] Remove one case of vmcnt loop header flushing for GFX12 (#105550) When a loop contains a VMEM load whose result is only used outside the loop, do not bother to flush vmcnt in the loop head on GFX12. A wait for vmcnt will be required inside the loop anyway, because VMEM instructions can write their VGPR results out of order. (cherry picked from commit fa2dccb377d0b712223efe5b62e5fc633580a9e6) * [libunwind] Stop installing the mach-o module map (#105616) libunwind shouldn't know that compact_unwind_encoding.h is part of a MachO module that it doesn't own. Delete the mach-o module map, and let whatever is in charge of the mach-o directory be the one to say how its module is organized and where compact_unwind_encoding.h fits in. (cherry picked from commit 172c4a4a147833f1c08df1555f3170aa9ccb6cbe) * [clang-format] Fix a misannotation of redundant r_paren as CastRParen (#105921) Fixes #105880. (cherry picked from commit 6bc225e0630f28e83290a43c3d9b25b057fc815a) * [clang-format] Fix a misannotation of less/greater as angle brackets (#105941) Fixes #105877. (cherry picked from commit 0916ae49b89db6eb9eee9f6fee4f1a65fd9cdb74) * [PowerPC] Fix mask for __st[d/w/h/b]cx builtins (#104453) These builtins are currently returning CR0 which will have the format [0, 0, flag_true_if_saved, XER]. We only want to return flag_true_if_saved. This patch adds a shift to remove the XER bit before returning. (cherry picked from commit 327edbe07ab4370ceb20ea7c805f64950871d835) * [clang][AArch64] Add SME2.1 feature macros (#105657) (cherry picked from commit 2617023923175b0fd2a8cb94ad677c061c01627f) * [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (#89934) In the last patch #82310, we used template depths to tell if such alias decls contain lambdas, which is wrong because the lambda can also appear as a part of the default argument, and that would make `getTemplateInstantiationArgs` provide extra template arguments in undesired contexts. This leads to issue #89853. Moreover, our approach for https://github.com/llvm/llvm-project/issues/82104 was sadly wrong. We tried to teach `DeduceReturnType` to consider alias template arguments; however, giving these arguments in the context where they should have been substituted in a `TransformCallExpr` call is never correct. This patch addresses such problems by using a `RecursiveASTVisitor` to check if the lambda is contained by an alias `Decl`, as well as twiddling the lambda dependencies - we should also build a dependent lambda expression if the surrounding alias template arguments were dependent. Fixes #89853 Fixes #102760 Fixes #105885 (cherry picked from commit b412ec5d3924c7570c2c96106f95a92403a4e09b) * [libc++] Add missing include to three_way_comp_ref_type.h We were using a `_LIBCPP_ASSERT_FOO` macro without including `<__assert>`. rdar://134425695 (cherry picked from commit 0df78123fdaed39d5135c2e4f4628f515e6d549d) * [compiler-rt] Fix definition of `usize` on 32-bit Windows 32-bit Windows uses `unsigned int` for uintptr_t and size_t. Commit 18e06e3e2f3d47433e1ed323b8725c76035fc1ac changed uptr to unsigned long, so it no longer matches the real size_t/uintptr_t and therefore the current definition of usize result in: `error C2821: first formal parameter to 'operator new' must be 'size_t'` However, the real problem is that uptr is wrong to work around the fact that we have local SIZE_T and SSIZE_T typedefs that trample on the basetsd.h definitions of the same name and therefore need to match exactly. Unlike size_t/ssize_t the uppercase ones always use unsigned long (even on 32-bit). This commit works around the build breakage by keeping the existing definitions of uptr/sptr and just changing usize. A follow-up change will attempt to fix this properly. Fixes: https://github.com/llvm/llvm-project/issues/101998 Reviewed By: mstorsjo Pull Request: https://github.com/llvm/llvm-project/pull/106151 (cherry picked from commit bb27dd853a713866c025a94ead8f03a1e25d1b6e) * [clang-format] Fix misalignments of pointers in angle brackets (#106013) Fixes #105898. (cherry picked from commit 656d5aa95825515a55ded61f19d41053c850c82d) * [clang-format] js handle anonymous classes (#106242) Addresses a regression in JavaScript when formatting anonymous classes. --------- Co-authored-by: Owen Pan <[email protected]> (cherry picked from commit 77d63cfd18aa6643544cf7acd5ee287689d54cca) * Revert "[LinkerWrapper] Extend with usual pass options (#96704)" (#102226) This reverts commit 90ccf2187332ff900d46a58a27cb0353577d37cb. Fixes: https://github.com/llvm/llvm-project/issues/100212 (cherry picked from commit 030ee841a9c9fbbd6e7c001e751737381da01f7b) Conflicts: clang/test/Driver/linker-wrapper-passes.c * [clang-format] Revert "[clang-format][NFC] Delete TT_LambdaArrow (#70… (#105923) …519)" This reverts commit e00d32afb9d33a1eca48e2b041c9688436706c5b and adds a test for lambda arrow SplitPenalty. Fixes #105480. * workflows/release-tasks: Pass required secrets to all called workflows (#106286) Called workflows don't have access to secrets by default, so we need to explicitly pass secrets that we use. (cherry picked from commit 9d81e7e36e33aecdee05fef551c0652abafaa052) * [C++20] [Modules] Don't insert class not in named modules to PendingEmittingVTables (#106501) Close https://github.com/llvm/llvm-project/issues/102933 The root cause of the issue is an oversight in https://github.com/llvm/llvm-project/pull/102287 that I didn't notice that PendingEmittingVTables should only accept classes in named modules. (cherry picked from commit 47615ff2347a8be429404285de3b1c03b411e7af) * Revert "[clang] fix broken canonicalization of DeducedTemplateSpecializationType (#95202)" This reverts commit 2e1ad93961a3f444659c5d02d800e3144acccdb4. Reverting #95202 in the 19.x branch Fixes #106182 The change in #95202 causes code to crash and there is no good way to backport a fix for that as there are ABI-impacting changes at play. Instead we revert #95202 in the 19x branch, fixing the regression and preserving the 18.x behavior (which is GCC's behavior) https://github.com/llvm/llvm-project/pull/106335#discussion_r1735174841 * [analyzer] Add missing include <unordered_map> to llvm/lib/Support/Z3Solver.cpp (#106410) Resolves #106361. Adding #include <unordered_map> to llvm/lib/Support/Z3Solver.cpp fixes compilation errors for homebrew build on macOS with Xcode 14. https://github.com/Homebrew/homebrew-core/actions/runs/10604291631/job/29390993615?pr=181351 shows that this is resolved when the include is patched in (Linux CI failure is due to unrelated timeout). (cherry picked from commit fcb3a0485857c749d04ea234a8c3d629c62ab211) * [RemoveDIs] Simplify spliceDebugInfo, fixing splice-to-end edge case (#105670) Not quite NFC, fixes splitBasicBlockBefore case when we split before an instruction with debug records (but without the headBit set, i.e., we are splitting before the instruction but after the debug records that come before it). splitBasicBlockBefore splices the instructions before the split point into a new block. Prior to this patch, the debug records would get shifted up to the front of the spliced instructions (as seen in the modified unittest - I believe the unittest was checking erroneous behaviour). We instead want to leave those debug records at the end of the spliced instructions. The functionality of the deleted `else if` branch is covered by the remaining `if` now that `DestMarker` is set to the trailing marker if `Dest` is `end()`. Previously the "===" markers were sometimes detached, now we always detach them and always reattach them. Note: `deleteTrailingDbgRecords` only "unlinks" the tailing marker from the block, it doesn't delete anything. The trailing marker is still cleaned up properly inside the final `if` body with `DestMarker->eraseFromParent();`. Part 1 of 2 needed for #105571 (cherry picked from commit f5815534d180c544bffd46f09c28b6fc334260fb) * [libcxx] don't `#include <cwchar>` if wide chars aren't enabled (#99911) Pull request #96032 unconditionall adds the `cwchar` include in the `format` umbrella header. However support for wchar_t can be disabled in the build system (LIBCXX_ENABLE_WIDE_CHARACTERS). This patch guards against inclusion of `cwchar` in `format` by checking the `_LIBCPP_HAS_NO_WIDE_CHARACTERS` define. For clarity I've also merged the include header section that `cwchar` was in with the one above as they were both guarded by the same `#if` logic. (cherry picked from commit ec56790c3b27df4fa1513594ca9a74fd8ad5bf7f) * [clang-format] Correctly annotate braces in ObjC square brackets (#106654) See https://github.com/llvm/llvm-project/pull/88238#issuecomment-2316954781. (cherry picked from commit e0f2368cdeb7312973a92fb2d22199d1de540db8) * [Instrumentation] Fix EdgeCounts vector size in SetBranchWeights (#99064) (cherry picked from commit 46a4132e167aa44d8ec7776262ce2a0e6d47de59) * [builtins] Fix missing main() function in float16/bfloat16 support checks (#104478) The CMake docs state that `check_c_source_compiles()` checks whether the supplied code "can be compiled as a C source file and linked as an executable (so it must contain at least a `main()` function)." https://cmake.org/cmake/help/v3.30/module/CheckCSourceCompiles.html In practice, this command is a wrapper around `try_compile()`: - https://gitlab.kitware.com/cmake/cmake/blob/2904ce00d2ed6ad5dac6d3459af62d8223e06ce0/Modules/CheckCSourceCompiles.cmake#L54 - https://gitlab.kitware.com/cmake/cmake/blob/2904ce00d2ed6ad5dac6d3459af62d8223e06ce0/Modules/Internal/CheckSourceCompiles.cmake#L101 When `CMAKE_SOURCE_DIR` is compiler-rt/lib/builtins/, `CMAKE_TRY_COMPILE_TARGET_TYPE` is set to `ST…
The llvm-cgdata tool has been introduced to handle reading and writing of codegen data. This data includes an optimistic codegen summary that can be utilized to enhance subsequent codegen. Currently, the tool supports saving and restoring the outlined hash tree, facilitating machine function outlining across modules. Additional codegen summaries can be incorporated into separate sections as required. This patch primarily establishes basic support for the reader and writer, similar to llvm-profdata.
The high-level operations of llvm-cgdata are as follows:
This depends on #89792.
This is a patch for https://discourse.llvm.org/t/rfc-enhanced-machine-outliner-part-2-thinlto-nolto/78753.