[PATCH] D37958: [libc++] Correctly propagate user-defined lookup_classname().

2017-09-17 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 115560. timshen added a comment. Stylize template decl to "template https://reviews.llvm.org/D37958 Files: libcxx/include/regex libcxx/test/std/re/re.traits/lookup_classname_user_defined.pass.cpp libcxx/utils/libcxx/test/target_info.py Index: libcxx/ut

[PATCH] D37958: [libc++] Correctly propagate user-defined lookup_classname().

2017-09-17 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 115559. timshen added a comment. Update description. https://reviews.llvm.org/D37958 Files: libcxx/include/regex libcxx/test/std/re/re.traits/lookup_classname_user_defined.pass.cpp libcxx/utils/libcxx/test/target_info.py Index: libcxx/utils/libcxx/te

[PATCH] D37958: [libc++] Correctly propagate user-defined lookup_classname().

2017-09-17 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. I'm not sure if we need to change the CI server to suport ja_JP.UTF-8. https://reviews.llvm.org/D37958 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37958: [libc++] Correctly propagate user-defined lookup_classname().

2017-09-17 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. Herald added a subscriber: sanjoy. Herald added a reviewer: EricWF. Always lookup the class name, even when the traits type is regex_traits<>. The lookup happens at regex compile time, so it shouldn't affect the performance. I also added ja_JP.UTF-8 as a common loc

[PATCH] D37956: [libc++] Check back reference subscript overflow in a single place.

2017-09-16 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. Herald added a subscriber: sanjoy. Herald added a reviewer: EricWF. Currently it's checked in three places, including one place that's at regex runtime. There is no need to do runtime check, as all uses and definitions of subexpress is known at regex compile-time.

[PATCH] D37955: [libcxx] Fix invert negative bracket match.

2017-09-16 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 115554. timshen added a comment. Remove "#include " in the test. It was for debugging. https://reviews.llvm.org/D37955 Files: libcxx/include/regex libcxx/test/std/re/re.alg/re.alg.search/invert_neg_word_search.pass.cpp Index: libcxx/test/std/re/re.alg

[PATCH] D37955: [libcxx] Fix invert negative bracket match.

2017-09-16 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. Herald added a subscriber: sanjoy. Herald added a reviewer: EricWF. Ideally we want !(neg_mask || neg_char), aka (!neg_mask && !neg_char). Before the change, the code is (!neg_mask || !neg_char). This fixes PR34310. https://reviews.llvm.org/D37955 Files: libcx

[PATCH] D36253: [Sema] Add a comment on an identified bug on default arguments.

2017-08-02 Thread Tim Shen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL309908: [Sema] Add a comment on an identified bug on default arguments. (authored by timshen). Changed prior to commit: https://reviews.llvm.org/D36253?vs=109461&id=109464#toc Repository: rL LLVM ht

[PATCH] D36253: [Sema] Add a comment on an identified bug on default arguments.

2017-08-02 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. Herald added a subscriber: sanjoy. The mis-compile is triggered by internal code, but I haven't reduced it to a small piece of code. Add a FIXME here, since a decent fix doesn't seem to be trivial. The decent fix can be changing Decl::Init to PointerUnion, and mak

[PATCH] D36108: Add powerpc64 to compiler-rt build infrastructure.

2017-07-31 Thread Tim Shen via Phabricator via cfe-commits
timshen accepted this revision. timshen added a comment. This revision is now accepted and ready to land. Offline discussion discovered that __clear_cache() is not implemented for powerpc64 (the big-endian target). I think it's correct to use the same implementation of __clear_cache() for both e

[PATCH] D34790: [NewPM] Add Clang cc1 flag -fdebug-pass-manager for printing debug information.

2017-06-29 Thread Tim Shen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL306757: [NewPM] Add Clang cc1 flag -fdebug-pass-manager for printing debug information. (authored by timshen). Changed prior to commit: https://reviews.llvm.org/D34790?vs=104766&id=104768#toc Repositor

[PATCH] D34728: [ThinkLTO] Invoke build(Thin)?LTOPreLinkDefaultPipeline.

2017-06-29 Thread Tim Shen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL306756: [ThinkLTO] Invoke build(Thin)?LTOPreLinkDefaultPipeline. (authored by timshen). Changed prior to commit: https://reviews.llvm.org/D34728?vs=104551&id=104767#toc Repository: rL LLVM https://r

[PATCH] D34790: [NewPM] Add Clang cc1 flag -fdebug-pass-manager for printing debug information.

2017-06-29 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 104766. timshen marked an inline comment as done. timshen added a comment. Herald added a subscriber: aprantl. s/the debug prints/debug printing/ https://reviews.llvm.org/D34790 Files: clang/include/clang/Driver/CC1Options.td clang/include/clang/Fronten

[PATCH] D34790: [NewPM] Add Clang cc1 flag -fdebug-pass-manager for printing debug information.

2017-06-29 Thread Tim Shen via Phabricator via cfe-commits
timshen marked 2 inline comments as done. timshen added inline comments. Comment at: clang/include/clang/Driver/Options.td:971-973 +def fexperimental_new_pass_manager_EQ : Joined<["-"], "fexperimental-new-pass-manager=">, + Group, Flags<[CC1Option]>, + HelpText<"Enables an exp

[PATCH] D34790: [NewPM] Add Clang cc1 flag -fdebug-pass-manager for printing debug information.

2017-06-29 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. Also add @tejohnson as a reviewer, since the LTO test changed https://reviews.llvm.org/D34790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34790: [NewPM] Add a flag -fexperimental-new-pass-manager=on/off/debug for printing debug output.

2017-06-29 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 104753. timshen added a comment. Use a cc1 flag -fdebug-pass-manager instead. https://reviews.llvm.org/D34790 Files: clang/include/clang/Driver/CC1Options.td clang/include/clang/Frontend/CodeGenOptions.def clang/lib/CodeGen/BackendUtil.cpp clang/lib

[PATCH] D34790: [NewPM] Add a flag -fexperimental-new-pass-manager=on/off/debug for printing debug output.

2017-06-28 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: clang/include/clang/Driver/Options.td:971-973 +def fexperimental_new_pass_manager_EQ : Joined<["-"], "fexperimental-new-pass-manager=">, + Group, Flags<[CC1Option]>, + HelpText<"Enables an experimental new pass manager in LLVM.">, Va

[PATCH] D34728: [ThinkLTO] Invoke build(Thin)?LTOPreLinkDefaultPipeline.

2017-06-28 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 104551. timshen added a comment. Splitted into two patches. I'll commit this one (ThinLTO change) without the test first, then commit the flag change with the Clang ThinLTO pipeline test. https://reviews.llvm.org/D34728 Files: clang/lib/CodeGen/BackendUt

[PATCH] D34790: [NewPM] Add a flag -fexperimental-new-pass-manager=on/off/debug for printing debug output.

2017-06-28 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. Herald added subscribers: hiraditya, mehdi_amini, sanjoy. https://reviews.llvm.org/D34790 Files: clang/include/clang/Driver/Options.td clang/include/clang/Frontend/CodeGenOptions.def clang/include/clang/Frontend/CodeGenOptions.h clang/lib/CodeGen/BackendUtil

[PATCH] D34728: [ThinkLTO] Invoke build(Thin)?LTOPreLinkDefaultPipeline.

2017-06-28 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:804-807 + case 0: +return PassBuilder::O0; + case 1: tejohnson wrote: > chandlerc wrote: > > Why is this change needed? > I assume it is just cleanup since this isn't currently c

[PATCH] D34728: [ThinkLTO] Invoke build(Thin)?LTOPreLinkDefaultPipeline.

2017-06-28 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 104533. timshen marked 5 inline comments as done. timshen added a comment. Added -fexperimental-new-pass-manager=off/on/debug for printing debug information. Added a Clang test. Do tell if you want me to split this patch. I didn't, becuase then I don't have

[PATCH] D34728: [ThinkLTO] Invoke build(Thin)?LTOPreLinkDefaultPipeline.

2017-06-27 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. A question I have is that I don't know how to test this. Ideally we want -debug-pass-manager from opt, but that flag is not part of the LLVM libraries. https://reviews.llvm.org/D34728 ___ cfe-commits mailing list cfe-commit

[PATCH] D34728: [ThinkLTO] Invoke build(Thin)?LTOPreLinkDefaultPipeline.

2017-06-27 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. Herald added subscribers: hiraditya, eraman, inglorion, mehdi_amini, sanjoy. Previously it doesn't actually invoke the designated new PM builder functions. https://reviews.llvm.org/D34728 Files: clang/lib/CodeGen/BackendUtil.cpp llvm/lib/Passes/PassBuilder.cpp

[PATCH] D33692: [ThinLTO] Wire up ThinLTO and new PM

2017-06-01 Thread Tim Shen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304496: [ThinLTO] Wire up ThinLTO and new PM (authored by timshen). Changed prior to commit: https://reviews.llvm.org/D33692?vs=101106&id=101135#toc Repository: rL LLVM https://reviews.llvm.org/D336

[PATCH] D33692: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-06-01 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 101106. timshen added a comment. Rebase the patch onto https://reviews.llvm.org/D33799. https://reviews.llvm.org/D33692 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeGen/thin_link_bitcode.c Index: clang/test/CodeGen/thin_link_bitcode.c =

[PATCH] D33692: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-30 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. Herald added subscribers: inglorion, Prazek, mehdi_amini. Also see https://reviews.llvm.org/D33429 for other ThinLTO + New PM related changes. https://reviews.llvm.org/D33692 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeGen/thin_link_bitcode.c In

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-30 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp:443 + writeThinLTOBitcode(OS, ThinLinkOS, + [&FAM](Function &F) -> AAResults & { +return FAM.getResult(F); chandlerc wrote: >

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-30 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 100761. timshen marked 12 inline comments as done. timshen added a comment. Updated based on the comments, and left out Clang changes for a separate patch. https://reviews.llvm.org/D33525 Files: llvm/include/llvm/Transforms/IPO/ThinLTOBitcodeWriter.h ll

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-29 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: llvm/test/Transforms/ThinLTOBitcodeWriter/new-pm.ll:1 +; RUN: opt -passes='lto' -debug-pass-manager -thinlto-bc -thin-link-bitcode-file=%t2 -o %t %s 2>&1 | FileCheck %s --check-prefix=DEBUG_PM +; RUN: llvm-bcanalyzer -dump %t2 | FileChe

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-26 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 100488. timshen added a comment. Add opt support and llvm test. https://reviews.llvm.org/D33525 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeGen/thin_link_bitcode.c llvm/include/llvm/Transforms/IPO/ThinLTOBitcodeWriter.h llvm/lib/Transfor

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-26 Thread Tim Shen via Phabricator via cfe-commits
timshen marked an inline comment as done. timshen added a comment. In https://reviews.llvm.org/D33525#764251, @chandlerc wrote: > (focusing on the LLVM side of this review for now) > > Can you add an LLVM-based test? Can you add this to > `lib/Passes/PassRegistry.def`? Talked offline. Given th

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-26 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 100462. timshen added a comment. Change the test case. https://reviews.llvm.org/D33525 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeGen/thin_link_bitcode.c llvm/include/llvm/Transforms/IPO/ThinLTOBitcodeWriter.h llvm/lib/Transforms/IPO/Th

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-25 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. In https://reviews.llvm.org/D33525#764251, @chandlerc wrote: > (focusing on the LLVM side of this review for now) > > Can you add an LLVM-based test? Can you add this to > `lib/Passes/PassRegistry.def`? I see that not all passes are registered (BitcodeWriterPass). Is i

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-24 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp:423 + +class AARGetter { + FunctionAnalysisManager &AM; mehdi_amini wrote: > Can't you do it with a lambda? I can, except that AAR needs to be allocated outside of the la

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-24 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. Herald added subscribers: eraman, inglorion, Prazek, mehdi_amini. Also see https://reviews.llvm.org/D33429 for other ThinLTO + New PM related changes. https://reviews.llvm.org/D33525 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeGen/thin_link_bitcod

[PATCH] D30118: [XRay] Merge xray clang flag tests, and add powerpc64le.

2017-02-21 Thread Tim Shen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL295778: [XRay] Merge xray clang flag tests, and add powerpc64le. (authored by timshen). Changed prior to commit: https://reviews.llvm.org/D30118?vs=88953&id=89284#toc Repository: rL LLVM https://rev

[PATCH] D30118: [XRay] Merge xray clang flag tests, and add powerpc64le.

2017-02-17 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. Herald added a subscriber: nemanjai. I'm not sure why they were in different files, but it's kind of harder to maintain. I create this patch partially for initiate a discussion. https://reviews.llvm.org/D30118 Files: clang/test/CodeGen/xray-attributes-supported

[PATCH] D24333: [VLA] Handle VLA size expression in a full-expression context.

2017-02-14 Thread Tim Shen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL295123: [VLA] Handle VLA size expression in a full-expression context. (authored by timshen). Changed prior to commit: https://reviews.llvm.org/D24333?vs=86377&id=88464#toc Repository: rL LLVM https

[PATCH] D24333: [CleanupInfo] Use cleanupsHaveSideEffects instead of exprNeedsCleanups in assertions

2017-01-30 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 86377. timshen added a comment. ActOnFinishFullExpr after exiting the expression evaluation context. https://reviews.llvm.org/D24333 Files: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp clang/lib/Sema/TreeTransform.h clang/test/Sema/pr30306.cpp Ind

[PATCH] D24333: [CleanupInfo] Use cleanupsHaveSideEffects instead of exprNeedsCleanups in assertions

2017-01-30 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 86375. timshen added a comment. Fix in the right way as rsmith pointed out. https://reviews.llvm.org/D24333 Files: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp clang/lib/Sema/TreeTransform.h clang/test/Sema/pr30306.cpp Index: clang/test/Sema/pr303

[PATCH] D27872: [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble)

2017-01-24 Thread Tim Shen via Phabricator via cfe-commits
timshen marked 13 inline comments as done. timshen added inline comments. Comment at: llvm/include/llvm/ADT/APFloat.h:1054 + opStatus next(bool nextDown) { +if (usesLayout(getSemantics())) jlebar wrote: > FWIW, see my screed on this: > http://jlebar.com/2

[PATCH] D27872: [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble)

2017-01-23 Thread Tim Shen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL292839: [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdoubleā€¦ (authored by timshen). Changed prior to commit: https://reviews.llvm.org/D27872?vs=85217&id=85457#toc Repository:

[PATCH] D27872: [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble)

2017-01-20 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: llvm/include/llvm/ADT/APFloat.h:1039 + /// \brief Operator+ overload which provides the default + /// \c nmNearestTiesToEven rounding mode and *no* error checking. APFloat operator+(const APFloat &RHS) const { echri

[PATCH] D27872: [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble)

2017-01-20 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 85217. timshen marked 2 inline comments as done. timshen added a comment. Stylish changes. https://reviews.llvm.org/D27872 Files: clang/test/CodeGen/ppc64-complex-parms.c llvm/include/llvm/ADT/APFloat.h llvm/lib/Support/APFloat.cpp llvm/test/CodeGen

[PATCH] D28037: [Altivec] Change vec_sl to a << (b % (sizeof(a) * 8))

2017-01-20 Thread Tim Shen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL292659: [Altivec] Change vec_sl to a << (b % (sizeof(a) * 8)) (authored by timshen). Changed prior to commit: https://reviews.llvm.org/D28037?vs=83140&id=85194#toc Repository: rL LLVM https://review

[PATCH] D28037: [Altivec] Change vec_sl to a << (b % (sizeof(a) * 8))

2017-01-20 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. In https://reviews.llvm.org/D28037#652021, @echristo wrote: > Going to commit this? I'd like to commit https://reviews.llvm.org/D28329 first. If we commit this now, the normal code will be slower. https://reviews.llvm.org/D28037 ___

[PATCH] D27872: [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble)

2017-01-18 Thread Tim Shen via Phabricator via cfe-commits
timshen marked an inline comment as done. timshen added a comment. Friendly ping. :) We still have internal test failures that this patch (and the next one) fixes, and I think this is the last "hard to review" patch in the APFloat refactoring. https://reviews.llvm.org/D27872 ___

[PATCH] D27872: [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble)

2017-01-09 Thread Tim Shen via Phabricator via cfe-commits
timshen marked an inline comment as done. timshen added inline comments. Comment at: llvm/include/llvm/ADT/APFloat.h:791 void makeNaN(bool SNaN, bool Neg, const APInt *fill) { -getIEEE().makeNaN(SNaN, Neg, fill); +if (usesLayout(getSemantics())) + return U.IEEE.ma

[PATCH] D27872: [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble)

2017-01-09 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. In https://reviews.llvm.org/D27872#639020, @hfinkel wrote: > it is not at all obvious what is going on (i.e. why are we casting to > integers?). Maybe semPPCDoubleDoubleImpl needs a better name now? It seems > confusing to have semPPCDoubleDoubleImpl and semPPCDoubleDou

[PATCH] D27872: [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble)

2017-01-09 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 83700. timshen added a comment. Rename semPPCDoubleDoubleImpl to semPPCDoubleDoubleLegacy to reflect its use more accurately. https://reviews.llvm.org/D27872 Files: clang/test/CodeGen/ppc64-complex-parms.c llvm/include/llvm/ADT/APFloat.h llvm/lib/Sup

[PATCH] D27872: [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble)

2017-01-06 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. Friendly ping :) Is there anyone else I can add as a reviewer, if no one feels comfortable reviewing the semantic? https://reviews.llvm.org/D27872 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

[PATCH] D27872: [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble)

2017-01-04 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. In https://reviews.llvm.org/D27872#636149, @echristo wrote: > I'm pretty sure I've never seen return widely used in > the code base versus my suggestion. That said, if you've looked and it's > roughly 50/50 then I care a lot less (and we can bike shed in some separate

[PATCH] D27872: [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble)

2017-01-04 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. In https://reviews.llvm.org/D27872#636130, @echristo wrote: > Looks pretty weird. Typically I'd suggest just: > > if (foo) { > > Foo(); > return; > > } > > since that will keep cognitive overhead to a minimum. > > -eric > > > Other functions are not controversial. I

[PATCH] D28037: [Altivec] Change vec_sl to a << (b % (sizeof(a) * 8))

2017-01-04 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 83140. timshen added a comment. Update comments, and move llvm changes to another patch. https://reviews.llvm.org/D28037 Files: clang/lib/Headers/altivec.h clang/test/CodeGen/builtins-ppc-altivec.c Index: clang/test/CodeGen/builtins-ppc-altivec.c =

[PATCH] D28224: [libcxx, regex] Throw exception after too many steps.

2017-01-02 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. I defined and exported a macro _LIBCPP_REGEX_COMPLEXITY_FACTOR in the hope that even when the library is shipped to the user, and when the user finds the factor to be inappropriate, they can override it. I'm not aware of and exported macro policy though, please advice.

[PATCH] D28224: [libcxx, regex] Throw exception after too many steps.

2017-01-02 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 82840. timshen added a comment. Detect user defined _LIBCPP_REGEX_COMPLEXITY_FACTOR first. https://reviews.llvm.org/D28224 Files: libcxx/include/regex libcxx/test/std/re/re.alg/re.alg.match/exponential.pass.cpp libcxx/test/std/re/re.alg/re.alg.search/

[PATCH] D28224: [libcxx, regex] Throw exception after too many steps.

2017-01-02 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added a reviewer: mclow.lists. timshen added a subscriber: cfe-commits. Herald added a reviewer: EricWF. This prevents the backtracking regex engines from "hanging forever" under certain input. https://reviews.llvm.org/D28224 Files: libcxx/include/regex

[PATCH] D28037: [PowerPC, DAGCombiner] Change vec_sl to a << (b % (sizeof(a) * 8)), and fold it back to a << b.

2016-12-21 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added reviewers: kbarton, hfinkel, iteratee, echristo, bogner. timshen added subscribers: llvm-commits, cfe-commits. Herald added subscribers: amehsan, nemanjai, mehdi_amini. For a << b (as original vec_sl does), if b >= sizeof(a) * 8, the behavior is undefin

[PATCH] D27872: [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble)

2016-12-20 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. I changed type style to early return. For constructors and destructors, I use: if (...) { // statement; return; } For normal functions that returns void, I chose: if (...) return Foo(); llvm_unreachable(...); since it's more compact. If returning v

[PATCH] D27872: [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble)

2016-12-20 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 82148. timshen added a comment. Consistently use early return style. https://reviews.llvm.org/D27872 Files: clang/test/CodeGen/ppc64-complex-parms.c llvm/include/llvm/ADT/APFloat.h llvm/lib/Support/APFloat.cpp llvm/test/CodeGen/PowerPC/fp128-bitcast

[PATCH] D27872: [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble)

2016-12-19 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 81981. timshen added a comment. Remove more 'else' after return. https://reviews.llvm.org/D27872 Files: clang/test/CodeGen/ppc64-complex-parms.c llvm/include/llvm/ADT/APFloat.h llvm/lib/Support/APFloat.cpp llvm/test/CodeGen/PowerPC/fp128-bitcast-aft

[PATCH] D27872: [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble)

2016-12-19 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 81980. timshen added a comment. Remove 'else' after return. Remove 'return' on void type. https://reviews.llvm.org/D27872 Files: clang/test/CodeGen/ppc64-complex-parms.c llvm/include/llvm/ADT/APFloat.h llvm/lib/Support/APFloat.cpp llvm/test/CodeGen/

[PATCH] D27872: [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble)

2016-12-16 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added reviewers: hfinkel, kbarton, iteratee, echristo. timshen added subscribers: llvm-commits, cfe-commits. Herald added subscribers: nemanjai, mehdi_amini. This patch changes the layout of DoubleAPFloat, and adjust all operations to do either: 1. (IEEEdoub

<    1   2