[clang] [clang][LoongArch] Align global symbol by size (PR #101309)

2024-08-01 Thread via cfe-commits
heiher wrote: @nikic @s-barannikov Thanks for your guidance and help. https://github.com/llvm/llvm-project/pull/101309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][LoongArch] Align global symbol by size (PR #101309)

2024-07-31 Thread Nikita Popov via cfe-commits
nikic wrote: I think for your use case you want to implement the shouldAlignPointerArgs() hook. It exists to allow raising GV/Alloca alignment for objects used inside memcpy and similar. Check out the ARM backend for an example. https://github.com/llvm/llvm-project/pull/101309

[clang] [clang][LoongArch] Align global symbol by size (PR #101309)

2024-07-31 Thread Sergei Barannikov via cfe-commits
s-barannikov wrote: > > > > This looks wrong. Preferred and ABI alignments should be set in > > > > ~Triple~. ADD: Sorry, I meant DataLayout, of course. > > > > > > > > > Thanks for pointing this out. How does data layout affect the alignment > > > of constant string global variable symbols?

[clang] [clang][LoongArch] Align global symbol by size (PR #101309)

2024-07-31 Thread via cfe-commits
heiher wrote: > > > This looks wrong. Preferred and ABI alignments should be set in ~Triple~. > > > ADD: Sorry, I meant DataLayout, of course. > > > > > > Thanks for pointing this out. How does data layout affect the alignment of > > constant string global variable symbols? > > They will be

[clang] [clang][LoongArch] Align global symbol by size (PR #101309)

2024-07-31 Thread Sergei Barannikov via cfe-commits
s-barannikov wrote: > > This looks wrong. Preferred and ABI alignments should be set in ~Triple~. > > ADD: Sorry, I meant DataLayout, of course. > > Thanks for pointing this out. How does data layout affect the alignment of > constant string global variable symbols? They will be aligned to th

[clang] [clang][LoongArch] Align global symbol by size (PR #101309)

2024-07-31 Thread via cfe-commits
heiher wrote: > This looks wrong. Preferred and ABI alignments should be set in ~Triple~. > ADD: Sorry, I meant DataLayout, of course. Thanks for pointing this out. How does data layout affect the alignment of constant string global variable symbols? https://github.com/llvm/llvm-project/pull/

[clang] [clang][LoongArch] Align global symbol by size (PR #101309)

2024-07-31 Thread Sergei Barannikov via cfe-commits
s-barannikov wrote: This looks wrong. Preferred and ABI alignments should be set in Triple. https://github.com/llvm/llvm-project/pull/101309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [clang][LoongArch] Align global symbol by size (PR #101309)

2024-07-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: hev (heiher) Changes Fixes #101295 --- Full diff: https://github.com/llvm/llvm-project/pull/101309.diff 3 Files Affected: - (modified) clang/lib/Basic/Targets/LoongArch.cpp (+17) - (modified) clang/lib/Basic/Targets/LoongArch.h (+3) -

[clang] [clang][LoongArch] Align global symbol by size (PR #101309)

2024-07-31 Thread via cfe-commits
https://github.com/heiher created https://github.com/llvm/llvm-project/pull/101309 Fixes #101295 >From 34c558dda32076634d9575a32a0508e576c13d0b Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Wed, 31 Jul 2024 17:11:56 +0800 Subject: [PATCH] [clang][LoongArch] Align global symbol by size Fixes #