[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

2017-10-11 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. Herald added subscribers: Anastasia, nhaehnle, jholewinski. Currently both clang AST address spaces and target specific address spaces are represented as unsigned which can lead to subtle errors if the wrong type is passed. It is especially confusing in the CodeG

[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

2017-10-11 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: include/clang/Basic/AddressSpaces.h:51 +namespace LanguageAS { /// The type of a lookup table which maps from language-specific address spaces jlebar wrote: > I wonder if you need this namespace? LangAS right nex

[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

2017-10-12 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 118784. arichardson added a comment. Removed the additional namespace https://reviews.llvm.org/D38816 Files: include/clang/AST/ASTContext.h include/clang/AST/Type.h include/clang/Basic/AddressSpaces.h include/clang/Basic/TargetInfo.h lib/AST/A

[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

2017-10-12 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: lib/AST/TypePrinter.cpp:1323 OS << "address_space("; -OS << T->getEquivalentType().getAddressSpace(); +OS << T->getEquivalentType() + .getQualifiers() Anastasia wrote: > Why do we need this

[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

2017-10-12 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson planned changes to this revision. arichardson added inline comments. Comment at: include/clang/Basic/AddressSpaces.h:66 +inline LangAS LangASFromTargetAS(unsigned TargetAS) { + return static_cast((TargetAS) + yaxunl wrote: > how about `getLangASFro

[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

2017-10-13 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 118915. arichardson edited the summary of this revision. arichardson added a comment. This revision is now accepted and ready to land. - Keep old behaviour for clang_getAddressSpace() - renamed to getLangASFromTargetAS() - rebased on latest trunk https:/

[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

2017-10-13 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: lib/AST/TypePrinter.cpp:1323 OS << "address_space("; -OS << T->getEquivalentType().getAddressSpace(); +OS << T->getEquivalentType() + .getQualifiers() Anastasia wrote: > arichardson wrote: >

[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

2017-10-13 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: lib/AST/TypePrinter.cpp:1323 OS << "address_space("; -OS << T->getEquivalentType().getAddressSpace(); +OS << T->getEquivalentType() + .getQualifiers() Anastasia wrote: > arichardson wrote: >

[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

2017-10-13 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: lib/AST/TypePrinter.cpp:1323 OS << "address_space("; -OS << T->getEquivalentType().getAddressSpace(); +OS << T->getEquivalentType() + .getQualifiers() arichardson wrote: > Anastasia wrote: >

[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

2017-10-13 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: lib/AST/TypePrinter.cpp:1323 OS << "address_space("; -OS << T->getEquivalentType().getAddressSpace(); +OS << T->getEquivalentType() + .getQualifiers() yaxunl wrote: > arichardson wrote: > >

[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

2017-10-15 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315871: Convert clang::LangAS to a strongly typed enum (authored by arichardson). Changed prior to commit: https://reviews.llvm.org/D38816?vs=118915&id=119090#toc Repository: rL LLVM https://reviews

[PATCH] D49067: Stop wrapping __has_include in another macro

2018-07-23 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. Ping? Repository: rCXX libc++ https://reviews.llvm.org/D49067 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49091: Warn about usage of __has_include/__has_include_next in macro expansions

2018-07-23 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. Ping? Repository: rC Clang https://reviews.llvm.org/D49091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49067: Stop wrapping __has_include in another macro

2018-07-23 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In https://reviews.llvm.org/D49067#1172500, @EricWF wrote: > Where are the special lexing rules specified? In https://bugs.llvm.org/show_bug.cgi?id=37990#c1 @rsmith wrote: > The C++ standard appears to be missing a rule that says that a __has_include > token pr

[PATCH] D49067: Stop wrapping __has_include in another macro

2018-07-24 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCXX337824: Stop wrapping __has_include in another macro (authored by arichardson, committed by ). Changed prior to commit: https://reviews.llvm.org/D49067?vs=154566&id=157011#toc Repository: rL LLVM

[PATCH] D49067: Stop wrapping __has_include in another macro

2018-07-24 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337824: Stop wrapping __has_include in another macro (authored by arichardson, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D49067 Files: lib

[PATCH] D37057: [clang] Require address space to be specified when creating functions (3/3)

2018-02-08 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. Looks good to me but I guess someone else should approve the change. I added a bunch of hacks in our fork to ensure that functions end up being in address space 200 but this would be much better. Repository: rC Clang https://reviews.llvm.org/D37057 __

[PATCH] D42139: Allow passing additional compiler/linker flags for the tests

2018-02-19 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. Herald added a subscriber: christof. ping Repository: rCXX libc++ https://reviews.llvm.org/D42139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42139: Allow passing additional compiler/linker flags for the tests

2018-02-23 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325914: Allow passing additional compiler/linker flags for the tests (authored by arichardson, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D421

[PATCH] D44604: Make stdarg.h compatible with FreeBSD

2018-03-17 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: efriedma, dim. Herald added subscribers: cfe-commits, krytarowski, sdardis, emaste. On FreeBSD it is currently not possible to use the clang builtin headers to build the base system. The build will fail with the following error if I d

[PATCH] D47627: [ASTContext] Make getAddrSpaceQualType replace address spaces.

2018-06-11 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. > Well, the documentation mismatch is worth fixing even if the code isn't. But > I think at best your use-case calls for weakening the assertion to be that > any existing address space isn't *different*, yeah. > > Separately, I'm not sure that's really the right re

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-11 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson requested changes to this revision. arichardson added inline comments. This revision now requires changes to proceed. Comment at: ELF/Driver.cpp:770 + // Start with a default initial triple + Config->TargetTriple = llvm::Triple(getDefaultTargetTriple()); + -

[PATCH] D56650: [lld] [ELF] Support inferring target triple from filename

2019-01-14 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. I'm happy with this approach since the triple can be set on the commandline. If this gets merged I will update CHERI lld to use the triple instead of the new emulation that we added. Comment at: ELF/Driver.cpp:757 + if (!TargetOpt.empty()) { +

[PATCH] D40016: Use ImplicitConversionSequence::setAsIdentityConversion(QualType). NFC

2018-11-13 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 173828. arichardson added a comment. rebased on latest HEAD Repository: rC Clang https://reviews.llvm.org/D40016 Files: lib/Sema/SemaOverload.cpp Index: lib/Sema/SemaOverload.cpp ===

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-03 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: george.burgess.iv, aaron.ballman, jdenny. Herald added a subscriber: cfe-commits. I have been trying to statically find and analyze all calls to heap allocation functions to determine how many of them use sizes known at compile time v

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-03 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 176368. arichardson added a comment. Remove RUN: line added for debugging Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55212/new/ https://reviews.llvm.org/D55212 Files: include/clang/Basic/Attr.td lib/AST/ExprConsta

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-03 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson marked 5 inline comments as done. arichardson added inline comments. Comment at: include/clang/Basic/Attr.td:1072 def AllocSize : InheritableAttr { let Spellings = [GCC<"alloc_size">]; + let Subjects = SubjectList<[HasFunctionProto]>; aaron.ballm

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-03 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 176413. arichardson added a comment. - address review comments - add test that we can assign between function pointers with and without alloc_size attribute. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55212/new/ https

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-03 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson marked an inline comment as done. arichardson added a comment. Thanks for the review! I'll write a C++ test tomorrow. Comment at: include/clang/Basic/Attr.td:1072 def AllocSize : InheritableAttr { let Spellings = [GCC<"alloc_size">]; + let Subjects = SubjectLis

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-06 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson marked an inline comment as done. arichardson added inline comments. Comment at: include/clang/Basic/Attr.td:1072 def AllocSize : InheritableAttr { let Spellings = [GCC<"alloc_size">]; + let Subjects = SubjectList<[HasFunctionProto]>; aaron.ballm

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-06 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 177027. arichardson added a comment. Add a C++ test for alloc_size Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55212/new/ https://reviews.llvm.org/D55212 Files: include/clang/Basic/Attr.td lib/AST/ExprConstant.cpp

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-10 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 177517. arichardson added a comment. clang-format fix a failing test Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55212/new/ https://reviews.llvm.org/D55212 Files: include/clang/Basic/Attr.td lib/AST/ExprConstant.cp

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-10 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 177519. arichardson marked 3 inline comments as done. arichardson added a comment. fix typo Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55212/new/ https://reviews.llvm.org/D55212 Files: include/clang/Basic/Attr.td

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-10 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson marked 5 inline comments as done. arichardson added inline comments. Comment at: test/Misc/pragma-attribute-supported-attributes-list.test:15 +// FIXME: After changing the subject from Function to HasFunctionProto, AllocSize is no longer listed (similar to Format, et

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-10 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson marked an inline comment as done. arichardson added inline comments. Comment at: test/Misc/pragma-attribute-supported-attributes-list.test:15 +// FIXME: After changing the subject from Function to HasFunctionProto, AllocSize is no longer listed (similar to Format, et

[PATCH] D59118: creduce script for clang crashes

2019-03-12 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In case anyone is interested, for the CHERI fork of LLVM/Clang I added a similar script that contains additional features such as inferring the crash message (so that you get the minimal reproducer for the issue that you are trying to reduce and not some obscure par

[PATCH] D59440: add steps to preprocess file and reduce command line args

2019-03-21 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. @akhuang Thanks for getting this committed. Since it seems like a lot of this is taken from my script, could you please add me as a reviewer for the next patch so that I know which bits still need to be upstreamed? Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D59725: Additions to creduce script

2019-03-26 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/utils/creduce-clang-crash.py:145 + matches = re.findall(stacktrace_re, crash_output) + result = filter(lambda x: x and x.strip() not in filters, matches)[:5] + for msg in result: george.burgess.i

[PATCH] D59725: Additions to creduce script

2019-03-28 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D59725#1443990 , @george.burgess.iv wrote: > Only a few more nits on my side, and this LGTM. WDYT, arichardson? LGTM with the minor tempfile changes. Comment at: clang/utils/creduce-clang-crash.py:201

[PATCH] D59725: Additions to creduce script

2019-03-29 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson accepted this revision. arichardson added a comment. This revision is now accepted and ready to land. LGTM once the tempfile is deleted. Comment at: clang/utils/creduce-clang-crash.py:208 +print("\nTrying to preprocess the source file...") +# use delete=Fals

[PATCH] D59725: Additions to creduce script

2019-04-24 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D59725#1477042 , @lebedev.ri wrote: > I've stumbled into an issue with the script: > It got a line: `clang: > /build/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:2582: bool > {anonymous}::IndVarSimplify::run(llvm::Loop*)

[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2018-12-13 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: include/clang/Basic/Builtins.def:942 LIBBUILTIN(alloca, "v*z", "f", "stdlib.h", ALL_GNU_LANGUAGES) +LIBBUILTIN(qsort_r, "", "fC<3,-1,-1,4>", "stdlib.h", ALL_GNU_LANGUAGES) // POSIX string.h q

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-04 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D56215#1346061 , @mgorny wrote: > For the record, another option is to actually fix other software not to call > LD directly. Or if you really need to call the linker directly without specifying search paths you could al

[PATCH] D55212: Handle alloc_size attribute on function pointers

2019-01-07 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. I don't see an easy way of fixing the pragma clang attribute support for this. Would it be okay to commit this change anyway? Since `alloc_size` is only used for very few functions I'd be very surprised if there's any existing code that relies on using `#pragma clang

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-08 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: ELF/Driver.cpp:770 + // Start with a default initial triple + Config->TargetTriple = llvm::Triple(getDefaultTargetTriple()); + If I invoke an unprefixed ld.lld on NetBSD but want to target a different operating sy

[PATCH] D66795: [Mips] Use appropriate private label prefix based on Mips ABI

2019-09-18 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson accepted this revision. arichardson added a comment. This revision is now accepted and ready to land. Looks good to me but I guess someone else should give the final approval. Comment at: llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp:25 if (TheTriple.isMI

[PATCH] D49091: Warn about usage of __has_include/__has_include_next in macro expansions

2019-09-18 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. Herald added a project: clang. Ping? I'm not sure if this is still required now that D63508 has been committed? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49091/new/ https://reviews.llvm.org/D4909

[PATCH] D68141: [Alignment][NFC] Remove AllocaInst::setAlignment(unsigned)

2019-09-30 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: llvm/trunk/lib/Target/AArch64/AArch64StackTagging.cpp:65 -static constexpr unsigned kTagGranuleSize = 16; +static const Align kTagGranuleSize = Align(16); Can't the Align ctor be constexpr? Will this result in a

[PATCH] D68141: [Alignment][NFC] Remove AllocaInst::setAlignment(unsigned)

2019-09-30 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: llvm/trunk/lib/Target/AArch64/AArch64StackTagging.cpp:65 -static constexpr unsigned kTagGranuleSize = 16; +static const Align kTagGranuleSize = Align(16); gchatelet wrote: > arichardson wrote: > > Can't the Align

[PATCH] D24867: Request init/fini array on FreeBSD 12 and later

2018-05-07 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson accepted this revision. arichardson added a comment. I recently made this change for the CHERI clang fork and as far as I can tell everything works fine. https://reviews.llvm.org/D24867 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D48549: Use Triple::isMIPS() instead of enumerating all Triples. NFC

2018-06-25 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added a reviewer: atanasyan. Herald added subscribers: cfe-commits, sdardis, emaste. Repository: rC Clang https://reviews.llvm.org/D48549 Files: lib/Basic/Targets/Mips.cpp lib/Basic/Targets/Mips.h lib/Driver/ToolChains/Arch/Mips.cpp lib/Dr

[PATCH] D48549: Use Triple::isMIPS() instead of enumerating all Triples. NFC

2018-06-25 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 152696. arichardson added a comment. Ran clang-format on the diff Repository: rC Clang https://reviews.llvm.org/D48549 Files: lib/Basic/Targets/Mips.cpp lib/Basic/Targets/Mips.h lib/Driver/ToolChains/Arch/Mips.cpp lib/Driver/ToolChains/Arch/M

[PATCH] D48549: Use Triple::isMIPS() instead of enumerating all Triples. NFC

2018-06-25 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC335495: Use Triple::isMIPS() instead of enumerating all Triples. NFC (authored by arichardson, committed by ). Changed prior to commit: https://reviews.llvm.org/D48549?vs=152696&id=152713#toc Repositor

[PATCH] D45383: Limit types of builtins that can be redeclared.

2018-07-09 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. This broke the build of FreeBSD for me due to the declaration of __builtin_return_address(unsigned int) in https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Base.h#L1281: In file included from /exports/users/alr48/sources/freebsd-x86/sys/contrib/edk2/I

[PATCH] D49067: Stop wrapping __has_include in another macro

2018-07-09 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: EricWF, rsmith. Herald added subscribers: cfe-commits, ldionne, christof. This is not guaranteed to work since the characters after '__has_include(' have special lexing rules that can't possibly be applied when __has_include is genera

[PATCH] D49091: Warn about usage of __has_include/__has_include_next in macro expansions

2018-07-09 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added a reviewer: rsmith. Herald added a subscriber: cfe-commits. The characters after '__has_include(' have special lexing rules that can't possibly be applied when __has_include is generated by a macro. Instead of wrapping __has_include in another m

[PATCH] D80913: [update_cc_test_checks.py] Correctly skip function definitions

2020-06-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added a reviewer: MaskRay. Herald added subscribers: llvm-commits, cfe-commits, kristof.beyls. Herald added projects: clang, LLVM. Function declarations can in fact have an 'inner' node that lists the ParmVarDecls. It seems like either the JSON output

[PATCH] D80914: [update_cc_test_checks.py] Handle C++ methods

2020-06-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added a reviewer: MaskRay. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Previously the script only handled C input, this change extends the JSON parsing to to also include C++ function types such as methods,

[PATCH] D78491: Avoid relying on address space zero default parameter in llvm/IR

2020-07-22 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 279861. arichardson added a comment. rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78491/new/ https://reviews.llvm.org/D78491 Files: clang/lib/CodeGen/CGOpenMPRuntime.h llvm/include/llvm/Analys

[PATCH] D84345: [AMDGPU] Set the default globals address space to 1

2020-07-22 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added a reviewer: arsenm. Herald added subscribers: llvm-commits, cfe-commits, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, jvesely, kzhuravl. Herald added projects: clang, LLVM. This will ensure that passes that add new global

[PATCH] D84345: [AMDGPU] Set the default globals address space to 1

2020-07-22 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson marked an inline comment as done. arichardson added a subscriber: akhuang. arichardson added inline comments. Comment at: llvm/lib/IR/AutoUpgrade.cpp:4297 + // address space of 1. + if (T.isAMDGPU() && !DL.contains("-G") && !DL.startswith("G")) { +return DL.empt

[PATCH] D84345: [AMDGPU] Set the default globals address space to 1

2020-07-23 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson marked an inline comment as done. arichardson added inline comments. Comment at: llvm/lib/IR/AutoUpgrade.cpp:4297 + // address space of 1. + if (T.isAMDGPU() && !DL.contains("-G") && !DL.startswith("G")) { +return DL.empty() ? std::string("G1") : (DL + "-G1").st

[PATCH] D84511: Fix update_cc_test_checks.py --llvm-bin after D78478

2020-07-24 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: vitalybuka, jdoerfert, MaskRay. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Not passing --clang would result in a python exception after this change: (TypeError: expected str, bytes or os.P

[PATCH] D84511: Fix update_cc_test_checks.py --llvm-bin after D78478

2020-07-24 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson marked an inline comment as done. arichardson added inline comments. Comment at: clang/test/utils/update_cc_test_checks/lit.local.cfg:24 +# works as expected +config.substitutions.append( +('%update_cc_test_checks_llvm_bin', "%s %s %s" % ( MaskRay

[PATCH] D77776: [Driver] Drop support for FreeBSD < 10

2020-04-09 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. Alternatively, the checks could be changed to also handle OSMajorVersion == 0 and translate that to 10. This seems to be what NetBSD.cpp does. Darwin.cpp also infers the version from the host when running on macos. Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D81608: Fix incorrect call to ExprResult::get()

2020-06-10 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: Anastasia, pekka.jaaskelainen. Herald added a project: clang. Herald added a subscriber: cfe-commits. Res is already a ExprResult, so if we call .get() we convert an ExprError() result into an unset result. I discovered this in our do

[PATCH] D81608: Fix incorrect call to ExprResult::get()

2020-06-11 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG385e5f7e147f: Fix incorrect call to ExprResult::get() (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81608/new/ https://reviews.ll

[PATCH] D78478: [UpdateTestChecks] Add UTC_ARGS support for update_{llc,cc}_test_checks.py

2020-07-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D78478#2128604 , @MaskRay wrote: > The idea look good to me, but I want some opinions on the name `UTC_ARGS` (I > can't help associating it with Coordinated Universal Time). Adding some folks > who may have opinions: @gree

[PATCH] D83074: [clang] Check ValueDependent instead of InstantiationDependent before executing the align expr for builtin align functions.

2020-07-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson accepted this revision. arichardson added inline comments. This revision is now accepted and ready to land. Comment at: clang/test/SemaCXX/builtin-align-cxx.cpp:40 template void test_incorrect_alignment_without_instatiation(T value) { Could also

[PATCH] D78478: [UpdateTestChecks] Add UTC_ARGS support for update_{llc,cc}_test_checks.py

2020-07-07 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. @MaskRay are you okay with me committing this change and delaying the global search-replace? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78478/new/ https://reviews.llvm.org/D78478 _

[PATCH] D78478: [UpdateTestChecks] Add UTC_ARGS support for update_{llc,cc}_test_checks.py

2020-07-08 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa80afc032859: [UpdateTestChecks] Add UTC_ARGS support for update_{llc,cc}_test_checks.py (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D78478: [UpdateTestChecks] Add UTC_ARGS support for update_{llc,cc}_test_checks.py

2020-07-08 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa80afc032859: [UpdateTestChecks] Add UTC_ARGS support for update_{llc,cc}_test_checks.py (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D80914: [update_cc_test_checks.py] Handle C++ methods

2020-06-18 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3ce0e92f45f5: [update_cc_test_checks.py] Handle C++ methods (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80914/new/ https://revi

[PATCH] D80913: [update_cc_test_checks.py] Correctly skip function definitions

2020-06-18 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGead7a8beccc1: [update_cc_test_checks.py] Correctly skip function definitions (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80913/n

[PATCH] D82169: Don't install clang-import-test

2020-06-19 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: spyffe, bruno, lhames, v.g.vassilev, loladiro. Herald added subscribers: cfe-commits, dexonsmith, mgorny. Herald added a project: clang. I have been trying to reduce the installed size of our CHERI toolchain and noticed that this tool

[PATCH] D82169: Don't install clang-import-test

2020-06-24 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2ace69339ffe: Don't install clang-import-test (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82169/new/ https://reviews.llvm.org/D

[PATCH] D78478: [UpdateTestChecks] Add UTC_ARGS support for update_{llc,cc}_test_checks.py

2020-06-30 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 274427. arichardson added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78478/new/ https://reviews.llvm.org/D78478 F

[PATCH] D78478: [UpdateTestChecks] Add UTC_ARGS support for update_{llc,cc}_test_checks.py

2020-04-20 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: jdoerfert, MaskRay. Herald added a project: clang. Herald added a subscriber: cfe-commits. https://reviews.llvm.org/D69701 added support for on-the-fly argument changes for update scripts. I recently wanted to keep some manual check l

[PATCH] D78491: Avoid relying on address space zero default parameter in llvm/IR

2020-04-20 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: aykevl, dylanmckay, arsenm, bjope, theraven, jrtc27. Herald added subscribers: cfe-commits, hiraditya, mgorny, wdng. Herald added a reviewer: ctetreau. Herald added a project: clang. APIs such as PointerType::getUnqual/Type::getPoint

[PATCH] D77776: [Driver] Default to libc++ on FreeBSD

2020-04-20 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. I don't like the fact that this only changes one of the users of `getTriple().getOSMajorVersion()`. Could you add a new member function such as void FreeBSD::getMajorVersion() const { unsigned Major = getTriple().getOSMajorVersion(); if (Major == 0)

[PATCH] D78491: Avoid relying on address space zero default parameter in llvm/IR

2020-04-20 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson marked an inline comment as done. arichardson added a comment. In D78491#1992618 , @aykevl wrote: > I can't give an LGTM but at least from my perspective I very much welcome > this change. I am still hitting problems with non-zero address spac

[PATCH] D78478: [UpdateTestChecks] Add UTC_ARGS support for update_{llc,cc}_test_checks.py

2020-04-22 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D78478#1994923 , @jdoerfert wrote: > I feel there is a lot of good stuff here but it seems to mix two things. A > rewrite of the script infrastructure and the UTC_ARGS stuff. If so, do you > think we could split them? I fe

[PATCH] D78478: [UpdateTestChecks] Add UTC_ARGS support for update_{llc,cc}_test_checks.py

2020-04-22 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 259210. arichardson added a comment. Split into multiple reviews Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78478/new/ https://reviews.llvm.org/D78478 Files: clang/test/utils/update_cc_test_checks/Inp

[PATCH] D74051: Move update_cc_test_checks.py tests to clang

2020-05-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D74051#2016101 , @mgorny wrote: > In D74051#2016085 , @lebedev.ri > wrote: > > > In D74051#2016078 , @mgorny wrote: > > > > > This broke runn

[PATCH] D84511: Fix update_cc_test_checks.py --llvm-bin after D78478

2020-08-03 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 282563. arichardson added a comment. remove tests and check for empty instead of none Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84511/new/ https://reviews.llvm.org/D84511 Files: llvm/utils/UpdateTest

[PATCH] D85115: [update_cc_test_checks.py] Add test for D84511

2020-08-03 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added a reviewer: MaskRay. Herald added a project: clang. Herald added a subscriber: cfe-commits. arichardson requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D85115 Files: clang/test/utils/update_c

[PATCH] D84511: Fix update_cc_test_checks.py --llvm-bin after D78478

2020-08-03 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd1007478f19d: Fix update_cc_test_checks.py --llvm-bin after D78478 (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D85115: [update_cc_test_checks.py] Add test for D84511

2020-08-06 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe150d2cab868: [update_cc_test_checks.py] Add test for D84511 (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85115/new/ https://rev

[PATCH] D85099: [UpdateTestChecks] Match unnamed values like "@[0-9]+" and "![0-9]+"

2020-08-11 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson accepted this revision. arichardson added a comment. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85099/new/ https://reviews.llvm.org/D85099 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D78491: Avoid relying on address space zero default parameter in llvm/IR

2020-05-17 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D78491#2040424 , @dylanmckay wrote: > I really like the idea behind this patch, but I suspect there is a better way > to go about it. > > The only drawbacks to upstreaming this patch as-is is the idea that because > it is

[PATCH] D135171: FreeBSD: enable __float128 on x86 and powerpc64le

2023-11-19 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D135171#4657080 , @brad wrote: > You can close this. The submitted patch https://github.com/llvm/llvm-project/commit/23c47eba879769a29772c999be2991201c2fe399 was not the same since it omitted ppc64. So I guess this shoul

[PATCH] D128625: [RISCV][Driver] Fix baremetal `GCCInstallation` paths

2022-06-30 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/lib/Driver/ToolChains/RISCVToolchain.cpp:54 + + // Set alias for "riscv{64|32}-unknown-unknown-elf" + SmallVector TripleAliases; This seems like the wrong place to add this workaround, shouldn't the change be

[PATCH] D128625: [RISCV][Driver] Fix baremetal `GCCInstallation` paths

2022-07-03 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/lib/Driver/ToolChains/RISCVToolchain.cpp:54 + + // Set alias for "riscv{64|32}-unknown-unknown-elf" + SmallVector TripleAliases; anton-afanasyev wrote: > arichardson wrote: > > This seems like the wrong place

[PATCH] D122335: [clang] Emit crash reproduction as a single tar file

2022-03-24 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D122335#3404358 , @jrtc27 wrote: > As a developer who often deals with crashes locally this is more annoying; > currently I can just point tools at the shell script and C file in /tmp and > let them go to work reducing, b

[PATCH] D122335: [clang] Emit crash reproduction as a single tar file

2022-03-30 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/CMakeLists.txt:520 + ON "${CMAKE_BUILD_TYPE} MATCHES Debug" OFF) +if(CLANG_CRASH_SAVE_TEMPS) + add_definitions(-DCLANG_CRASH_SAVE_TEMPS) Could you add this to the config.h header instead?

[PATCH] D131155: [clang] Expand array expressions if the filler expression's filler is element dependent

2022-08-04 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/test/SemaCXX/constexpr-array-init.cpp:3 + + +/// expected-no-diagnostics Nit: It might be helpful to add a comment to this test explaining what it's testing. This makes it easier to diagnose tests failures (e.

[PATCH] D106243: [Utils] Support class template specializations in update_cc_test_checks

2021-07-18 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson accepted this revision. arichardson added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106243/new/ https://reviews.llvm.org/D106243 _

[PATCH] D105555: [PoC][RISCV][Clang] Compute the default target-abi if it's empty.

2021-07-22 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: llvm/include/llvm/Support/TargetParser.h:177 StringRef resolveTuneCPUAlias(StringRef TuneCPU, bool IsRV64); +StringRef computeABIByArch(bool HasD, bool HasE, bool IsRV64); Maybe this should be `computeDefaultABIFr

[PATCH] D105972: Fix __attribute__((annotate("")) with non-zero globals AS

2021-07-27 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105972/new/ https://reviews.llvm.org/D105972 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D105516: [clang][PassManager] Add -falways-mem2reg to run mem2reg at -O0

2021-07-27 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. I like this since the flag significantly improves readability for `update_cc_test_checks.py`-generated Clang test without having to use the `-disable-O0-optnone | opt` trick. Not sure what the best flag name is, but as long as it's a CC1 flag it shouldn't really mat

  1   2   3   4   >