[PATCH] D91455: [XCOFF][AIX] Generate LSDA data and compact unwind section on AIX

2020-12-02 Thread Jason Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa65d8c5d720d: [XCOFF][AIX] Generate LSDA data and compact unwind section on AIX (authored by jasonliu). Herald added a project: clang. Changed prior to commit:

[PATCH] D91455: [XCOFF][AIX] Generate LSDA data and compact unwind section on AIX

2020-12-01 Thread Jason Liu via Phabricator via cfe-commits
jasonliu marked 2 inline comments as done. jasonliu added inline comments. Comment at: llvm/test/CodeGen/PowerPC/aix-exception.ll:108-109 +; ASM: .byte 255 # @LPStart Encoding = omit +; ASM32: .byte 187 #

[PATCH] D91455: [XCOFF][AIX] Generate LSDA data and compact unwind section on AIX

2020-12-01 Thread Jason Liu via Phabricator via cfe-commits
jasonliu updated this revision to Diff 308752. jasonliu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91455/new/ https://reviews.llvm.org/D91455 Files: clang/lib/CodeGen/CGCleanup.h clang/lib/CodeGen/CGException.cpp

[PATCH] D91455: [XCOFF][AIX] Generate LSDA data and compact unwind section on AIX

2020-12-01 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: llvm/lib/CodeGen/AsmPrinter/AIXException.cpp:68 +Per = dyn_cast(F.getPersonalityFn()->stripPointerCasts()); + bool EmitEHBlock = + HasLandingPads || (F.hasPersonalityFn() && daltenty wrote: > This logic seems

[PATCH] D91455: [XCOFF][AIX] Generate LSDA data and compact unwind section on AIX

2020-12-01 Thread Jason Liu via Phabricator via cfe-commits
jasonliu updated this revision to Diff 308653. jasonliu added a comment. Address comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91455/new/ https://reviews.llvm.org/D91455 Files: clang/lib/CodeGen/CGCleanup.h clang/lib/CodeGen/CGException.cpp

[PATCH] D91455: [XCOFF][AIX] Generate LSDA data and compact unwind section on AIX

2020-11-30 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added a comment. In D91455#2424584 , @hubert.reinterpretcast wrote: >> 2. AIX uses a new personality routine, named __xlcxx_personality_v1. It >> doesn't use the GCC personality rountine, because the intractability is not >> there yet on AIX.

[PATCH] D91455: [XCOFF][AIX] Generate LSDA data and compact unwind section on AIX

2020-11-30 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: llvm/lib/MC/MCObjectFileInfo.cpp:889 + CompactUnwindSection = + Ctx->getXCOFFSection(".eh_info_table", XCOFF::StorageMappingClass::XMC_RW, + XCOFF::XTY_SD, SectionKind::getData());

[PATCH] D91455: [XCOFF][AIX] Generate LSDA data and compact unwind section on AIX

2020-11-30 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: llvm/lib/MC/MCObjectFileInfo.cpp:889 + CompactUnwindSection = + Ctx->getXCOFFSection(".eh_info_table", XCOFF::StorageMappingClass::XMC_RW, + XCOFF::XTY_SD, SectionKind::getData());

[PATCH] D91455: [XCOFF][AIX] Generate LSDA data and compact unwind section on AIX

2020-11-13 Thread Jason Liu via Phabricator via cfe-commits
jasonliu created this revision. jasonliu added reviewers: xingxue, hubert.reinterpretcast, cebowleratibm, DiggerLin, daltenty. Herald added subscribers: llvm-commits, kbarton, hiraditya, mgorny, nemanjai. Herald added a project: LLVM. jasonliu requested review of this revision. Herald added a

[PATCH] D89986: [AIX] do not emit visibility attribute into IR when there is -mignore-xcoff-visibility

2020-10-26 Thread Jason Liu via Phabricator via cfe-commits
jasonliu accepted this revision. jasonliu added a comment. This revision is now accepted and ready to land. LGTM with minor nit. Comment at: clang/lib/AST/Decl.cpp:1481 LinkageInfo LinkageComputer::getDeclLinkageAndVisibility(const NamedDecl *D) { - return getLVForDecl(D, -

[PATCH] D89986: [AIX] do not emit visibility attribute into IR when there is -mignore-xcoff-visibility

2020-10-26 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:520 Options.DataSections = CodeGenOpts.DataSections; - Options.IgnoreXCOFFVisibility = CodeGenOpts.IgnoreXCOFFVisibility; Options.UniqueSectionNames = CodeGenOpts.UniqueSectionNames;

[PATCH] D89986: [AIX] do not emit visibility attribute into IR when there is -mignore-xcoff-visibility

2020-10-26 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:520 Options.DataSections = CodeGenOpts.DataSections; - Options.IgnoreXCOFFVisibility = CodeGenOpts.IgnoreXCOFFVisibility; Options.UniqueSectionNames = CodeGenOpts.UniqueSectionNames;

[PATCH] D89986: [AIX] do not emit visibility attribute into IR when there is -mignore-xcoff-visibility

2020-10-26 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:520 Options.DataSections = CodeGenOpts.DataSections; - Options.IgnoreXCOFFVisibility = CodeGenOpts.IgnoreXCOFFVisibility; Options.UniqueSectionNames = CodeGenOpts.UniqueSectionNames;

[PATCH] D89986: [AIX] do not emit visibility attribute into IR when there is -mignore-xcoff-visibility

2020-10-26 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:520 Options.DataSections = CodeGenOpts.DataSections; - Options.IgnoreXCOFFVisibility = CodeGenOpts.IgnoreXCOFFVisibility; Options.UniqueSectionNames = CodeGenOpts.UniqueSectionNames;

[PATCH] D89897: [AIX] Emit error for -G option on AIX

2020-10-21 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added a comment. Could we add some rationale to the patch summary about why we would want to deliberately emitting an error for AIX? Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4924 + if (RawTriple.isOSAIX()) +if (Arg *A =

[PATCH] D88737: [AIX] Turn -fdata-sections on by default in Clang

2020-10-14 Thread Jason Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf85bcc21ddad: [AIX] Turn -fdata-sections on by default in Clang (authored by jasonliu). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D88737?vs=296965=298160#toc

[PATCH] D88737: [AIX] Turn -fdata-sections on by default in Clang

2020-10-13 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added a comment. Hi Fangrui(@MaskRay), are you okay with this patch to land as is? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88737/new/ https://reviews.llvm.org/D88737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D88737: [AIX] Turn -fdata-sections on by default in Clang

2020-10-09 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added a comment. In D88737#2321921 , @MaskRay wrote: > A less intrusive approach is to not touch the existing > InitTargetOptionsFromCodeGenFlags without parameters. You can add an > `initTargetOptionsFromCodeGenFlags` with `const Tripe &` as

[PATCH] D87702: [Frontend] Add pragma align natural and sort out pragma pack stack effect

2020-10-08 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/include/clang/Basic/LangOptions.def:340 +LANGOPT(AIXPragmaPack, 1, 0, "AIX #pragma pack handling") + Not sure if AIXPragmaPack is the best name here. It's more like IBM xl pragma pack handling on AIX. Would it

[PATCH] D88737: [AIX] Turn -fdata-sections on by default in Clang

2020-10-08 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: lld/Common/TargetOptionsCommandFlags.cpp:17 +llvm::TargetOptions +lld::initTargetOptionsFromCodeGenFlags(const llvm::Triple ) { + return llvm::codegen::InitTargetOptionsFromCodeGenFlags(TheTriple); MaskRay wrote: >

[PATCH] D88737: [AIX] Turn -fdata-sections on by default in Clang

2020-10-08 Thread Jason Liu via Phabricator via cfe-commits
jasonliu updated this revision to Diff 296965. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88737/new/ https://reviews.llvm.org/D88737 Files: clang/lib/Driver/ToolChains/Clang.cpp clang/test/Driver/aix-data-sections.c clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp

[PATCH] D87451: add new option -mignore-xcoff-visibility

2020-10-07 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: llvm/include/llvm/Target/TargetOptions.h:126 FunctionSections(false), DataSections(false), - UniqueSectionNames(true), UniqueBasicBlockSectionNames(false), - TrapUnreachable(false),

[PATCH] D88737: [AIX] Turn -fdata-sections on by default in Clang

2020-10-07 Thread Jason Liu via Phabricator via cfe-commits
jasonliu updated this revision to Diff 296665. jasonliu added a comment. Change lld's forwarder function's signature to match LLVM style. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88737/new/ https://reviews.llvm.org/D88737 Files: clang/lib/Driver/ToolChains/Clang.cpp

[PATCH] D88737: [AIX] Turn -fdata-sections on by default in Clang

2020-10-07 Thread Jason Liu via Phabricator via cfe-commits
jasonliu marked an inline comment as done. jasonliu added inline comments. Comment at: clang/test/Driver/aix-data-sections.c:7 +// RUN: | FileCheck %s +// CHECK: "-fdata-sections" DiggerLin wrote: > may be good to check the whether other OS platform behavior

[PATCH] D88737: [AIX] Turn -fdata-sections on by default in Clang

2020-10-02 Thread Jason Liu via Phabricator via cfe-commits
jasonliu updated this revision to Diff 295950. jasonliu added a comment. Herald added subscribers: llvm-commits, nemanjai. Herald added a project: LLVM. An update follows up with the idea in D88748 . CHANGES SINCE LAST ACTION

[PATCH] D88737: [AIX] Turn -fdata-sections on by default in Clang

2020-10-02 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/include/clang/Basic/CodeGenOptions.def:47 +CODEGENOPT(DataSections , 1, 0) ///< Set by default, or when -f[no-]data-sections. +CODEGENOPT(HasExplicitDataSections, 1, 0) ///< Set when -f[no-]data-sections is set.

[PATCH] D88737: [AIX] Turn -fdata-sections on by default in Clang

2020-10-02 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/include/clang/Basic/CodeGenOptions.def:47 +CODEGENOPT(DataSections , 1, 0) ///< Set by default, or when -f[no-]data-sections. +CODEGENOPT(HasExplicitDataSections, 1, 0) ///< Set when -f[no-]data-sections is set.

[PATCH] D88737: [AIX] Turn -fdata-sections on by default in Clang

2020-10-02 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added a comment. Not sure if there is a better way to do this. But I have to admit this approach along with D88493 is a bit fragile. If plug-in writer forgets to set `HasExplicitDataSections` to true, then the final result that TargetMachine give for

[PATCH] D88737: [AIX] Turn -fdata-sections on by default in Clang

2020-10-02 Thread Jason Liu via Phabricator via cfe-commits
jasonliu created this revision. jasonliu added reviewers: hubert.reinterpretcast, daltenty, sfertile, Xiangling_L, DiggerLin. Herald added subscribers: dang, dexonsmith, steven_wu, hiraditya, arichardson, sbc100, emaste. Herald added a reviewer: espindola. Herald added a reviewer: MaskRay.

[PATCH] D88260: [NFC][FE] Replace TypeSize with StorageUnitSize

2020-09-29 Thread Jason Liu via Phabricator via cfe-commits
jasonliu accepted this revision. jasonliu added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1749-1750 -// Otherwise, allocate just the number of bytes required to store -// the bitfield. +

[PATCH] D86790: [FE] Use preferred alignment instead of ABI alignment for complete object when applicable

2020-09-28 Thread Jason Liu via Phabricator via cfe-commits
jasonliu accepted this revision. jasonliu added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86790/new/ https://reviews.llvm.org/D86790 ___ cfe-commits mailing list

[PATCH] D86790: [FE] Use preferred alignment instead of ABI alignment for complete object when applicable

2020-09-28 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/test/CodeGenCXX/aix-alignment.cpp:16 +// AIX64: %call = call noalias nonnull i8* @_Znam(i64 8) +B *allocBp() { return new B[0]; } + I believe we would also want to add a test for the delete call to verify the

[PATCH] D87451: add new clang option -mno-xcoff-visibility

2020-09-24 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: llvm/include/llvm/Target/TargetMachine.h:265 + /// corresponding to -mno-xcoff-visibility. + bool getNoXCOFFVisibility() const { return Options.NoXCOFFVisibility; } + DiggerLin wrote: > daltenty wrote: > > This seems

[PATCH] D87451: add new clang option -mno-xcoff-visibility

2020-09-24 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/docs/ClangCommandLineReference.rst:2310 +.. option:: -mno-xcoff-visibility + It's rare to see an option with only the negative form. Could we rename and make it a positive form somehow? Also we would need to

[PATCH] D87029: [AIX] Implement AIX special bitfield related alignment rules

2020-09-21 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added a comment. I think it would help the review if we could put the NFC portion(e.g. TypeSize -> StorageUnitSize) to a new patch, and give some rationale about the NFC change. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:624 /// a byte, but larger units

[PATCH] D87914: [AIX][Clang][Driver] Add handling of shared option

2020-09-21 Thread Jason Liu via Phabricator via cfe-commits
jasonliu accepted this revision. jasonliu added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87914/new/ https://reviews.llvm.org/D87914

[PATCH] D87904: [AIX][Clang][Driver] Add handling of nostartfiles option

2020-09-18 Thread Jason Liu via Phabricator via cfe-commits
jasonliu accepted this revision. jasonliu added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87904/new/ https://reviews.llvm.org/D87904

[PATCH] D87702: [Frontend] Add pragma align natural and sort out pragma pack stack effect

2020-09-18 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/include/clang/Sema/Sema.h:66 #include "llvm/Frontend/OpenMP/OMPConstants.h" +#include #include Do we need cmath? Comment at: clang/include/clang/Sema/Sema.h:488 +

[PATCH] D86790: [FE] Use preferred alignment instead of ABI alignment for complete object when applicable

2020-09-18 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/include/clang/AST/ASTContext.h:259 mutable TypeInfoMap MemoizedTypeInfo; + /// /// A cache from types to size and preferred alignment information. + mutable TypeInfoMap MemoizedPreferredTypeInfo; nit: Extra

[PATCH] D87451: add new clang option -mignore-xcoff-visibility

2020-09-16 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/docs/ClangCommandLineReference.rst:2310 +.. option:: -mignore-xcoff-visibility + We should move this option to where all the other -m options resides. Comment at:

[PATCH] D84534: [AIX] Static init frontend recovery and backend support

2020-08-07 Thread Jason Liu via Phabricator via cfe-commits
jasonliu accepted this revision. jasonliu added a comment. This revision is now accepted and ready to land. Thanks. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84534/new/ https://reviews.llvm.org/D84534 ___ cfe-commits mailing list

[PATCH] D84534: [AIX] Static init frontend recovery and backend support

2020-08-06 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: llvm/include/llvm/CodeGen/AsmPrinter.h:466 + + bool preprocessStructorList(const DataLayout , const Constant *List, + SmallVector ); Xiangling_L wrote: > jasonliu wrote: > > Xiangling_L

[PATCH] D84534: [AIX] Static init frontend recovery and backend support

2020-08-06 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: llvm/include/llvm/CodeGen/AsmPrinter.h:391 + /// @param[out] Structors Sorted Structor structs by Priority. + /// @return false if List is not an array of '{ i32, void ()*, i8* }' structs. + bool preprocessXXStructorList(const

[PATCH] D84534: [AIX] Static init frontend recovery and backend support

2020-08-05 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: format:1 +//===-- PPCAsmPrinter.cpp - Print machine instrs to PowerPC assembly --===// +// Redundant file? Comment at: llvm/include/llvm/CodeGen/AsmPrinter.h:455 } + struct Structor {

[PATCH] D84534: [AIX] Static init frontend recovery and backend support

2020-07-30 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1865 +if (isSpecialLLVMGlobalArrayForStaticInit()) { + if (GlobalUniqueModuleId.empty()) { +GlobalUniqueModuleId = getUniqueModuleId(); We will need to move

[PATCH] D84534: [AIX] Static init frontend recovery and backend support

2020-07-30 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:24 #include "llvm/Support/Path.h" #include "llvm/Transforms/Utils/ModuleUtils.h" We are removing the usage of "getUniqueModuleId" in this file, So I assume this include could get

[PATCH] D84534: [AIX] Static init frontend recovery and backend support

2020-07-27 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:4609 +// their own llvm.global_dtors entry. +CGM.AddCXXStermFinalizerToGlobalDtor(StermFinalizer, 65535); + else Handling template instantiation seems fairly orthogonal to

[PATCH] D84356: [AIX] remove -u from the clang when invoke aix as assembler

2020-07-23 Thread Jason Liu via Phabricator via cfe-commits
jasonliu accepted this revision. jasonliu added a comment. This revision is now accepted and ready to land. Thanks. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84356/new/ https://reviews.llvm.org/D84356

[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double

2020-07-22 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added a comment. Thanks. No further comments from me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79719/new/ https://reviews.llvm.org/D79719 ___ cfe-commits mailing list

[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double

2020-07-22 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:2418 + if (!Target->allowsLargerPreferedTypeAlignment()) return ABIAlign; Should this if statement go above the `if (const auto *RT = T->getAs()) ` ? When Target does not allow

[PATCH] D83974: [AIX] report_fatal_error on `-fregister_global_dtors_with_atexit` for static init

2020-07-16 Thread Jason Liu via Phabricator via cfe-commits
jasonliu accepted this revision. jasonliu added a comment. This revision is now accepted and ready to land. LGTM with minor nit. Comment at: clang/test/CodeGenCXX/aix-sinit-register-global-dtors-with-atexit.cpp:10 +struct T{ +T(); +~T(); nit: fix

[PATCH] D82476: [Clang][Driver] Recognize the AIX OBJECT_MODE environment setting

2020-07-08 Thread Jason Liu via Phabricator via cfe-commits
jasonliu accepted this revision. jasonliu added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82476/new/ https://reviews.llvm.org/D82476

[PATCH] D81270: [XCOFF][AIX] Use 'L..' instead of '.L' for getPrivateGlobalPrefix in DataLayout

2020-07-03 Thread Jason Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG572dde55eebb: [XCOFF][AIX] Use L.. instead of .L for getPrivateGlobalPrefix in DataLayout (authored by jasonliu). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG

[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double

2020-06-25 Thread Jason Liu via Phabricator via cfe-commits
jasonliu accepted this revision. jasonliu added a comment. LGTM. I have no further comments on this patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79719/new/ https://reviews.llvm.org/D79719 ___ cfe-commits mailing list

[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double

2020-06-24 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1881 + if (isAIXLayout(Context) && FieldOffset == CharUnits::Zero() && + (IsUnion || NonOverlappingEmptyFieldFound)) { +FirstNonOverlappingEmptyFieldHandled = true;

[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double

2020-06-23 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1881 + if (isAIXLayout(Context) && FieldOffset == CharUnits::Zero() && + (IsUnion || NonOverlappingEmptyFieldFound)) { +FirstNonOverlappingEmptyFieldHandled = true;

[PATCH] D74166: [AIX][Frontend] Static init implementation for AIX considering no priority

2020-06-18 Thread Jason Liu via Phabricator via cfe-commits
jasonliu accepted this revision. jasonliu added a comment. This revision is now accepted and ready to land. LGTM. But I suggest to wait for @hubert.reinterpretcast to have another scan at this before landing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74166/new/

[PATCH] D74166: [AIX][Frontend] Static init implementation for AIX considering no priority

2020-06-18 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:345 +// rarely. +Weights = nullptr; + } else if (Kind == GuardKind::VariableGuard && !D->isLocalVarDecl()) { Do we need to change/complicate the interface for this function,

[PATCH] D81972: [NFC] Cleanup of EmitCXXGlobalInitFunc() and EmitCXXGlobalDtorFunc()

2020-06-17 Thread Jason Liu via Phabricator via cfe-commits
jasonliu accepted this revision. jasonliu added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:596 } + // Include the filename in the symbol name. Including "sub_" matches gcc Xiangling_L

[PATCH] D81972: [NFC] Cleanup of EmitCXXGlobalInitFunc() and EmitCXXGlobalDtorFunc()

2020-06-17 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added a comment. New diff does not have context available. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81972/new/ https://reviews.llvm.org/D81972 ___ cfe-commits mailing list

[PATCH] D81972: [NFC] Cleanup of EmitCXXGlobalInitFunc() and EmitCXXGlobalDtorFunc()

2020-06-17 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:596 } + // Include the filename in the symbol name. Including "sub_" matches gcc jasonliu wrote: > jasonliu wrote: > > I think this patch is missing what @hubert.reinterpretcast

[PATCH] D81972: [NFC] Cleanup of EmitCXXGlobalInitFunc() and EmitCXXGlobalDtorFunc()

2020-06-17 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:596 } + // Include the filename in the symbol name. Including "sub_" matches gcc jasonliu wrote: > I think this patch is missing what @hubert.reinterpretcast mentioned in >

[PATCH] D74166: [AIX][Frontend] Static init implementation for AIX considering no priority

2020-06-17 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:835 + + llvm::CallInst *CI = nullptr; + if (Arg == nullptr) { nit: trailing whitespace Comment at: clang/test/CodeGen/static-init.cpp:31 +namespace test4 {

[PATCH] D74166: [AIX][Frontend] Static init implementation for AIX considering no priority

2020-06-17 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:708 +" based on strong external symbols"); + GlobalUniqueModuleId = GlobalUniqueModuleId.substr(1); +} Correct me if I'm wrong... `GlobalUniqueModuleId` will always

[PATCH] D81972: [NFC] Cleanup of EmitCXXGlobalInitFunc() and EmitCXXGlobalDtorFunc()

2020-06-16 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:596 } + // Include the filename in the symbol name. Including "sub_" matches gcc I think this patch is missing what @hubert.reinterpretcast mentioned in

[PATCH] D74166: [AIX][Frontend] Static init implementation for AIX considering no priority

2020-06-12 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/test/CodeGen/static-init.cpp:8 +// RUN: FileCheck %s struct test { Looks like the non-inline comments are easier to get ignored and missed, so I will copy paste the non-inlined comment I previously had: ```

[PATCH] D74166: [AIX][Frontend] Static init implementation for AIX considering no priority

2020-06-10 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/CodeGen/CGCXXABI.h:113 + + virtual bool isCXXGlobalInitAndDtorFuncInternal() const { return true; } + Xiangling_L wrote: > jasonliu wrote: > > Do we need this isCXXGlobalInitAndDtorFuncInternal? Looks like

[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double

2020-06-10 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/include/clang/AST/RecordLayout.h:75 + // can be different than Alignment in cases where it is beneficial for + // performance. + CharUnits PreferredAlignment; nit for comment: I don't think it's related to

[PATCH] D74166: [AIX][Frontend] Static init implementation for AIX considering no priority

2020-06-10 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added a comment. -fregister_global_dtors_with_atexit does not seem to work properly in current implementation. We should consider somehow disabling/report_fatal_error it instead of letting it generate invalid code on AIX. Comment at:

[PATCH] D74166: [AIX][Frontend] Static init implementation for AIX considering no priority

2020-06-10 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:305 + if (llvm::Function *unatexitFn = + dyn_cast(unatexit.getCallee())) +unatexitFn->setDoesNotThrow(); Is there a valid case that unatexit.getCallee() returns a type

[PATCH] D74166: [AIX][Frontend] Static init implementation for AIX considering no priority

2020-06-09 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/AST/ItaniumMangle.cpp:5217 + else +Mangler.getStream() << D->getName(); +} If I understand correctly, this function will come in pair with `__cxx_global_var_init`. `__cxx_global_var_init` use number as

[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double

2020-05-20 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:2533 + hasFloatingPointAsFirstMember(RD, MaxFieldAlignment)) +return std::max(ABIAlign, (unsigned)toBits(CharUnits::fromQuantity(8))); +} I guess another thing that

[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double

2020-05-20 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/include/clang/AST/RecordLayout.h:74 + /// The maximum allowed field alignment. This is set by #pragma pack. + CharUnits MaxFieldAlignment; + efriedma wrote: > If we have to keep around extra data anyway,

[PATCH] D79035: [clang][AIX] Implement ABIInfo and TargetCodeGenInfo for AIX

2020-05-19 Thread Jason Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7f5d91d3ffed: [clang][AIX] Implement ABIInfo and TargetCodeGenInfo for AIX (authored by jasonliu). Changed prior to commit: https://reviews.llvm.org/D79035?vs=263864=264922#toc Repository: rG LLVM

[PATCH] D79035: [clang][AIX] Implement ABIInfo and TargetCodeGenInfo for AIX

2020-05-13 Thread Jason Liu via Phabricator via cfe-commits
jasonliu updated this revision to Diff 263864. jasonliu added a comment. Remove driver's error. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79035/new/ https://reviews.llvm.org/D79035 Files: clang/lib/CodeGen/TargetInfo.cpp clang/lib/Frontend/CompilerInvocation.cpp

[PATCH] D79035: [clang][AIX] Implement ABIInfo and TargetCodeGenInfo for AIX

2020-05-13 Thread Jason Liu via Phabricator via cfe-commits
jasonliu marked an inline comment as done. jasonliu added inline comments. Comment at: clang/test/Frontend/aix-unsupported.c:10 +// RUN: -c %s 2>&1 | FileCheck %s +// CHECK: unsupported option Xiangling_L wrote: > One thing I am not so sure about is that for

[PATCH] D79035: [clang][AIX] Implement ABIInfo and TargetCodeGenInfo for AIX

2020-05-12 Thread Jason Liu via Phabricator via cfe-commits
jasonliu updated this revision to Diff 263502. jasonliu added a comment. Add error report in clang_cc1 for unsupported option on AIX. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79035/new/ https://reviews.llvm.org/D79035 Files: clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D79035: [clang][AIX] Implement ABIInfo and TargetCodeGenInfo for AIX

2020-05-08 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:1547 // Otherwise, if the type contains an SSE vector type, the alignment is 16. + if (Align >= 16 && (isSIMDVectorType(getContext(), Ty) || Xiangling_L wrote: > Also update the

[PATCH] D79035: [clang][AIX] Implement ABIInfo and TargetCodeGenInfo for AIX

2020-05-08 Thread Jason Liu via Phabricator via cfe-commits
jasonliu updated this revision to Diff 262964. jasonliu marked 5 inline comments as done. jasonliu added a comment. Address Xiangling's comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79035/new/ https://reviews.llvm.org/D79035 Files: clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D79035: [clang][AIX] Implement ABIInfo and TargetCodeGenInfo for AIX

2020-05-08 Thread Jason Liu via Phabricator via cfe-commits
jasonliu updated this revision to Diff 262958. jasonliu marked 2 inline comments as done. jasonliu added a comment. Address Zarko's comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79035/new/ https://reviews.llvm.org/D79035 Files: clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D79035: [clang][AIX] Implement ABIInfo and TargetCodeGenInfo for AIX

2020-05-08 Thread Jason Liu via Phabricator via cfe-commits
jasonliu updated this revision to Diff 262878. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79035/new/ https://reviews.llvm.org/D79035 Files: clang/lib/CodeGen/TargetInfo.cpp clang/lib/Driver/ToolChains/Clang.cpp clang/test/CodeGen/aix-complex.c clang/test/CodeGen/aix-return.c

[PATCH] D79035: [clang][AIX] Implement ABIInfo and TargetCodeGenInfo for AIX

2020-05-08 Thread Jason Liu via Phabricator via cfe-commits
jasonliu updated this revision to Diff 262869. jasonliu added a comment. Address comments. Add in over aligned structure and structure containing vector type handling for argument on AIX. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79035/new/ https://reviews.llvm.org/D79035 Files:

[PATCH] D79035: [clang][AIX] Implement ABIInfo and TargetCodeGenInfo for AIX

2020-05-05 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:4368 + + return emitVoidPtrVAArg(CGF, VAListAddr, Ty, /*Indirect*/ false, TypeInfo, + SlotSize, /*AllowHigher*/ true); ZarkoCA wrote: > Is there a reason why

[PATCH] D79035: [clang][AIX] Implement ABIInfo and TargetCodeGenInfo for AIX

2020-05-05 Thread Jason Liu via Phabricator via cfe-commits
jasonliu updated this revision to Diff 262252. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79035/new/ https://reviews.llvm.org/D79035 Files: clang/lib/CodeGen/TargetInfo.cpp clang/lib/Driver/ToolChains/Clang.cpp clang/test/CodeGen/aix-complex.c clang/test/CodeGen/aix-return.c

[PATCH] D79035: [clang][AIX] Implement ABIInfo and TargetCodeGenInfo for AIX

2020-05-05 Thread Jason Liu via Phabricator via cfe-commits
jasonliu updated this revision to Diff 262250. jasonliu marked 12 inline comments as done. jasonliu added a comment. Rebase and address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79035/new/ https://reviews.llvm.org/D79035 Files: clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D79035: [clang][AIX] Implement ABIInfo and TargetCodeGenInfo for AIX

2020-05-04 Thread Jason Liu via Phabricator via cfe-commits
jasonliu marked 2 inline comments as done. jasonliu added inline comments. Comment at: clang/test/CodeGen/ppc32-dwarf.c:2 +// RUN: %clang_cc1 -triple powerpc-unknown-aix -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple powerpc-unknown-unknown -emit-llvm %s -o - |

[PATCH] D79035: [clang][AIX] Implement ABIInfo and TargetCodeGenInfo for AIX

2020-05-04 Thread Jason Liu via Phabricator via cfe-commits
jasonliu marked 2 inline comments as done. jasonliu added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:4317 + if (isAggregateTypeForABI(RetTy)) +return getNaturalAlignIndirect(RetTy); + Xiangling_L wrote: > This method uses the ABI

[PATCH] D79044: [AIX] Avoid structor alias; die before bad alias codegen

2020-05-01 Thread Jason Liu via Phabricator via cfe-commits
jasonliu accepted this revision. jasonliu added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79044/new/ https://reviews.llvm.org/D79044

[PATCH] D79033: [NFC][clang] Replace raw new/delete with unique_ptr to store ABIInfo in TargetCodeGenInfo

2020-04-30 Thread Jason Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe0c356582d2f: [NFC][clang] Replace raw new/delete with unique_ptr to store ABIInfo in… (authored by jasonliu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D79033: [NFC][clang] Replace raw new/delete with unique_ptr to store ABIInfo in TargetCodeGenInfo

2020-04-28 Thread Jason Liu via Phabricator via cfe-commits
jasonliu updated this revision to Diff 260766. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79033/new/ https://reviews.llvm.org/D79033 Files: clang/lib/CodeGen/TargetInfo.cpp clang/lib/CodeGen/TargetInfo.h Index: clang/lib/CodeGen/TargetInfo.h

[PATCH] D79033: [NFC][clang] Replace raw new/delete with unique_ptr to store ABIInfo in TargetCodeGenInfo

2020-04-28 Thread Jason Liu via Phabricator via cfe-commits
jasonliu updated this revision to Diff 260746. jasonliu added a comment. Provide default virtual destructor. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79033/new/ https://reviews.llvm.org/D79033 Files: clang/lib/CodeGen/TargetInfo.cpp clang/lib/CodeGen/TargetInfo.h Index:

[PATCH] D79035: [clang][AIX] Implement ABIInfo and TargetCodeGenInfo for AIX

2020-04-28 Thread Jason Liu via Phabricator via cfe-commits
jasonliu created this revision. jasonliu added reviewers: Xiangling_L, sfertile, hubert.reinterpretcast, cebowleratibm, ZarkoCA. Herald added subscribers: kbarton, nemanjai. Herald added a project: clang. Created AIXABIInfo and AIXTargetCodeGenInfo for AIX ABI. Some investigation and FAQ on why

[PATCH] D79033: [NFC][clang] Replace raw new/delete with unique_ptr to store ABIInfo in TargetCodeGenInfo

2020-04-28 Thread Jason Liu via Phabricator via cfe-commits
jasonliu created this revision. jasonliu added reviewers: hubert.reinterpretcast, sfertile, nemanjai, Xiangling_L. Herald added subscribers: s.egerton, simoncook, fedor.sergeev, aheejin, dschuff. Herald added a project: clang. Use unique_ptr to manage the lifetime of ABIInfo member inside

[PATCH] D78563: [AIX] Port power alignment rules to clang

2020-04-21 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/include/clang/AST/RecordLayout.h:81 + /// AIXOffsetAlignment - The special AIX Alignment for the object that + /// contains floating-point member or sub-member. This is for AIX-abi only. AIX Alignment -> AIX

[PATCH] D78563: [AIX] Port power alignment rules to clang

2020-04-21 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/include/clang/AST/RecordLayout.h:177 + /// getAIXOffsetAlignment - Get the record of aixOffset alignment in + /// characters. Not sure if aixOffset is a thing? Might be better to just say "aix offset

[PATCH] D78563: [AIX] Port power alignment rules to clang

2020-04-21 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/test/Layout/aix-double-struct-member.cpp:136 +// CHECK-NEXT:| nvsize=12, nvalign=4] +}; // namespace test4 1. I think we also want to test empty base class with a derived class contains double as

[PATCH] D78506: [NFC] Common up TargetCodeGenInfo for all PowerPC target.

2020-04-20 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added a comment. To reviewers: Although the patch is showing changes on various ABIInfo classes. But those classes are actually untouched. This patch only touches PowerPC TargetCodeGenInfo related classes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78506/new/

[PATCH] D78506: [NFC] Common up TargetCodeGenInfo for all PowerPC target.

2020-04-20 Thread Jason Liu via Phabricator via cfe-commits
jasonliu created this revision. jasonliu added reviewers: sfertile, nemanjai, hubert.reinterpretcast, cebowleratibm. Herald added subscribers: steven.zhang, shchenz. jasonliu added a reviewer: PowerPC. jasonliu added a comment. To reviewers: Although the patch is showing changes on various

[PATCH] D76932: [AIX] emit .extern and .weak directive linkage

2020-04-16 Thread Jason Liu via Phabricator via cfe-commits
jasonliu accepted this revision. jasonliu added a comment. This revision is now accepted and ready to land. LGTM. Please wait a day or two to see if @hubert.reinterpretcast have further comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D76932: [AIX] emit .extern and .weak directive linkage

2020-04-15 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:441 + case GlobalValue::ExternalWeakLinkage: +if (TM.getTargetTriple().isOSBinFormatXCOFF()) { + OutStreamer->emitSymbolAttribute(GVSym, MCSA_Weak); Maybe an assert

  1   2   >