[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] 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

[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

[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] 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

[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] 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/

[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=`

[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

[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

[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

[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/

[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.

[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 -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

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

2019-07-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D64482#1578376 , @ro wrote: > In D64482#1578245 , @MaskRay wrote: > > > > There's one caveat: gcc defines _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE > > > for C++ only, while clang has

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

2019-07-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping:) It'll be great to have D64277 (-mlong-double-128) D64282 (libcall) D64283 (-mabi=ieeelongdouble) before 9.0.0 is branched. Repository: rC Clang CHANGES

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

2019-07-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 209114. MaskRay added a comment. Make -mabi=ieeelongdouble a pure CC1 option so that we can simplify the -mabi= loop Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64283/new/ https://reviews.llvm.org/D64283 Files:

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

2019-07-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked 5 inline comments as done. MaskRay added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:579 -static bool shouldUseFramePointer(const ArgList , - const llvm::Triple ) { - if (Arg *A =

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

2019-07-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 209112. MaskRay added a comment. Improve readability Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64294/new/ https://reviews.llvm.org/D64294 Files: lib/Driver/ToolChains/Clang.cpp test/Driver/cl-options.c

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

2019-07-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > There's one caveat: gcc defines _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE for > C++ only, while clang has long been doing it for all languages Can you explain more about the hack https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0f97ccfdccc033f543ccbcb220697e62e84bf01f

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

2019-07-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:585 + (A && A->getOption().matches(options::OPT_fno_omit_frame_pointer)) || + (!(A && A->getOption().matches(options::OPT_fomit_frame_pointer)) && +

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

2019-07-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208875. MaskRay edited the summary of this revision. MaskRay added a comment. Add another test: -mabi=elfv2 -mabi=elfv1 -mabi=ibmlongdouble -mabi=ieeelongdouble Try fixing the markdown in the description Repository: rC Clang CHANGES SINCE LAST ACTION

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

2019-07-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:1825 + // that don't use the altivec abi. + if (!SeenOther) +ABIName = A->getValue(); hfinkel wrote: > This seems like an

[PATCH] D64317: [Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272

2019-07-09 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365587: [Driver] Add float-divide-by-zero back to supported sanitizers after… (authored by MaskRay, committed by ). Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64317/new/

[PATCH] D64423: [OpenMP] Simplify getFloatTypeSemantics

2019-07-09 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365545: [OpenMP] Simplify getFloatTypeSemantics (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST

[PATCH] D64423: [OpenMP] Simplify getFloatTypeSemantics

2019-07-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208780. MaskRay edited the summary of this revision. MaskRay added a comment. Update description Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64423/new/ https://reviews.llvm.org/D64423 Files: lib/AST/ASTContext.cpp

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

2019-07-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. @ychen The GCC behavior ("omit" wins over "no-omit") makes sense because: in the 4 states: - 00) leaf retained, non-leaf retained - 01) leaf retained, non-leaf omitted - 10) leaf omitted, non-leaf retained - 11) leaf omitted, non-leaf omitted State 10) doesn't make

[PATCH] D64423: [OpenMP] Simplify getFloatTypeSemantics

2019-07-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added a reviewer: ABataev. Herald added subscribers: cfe-commits, jdoerfert, guansong. Herald added a project: clang. Repository: rC Clang https://reviews.llvm.org/D64423 Files: lib/AST/ASTContext.cpp Index: lib/AST/ASTContext.cpp

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

2019-07-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208704. MaskRay added a comment. Rebase The openmp issue was fixed by r365485 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64277/new/ https://reviews.llvm.org/D64277 Files: include/clang/Driver/Options.td

[PATCH] D64276: [ItaniumMangle] Refactor long double/__float128 mangling and fix the mangled code

2019-07-09 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365480: [ItaniumMangle] Refactor long double/__float128 mangling and fix the mangled… (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.

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

2019-07-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208616. MaskRay added a comment. Simplify and add another test Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64294/new/ https://reviews.llvm.org/D64294 Files: lib/Driver/ToolChains/Clang.cpp test/Driver/cl-options.c

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

2019-07-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208615. MaskRay edited the summary of this revision. MaskRay added a comment. Implement the GCC behavior: -fomit-frame-pointer wins over -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer loses out to -momit-leaf-frame-pointer Repository: rC Clang

[PATCH] D64317: [Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272

2019-07-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: test/Driver/fsanitize-blacklist.c:32 // RUN: %clang -target x86_64-linux-gnu -fsanitize=undefined -resource-dir=%S/Inputs/resource_dir %s -### 2>&1 | FileCheck %s

[PATCH] D64317: [Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272

2019-07-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked 2 inline comments as done. MaskRay added inline comments. Comment at: lib/Driver/SanitizerArgs.cpp:27-30 static const SanitizerMask NeedsUbsanRt = SanitizerKind::Undefined | SanitizerKind::Integer | SanitizerKind::ImplicitConversion |

[PATCH] D64317: [Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272

2019-07-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208565. MaskRay added a comment. Fix getPPTransparentSanitizers (test/Modules/check-for-sanitizer-feature.cpp) & ubsan_blacklist.txt Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64317/new/ https://reviews.llvm.org/D64317

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

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

[PATCH] D64317: [Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272

2019-07-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D64317#1574007 , @vitalybuka wrote: > is the patch description still correct? Yes. > Also, add SanitizerMask::FloatDivideByZero to a few other masks to make > -fsanitize-trap, -fsanitize-recover, -fsanitize-minimal-runtime

[PATCH] D64317: [Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272

2019-07-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208410. MaskRay added a comment. Fix sanitizer-ld.c test Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64317/new/ https://reviews.llvm.org/D64317 Files: lib/Driver/SanitizerArgs.cpp lib/Driver/ToolChain.cpp

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

2019-07-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208402. MaskRay added a comment. Rebase after getMangledCodeOfLongDouble -> getLongDoubleMangling rename Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64277/new/ https://reviews.llvm.org/D64277 Files:

[PATCH] D64276: [ItaniumMangle] Refactor long double/__float128 mangling and fix the mangled code

2019-07-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208399. MaskRay edited the summary of this revision. MaskRay added a comment. getMangledTypeOfLongDouble -> getLongDoubleMangling as erichkeane suggested. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64276/new/

[PATCH] D64317: [Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272

2019-07-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208395. MaskRay edited the summary of this revision. MaskRay added a comment. make various sanitizer features work Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64317/new/ https://reviews.llvm.org/D64317 Files:

[PATCH] D64317: [Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272

2019-07-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208382. MaskRay added a comment. Remove a stray : Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64317/new/ https://reviews.llvm.org/D64317 Files: lib/Driver/ToolChain.cpp test/Driver/fsanitize.c Index:

[PATCH] D64317: [Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272

2019-07-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208378. MaskRay retitled this revision from "[ubsan] Delete the FloatDivideByZero ErrorType" to "[Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272". MaskRay edited the summary of this revision. MaskRay added a comment.

[PATCH] D63793: Treat the range of representable values of floating-point types as [-inf, +inf] not as [-max, +max].

2019-07-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D63793#1572977 , @ostannard wrote: > There are a number of buildbot failures which look related to this, e.g. > > - >

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

2019-07-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208315. MaskRay edited the summary of this revision. MaskRay added a comment. Herald added subscribers: krytarowski, emaste. Update description. Fix the mangled code: U10__float128 -> u9__ieee128 Repository: rC Clang CHANGES SINCE LAST ACTION

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

2019-07-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208314. MaskRay added a comment. Rebase 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

[PATCH] D64276: [ItaniumMangle] Refactor long double/__float128 mangling and fix the mangled code

2019-07-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208313. MaskRay retitled this revision from "[ItaniumMangle] Replace useFloat128ManglingForLongDouble() with getManglingForLongDouble() and getManglingForFloat128()" to "[ItaniumMangle] Refactor long double/__float128 mangling and fix the mangled code".

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

2019-07-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208294. MaskRay edited the summary of this revision. MaskRay removed a subscriber: wuzish. MaskRay added a comment. "U10__float128" -> "u9__ieee128" This is the new mangled type in gcc>8.1 Repository: rC Clang CHANGES SINCE LAST ACTION

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

2019-07-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208289. MaskRay added a comment. Simplify Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64294/new/ https://reviews.llvm.org/D64294 Files: lib/Driver/ToolChains/Clang.cpp test/Driver/cl-options.c

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

2019-07-07 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

[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

[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

[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 &&

[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},

[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 +++

[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: > >

[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: > >

[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:.+]]*

[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

[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/

[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

[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

[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:

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

2019-07-06 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:

[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:

[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=207971#toc Repository: rL LLVM CHANGES SINCE

[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));

[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 -

[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'

[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

[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: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:14080 return std::make_pair(0U, ::VSRCRegClass); - } else if (Constraint == "ws" && Subtarget.hasVSX()) { + } else if ((Constraint == "ws" ||

[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

[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] 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

[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

[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

[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

[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] 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

[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:

[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] 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

[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

[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

[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:

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

2019-06-26 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

[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:

[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

[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

[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

[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:22 + StringRef Format; + std::set ParsedTemplates; + Does `StringSet<>` work? Comment at:

[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/CMakeLists.txt:58 clangDriver + clangIndex clangEdit This is a layering issue. clangIndex depends on clangFrontend so clangFrontend should not depend on clangIndex. The circular

[PATCH] D62509: [Driver] Render target options (e.g. -fuse-init-array) for -fembed-bitcode

2019-05-29 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC362052: [Driver] Render target options (e.g. -fuse-init-array) for -fembed-bitcode (authored by MaskRay, committed by ). Changed prior to commit: https://reviews.llvm.org/D62509?vs=202103=202105#toc

[PATCH] D62509: [Driver] Render target options (e.g. -fuse-init-array) for -fembed-bitcode

2019-05-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 202103. MaskRay retitled this revision from "[Driver] Render -fuse-init-array for -fembed-bitcode" to "[Driver] Render target options (e.g. -fuse-init-array) for -fembed-bitcode". MaskRay edited the summary of this revision. MaskRay added a comment. Add

[PATCH] D59185: [PowerPC] Set the default PLT mode on musl to Secure PLT

2019-05-29 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362051: [PowerPC] Set the default PLT mode on musl to Secure PLT (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D62606: [Driver] -static-pie: add -z text

2019-05-29 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362050: [Driver] -static-pie: add -z text (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION

[PATCH] D62606: [Driver] -static-pie: add -z text

2019-05-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: saugustine, sivachandra. Herald added a project: clang. Herald added a subscriber: cfe-commits. gcc -static-pie adds -z text. In ld.bfd and gold, default/-z text/-z notext are tri-state. By default, text relocations (and DF_TEXTREL) are

[PATCH] D62509: [Driver] Render -fuse-init-array for -fembed-bitcode

2019-05-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:3675 +// Render target options such as -fuse-init-array on modern ELF platforms. +TC.addClangTargetOptions(Args, CmdArgs, JA.getOffloadingDeviceKind()); +

  1   2   3   4   >