[llvm-branch-commits] [hmaptool] Implement simple string deduplication (PR #102677)

2024-08-09 Thread Shoaib Meenai via llvm-branch-commits

https://github.com/smeenai created 
https://github.com/llvm/llvm-project/pull/102677

This reduces the size of the generated header maps significantly (35%
measured internally). Further savings are possible through tail
deduplication, but the additional complication isn't worth the gain IMO.



___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [lld] ReleaseNotes: add lld/ELF notes (PR #80393)

2024-02-02 Thread Shoaib Meenai via llvm-branch-commits

https://github.com/smeenai approved this pull request.

LGTM, thanks!

https://github.com/llvm/llvm-project/pull/80393
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [lld] ReleaseNotes: add lld/ELF notes (PR #80393)

2024-02-02 Thread Shoaib Meenai via llvm-branch-commits


@@ -29,8 +29,42 @@ ELF Improvements
 * ``--fat-lto-objects`` option is added to support LLVM FatLTO.
   Without ``--fat-lto-objects``, LLD will link LLVM FatLTO objects using the
   relocatable object file. (`D146778 `_)
+* ``-Bsymbolic-non-weak`` is added to directly bind non-weak definitions.
+  (`D158322 `_)
+* ``--lto-validate-all-vtables-have-type-infos``, which complements
+  ``--lto-whole-program-visibility``, is added to disable unsafe whole-program
+  devirtualization. ``--lto-known-safe-vtables=`` can be used
+  to mark known-safe vtable symbols.
+  (`D155659 `_)
+* ``--no-allow-shlib-undefined`` now reports errors for DSO referencing
+  non-exported definitions.
+  (`#70769 `_)
 * common-page-size can now be larger than the system page-size.
   (`#57618 `_)
+* When call graph profile information is availablue due to instrumentation or

smeenai wrote:

Typo: availablue -> available

https://github.com/llvm/llvm-project/pull/80393
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [lld] ReleaseNotes: add lld/ELF notes (PR #80393)

2024-02-02 Thread Shoaib Meenai via llvm-branch-commits


@@ -29,8 +29,42 @@ ELF Improvements
 * ``--fat-lto-objects`` option is added to support LLVM FatLTO.
   Without ``--fat-lto-objects``, LLD will link LLVM FatLTO objects using the
   relocatable object file. (`D146778 `_)
+* ``-Bsymbolic-non-weak`` is added to directly bind non-weak definitions.
+  (`D158322 `_)
+* ``--lto-validate-all-vtables-have-type-infos``, which complements
+  ``--lto-whole-program-visibility``, is added to disable unsafe whole-program
+  devirtualization. ``--lto-known-safe-vtables=`` can be used
+  to mark known-safe vtable symbols.
+  (`D155659 `_)
+* ``--no-allow-shlib-undefined`` now reports errors for DSO referencing
+  non-exported definitions.
+  (`#70769 `_)
 * common-page-size can now be larger than the system page-size.
   (`#57618 `_)
+* When call graph profile information is availablue due to instrumentation or
+  sample PGO, input sections are now sorted using the new ``cdsort`` algorithm,
+  better than the previous ``hfsort`` algorithm.
+  (`D152840 `_)
+* Symbol assignments like ``a = DEFINED(a) ? a : 0;`` are now handled.
+  (`#65866 `_)
+* ``OVERLAY`` now supports optional start address and LMA
+  (`#77272 `_)
+* Relocations referencing a symbol defined in ``/DISCARD/`` section now lead to
+  an error.
+  (`#69295 `_)
+* For AArch64 MTE, global variable descriptors have been implemented.
+  (`D152921 `_)
+* ``R_LARCH_PCREL20_S2``/``R_LARCH_ADD6``/``R_LARCH_CALL36`` and extreme code
+  model relocations are now supported.
+* ``--emit-relocs`` is now supported for RISC-V linker relaxation.
+  (`D159082 `_)
+* Call relaxation respects RVC when mixing +c and -c relocatable files.
+  (`#73977 `_)
+* ``R_RISCV_SET_ULEB128``/``R_RISCV_SUB_ULEB128`` relocations are now 
supported.
+  (`#72610 `_)
+  (`#77261 `_)
+* RISC-V TLSDESC is now supported.
+  (`#79239 `_)
 

smeenai wrote:

Good call, as well as R_RISCV_GOT32_PCREL (#72587)

https://github.com/llvm/llvm-project/pull/80393
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [lld] ReleaseNotes: add lld/ELF notes (PR #80393)

2024-02-02 Thread Shoaib Meenai via llvm-branch-commits

https://github.com/smeenai edited 
https://github.com/llvm/llvm-project/pull/80393
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [lld] b117d17 - [doc] Place sha256 in lld/README.md into backticks

2021-01-12 Thread Shoaib Meenai via llvm-branch-commits

Author: Emil Engler
Date: 2021-01-12T10:19:40-08:00
New Revision: b117d17d264f448e0b037a62f5a48ec9aedd886c

URL: 
https://github.com/llvm/llvm-project/commit/b117d17d264f448e0b037a62f5a48ec9aedd886c
DIFF: 
https://github.com/llvm/llvm-project/commit/b117d17d264f448e0b037a62f5a48ec9aedd886c.diff

LOG: [doc] Place sha256 in lld/README.md into backticks

Reviewed By: smeenai

Differential Revision: https://reviews.llvm.org/D93984

Added: 


Modified: 
lld/README.md

Removed: 




diff  --git a/lld/README.md b/lld/README.md
index 3b8cd7a14948..3b693c9957ee 100644
--- a/lld/README.md
+++ b/lld/README.md
@@ -16,4 +16,4 @@ same tests, we create a collection of self contained programs.
 
 It is hosted at 
https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz
 
-The current sha256 is 
10eec685463d5a8bbf08d77f4ca96282161d396c65bd97dc99dbde644a31610f.
+The current sha256 is 
`10eec685463d5a8bbf08d77f4ca96282161d396c65bd97dc99dbde644a31610f`.



___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] 0066a09 - [libc++] Give extern templates default visibility on gcc

2021-01-12 Thread Shoaib Meenai via llvm-branch-commits

Author: Shoaib Meenai
Date: 2021-01-12T18:30:56-08:00
New Revision: 0066a09579ca90f60cb1947691e5a441f9f57a5d

URL: 
https://github.com/llvm/llvm-project/commit/0066a09579ca90f60cb1947691e5a441f9f57a5d
DIFF: 
https://github.com/llvm/llvm-project/commit/0066a09579ca90f60cb1947691e5a441f9f57a5d.diff

LOG: [libc++] Give extern templates default visibility on gcc

Contrary to the current visibility macro documentation, it appears that
gcc does handle visibility attribute on extern templates correctly, e.g.
https://godbolt.org/g/EejuV7. We need this so that extern template
instantiations of classes not marked _LIBCPP_TEMPLATE_VIS (e.g.
__vector_base_common) are correctly exported with gcc when building with
hidden visibility.

Reviewed By: ldionne

Differential Revision: https://reviews.llvm.org/D35388

Added: 


Modified: 
libcxx/docs/DesignDocs/VisibilityMacros.rst
libcxx/include/__config

Removed: 




diff  --git a/libcxx/docs/DesignDocs/VisibilityMacros.rst 
b/libcxx/docs/DesignDocs/VisibilityMacros.rst
index d0d4f0adb220..20237b74de6a 100644
--- a/libcxx/docs/DesignDocs/VisibilityMacros.rst
+++ b/libcxx/docs/DesignDocs/VisibilityMacros.rst
@@ -131,12 +131,6 @@ Visibility Macros
   specified on the primary template and to export the member functions produced
   by the explicit instantiation in the dylib.
 
-  **GCC Behavior**: GCC ignores visibility attributes applied the type in
-  extern template declarations and applying an attribute results in a warning.
-  However since `_LIBCPP_TEMPLATE_VIS` is the same as
-  `__attribute__((visibility("default"))` the visibility is already correct.
-  The macro has an empty definition with GCC.
-
   **Windows Behavior**: `extern template` and `dllexport` are fundamentally
   incompatible *on a class template* on Windows; the former suppresses
   instantiation, while the latter forces it. Specifying both on the same

diff  --git a/libcxx/include/__config b/libcxx/include/__config
index f1606c6d3b1c..a6ed66857d75 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -718,7 +718,7 @@ typedef __char32_t char32_t;
 #endif
 
 #ifndef _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS
-#  if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && 
__has_attribute(__type_visibility__)
+#  if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
 #define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __attribute__ 
((__visibility__("default")))
 #  else
 #define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS



___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] 4dbb3f5 - [clang] Add llvm-strip to test dependencies

2021-01-09 Thread Shoaib Meenai via llvm-branch-commits

Author: Shoaib Meenai
Date: 2021-01-09T11:57:27-08:00
New Revision: 4dbb3f57c6fe581ef525dbe49a401f4bab834eff

URL: 
https://github.com/llvm/llvm-project/commit/4dbb3f57c6fe581ef525dbe49a401f4bab834eff
DIFF: 
https://github.com/llvm/llvm-project/commit/4dbb3f57c6fe581ef525dbe49a401f4bab834eff.diff

LOG: [clang] Add llvm-strip to test dependencies

CodeGen/thinlto_embed_bitcode.ll relies on it.

Added: 


Modified: 
clang/test/CMakeLists.txt

Removed: 




diff  --git a/clang/test/CMakeLists.txt b/clang/test/CMakeLists.txt
index a913b35ed567..562a14826033 100644
--- a/clang/test/CMakeLists.txt
+++ b/clang/test/CMakeLists.txt
@@ -122,6 +122,7 @@ if( NOT CLANG_BUILT_STANDALONE )
 llvm-profdata
 llvm-readelf
 llvm-readobj
+llvm-strip
 llvm-symbolizer
 opt
 split-file



___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [lld] 05d07e4 - [lld] Fix typo in 15.x release notes

2022-08-29 Thread Shoaib Meenai via llvm-branch-commits

Author: Shoaib Meenai
Date: 2022-08-29T16:33:53+05:00
New Revision: 05d07e41b3c5bccf8c9b93ae93ee05518a7435f1

URL: 
https://github.com/llvm/llvm-project/commit/05d07e41b3c5bccf8c9b93ae93ee05518a7435f1
DIFF: 
https://github.com/llvm/llvm-project/commit/05d07e41b3c5bccf8c9b93ae93ee05518a7435f1.diff

LOG: [lld] Fix typo in 15.x release notes

The flag is -femit-dwarf-unwind, not -femit-compact-unwind.

Added: 


Modified: 
lld/docs/ReleaseNotes.rst

Removed: 




diff  --git a/lld/docs/ReleaseNotes.rst b/lld/docs/ReleaseNotes.rst
index 80d89984f5df0..d9a93d342c73c 100644
--- a/lld/docs/ReleaseNotes.rst
+++ b/lld/docs/ReleaseNotes.rst
@@ -98,7 +98,7 @@ MachO Improvements
 
 * We now support proper relocation and pruning of EH frames. **Note:** this
   comes at some performance overhead on x86_64 builds, and we recommend adding
-  the ``-femit-compact-unwind=no-compact-unwind`` compile flag to avoid it.
+  the ``-femit-dwarf-unwind=no-compact-unwind`` compile flag to avoid it.
   (`D129540 `_,
   `D122258 `_)
 



___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] [clang][CIR] Merge the mlir::cir namespace into cir (PR #115386)

2024-11-07 Thread Shoaib Meenai via llvm-branch-commits

smeenai wrote:

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* (to be filled)

https://github.com/llvm/llvm-project/pull/115386
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] [clang][CIR] Merge the mlir::cir namespace into cir (PR #115386)

2024-11-07 Thread Shoaib Meenai via llvm-branch-commits

https://github.com/smeenai created 
https://github.com/llvm/llvm-project/pull/115386

https://github.com/llvm/clangir/issues/1025 discusses the motivation.
The mechanical parts of this change were done via:
find clang \( -name '*.h' -o -name '*.cpp' -o -name '*.td' \) -print0 | 
xargs -0 perl -pi -e 's/mlir::cir/cir/g'
find clang \( -name '*.h' -o -name '*.cpp' \) -print0 | xargs -0 perl -pi 
-e 's/::cir/cir/g'

There were some manual fixups and a clang-format run afterwards.

>From d6f7f57e206c39be3af09a2fbfb84ae8759bce99 Mon Sep 17 00:00:00 2001
From: Shoaib Meenai 
Date: Thu, 7 Nov 2024 14:36:25 -0800
Subject: [PATCH] Update

[ghstack-poisoned]
---
 clang/include/clang/CIR/Dialect/IR/CIRDialect.td   | 14 --
 clang/include/clang/CIR/Dialect/IR/CIROps.td   |  8 
 clang/lib/CIR/CodeGen/CIRGenModule.cpp |  2 +-
 clang/lib/CIR/CodeGen/CIRGenerator.cpp |  2 +-
 clang/lib/CIR/Dialect/IR/CIRAttrs.cpp  |  2 +-
 clang/lib/CIR/Dialect/IR/CIRDialect.cpp| 10 +-
 clang/lib/CIR/Dialect/IR/CIRTypes.cpp  |  2 +-
 .../lib/FrontendTool/ExecuteCompilerInvocation.cpp |  2 +-
 8 files changed, 22 insertions(+), 20 deletions(-)

diff --git a/clang/include/clang/CIR/Dialect/IR/CIRDialect.td 
b/clang/include/clang/CIR/Dialect/IR/CIRDialect.td
index 69d6e9774942b9d..305a06427ed0e0e 100644
--- a/clang/include/clang/CIR/Dialect/IR/CIRDialect.td
+++ b/clang/include/clang/CIR/Dialect/IR/CIRDialect.td
@@ -22,7 +22,7 @@ def CIR_Dialect : Dialect {
   let summary = "A high-level dialect for analyzing and optimizing Clang "
 "supported languages";
 
-  let cppNamespace = "::mlir::cir";
+  let cppNamespace = "::cir";
 
   let useDefaultAttributePrinterParser = 0;
   let useDefaultTypePrinterParser = 0;
@@ -31,13 +31,15 @@ def CIR_Dialect : Dialect {
 void registerAttributes();
 void registerTypes();
 
-Type parseType(DialectAsmParser &parser) const override;
-void printType(Type type, DialectAsmPrinter &printer) const override;
+mlir::Type parseType(mlir::DialectAsmParser &parser) const override;
+void printType(mlir::Type type,
+   mlir::DialectAsmPrinter &printer) const override;
 
-Attribute parseAttribute(DialectAsmParser &parser,
- Type type) const override;
+mlir::Attribute parseAttribute(mlir::DialectAsmParser &parser,
+   mlir::Type type) const override;
 
-void printAttribute(Attribute attr, DialectAsmPrinter &os) const override;
+void printAttribute(mlir::Attribute attr,
+mlir::DialectAsmPrinter &os) const override;
   }];
 }
 
diff --git a/clang/include/clang/CIR/Dialect/IR/CIROps.td 
b/clang/include/clang/CIR/Dialect/IR/CIROps.td
index c0440faa3c7b17e..4462eb6fc00bae4 100644
--- a/clang/include/clang/CIR/Dialect/IR/CIROps.td
+++ b/clang/include/clang/CIR/Dialect/IR/CIROps.td
@@ -51,12 +51,12 @@ include "mlir/Interfaces/SideEffectInterfaces.td"
 // following:
 //
 //   class CIRFooOpLowering
-//   : public mlir::OpConversionPattern {
+//   : public mlir::OpConversionPattern {
 //   public:
-// using OpConversionPattern::OpConversionPattern;
+// using OpConversionPattern::OpConversionPattern;
 //
 // mlir::LogicalResult matchAndRewrite(
-// mlir::cir::FooOp op,
+// cir::FooOp op,
 // OpAdaptor adaptor,
 // mlir::ConversionPatternRewriter &rewriter) const override {
 //   rewriter.replaceOpWithNewOp(
@@ -92,7 +92,7 @@ def FuncOp : CIR_Op<"func"> {
 
   let skipDefaultBuilders = 1;
 
-  let builders = [OpBuilder<(ins "StringRef":$name)>];
+  let builders = [OpBuilder<(ins "llvm::StringRef":$name)>];
 
   let hasCustomAssemblyFormat = 1;
   let hasVerifier = 1;
diff --git a/clang/lib/CIR/CodeGen/CIRGenModule.cpp 
b/clang/lib/CIR/CodeGen/CIRGenModule.cpp
index 5a6fc27a130c8f1..4e8a8cc3f4c524f 100644
--- a/clang/lib/CIR/CodeGen/CIRGenModule.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenModule.cpp
@@ -77,7 +77,7 @@ void CIRGenModule::buildGlobal(clang::GlobalDecl gd) {
 void CIRGenModule::buildGlobalFunctionDefinition(clang::GlobalDecl gd,
  mlir::Operation *op) {
   auto const *funcDecl = cast(gd.getDecl());
-  auto funcOp = builder.create(
+  auto funcOp = builder.create(
   getLoc(funcDecl->getSourceRange()), 
funcDecl->getIdentifier()->getName());
   theModule.push_back(funcOp);
 }
diff --git a/clang/lib/CIR/CodeGen/CIRGenerator.cpp 
b/clang/lib/CIR/CodeGen/CIRGenerator.cpp
index 825f78d32e76f04..85367a916ef7830 100644
--- a/clang/lib/CIR/CodeGen/CIRGenerator.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenerator.cpp
@@ -35,7 +35,7 @@ void CIRGenerator::Initialize(ASTContext &astCtx) {
   this->astCtx = &astCtx;
 
   mlirCtx = std::make_unique();
-  mlirCtx->loadDialect();
+  mlirCtx->loadDialect();
   cgm = std::make_unique(*mlirCtx.get(), astCtx,
 

[llvm-branch-commits] [clang] [clang][CIR] Merge the mlir::cir namespace into cir (PR #115386)

2024-11-07 Thread Shoaib Meenai via llvm-branch-commits

https://github.com/smeenai edited 
https://github.com/llvm/llvm-project/pull/115386
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] [clang][CIR] Merge the mlir::cir namespace into cir (PR #115386)

2024-11-07 Thread Shoaib Meenai via llvm-branch-commits

smeenai wrote:

The Windows CI error is an unrelated infra failure, but I don't know how to 
retry it.

https://github.com/llvm/llvm-project/pull/115386
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits