[PATCH] D92445: [PowerPC] Add powerpcle target.

2020-12-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The lld/ELF part change looks good. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92445/new/ https://reviews.llvm.org/D92445 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D85474: Add -fbinutils-version= to gate ELF features on the specified binutils version

2020-11-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping @compnerd Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85474/new/ https://reviews.llvm.org/D85474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D87956: [IR] add fn attr for no_stack_protector; prevent inlining on mismatch

2020-11-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Herald added a subscriber: pengfei. Comment at: clang/test/Frontend/optimization-remark-missed-inline-stack-protectors.c:1 +// RUN: %clang_cc1 -stack-protector 2 -Rpass-missed=inline -O2 -verify %s -emit-llvm-only + Emm. I am a bi

[PATCH] D90815: -fbasic-block-sections=list=: Suppress output if failed to open the file

2020-11-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: dblaikie, tmsriram. Herald added a project: clang. Herald added a subscriber: cfe-commits. MaskRay requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D90815 Files: clang/lib/CodeGen/BackendUt

[PATCH] D90874: [test] Properly test -Werror-implicit-function-declaration and -Wvec-elem-size

2020-11-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added a reviewer: dblaikie. Herald added a project: clang. Herald added a subscriber: cfe-commits. MaskRay requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D90874 Files: clang/test/Modules/diagnose-missing-

[PATCH] D90874: [test] Properly test -Werror-implicit-function-declaration and -Wvec-elem-size

2020-11-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Sema/implicit-decl.c:2 +// RUN: %clang_cc1 %s -verify=expected,implicit -fsyntax-only -Werror=implicit-function-declaration +// RUN: %clang_cc1 %s -verify -fsyntax-only -Wno-implicit-function-declaration + db

[PATCH] D90874: [test] Properly test -Werror-implicit-function-declaration and -Wvec-elem-size

2020-11-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 303273. MaskRay added a comment. comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90874/new/ https://reviews.llvm.org/D90874 Files: clang/test/Modules/diagnose-missing-import.m clang/test/Sema/implic

[PATCH] D90874: [test] Properly test -Werror-implicit-function-declaration and -Wvec-elem-size

2020-11-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 303277. MaskRay added a comment. Discard an unintentional change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90874/new/ https://reviews.llvm.org/D90874 Files: clang/test/Modules/diagnose-missing-import.m

[PATCH] D90874: [test] Properly test -Werror-implicit-function-declaration and -Wvec-elem-size

2020-11-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 303310. MaskRay added a comment. Fix vecshift.c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90874/new/ https://reviews.llvm.org/D90874 Files: clang/test/Modules/diagnose-missing-import.m clang/test/Sema/

[PATCH] D90874: [test] Properly test -Werror-implicit-function-declaration and -Wvec-elem-size

2020-11-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked 2 inline comments as done. MaskRay added inline comments. Comment at: clang/test/Sema/vecshift.c:3-4 +// RUN: %clang_cc1 -fsyntax-only -DEXT -DERR -verify=expected,vecelemsize %s +// RUN: %clang_cc1 -fsyntax-only -DERR -verify %s -Wno-vec-elem-size +// RUN: %clang_

[PATCH] D90874: [test] Properly test -Werror-implicit-function-declaration and -Wvec-elem-size

2020-11-05 Thread Fangrui Song via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG247c5b5d6963: [test] Properly test -Werror-implicit-function-declaration and -Wvec-elem-size (authored by MaskRay). Repository: rG LLVM Github Mon

[PATCH] D84192: [OpenMP5.0] map item can be non-contiguous for target update

2020-11-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > map item can be non-contiguous for target update The subject appears to describe a situation, but patch subjects should usually be imperative Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:8572 if (PartialStruct.Base.isValid()) +Cu

[PATCH] D90815: -fbasic-block-sections=list=: Suppress output if failed to open the file

2020-11-09 Thread Fangrui Song via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe625f9c5d1e2: -fbasic-block-sections=list=: Suppress output if failed to open the file (authored by MaskRay). Repository: rG LLVM Github Monorepo

[PATCH] D90457: [clang][driver] Set LTO mode based on input files

2020-11-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Is the motivation just to avoid -flto or -flto=lto at link time? I am afraid that the advantage probably is not large enough to justify the potentially costly object file parsing in the driver. Before this, as I understand it, object files are opaque to the driver. The

[PATCH] D91034: [Frontend] Treat CUDA header files as CUDA source files

2020-11-12 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe7c7a1982632: [Frontend] Treat .cuh files as CUDA source files (authored by tomilov, committed by MaskRay). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llvm.org/D910

[PATCH] D84846: [MC] Add support for generating missing GNU build notes

2020-11-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Herald added a subscriber: dexonsmith. https://fedoraproject.org/wiki/Toolchain/Watermark Seems that `.gnu.build.attributes` is used with a GCC plugin (annobin?). The feature on its own is probably not that useful. `.gnu.linkonce` is a proto-comdat legacy feature which

[PATCH] D85474: Add -fbinutils-version= to gate ELF features on the specified binutils version

2020-11-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Sent https://lists.llvm.org/pipermail/llvm-dev/2020-November/146676.html "Add -fbinutils-version=" (cross posted to cfe-dev) so that more folks can notice it. About "generate code and don't care about GNU as/ld compatibility/limitation", I am open for suggestions. Curre

[PATCH] D90507: Adding DWARF64 clang flag

2020-11-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4018 + if (Args.hasArg(options::OPT_gdwarf64)) { +const Arg *A = Args.getLastArg(options::OPT_gdwarf64); `if (const Arg *A = Args.getLastArg(options::OPT_gdwarf64)`) ===

[PATCH] D90507: Adding DWARF64 clang flag

2020-11-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > Adding DWARF64 clang flag It is important to mention the exact option name: Add `-gdwarf-64` to enable 64-bit DWARF format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90507/new/ https://reviews.llvm.org/D90507 __

[PATCH] D91605: [sanitizers] Implement GetTls on Solaris

2020-11-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Solaris.cpp:150 + const SanitizerArgs &SA = getToolChain().getSanitizerArgs(); + if (LINKER_SUPPORTS_Z_RELAX_TRANSTLS && + getToolChain().getTriple().getArch() == llvm::Triple::x86_64 && ---

[PATCH] D91605: [sanitizers] Implement GetTls on Solaris

2020-11-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Solaris.cpp:150 + const SanitizerArgs &SA = getToolChain().getSanitizerArgs(); + if (LINKER_SUPPORTS_Z_RELAX_TRANSTLS && + getToolChain().getTriple().getArch() == llvm::Triple::x86_64 && ---

[PATCH] D91760: [Driver] Default Generic_GCC aarch64 to use -fasynchronous-unwind-tables

2020-11-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: joerg, psmith, resistor. Herald added subscribers: cfe-commits, danielkiss, mstorsjo, kristof.beyls, krytarowski, arichardson, emaste. Herald added a project: clang. MaskRay requested review of this revision. In GCC, `aarch64-*-linux` and `a

[PATCH] D91760: [Driver] Default Generic_GCC aarch64 to use -fasynchronous-unwind-tables

2020-11-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 306312. MaskRay added a comment. Drop an unneeded change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91760/new/ https://reviews.llvm.org/D91760 Files: clang/lib/Driver/ToolChains/Gnu.cpp clang/test/Drive

[PATCH] D91410: [llvm][clang][mlir] Add checks for the return values from Target::createXXX to prevent protential null deref

2020-11-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. Seems that sufficient approvals have been received. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91410/new/ https://reviews.llvm.org/D91410

[PATCH] D85474: Add -fbinutils-version= to gate ELF features on the specified binutils version

2020-11-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 306478. MaskRay edited the summary of this revision. MaskRay added a comment. Switch to -fbinutils-version=none from 'future' Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85474/new/ https://reviews.llvm.org/D8

[PATCH] D91760: [Driver] Default Generic_GCC aarch64 to use -fasynchronous-unwind-tables

2020-11-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D91760#2406650 , @joerg wrote: > I have no problem with the change, but please adjust the description to take > about -funwind-tables. I don't think we do async by default, at least not by > design. AFAICT we don't make disti

[PATCH] D85474: Add -fbinutils-version= to gate ELF features on the specified binutils version

2020-11-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 306538. MaskRay added a comment. Fix comments: 'future' -> 'none' Add a test for llc -binutils-version=none Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85474/new/ https://reviews.llvm.org/D85474 Files: cla

[PATCH] D91760: [Driver] Default Generic_GCC aarch64 to use -fasynchronous-unwind-tables

2020-11-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D91760#2406747 , @joerg wrote: > The difference is whether we promise to be instruction precise or not. I'm > not sure we do or want to promise that as default. `gcc/common/config/{aarch64,rs6000}/*-common.c` enables -fasynch

[PATCH] D91605: [sanitizers] Implement GetTls on Solaris

2020-11-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/tools/driver/CMakeLists.txt:123 + +check_linker_flag("-Wl,-z,relax=transtls" LINKER_SUPPORTS_Z_RELAX_TRANSTLS) ro wrote: > MaskRay wrote: > > GNU ld reports a warning instead of an error when an unknown `-z` is see

[PATCH] D87737: Add -fprofile-update={atomic,prefer-atomic,single}

2020-09-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 294781. MaskRay added a comment. Add documentation to UserManual.rst Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87737/new/ https://reviews.llvm.org/D87737 Files: clang/docs/UsersManual.rst clang/include

[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-09-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: lld/ELF/Driver.cpp:895 const char *argv[] = {config->progName.data(), opt.data()}; + cl::ResetAllOptionOccurrences(); if (cl::ParseCommandLineOptions(2, argv, "", &os)) ayrivera wrote: > Hi, > > I built locally l

[PATCH] D87901: [Driver] Filter out /gcc and /gcc-cross if they do not exists

2020-09-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. > For my installation configured with > -DCMAKE_INSTALL_PREFIX=/home/antipov/.local/llvm-12.0.0, it's possible to > filter out 80 of 200 VFS lookups, from: The strace dump is too long. Plea

[PATCH] D87737: Add -fprofile-update={atomic,prefer-atomic,single}

2020-09-29 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3681be876fea: Add -fprofile-update={atomic,prefer-atomic,single} (authored by MaskRay). Changed prior to commit: https://reviews.llvm.org/D87737?vs=294781&id=295042#toc Repository: rG LLVM Github Mon

[PATCH] D88566: be more specific when testing for no fuse-ld warnings

2020-10-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/fuse-ld.c:15 // RUN: FileCheck %s --check-prefix=CHECK-NO-WARN -// CHECK-NO-WARN-NOT: warning: +// CHECK-NO-WARN-NOT: warning: 'fuse-ld' How does this line trigger unrelated warnings? Can you dump

[PATCH] D88712: [CGBuiltin] Respect asm labels and redefine_extname for builtins with specialized emitting

2020-10-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: joerg, jyknight, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. MaskRay requested review of this revision. rL131311 added `asm()` support for builtin functions, but `asm()`

[PATCH] D88712: [CGBuiltin] Respect asm labels and redefine_extname for builtins with specialized emitting

2020-10-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 295696. MaskRay added a comment. Improve tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88712/new/ https://reviews.llvm.org/D88712 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/test/CodeGen/asm-label.c

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

2020-10-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added inline comments. This revision now requires changes to proceed. Comment at: clang/include/clang/Basic/CodeGenOptions.def:47 +CODEGENOPT(DataSections , 1, 0) ///< Set by default, or when -f[no-]data-sections. +CODEGEN

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

2020-10-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay 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. CODEGENOPT(

[PATCH] D88786: [CUDA] Suppress comdat on host-side shadow variables registered by __cuda_register_globals

2020-10-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: jlebar, tra. Herald added subscribers: cfe-commits, yaxunl. Herald added a project: clang. MaskRay requested review of this revision. Host-side shadow variables of external declarations of device-side global variables have internal linkage an

[PATCH] D88786: [CUDA] Suppress comdat on host-side shadow variables registered by __cuda_register_globals

2020-10-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Maybe we should disallow it instead. nvcc from CUDA 11.1 does not allow `__device__ inline` or `__device__ constexpr` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88786/new/ https://reviews.llvm.org/D88786 __

[PATCH] D88786: [CUDA] Don't call __cudaRegisterVariable on C++17 inline variables

2020-10-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 296007. MaskRay retitled this revision from "[CUDA] Suppress comdat on host-side shadow variables registered by __cuda_register_globals" to "[CUDA] Don't call __cudaRegisterVariable on C++17 inline variables". MaskRay edited the summary of this revision. Mask

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

2020-10-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: lld/Common/TargetOptionsCommandFlags.cpp:17 +llvm::TargetOptions +lld::initTargetOptionsFromCodeGenFlags(const llvm::Triple &TheTriple) { + return llvm::codegen::InitTargetOptionsFromCodeGenFlags(TheTriple); Currently l

[PATCH] D88786: [CUDA] Don't call __cudaRegisterVariable on C++17 inline variables

2020-10-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D88786#2312329 , @tra wrote: >> If such a variable (which has a comdat group) is discarded (a copy from >> another >> translation unit is prevailing and selected), accessing the variable from >> outside the section group (__cud

[PATCH] D88786: [CUDA] Don't call __cudaRegisterVariable on C++17 inline variables

2020-10-05 Thread Fangrui Song via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa2cc8833683d: [CUDA] Don't call __cudaRegisterVariable on C++17 inline variables (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANG

[PATCH] D88786: [CUDA] Don't call __cudaRegisterVariable on C++17 inline variables

2020-10-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4137 +// TODO: Reject __device__ constexpr and __device__ inline in Sema. +if (!D->hasExternalStorage() && !D->isInline()) getCUDARu

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

2020-10-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: lld/Common/TargetOptionsCommandFlags.cpp:17 +llvm::TargetOptions +lld::initTargetOptionsFromCodeGenFlags(const llvm::Triple &TheTriple) { + return llvm::codegen::InitTargetOptionsFromCodeGenFlags(TheTriple); jasonliu wr

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

2020-10-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. A less intrusive approach is to not touch the existing InitTargetOptionsFromCodeGenFlags without parameters. You can add an `initTargetOptionsFromCodeGenFlags` with `const Tripe &` as its parameter. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88737/new/ http

[PATCH] D88712: [CGBuiltin] Respect asm labels and redefine_extname for builtins with specialized emitting

2020-10-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88712/new/ https://reviews.llvm.org/D88712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D89197: [X86] Support -march=x86-64-v[234]

2020-10-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: craig.topper, efriedma, fweimer, RKSimon, spatel. Herald added subscribers: llvm-commits, cfe-commits, pengfei, jfb, hiraditya. Herald added projects: clang, LLVM. MaskRay requested review of this revision. PR47686. These micro-architecture l

[PATCH] D89198: [X86] Define __LAHF_SAHF__ if feature 'sahf' is set

2020-10-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: craig.topper, dim, fweimer. Herald added subscribers: cfe-commits, pengfei. Herald added a project: clang. MaskRay requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D89198 Files: clang/lib/B

[PATCH] D89197: [X86] Support -march=x86-64-v[234]

2020-10-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Preprocessor/predefined-arch-macros-x86.c:20 + +/// TODO: __LAHF_SAHF__ +// X86_64_V2: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 1 I'll add it after D89198 is accepted. Repository: rG LLVM Github Mo

[PATCH] D89198: [X86] Define __LAHF_SAHF__ if feature 'sahf' is set

2020-10-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:564 + if (HasLAHFSAHF) +Builder.defineMacro("__LAHF_SAHF__"); if (HasLZCNT) craig.topper wrote: > craig.topper wrote: > > It looks like gcc may define this always in 32-bit mode? >

[PATCH] D89198: [X86] Define __LAHF_SAHF__ if feature 'sahf' is set

2020-10-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 297441. MaskRay edited the summary of this revision. MaskRay added a comment. Always define __LAHF_SAHF__ in 32-bit mode Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89198/new/ https://reviews.llvm.org/D89198

[PATCH] D89198: [X86] Define __LAHF_SAHF__ if feature 'sahf' is set

2020-10-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:564 + if (HasLAHFSAHF) +Builder.defineMacro("__LAHF_SAHF__"); if (HasLZCNT) craig.topper wrote: > MaskRay wrote: > > craig.topper wrote: > > > craig.topper wrote: > > > > It looks

[PATCH] D89197: [X86] Support -march=x86-64-v[234]

2020-10-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 297444. MaskRay added a comment. Update X86.td ProcModel Update llvm/test/CodeGen/X86/cpus-other.ll Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89197/new/ https://reviews.llvm.org/D89197 Files: clang/lib/B

[PATCH] D89197: [X86] Support -march=x86-64-v[234]

2020-10-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/lib/Target/X86/X86.td:580 // Nehalem - list NHMFeatures = [FeatureX87, -FeatureCMPXCHG8B, -FeatureCMOV, -Fea

[PATCH] D89197: [X86] Support -march=x86-64-v[234]

2020-10-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 297469. MaskRay added a comment. Add release note Fix F16C and BMI of x86-64-v3 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89197/new/ https://reviews.llvm.org/D89197 Files: clang/lib/Basic/Targets/X86.cpp

[PATCH] D89198: [X86] Define __LAHF_SAHF__ if feature 'sahf' is set or 32-bit mode

2020-10-11 Thread Fangrui Song via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGcbe4d973edad: [X86] Define __LAHF_SAHF__ if feature 'sahf' is set or 32-bit mode (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANG

[PATCH] D89197: [X86] Support -march=x86-64-v[234]

2020-10-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 297473. MaskRay added a comment. Test __LAHF_SAHF__ Update clang/docs/ReleaseNotes.rst Update clang/test/CodeGen/attr-target-x86.c to test X86.td changes. Ideally "target-features" should be testable with llc to have better layering Repository: rG LLVM Gi

[PATCH] D89197: [X86] Support -march=x86-64-v[234]

2020-10-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D89197#2323979 , @craig.topper wrote: > In D89197#2323946 , @MaskRay wrote: > >> Test __LAHF_SAHF__ >> Update clang/docs/ReleaseNotes.rst >> Update clang/test/CodeGen/attr-target-x86.c t

[PATCH] D89197: [X86] Support -march=x86-64-v[234]

2020-10-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 297606. MaskRay added a comment. Fix bullet point. Add a link to https://gitlab.com/x86-psABIs/x86-64-ABI/-/commit/77566eb03bc6a326811cb7e9 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89197/new/ https://revi

[PATCH] D89197: [X86] Support -march=x86-64-v[234]

2020-10-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: clang/docs/ReleaseNotes.rst:191 -- Support for -march=sapphirerapids was added. +* Support for ``-march=sapphirerapids`` and ``-march=x86-64-v[234]`` has been added. RKSimon

[PATCH] D89197: [X86] Support -march=x86-64-v[234]

2020-10-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 297612. MaskRay added a comment. Update clang/docs/UsersManual.rst Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89197/new/ https://reviews.llvm.org/D89197 Files: clang/docs/ReleaseNotes.rst clang/docs/Use

[PATCH] D89197: [X86] Support -march=x86-64-v[234]

2020-10-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 297613. MaskRay added a comment. ReleaseNotes.rst: use `` :doc:`UsersManual` `` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89197/new/ https://reviews.llvm.org/D89197 Files: clang/docs/ReleaseNotes.rst c

[PATCH] D89197: [X86] Support -march=x86-64-v[234]

2020-10-12 Thread Fangrui Song via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG012dd42e027e: [X86] Support -march=x86-64-v[234] (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D88712: [CGBuiltin] Respect asm labels and redefine_extname for builtins with specialized emitting

2020-10-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 297667. MaskRay edited the summary of this revision. MaskRay added a comment. Mention the limitation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88712/new/ https://reviews.llvm.org/D88712 Files: clang/lib/

[PATCH] D88712: [CGBuiltin] Respect asm labels and redefine_extname for builtins with specialized emitting

2020-10-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D88712#2324105 , @rsmith wrote: > What are the expected semantics in this case? Is this: > > - the function is still the builtin, but if it ends up being a libcall, call > a function with a different asm name, or > - the functi

[PATCH] D88712: [CGBuiltin] Respect asm labels and redefine_extname for builtins with specialized emitting

2020-10-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D88712#2326223 , @rsmith wrote: > In D88712#2325823 , @MaskRay wrote: > >> In D88712#2324105 , @rsmith wrote: >> >>> What are the expected semanti

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

2020-10-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88737/new/ https://reviews.llvm.org/D88737 ___ cfe-commits mailing list cfe-commits@

[PATCH] D89025: [RISCV] Add -mtune support

2020-10-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/riscv-cpus.c:91 +// MTUNE-E31-MCPU-E76: "-target-feature" "+a" +// MTUNE-E31-MCPU-E76-NOT: "-target-feature" "+f" +// MTUNE-E31-MCPU-E76: "-target-feature" "+c" A NOT pattern depends on the feature orde

[PATCH] D88712: [CGBuiltin] Respect asm labels and redefine_extname for builtins with specialized emitting

2020-10-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In case my previous comment is not clear: we can do renaming in LLVM, but the benefit is small (for a few libcalls (only some really simple libcalls) with custom code emitting, if they have `asm(...)`, they are now optimizable). We will require a renaming infrastructure

[PATCH] D88712: [CGBuiltin] Respect asm labels and redefine_extname for builtins with specialized emitting

2020-10-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a subscriber: zatrazz. MaskRay added a comment. In D88712#2333030 , @rsmith wrote: > I worry that we're chasing after the implementation details of GCC here. It > seems self-contradictory to say all three of these things at once: > > 1. The

[PATCH] D88712: [CGBuiltin] Respect asm labels and redefine_extname for builtins with specialized emitting

2020-10-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 298480. MaskRay edited the summary of this revision. MaskRay added a comment. Add an example about inconsistency. Elaborate on the limitation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88712/new/ https://re

[PATCH] D88712: [CGBuiltin] Respect asm labels and redefine_extname for builtins with specialized emitting

2020-10-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D88712#2333294 , @rsmith wrote: > If the answer is that we consider (2) to be incorrect, but that this is only > a partial step in that direction, I think that's fine -- that's enough that > we can know where the bug is if / w

[PATCH] D88712: [CGBuiltin] Respect asm labels and redefine_extname for builtins with specialized emitting

2020-10-15 Thread Fangrui Song via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG5a338599fbaa: [CGBuiltin] Respect asm labels and redefine_extname for builtins with… (authored by MaskRay). Repository: rG LLVM Github Monorepo C

[PATCH] D91605: [sanitizers] Implement GetTls on Solaris

2020-11-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/tools/driver/CMakeLists.txt:123 + +check_linker_flag("-Wl,-z,relax=transtls" LINKER_SUPPORTS_Z_RELAX_TRANSTLS) ro wrote: > MaskRay wrote: > > ro wrote: > > > MaskRay wrote: > > > > GNU ld reports a warning instead

[PATCH] D91410: [llvm][clang][mlir] Add checks for the return values from Target::createXXX to prevent protential null deref

2020-11-22 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1756d67934bb: [llvm][clang][mlir] Add checks for the return values from Target::createXXX to… (authored by OikawaKirie, committed by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D88712: [CGBuiltin] Respect asm labels and redefine_extname for builtins with specialized emitting

2020-11-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D88712#2411841 , @venkataramanan.kumar.llvm wrote: > For your example: extern double log (double) asm ("" "log_finite") __attribute__ ((nothrow)); double mylog (double d) { return log(d); } The intention is to emit `

[PATCH] D91760: [Driver] Default Generic_GCC aarch64 to use -fasynchronous-unwind-tables

2020-11-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. @psmith Do they have concerns? :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91760/new/ https://reviews.llvm.org/D91760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D90524: [Driver] Enable getOSLibDir() lib32 workaround for SPARC on Linux

2020-11-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. Comment at: clang/test/Driver/linux-header-search.cpp:266 +// CHECK-DEBIAN-SPARC: "{{[^"]*}}clang{{[^"]*}}" "-cc1" +// CHECK-DEBIAN-SPARC: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]" +// CHECK-DEBIAN-SPARC: "-isysroot" "

[PATCH] D90524: [Driver] Enable getOSLibDir() lib32 workaround for SPARC on Linux

2020-11-23 Thread Fangrui Song via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc2fb114475d1: [Driver] Enable getOSLibDir() lib32 workaround for SPARC on Linux (authored by glaubitz, committed by MaskRay). Changed prior to commi

[PATCH] D91605: [sanitizers] Implement GetTls on Solaris

2020-11-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/tools/driver/CMakeLists.txt:123 + +check_linker_flag("-Wl,-z,relax=transtls" LINKER_SUPPORTS_Z_RELAX_TRANSTLS) ro wrote: > MaskRay wrote: > > ro wrote: > > > MaskRay wrote: > > > > ro wrote: > > > > > MaskRay wrote

[PATCH] D88712: [CGBuiltin] Respect asm labels and redefine_extname for builtins with specialized emitting

2020-11-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D88712#2412874 , @venkataramanan.kumar.llvm wrote: > In D88712#2412366 , @MaskRay wrote: > >> In D88712#2411841 , >> @venkataramanan.kumar.llvm

[PATCH] D91760: [Driver] Default Generic_GCC aarch64 to use -fasynchronous-unwind-tables

2020-11-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D91760#2413294 , @psmith wrote: > Radio silence so far; I think no news is good news applies in this case. I'm > happy to say no objections. Thanks. I'll commit then. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D91760: [Driver] Default Generic_GCC aarch64 to use -fasynchronous-unwind-tables

2020-11-24 Thread Fangrui Song via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGf96fef89b5ec: [Driver] Default Generic_GCC aarch64 to -fasynchronous-unwind-tables (authored by MaskRay). Repository: rG LLVM Github Monorepo CHA

[PATCH] D92054: [Driver] Default Generic_GCC ppc/ppc64/ppc64le to -fasynchronous-unwind-tables

2020-11-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: PowerPC, Bdragon28, nemanjai. Herald added subscribers: cfe-commits, steven.zhang, kbarton, krytarowski, arichardson, emaste. Herald added a project: clang. MaskRay requested review of this revision. GCC made the switch in 2018-04-10 ("rs600

[PATCH] D91605: [sanitizers] Implement GetTls on Solaris

2020-11-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/tools/driver/CMakeLists.txt:123 + +check_linker_flag("-Wl,-z,relax=transtls" LINKER_SUPPORTS_Z_RELAX_TRANSTLS) ro wrote: > MaskRay wrote: > > ro wrote: > > > MaskRay wrote: > > > > ro wrote: > > > > > MaskRay wrote

[PATCH] D91223: Support struct annotations in FuchsiaHandleChecker.

2020-11-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. @haowei https://llvm.org/docs/DeveloperPolicy.html#commit-messages Please use git commit --amend --author for future patches where the majority of the work is done by others. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D9

[PATCH] D91605: [sanitizers] Implement GetTls on Solaris

2020-11-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/tools/driver/CMakeLists.txt:123 + +check_linker_flag("-Wl,-z,relax=transtls" LINKER_SUPPORTS_Z_RELAX_TRANSTLS) MaskRay wrote: > ro wrote: > > MaskRay wrote: > > > ro wrote: > > > > MaskRay wrote: > > > > > ro wrote

[PATCH] D92297: [CodeGen] -fno-delete-null-pointer-checks: change dereferenceable to dereferenceable_or_null

2020-11-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: bkramer, CJ-Johnson, jdoerfert, rjmccall, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. MaskRay requested review of this revision. After D17993 , with -fno-delete-null-pointer

[PATCH] D92297: [CodeGen] -fno-delete-null-pointer-checks: change dereferenceable to dereferenceable_or_null

2020-11-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 308419. MaskRay edited the summary of this revision. MaskRay added a comment. Add FIXME Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92297/new/ https://reviews.llvm.org/D92297 Files: clang/lib/CodeGen/CGCal

[PATCH] D92297: [CodeGen] -fno-delete-null-pointer-checks: change dereferenceable to dereferenceable_or_null

2020-11-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2176 +} else { + // FIXME dereferenceable should be correct here, regardless of + // NullPointerIsValid. However, dereferenceable currently does not always @rsmith @jdoerfert

[PATCH] D92297: [CodeGen] -fno-delete-null-pointer-checks: change dereferenceable to dereferenceable_or_null

2020-11-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 308454. MaskRay marked an inline comment as done. MaskRay edited the summary of this revision. MaskRay added a comment. Fix a comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92297/new/ https://reviews.llv

[PATCH] D92297: [CodeGen] -fno-delete-null-pointer-checks: change dereferenceable to dereferenceable_or_null

2020-11-30 Thread Fangrui Song via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG164410324d8b: [CodeGen] -fno-delete-null-pointer-checks: change dereferenceable to… (authored by MaskRay). Repository: rG LLVM Github Monorepo CH

[PATCH] D92445: [PowerPC] Add powerpcle target.

2020-12-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. This patch should be split. I suggest that you create 4 patches. - llvm: triple change - llvm: llvm/Object/ELFObjectFile.h llvm-readobj llvm-objdump - clang - lld Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92445/new/ ht

[PATCH] D92054: [Driver] Default Generic_GCC ppc/ppc64/ppc64le to -fasynchronous-unwind-tables

2020-12-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping:) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92054/new/ https://reviews.llvm.org/D92054 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D92278: [Clang] Don't adjust align for IBM extended double type

2020-12-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/CodeGen/ppc64le-varargs-f128.c:8 +// RUN: %clang -target powerpc64le-unknown-linux-gnu -S -emit-llvm \ +// RUN: -fopenmp-targets=ppc64le -mfloat128 -mabi=ieeelongdouble -mcpu=pwr9 \ Generally `%clang` is o

[PATCH] D92078: [asan] Default to -asan-use-private-alias=1

2020-12-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 309058. MaskRay edited the summary of this revision. MaskRay added a comment. Herald added subscribers: cfe-commits, sunfish, aheejin, dschuff. Herald added a project: clang. Fix two clang/test/CodeGen tests Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D92278: [Clang] Don't adjust align for IBM extended double type

2020-12-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/CodeGen/ppc64le-varargs-f128.c:8 +// RUN: %clang -target powerpc64le-unknown-linux-gnu -S -emit-llvm \ +// RUN: -fopenmp-targets=ppc64le -mfloat128 -mabi=ieeelongdouble -mcpu=pwr9 \ qiucf wrote: > MaskRay

[PATCH] D92078: [asan] Default to -asan-use-private-alias=1

2020-12-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 309434. MaskRay marked an inline comment as done. MaskRay added a comment. Improve odr-vtable.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92078/new/ https://reviews.llvm.org/D92078 Files: clang/test/Co

<    10   11   12   13   14   15   16   17   18   19   >