[PATCH] D97116: Reduce the number of attributes attached to each function

2021-04-08 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:496 //function. - CurFn->addFnAttr("min-legal-vector-width", llvm::utostr(LargestVectorWidth)); + if (LargestVectorWidth) +CurFn->addFnAttr("min-legal-vector-width",

[PATCH] D97116: Reduce the number of attributes attached to each function

2021-04-08 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:496 //function. - CurFn->addFnAttr("min-legal-vector-width", llvm::utostr(LargestVectorWidth)); + if (LargestVectorWidth) +CurFn->addFnAttr("min-legal-vector-width",

[PATCH] D87981: [X86] AMX programming model prototype.

2020-11-16 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added a comment. Please add register allocation code owner: "qcolombet" to the reviewer list. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87981/new/ https://reviews.llvm.org/D87981 ___

[PATCH] D87981: [X86] AMX programming model prototype.

2020-11-16 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added inline comments. Comment at: llvm/include/llvm/CodeGen/LiveRegMatrix.h:44 VirtRegMap *VRM; + MachineRegisterInfo *MRI; what's the purpose of this member? Comment at: llvm/lib/Target/X86/X86RegisterInfo.cpp:917 + } + for

[PATCH] D60748: Fix i386 struct and union parameter alignment

2019-09-11 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added a comment. @RKSimon I'm busy with other stuff and my colleague: LiuChen3 will help finish the work. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60748/new/ https://reviews.llvm.org/D60748 ___

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-06-18 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added a comment. Can anyone provide me some small reproducers code for the issue tripped over by Chromium / Skia? Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59744/new/ https://reviews.llvm.org/D59744 ___

[PATCH] D63473: Support -fclang-abi-compat=8.0 to keep old ABI behavior

2019-06-18 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 updated this revision to Diff 205261. wxiao3 added a reviewer: compnerd. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63473/new/ https://reviews.llvm.org/D63473 Files: docs/ReleaseNotes.rst include/clang/Basic/LangOptions.h lib/CodeGen/TargetInfo.cpp

[PATCH] D63473: Support -fclang-abi-compat=8.0 to keep old ABI behavior

2019-06-18 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 marked an inline comment as done. wxiao3 added a comment. Yes, there is a test to ensure that Darwin defaults to the old behaviour in "test/CodeGen/x86_32-m64.c". CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63473/new/ https://reviews.llvm.org/D63473

[PATCH] D63473: Support -fclang-abi-compat=8.0 to keep old ABI behavior

2019-06-17 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 created this revision. wxiao3 added reviewers: annita.zhang, LuoYuanke, smaslov, craig.topper, hjl.tools, rnk, andreadb, gbedwell, rjmccall, krytarowski, mgorny, joerg, RKSimon, hans, thakis. Herald added a project: clang. Herald added a subscriber: cfe-commits. The System V i386 bug fix

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-06-17 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added a comment. I have created a patch for you: https://reviews.llvm.org/D63473 Is it ok? Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59744/new/ https://reviews.llvm.org/D59744 ___ cfe-commits mailing list

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-06-17 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added a comment. @hans Please make sure all Chromium for 32-bit Linux libraries are following System V ABI (i.e., m64 is passed on mmx register). I suspect that there are some hand written assembly code in your libraries which is not following the ABI. Repository: rL LLVM CHANGES

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-06-11 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added a comment. Thanks for the comments! Updated for landing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59744/new/ https://reviews.llvm.org/D59744 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-06-11 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 updated this revision to Diff 204197. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59744/new/ https://reviews.llvm.org/D59744 Files: lib/CodeGen/TargetInfo.cpp test/CodeGen/x86_32-arguments-linux.c test/CodeGen/x86_32-m64.c Index: test/CodeGen/x86_32-m64.c

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-06-11 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added a comment. Thanks for the suggestions! I have updated it. Ok now? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59744/new/ https://reviews.llvm.org/D59744 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-06-11 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 updated this revision to Diff 204057. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59744/new/ https://reviews.llvm.org/D59744 Files: lib/CodeGen/TargetInfo.cpp test/CodeGen/x86_32-arguments-linux.c test/CodeGen/x86_32-m64.c Index: test/CodeGen/x86_32-m64.c

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-06-06 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added a comment. Thanks for the suggestions! I have updated the patch accordingly. Ok for merge now? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59744/new/ https://reviews.llvm.org/D59744 ___ cfe-commits mailing list

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-06-06 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 updated this revision to Diff 203492. wxiao3 edited the summary of this revision. wxiao3 added a reviewer: mgorny. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59744/new/ https://reviews.llvm.org/D59744 Files: lib/CodeGen/TargetInfo.cpp test/CodeGen/x86_32-arguments-linux.c

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-06-03 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added a comment. Consider other Systems (e.g Darwin, PS4 and FreeBSD) don't want to spend any effort dealing with the ramifications of ABI breaks (as discussed in https://reviews.llvm.org/D60748) at present, I only fix the bug for Linux. If other system wants the fix, the only thing

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-06-01 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added a comment. Hi all, With the latest version, I have made below changes according to all your comments: 1. Only apply the fix to Linux where many libraries are built by GCC. 2. Avoid converting the QualType to llvm::Type and then checking if the llvm::Type is a 64-bit vector, which

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-06-01 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 updated this revision to Diff 202579. wxiao3 edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59744/new/ https://reviews.llvm.org/D59744 Files: lib/CodeGen/TargetInfo.cpp test/CodeGen/x86_32-arguments-linux.c test/CodeGen/x86_32-m64.c

[PATCH] D60748: Fix i386 struct and union parameter alignment

2019-05-30 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added a comment. Thanks for the information! We have reverted the patch and will resubmit it when we have a complete fix. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60748/new/ https://reviews.llvm.org/D60748

[PATCH] D60748: Fix i386 struct and union parameter alignment

2019-05-28 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added a comment. Ok for merge now? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60748/new/ https://reviews.llvm.org/D60748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D60748: Fix i386 struct and union parameter alignment

2019-05-13 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added a comment. Yes, the ABI bug will cause SEGV in Linux where a lot of libraries are built by GCC. I have restricted the fix to Linux only in the latest revision. Any other comments? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60748/new/ https://reviews.llvm.org/D60748

[PATCH] D60748: Fix i386 struct and union parameter alignment

2019-05-13 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 updated this revision to Diff 199360. wxiao3 edited the summary of this revision. Herald added a subscriber: krytarowski. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60748/new/ https://reviews.llvm.org/D60748 Files: lib/CodeGen/TargetInfo.cpp

[PATCH] D60748: Fix i386 struct and union parameter alignment

2019-05-13 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added a comment. Any other comments? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60748/new/ https://reviews.llvm.org/D60748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-05-13 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 marked an inline comment as done. wxiao3 added inline comments. Comment at: lib/CodeGen/TargetInfo.cpp:919 /// IsX86_MMXType - Return true if this is an MMX type. bool IsX86_MMXType(llvm::Type *IRType) { - // Return true if the type is an MMX type <2 x i32>, <4 x i16>,

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-05-13 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 updated this revision to Diff 199233. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59744/new/ https://reviews.llvm.org/D59744 Files: lib/CodeGen/TargetInfo.cpp test/CodeGen/vector.c test/CodeGen/x86_32-arguments-darwin.c test/CodeGen/x86_32-arguments-linux.c

[PATCH] D60748: Fix i386 struct and union parameter alignment

2019-05-13 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 updated this revision to Diff 199231. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60748/new/ https://reviews.llvm.org/D60748 Files: lib/CodeGen/TargetInfo.cpp test/CodeGen/vector.c test/CodeGen/x86_32-arguments-darwin.c test/CodeGen/x86_32-arguments-linux.c

[PATCH] D60748: Fix i386 struct and union parameter alignment

2019-05-13 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 updated this revision to Diff 199232. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60748/new/ https://reviews.llvm.org/D60748 Files: lib/CodeGen/TargetInfo.cpp test/CodeGen/x86_32-align-linux.c test/CodeGen/x86_32-arguments-linux.c Index:

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-04-27 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 marked 2 inline comments as done. wxiao3 added inline comments. Comment at: lib/CodeGen/TargetInfo.cpp:919 /// IsX86_MMXType - Return true if this is an MMX type. bool IsX86_MMXType(llvm::Type *IRType) { - // Return true if the type is an MMX type <2 x i32>, <4 x i16>,

[PATCH] D60748: Fix i386 struct and union parameter alignment

2019-04-27 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added a comment. Ok, I have excluded Darwin and PS4 for the changes. The fix mainly targets at Linux so that we can compile a project with parts by GCC and parts by LLVM given that they follow the same ABI. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60748/new/

[PATCH] D60748: Fix i386 struct and union parameter alignment

2019-04-27 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 updated this revision to Diff 196967. wxiao3 edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60748/new/ https://reviews.llvm.org/D60748 Files: lib/CodeGen/TargetInfo.cpp test/CodeGen/x86_32-align-linux.c

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-04-17 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 updated this revision to Diff 195660. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59744/new/ https://reviews.llvm.org/D59744 Files: lib/CodeGen/TargetInfo.cpp test/CodeGen/vector.c test/CodeGen/x86_32-arguments-darwin.c test/CodeGen/x86_32-arguments-linux.c

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-04-17 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 updated this revision to Diff 195659. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59744/new/ https://reviews.llvm.org/D59744 Files: lib/CodeGen/TargetInfo.cpp test/CodeGen/x86_32-arguments-linux.c test/CodeGen/x86_32-mmx-linux.c Index: test/CodeGen/x86_32-mmx-linux.c

[PATCH] D60748: Fix i386 struct and union parameter alignment

2019-04-15 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 created this revision. wxiao3 added reviewers: annita.zhang, LuoYuanke, smaslov, hjl.tools, RKSimon, rnk, andreadb. wxiao3 added a project: clang. Herald added a subscriber: cfe-commits. According to i386 System V ABI 2.1: Structures and unions assume the alignment of their most strictly

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-04-15 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 updated this revision to Diff 195291. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59744/new/ https://reviews.llvm.org/D59744 Files: lib/CodeGen/TargetInfo.cpp test/CodeGen/vector.c test/CodeGen/x86_32-arguments-darwin.c test/CodeGen/x86_32-arguments-linux.c

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-04-15 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 updated this revision to Diff 195096. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59744/new/ https://reviews.llvm.org/D59744 Files: lib/CodeGen/TargetInfo.cpp test/CodeGen/vector.c test/CodeGen/x86_32-arguments-darwin.c test/CodeGen/x86_32-arguments-linux.c

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-04-03 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 added a comment. Dear reviewers, any comments? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59744/new/ https://reviews.llvm.org/D59744 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-03-23 Thread Wei Xiao via Phabricator via cfe-commits
wxiao3 created this revision. wxiao3 added reviewers: annita.zhang, LuoYuanke, smaslov, craig.topper, hjl.tools. Herald added a project: clang. Herald added a subscriber: cfe-commits. According to System V i386 ABI: the "__m64" type paramater and return va passed by MMX registers. But current