[PATCH] D60974: Clang IFSO driver action.

2019-06-17 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: cfe/trunk/lib/Frontend/InterfaceStubFunctionsConsumer.cpp:12 +#include "clang/Frontend/FrontendActions.h" +#include "clang/Index/CodegenNameGenerator.h" +#include "clang/Sema/TemplateInstCallback.h" > rL363646 This file

[PATCH] D60974: Clang IFSO driver action.

2019-06-17 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. @plotfi Sorry I have to revert this patch. This can also cause problems in `-DBUILD_SHARED_LIBS=off` builds. clangFrontend files cannot `#include "clang/Index/CodegenNameGenerator.h"`, I think you may have to move files around. Repository: rL LLVM CHANGES SINCE LA

[PATCH] D64294: [Driver] Refactor interaction between -f(no-)omit-frame-pointer and -mno-omit-leaf-frame-pointer

2019-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 209396. MaskRay marked 2 inline comments as done. MaskRay retitled this revision from "[Driver] Consolidate shouldUseFramePointer() and shouldUseLeafFramePointer()" to "[Driver] Refactor interaction between -f(no-)omit-frame-pointer and -mno-omit-leaf-frame-p

[PATCH] D64294: [Driver] Refactor interaction between -f(no-)?omit-frame-pointer and -m(no-)?omit-leaf-frame-pointer

2019-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 209398. MaskRay retitled this revision from "[Driver] Refactor interaction between -f(no-)omit-frame-pointer and -mno-omit-leaf-frame-pointer" to "[Driver] Refactor interaction between -f(no-)?omit-frame-pointer and -m(no-)?omit-leaf-frame-pointer". MaskRay

[PATCH] D64294: [Driver] Refactor interaction between -f(no-)?omit-frame-pointer and -m(no-)?omit-leaf-frame-pointer

2019-07-11 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365860: [Driver] Refactor interaction between -f(no-)?omit-frame-pointer and -m(no-)? (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repositor

[PATCH] D60335: Use -fomit-frame-pointer when optimizing PowerPC code

2019-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I did this in rC365862 with a test after my refactoring of the interface rC365860 . Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60335/new/ https://reviews.llvm.org/

[PATCH] D64277: [X86][PowerPC] Support -mlong-double-128

2019-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 209404. MaskRay added a comment. Use A->render(Args, CmdArgs); Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64277/new/ https://reviews.llvm.org/D64277 Files: include/clang/Driver/Options.td lib/Basic/TargetInfo.cp

[PATCH] D64277: [X86][PowerPC] Support -mlong-double-128

2019-07-11 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365866: [X86][PowerPC] Support -mlong-double-128 (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTI

[PATCH] D56353: Replace cc1 options '-mdisable-fp-elim' and '-momit-leaf-frame-pointer' with'-mframe-pointer='

2019-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. This should be rebased after D64294 . Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56353/new/ https://reviews.llvm.org/D56353 ___ cfe-commits mailing list cf

[PATCH] D64610: [clang] allow -fthinlto-index= without -x ir

2019-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/Driver.cpp:2123 + + // If running with -thinlto-index=, extensions that normally identify + // native object files actually identify LLVM bitcode files. `-fthinlto-index=` Repository:

[PATCH] D64653: clang/test/Driver/fsanitize.c: Fix -fsanitize=vptr using default target

2019-07-12 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. Sorry, I accidentally updated this one by mistake. vptr is not always available. Thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64653/new/ https://re

[PATCH] D64653: clang/test/Driver/fsanitize.c: Fix -fsanitize=vptr using default target

2019-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I committed this for you in rL365981 (it may have broken a Windows build for a long time. I wanted to fix it soon..). Thanks! % clang -target x86_64-windows -fsanitize=vptr -fno-rtti fsanitize.c '-###' clang-9: error: unsupported

[PATCH] D64687: [clang] Revert "Remove __VERSION__"

2019-07-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay closed this revision. MaskRay added a comment. In D64687#1584337 , @sylvestre.ledru wrote: > I went ahead and committed your revert in r365992. Thanks! > > Next time, please remove the clang/ from your patch > arc could not apply it: I think `c

[PATCH] D56353: Replace cc1 options '-mdisable-fp-elim' and '-momit-leaf-frame-pointer' with '-mframe-pointer'

2019-07-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Basic/CodeGenOptions.h:120 + enum FramePointerKind { +FP_All, // Keep all frame pointers. We can probably use `enum class FramePointerKind { None, NonLeaf, All };` here.. (`enum class

[PATCH] D64283: [PowerPC] Support -mabi=ieeelongdouble and -mabi=ibmlongdouble

2019-07-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Woohoo, this is the last :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64283/new/ https://reviews.llvm.org/D64283 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D64283: [PowerPC] Support -mabi=ieeelongdouble and -mabi=ibmlongdouble

2019-07-15 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366044: [PowerPC] Support -mabi=ieeelongdouble and -mabi=ibmlongdouble (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM C

[PATCH] D56353: Replace cc1 options '-mdisable-fp-elim' and '-momit-leaf-frame-pointer' with '-mframe-pointer'

2019-07-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:1728 } +assert(!FpKind.empty() && "unknown frame-pointer"); +FuncAttrs.addAttribute("frame-pointer", FpKind); The `assert` here is not very necessary. Comment

[PATCH] D64482: [Driver] Define _FILE_OFFSET_BITS=64 on Solaris

2019-07-17 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > You may not like them, but there are plenty of examples in OSTargets.h (for > kFreeBSD, Hurd, Linux, RTEMS, AIX, Windows, NaCl and several more). Why take offense in the Solaris case if this is already common practice? I used that as an example. Defining _GNU_SOURCE

[PATCH] D65029: [Driver] Support for disabling sanitizer runtime linking

2019-07-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. There is an existing option `-fsanitize-minimal-runtime`, will `-fsanitize-no-runtime` be a name providing more consistency? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65029/new/ https://reviews.llvm.org/D65029

[PATCH] D65183: [Format] Make it easy to add new format::FormatStyle::LanguageStandard. NFCI

2019-07-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: modocache, MyDeveloperDay, klimek, rsmith, sammccall, Typz. Herald added a project: clang. Herald added a subscriber: cfe-commits. Preparatory change for D65043 . We current use `!=LS_Cpp03` to enable langua

[PATCH] D65192: [Sema] Disable some enabled-by-default -Wparentheses diagnostics

2019-07-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: akyrtzi, jyknight, rtrieu, rsmith. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. The -Wparentheses warnings are enabled by default in clang but they are under -Wall in gcc (gcc/c-family/c.opt). Many of the

[PATCH] D65192: [Sema] Disable some enabled-by-default -Wparentheses diagnostics

2019-07-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 211425. MaskRay edited the summary of this revision. MaskRay added a comment. Delete -Wmost from the hierarchy. It doesn't belong there Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65192/new/ https://reviews.llvm.org/D65192

[PATCH] D65183: [Format] Make it easy to add new format::FormatStyle::LanguageStandard. NFCI

2019-07-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 211436. MaskRay added a comment. Change to `< Cpp11` Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65183/new/ https://reviews.llvm.org/D65183 Files: lib/Format/Format.cpp lib/Format/TokenAnnotator.cpp Index: lib/Format

[PATCH] D65183: [Format] Make it easy to add new format::FormatStyle::LanguageStandard. NFCI

2019-07-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:2862 return Right.is(TT_TemplateCloser) && Left.is(TT_TemplateCloser) && - (Style.Standard != FormatStyle::LS_Cpp11 || Style.SpacesInAngles); +

[PATCH] D65183: [Format] Make it easy to add new format::FormatStyle::LanguageStandard. NFCI

2019-07-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 211437. MaskRay added a comment. Fix another place that should use `< FormatStyle::LS_Cpp11` instead` Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65183/new/ https://reviews.llvm.org/D65183 Files: lib/Format/Format.cpp

[PATCH] D65183: [Format] Make it easy to add new format::FormatStyle::LanguageStandard. NFCI

2019-07-24 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366876: [Format] Make it easy to add new format::FormatStyle::LanguageStandard. NFCI (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repositor

[PATCH] D65194: [Format] Make getFormattingLangOpts clear LS_Auto uses LS_Cpp11 lexing rule

2019-07-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: modocache, sammccall. Herald added a project: clang. Herald added a subscriber: cfe-commits. Suggested by sammccall in post-commit review of D65183 Repository: rC Clang https://reviews.llvm.org/D65194

[PATCH] D65194: [Format] Make getFormattingLangOpts clear LS_Auto uses LS_Cpp11 lexing rule

2019-07-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. `getFormattingLangOpts` is called with unadjusted FormatStyle (`deriveLocalStyle` doesn't modify `Style`). For example, GoogleStyle uses `FormatStyle::LS_Auto`. We're relying on `FormatStyle::LS_Auto` being larger than `FormatStyle::LS_Cpp11`, which is brittle. Below i

[PATCH] D65194: [Format] Make getFormattingLangOpts clear LS_Auto uses LS_Cpp11 lexing rule

2019-07-24 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366883: [Format] getFormattingLangOpts: make LS_Auto uses LS_Cpp11 lexing rule (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL

[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

2019-07-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D64666#1600445 , @ziangwan wrote: > Update diff. > > 1. Fix 2 failing test cases. I omitted these two. My mistake. > 2. Fix trailing whitespaces. > > Okay? error: constant expression evaluates to 123456789 which cannot b

[PATCH] D65192: [Sema] Disable some enabled-by-default -Wparentheses diagnostics

2019-07-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:5654-5656 def warn_addition_in_bitshift : Warning< "operator '%0' has lower precedence than '%1'; " + "'%1' will be evaluated first">, InGroup, Def

[PATCH] D65192: [Sema] Disable some enabled-by-default -Wparentheses diagnostics

2019-07-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 212265. MaskRay edited the summary of this revision. MaskRay added a comment. keep -Woverloaded-shift-op-parentheses enabled by default Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65192/new/ https://reviews.llvm.org/D65192

[PATCH] D65192: [Sema] Disable some enabled-by-default -Wparentheses diagnostics

2019-07-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked 3 inline comments as done. MaskRay added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:5647-5650 def warn_overloaded_shift_in_comparison :Warning< "overloaded operator %select{>>|<<}0 has higher precedence than " "comparison operato

[PATCH] D65192: [Sema] Disable some enabled-by-default -Wparentheses diagnostics

2019-07-31 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added a comment. Ping :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65192/new/ https://reviews.llvm.org/D65192 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D65564: Improve raw_ostream so that you can "write" colors using operator<

2019-08-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65564/new/ https://reviews.llvm.org/D65564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D65192: [Sema] Disable some enabled-by-default -Wparentheses diagnostics

2019-08-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:5654-5656 def warn_addition_in_bitshift : Warning< "operator '%0' has lower precedence than '%1'; " + "'%1' will be evaluated first">, InGroup, Def

[PATCH] D65192: [Sema] Disable some enabled-by-default -Wparentheses diagnostics

2019-08-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:5654-5656 def warn_addition_in_bitshift : Warning< "operator '%0' has lower precedence than '%1'; " + "'%1' will be evaluated first">, InGroup, Def

[PATCH] D65192: [Sema] Make -Wbitwise-op-parentheses and -Wlogical-op-parentheses disabled-by-default

2019-08-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 212958. MaskRay retitled this revision from "[Sema] Disable some enabled-by-default -Wparentheses diagnostics" to "[Sema] Make -Wbitwise-op-parentheses and -Wlogical-op-parentheses disabled-by-default". MaskRay edited the summary of this revision. MaskRay add

[PATCH] D65192: [Sema] Make -Wbitwise-op-parentheses and -Wlogical-op-parentheses disabled-by-default

2019-08-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 212962. MaskRay added a comment. test/Parser/cxx2a-spaceship.cpp does not need a change Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65192/new/ https://reviews.llvm.org/D65192 Files: include/clang/Basic/DiagnosticSemaKind

[PATCH] D65192: [Sema] Make -Wbitwise-op-parentheses and -Wlogical-op-parentheses disabled-by-default

2019-08-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 213064. MaskRay added a comment. Add bitwise-op-parentheses.c logical-op-parentheses.c Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65192/new/ https://reviews.llvm.org/D65192 Files: include/clang/Basic/DiagnosticSemaKinds

[PATCH] D65192: [Sema] Make -Wbitwise-op-parentheses and -Wlogical-op-parentheses disabled-by-default

2019-08-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 213065. MaskRay added a comment. . Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65192/new/ https://reviews.llvm.org/D65192 Files: include/clang/Basic/DiagnosticSemaKinds.td test/Sema/bitwise-op-parentheses.c test/Sema

[PATCH] D65192: [Sema] Make -Wbitwise-op-parentheses and -Wlogical-op-parentheses disabled-by-default

2019-08-02 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367690: [Sema] Disable -Wbitwise-op-parentheses and -Wlogical-op-parentheses by default (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Reposit

[PATCH] D65029: [Driver] Support for disabling sanitizer runtime linking

2019-08-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D65029#1613315 , @phosek wrote: > I've updated the change and renamed the flag to `-fsanitize-no-runtime` > although I'm not sure if it's necessarily better. I was thinking that ideal > interface might be `-fsanitize-runtime=(

[PATCH] D65699: [Driver] Prioritize SYSROOT/usr/include over RESOURCE_DIR/include on linux-musl

2019-08-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: dalias, phosek, rsmith. Herald added subscribers: cfe-commits, jfb. Herald added a project: clang. On a musl-based Linux distribution, stdalign.h stdarg.h stdbool.h stddef.h stdint.h stdnoreturn.h are expected to be provided by musl (/usr/in

[PATCH] D65715: [Driver] Don't disable -fsanitizer-coverage for safe-stack or shadow-call-stack

2019-08-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Does this change affect `test/Driver/fsanitize-coverage.c`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65715/new/ https://reviews.llvm.org/D65715 ___ cfe-commits mailing lis

[PATCH] D65572: Fix static linking failure with --unwindlib=libunwind

2019-08-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. If libunwind is configured with `-DLIBUNWIND_ENABLE_THREADS=Off` / it is on Windows / `-DLIBUNWIND_USE_WEAK_PTHREAD=On`, libpthread is not a hard dependency. If you use lld: #if _LIBUNWIND_USE_DLADDR #include #if defined(__unix__) && defined(__ELF__) && defined

[PATCH] D65715: [Driver] Don't disable -fsanitizer-coverage for safe-stack or shadow-call-stack

2019-08-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Can you also take a quick look at https://reviews.llvm.org/D65699 :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65715/new/ https://reviews.llvm.org/D65715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D65699: [Driver] Prioritize SYSROOT/usr/include over RESOURCE_DIR/include on linux-musl

2019-08-05 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367981: [Driver] Prioritize SYSROOT/usr/include over RESOURCE_DIR/include on linux-musl (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Reposit

[PATCH] D65854: [diagtool] Use `operator<<(Colors)` to print out colored output.

2019-08-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/tools/diagtool/TreeView.cpp:167 + if (!hasColors(out)) +out.enable_colors(false); + `out.enable_colors(out.has_colors());` It looks the function `hasColors` is overengineered. `out` in these files can only b

[PATCH] D65880: [Driver] Move LIBRARY_PATH before user inputs

2019-08-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: lichray, phosek, void. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes PR16786 Currently, library paths specified by LIBRARY_PATH are placed after inputs: `inputs LIBRARY_PATH stdlib` In gcc, the order is: `inpu

[PATCH] D65881: [Driver] Move LIBRARY_PATH before user inputs

2019-08-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: lichray, phosek, void. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes PR16786 Currently, library paths specified by LIBRARY_PATH are placed after inputs: `inputs LIBRARY_PATH stdlib` In gcc, the order is: `inpu

[PATCH] D65881: [Driver] Move LIBRARY_PATH before user inputs

2019-08-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay abandoned this revision. MaskRay added a comment. Sorry. Accidentally created a duplicate one by my arc diff.. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65881/new/ https://reviews.llvm.org/D65881 ___ cfe-

[PATCH] D65880: [Driver] Move LIBRARY_PATH before user inputs

2019-08-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 213908. MaskRay added a comment. Fix a comment Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65880/new/ https://reviews.llvm.org/D65880 Files: lib/Driver/ToolChains/CommonArgs.cpp test/Driver/linker-opts.c Index: test/

[PATCH] D65880: [Driver] Move LIBRARY_PATH before user inputs

2019-08-07 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368245: [Driver] Move LIBRARY_PATH before user inputs (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST

[PATCH] D65880: [Driver] Move LIBRARY_PATH before user inputs

2019-08-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. @hfinkel Thanks! Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65880/new/ https://reviews.llvm.org/D65880 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[PATCH] D66043: Add to -Wparentheses case of bitwise-and ("&") and bitwise-or ("|") verses conditional operator ("?:")

2019-08-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: test/Sema/parentheses.c:148 + + (void)(x | b ? 1 : 2); // expected-warning {{operator '?:' has lower precedence than '|'}} expected-note 2{{place parentheses}} + (void)(x & b ? 1 : 2); // expected-warning {{operator '?:' has lower pr

[PATCH] D66043: Add to -Wparentheses case of bitwise-and ("&") and bitwise-or ("|") verses conditional operator ("?:")

2019-08-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: test/Sema/parentheses.c:148 + + (void)(x | b ? 1 : 2); // expected-warning {{operator '?:' has lower precedence than '|'}} expected-note 2{{place parentheses}} + (void)(x & b ? 1 : 2); // expected-warning {{operator '?:' has lower pr

[PATCH] D66209: Improved the doc comment for getCommentsInFile

2019-08-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/AST/RawCommentList.h:203 + /// \returns A mapping from an offset of the start of the comment to the + /// comment itself, or nullptr in case there are no comments in in \p File. const std::map *getCommentsInFile(

[PATCH] D65616: Ignore -fsemantic-interposition/-fno-semantic-interposition flag for gcc compatibility

2019-08-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D65616#1634966 , @serge-sans-paille wrote: > Adding @hfinkel to the thread to confirm it's okay to add this behavior, as > he authored an RFC on the subject (see > https://lists.llvm.org/pipermail/llvm-dev/2016-November/10762

[PATCH] D66142: clang: Don't warn on unused momit-leaf-frame-pointer when frame pointers are off.

2019-08-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. LGTM Comment at: cfe/trunk/test/Driver/frame-pointer-elim.c:31 +// fno-omit-frame-pointer -momit-leaf-frame-pointer can be overwritten by +// fomit-frame-pointer later on the command without warning Omitted `-` Repository: rL LLVM

[PATCH] D63718: [ADT] Implement llvm::bsearch() with std::partition_point()

2019-06-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: EricWF, sammccall. Herald added subscribers: llvm-commits, cfe-commits, kadircet, arphaman, dexonsmith, jkorous. Herald added projects: clang, LLVM. Deprecate the begin-end form because the standard std::partition_point can be easily used as

[PATCH] D63718: [ADT] Implement llvm::bsearch() with std::partition_point()

2019-06-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 206220. MaskRay edited the summary of this revision. MaskRay added a comment. Delete the begin-end form Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63718/new/ https://reviews.llvm.org/D63718 Files: clang-t

[PATCH] D63718: [ADT] Implement llvm::bsearch() with std::partition_point()

2019-06-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. @sammccall Ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63718/new/ https://reviews.llvm.org/D63718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D63822: [Driver] Delete --print-supported-cpus in favor of -mcpu=? or -mtune=?

2019-06-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: kongyi, ziangwan. Herald added subscribers: cfe-commits, srhines. Herald added a project: clang. Also fix some style issues after D63105 . Repository: rC Clang https://reviews.llvm.org/D63822 Files: do

[PATCH] D63718: [ADT] Implement llvm::bsearch() with std::partition_point()

2019-06-27 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/D63718/new/ https://reviews.llvm.org/D63718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D63822: [Driver] Fix style issues of --print-supported-cpus

2019-06-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 206989. MaskRay retitled this revision from "[Driver] Delete --print-supported-cpus in favor of -mcpu=? or -mtune=?" to "[Driver] Fix style issues of --print-supported-cpus". MaskRay added a comment. Repurpose Repository: rC Clang CHANGES SINCE LAST ACT

[PATCH] D63822: [Driver] Fix style issues of --print-supported-cpus

2019-06-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 206993. MaskRay added a comment. Restore a comment Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63822/new/ https://reviews.llvm.org/D63822 Files: include/clang/Driver/Options.td lib/Driver/Driver.cpp lib/Frontend/Comp

[PATCH] D63822: [Driver] Fix style issues of --print-supported-cpus

2019-06-28 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364704: [Driver] Fix style issues of --print-supported-cpus after D63105 (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM

[PATCH] D63718: [ADT] Implement llvm::bsearch() with std::partition_point()

2019-06-30 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364719: [ADT] Implement llvm::bsearch() with std::partition_point() (authored by MaskRay, committed by ). Herald added subscribers: kristina, ilya-biryukov. Changed prior to commit: https://reviews.llvm

[PATCH] D56554: [ELF] Add '-z nognustack' opt to suppress emitting PT_GNU_STACK

2019-07-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. This patch makes sense to me. It can benefit other OS/environment as well. Comment at: lld/ELF/Driver.cpp:357 + + // default + return GnuStackKind::NoExec; This is obvious. The comment can be removed. CHANGES SINCE LAST ACTION htt

[PATCH] D56650: [lld] [ELF] Support customizing behavior on target triple

2019-07-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added a comment. > krytarowski: The discussion is ongoing since 2017 and we have an impasse. > >> peter.smith: I think this might be better raised on lllvm-dev as I suspect >> that we need to give this wider visibility. I'm not totally opposed

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: awilfox, echristo, hfinkel, rnk, rsmith. Herald added subscribers: cfe-commits, jsji, kbarton, nemanjai. Herald added a project: clang. -mlong-double-64 is supported on some ports of gcc (i386, x86_64, and ppc{32,64}). On many other targets,

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 207532. MaskRay added a comment. Improve a test Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64067/new/ https://reviews.llvm.org/D64067 Files: include/clang/Basic/LangOptions.def include/clang/Driver/Options.td lib/Ba

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 207695. MaskRay edited the summary of this revision. MaskRay added a comment. Implement this in TargetInfo::adjust as rnk suggested Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64067/new/ https://reviews.llvm.org/D64067 Fil

[PATCH] D64119: [PowerPC] Support constraint code "ww"

2019-07-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: awilfox, echristo, hfinkel, jsji, kbarton, nemanjai. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. "ww" and "ws" are both constraint codes for VSX vector registers that holds scalar double

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 207708. MaskRay added a comment. Check -malign-double Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64067/new/ https://reviews.llvm.org/D64067 Files: include/clang/Basic/LangOptions.def include/clang/Driver/Options.td

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 207795. MaskRay added a comment. Make powerpc* musl default to 64-bit long double Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64067/new/ https://reviews.llvm.org/D64067 Files: include/clang/Basic/LangOptions.def includ

[PATCH] D64119: [PowerPC] Support constraint code "ww"

2019-07-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:14080 return std::make_pair(0U, &PPC::VSRCRegClass); - } else if (Constraint == "ws" && Subtarget.hasVSX()) { + } else if ((Constraint == "ws" |

[PATCH] D64119: [PowerPC] Support constraint code "ww"

2019-07-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: llvm/test/CodeGen/PowerPC/inlineasm-vsx-reg.ll:42 + +define float @test_ww(float %x, float %y) { + %1 = tail call float asm "xsmaxdp ${0:x}, ${1:x}, ${2:x}", "=^ww,^ww,^ww"(float %x, float %y)

[PATCH] D64119: [PowerPC] Support constraint code "ww"

2019-07-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: clang/lib/Basic/Targets/PPC.h:211 + case 's': // VSX vector register to hold scalar double data + case 'w': // VSX vector register to hold scalar double data case 'a': // Any VSX

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 207965. MaskRay edited the summary of this revision. MaskRay added a comment. Add tests to check mangling of long double -mlong-double-64 has no effect on gcc x86. On gcc ppc, -mlong-double-64 changes the mangled type from 'g' (ibmlongdouble) to 'e' Reposi

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. `-mlong-double-128` is not supported now. The mangling scheme of `-mlong-double-64` is consistent with gcc on x86 and ppc. % g++ a.cc -S -o - | grep '^_Z3foo' _Z3fooe: % g++ a.cc -S -o - -mlong-double-64 | grep '^_Z3foo' _Z3fooe: % g++ a.cc -S -o - -mlong-doubl

[PATCH] D64119: [PowerPC] Support constraint code "ww"

2019-07-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added a comment. float ws_float(float x, float y) { __asm__ ("xsadddp %0, %1, %2" : "=ws"(x) : "ws"(x), "ws"(y)); return x; } float ww_float(float x, float y) { __asm__ ("xsadddp %0, %1, %2" : "=ww"(x) : "ww"(x), "ww"(y)); ret

[PATCH] D64119: [PowerPC] Support constraint code "ww"

2019-07-03 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365106: [PowerPC] Support constraint code "ww" (authored by MaskRay, committed by ). Changed prior to commit: https://reviews.llvm.org/D64119?vs=207707&id=207971#toc Repository: rL LLVM CHANGES SINC

[PATCH] D64276: [ItaniumMangle] Replace useFloat128ManglingForLongDouble() with getManglingForLongDouble() and getManglingForFloat128()

2019-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: awilfox, echristo, erichkeane, hfinkel, majnemer, rnk, rsmith. Herald added subscribers: cfe-commits, erik.pilkington, jdoerfert, jsji, kbarton, nemanjai. Herald added a project: clang. On PowerPC, long double has 3 mangling schemes: -mlon

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208255. MaskRay added a comment. Herald added a subscriber: wuzish. Add more tests: elf32/elf64/darwin... Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64067/new/ https://reviews.llvm.org/D64067 Files: include/clang/Basic

[PATCH] D64276: [ItaniumMangle] Replace useFloat128ManglingForLongDouble() with getManglingForLongDouble() and getManglingForFloat128()

2019-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208256. MaskRay added a comment. Simplify x86_64 Android. Since it doesn't use -mlong-double-64 or -mlong-double-128, just use "g" for it. In the next -mlong-double-128 patch, we move its getManglingForLongDouble() overload to X86TargetInfo Repository: r

[PATCH] D64277: [X86][PowerPC] Support -mlong-double-128

2019-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: awilfox, echristo, erichkeane, hfinkel, jsji, majnemer, rnk, rsmith. Herald added subscribers: cfe-commits, kbarton, nemanjai. Herald added a project: clang. This patch makes the driver option -mlong-double-128 available for X86 and PowerPC.

[PATCH] D64277: [X86][PowerPC] Support -mlong-double-128

2019-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208260. MaskRay added a comment. Add a driver test Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64277/new/ https://reviews.llvm.org/D64277 Files: include/clang/Driver/Options.td lib/Basic/TargetInfo.cpp lib/Basic/Targ

[PATCH] D64277: [X86][PowerPC] Support -mlong-double-128

2019-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208266. MaskRay added a comment. Herald added a subscriber: jdoerfert. Small adjustment to PPC.cpp to make -mlong-double-128 -mabi=ieeelongdouble simpler Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64277/new/ https://revie

[PATCH] D64283: [PowerPC] Support -mabi=ieeelongdouble and -mabi=ibmlongdouble

2019-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: awilfox, dalias, echristo, hfinkel, nemanjai, jsji, kbarton. Herald added a project: clang. Herald added a subscriber: cfe-commits. MaskRay added parent revisions: D64282: [PowerPC] Support fp128 libcalls, D64277: [X86][PowerPC] Support -mlo

[PATCH] D64277: [X86][PowerPC] Support -mlong-double-128

2019-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added a subscriber: ABataev. MaskRay added inline comments. Comment at: test/OpenMP/nvptx_unsupported_type_codegen.cpp:79 } - -// CHECK: define weak void @__omp_offloading_{{.+}}foo{{.+}}_l75([[BIGTYPE:.+]]* @AB

[PATCH] D64277: [X86][PowerPC] Support -mlong-double-128

2019-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: test/OpenMP/nvptx_unsupported_type_codegen.cpp:79 } - -// CHECK: define weak void @__omp_offloading_{{.+}}foo{{.+}}_l75([[BIGTYPE:.+]]* ABataev wrote: > MaskRay wrote: > > @ABa

[PATCH] D64277: [X86][PowerPC] Support -mlong-double-128

2019-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: test/OpenMP/nvptx_unsupported_type_codegen.cpp:79 } - -// CHECK: define weak void @__omp_offloading_{{.+}}foo{{.+}}_l75([[BIGTYPE:.+]]* ABataev wrote: > MaskRay wrote: > > ABat

[PATCH] D60335: Use -fomit-frame-pointer when optimizing PowerPC code

2019-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Herald added a subscriber: wuzish. I would write the following test (I can commit that for you) diff --git c/test/Driver/frame-pointer-elim.c w/test/Driver/frame-pointer-elim.c index 6fcd3eb75a..c2e9ccb225 100644 --- c/test/Driver/frame-pointer-elim.c +++ w/test/

[PATCH] D64289: [OpenMP] Fix 128-bit long double support on target

2019-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Drive-by comment :) In gcc, (1) -mlong-double-128 uses IEEE 754 quad as the representation of long double on x86_64 (2) -mlong-double-128 -mabi=ieeelongdouble uses IEEE 754 quad as the representation of long double on powerpc{32,64}. (On Linux powerpc{32,64}, `-mlong

[PATCH] D64289: [OpenMP] Fix 128-bit long double support on target

2019-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:1594 + !Context.getTargetInfo().hasFloat128Type() && + Context.getTargetInfo().getLongDoubleWidth() != 128) || (Ty->isIntegerType() && Context.getTypeSize(Ty) == 128 && AB

[PATCH] D10051: Driver: Modify the -print-libgcc-file-name code to use ToolChain::GetRuntimeLibPath().

2019-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. D25338 fixed the issue.. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D10051/new/ https://reviews.llvm.org/D10051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[PATCH] D10049: Driver: Add OS-specific resource directory to file search paths.

2019-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Implemented by D31447 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D10049/new/ https://reviews.llvm.org/D10049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D64294: [Driver] Consolidate shouldUseFramePointer() and shouldUseLeafFramePointer()

2019-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: chandlerc, dim, echristo, rnk, rsmith, void, ychen. Herald added a project: clang. Herald added a subscriber: cfe-commits. Use a tri-state enum to represent shouldUseFramePointer() and shouldUseLeafFramePointer(). This simplifies the logic a

<    1   2   3   4   5   6   7   8   9   10   >