[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Another odd feature that's missing from early x86-64 CPUs is sahf. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63774/new/ https://reviews.llvm.org/D63774 ___ cfe-commits mailing list c

[PATCH] D63518: BitStream reader: propagate errors

2019-06-25 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno 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/D63518/new/ https://reviews.llvm.org/D63518 ___ c

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-06-25 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked 2 inline comments as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:744 OMPRTL__tgt_target_data_update_nowait, + // Call to int64_t __tgt_mapper_num_components(void *rt_mapper_handle); + OMPRTL__tgt_mapper_num_components, --

[PATCH] D62611: [analyzer][Dominators] Add unittests

2019-06-25 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/unittests/Analysis/CFGBuilder.h:16 + +class BuildResult { +public: Given that now it's in a header, i guess we need to pick a less generic name. Eg., `CFGBuildResult`. Comment at: clang/unittests/An

[PATCH] D63786: Print NULL as "(null)" in diagnostic message

2019-06-25 Thread Andus Yu via Phabricator via cfe-commits
andusy created this revision. andusy added reviewers: hubert.reinterpretcast, xingxue, jasonliu, daltenty, cebowleratibm. andusy added a project: clang. Herald added subscribers: jsji, arphaman. Passing a null pointer to the `printf` family for a %s format specifier leads to undefined behaviour.

[PATCH] D62738: [HIP] Support attribute hip_pinned_shadow

2019-06-25 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM. Thank you! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62738/new/ https://reviews.llvm.org/D62738 ___ cfe-commits mailing list cfe-com

[PATCH] D63789: [ODRHash] Fix null pointer dereference for ObjC selectors with empty slots.

2019-06-25 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added a reviewer: rtrieu. Herald added subscribers: dexonsmith, jkorous. Because `Selector::getIdentifierInfoForSlot` returns NULL if a slot has no corresponding identifier, use `Selector::getNameForSlot` instead. rdar://problem/51615164 https://reviews.ll

r364347 - Remove redundant expression evaluation context when substituting into a

2019-06-25 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jun 25 13:40:27 2019 New Revision: 364347 URL: http://llvm.org/viewvc/llvm-project?rev=364347&view=rev Log: Remove redundant expression evaluation context when substituting into a template argument. We do need one of these but we don't need two. Modified: cfe/trunk/l

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @craig.topper, hmm, what happens in terms of CG when LAHF/SAHF are not available? I assume its just worse CG as you could spill AH onto the stack and do a load/store. This actually results in library calls which may not be possible to fulfill. Repository: rC Clan

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-06-25 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 206527. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 Files: include/clang/AST/GlobalDecl.h lib/AST/ASTContext.cpp lib/CodeGen/CGDecl.cpp lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CGOpenMPRuntime.

[PATCH] D63760: [clangd] Address limitations in SelectionTree:

2019-06-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 206531. sammccall marked 2 inline comments as done. sammccall added a comment. Revert multi-range support. Add early hit detection (before children) instead. Add more tests. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.

Re: r364331 - [ARM] Support inline assembler constraints for MVE.

2019-06-25 Thread Richard Smith via cfe-commits
On Tue, 25 Jun 2019 at 09:49, Simon Tatham via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: statham > Date: Tue Jun 25 09:49:32 2019 > New Revision: 364331 > > URL: http://llvm.org/viewvc/llvm-project?rev=364331&view=rev > Log: > [ARM] Support inline assembler constraints for MVE. >

[PATCH] D63518: BitStream reader: propagate errors

2019-06-25 Thread Francis Visoiu Mistrih via Phabricator via cfe-commits
thegameg added inline comments. Comment at: llvm/include/llvm/Bitcode/BitstreamReader.h:441 // If we found a sub-block, just skip over it and check the next entry. - if (SkipBlock()) -return BitstreamEntry::getError(); + if (llvm::Error Err = SkipBlock())

[PATCH] D63518: BitStream reader: propagate errors

2019-06-25 Thread Michael Spencer via Phabricator via cfe-commits
Bigcheese added inline comments. Comment at: clang-tools-extra/clang-doc/BitcodeReader.cpp:527-529 + if (llvm::Error Err = readSubBlock(BlockOrCode, I)) { +if (llvm::Error Skipped = Stream.SkipBlock()) + return Skipped; This is a pretty big

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Yeah LAHF/SAHF just improves codegen. Lack of it won't result in any library calls. This patch LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63774/new/ https://reviews.llvm.org/D63774 ___

r364352 - android: enable double-word CAS on x64

2019-06-25 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Tue Jun 25 14:43:34 2019 New Revision: 364352 URL: http://llvm.org/viewvc/llvm-project?rev=364352&view=rev Log: android: enable double-word CAS on x64 The android target assumes that for the x86_64 target, the CPU supports SSE4.2 and popcnt. This implies that the CPU is Neh

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd closed this revision. compnerd added a comment. SVN r364352 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63774/new/ https://reviews.llvm.org/D63774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

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

2019-06-25 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith created this revision. rsmith added reviewers: rnk, BillyONeal. Herald added a project: clang. Prior to r329065, we used [-max, max] as the range of representable values because LLVM's `fptrunc` did not guarantee defined behavior when truncating from a larger floating-point type to a smalle

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-06-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, arg_base, arg_begin, lild

[PATCH] D63518: BitStream reader: propagate errors

2019-06-25 Thread Lang Hames via Phabricator via cfe-commits
lhames added a comment. I haven't had a chance to audit the whole patch yet, but in general the error suppression idioms are unsafe (though maybe no more so than the existing code?). I would be inclined to audit all those FIXMEs and replace them with cantFails or consumeErrors. consumeError wil

[PATCH] D63786: Print NULL as "(null)" in diagnostic message

2019-06-25 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM. I have some minor style comments that could be fixed as part of the commit. Comment at: clang/tools/c-index-test/c-index-test.c:4648

r364359 - Revert Devirtualize destructor of final class.

2019-06-25 Thread Rumeet Dhindsa via cfe-commits
Author: rdhindsa Date: Tue Jun 25 15:58:25 2019 New Revision: 364359 URL: http://llvm.org/viewvc/llvm-project?rev=364359&view=rev Log: Revert Devirtualize destructor of final class. This reverts r364100 (git commit 405c2b16225fc6eaf5eb8ba3ce584699a3b159ef) Removed: cfe/trunk/test/CodeGenCXX/

Re: r364359 - Revert Devirtualize destructor of final class.

2019-06-25 Thread Roman Lebedev via cfe-commits
On Wed, Jun 26, 2019 at 1:58 AM Rumeet Dhindsa via cfe-commits wrote: > > Author: rdhindsa > Date: Tue Jun 25 15:58:25 2019 > New Revision: 364359 > > URL: http://llvm.org/viewvc/llvm-project?rev=364359&view=rev > Log: > Revert Devirtualize destructor of final class. > > This reverts r364100 (git

Re: r364359 - Revert Devirtualize destructor of final class.

2019-06-25 Thread Rumeet Dhindsa via cfe-commits
Sorry for not including the reason, I discussed offline with the author to temporarily revert this patch. On Tue, Jun 25, 2019 at 4:00 PM Roman Lebedev wrote: > On Wed, Jun 26, 2019 at 1:58 AM Rumeet Dhindsa via cfe-commits > wrote: > > > > Author: rdhindsa > > Date: Tue Jun 25 15:58:25 2019 >

[PATCH] D63518: BitStream reader: propagate errors

2019-06-25 Thread JF Bastien via Phabricator via cfe-commits
jfb marked 8 inline comments as done. jfb added inline comments. Comment at: clang-tools-extra/clang-doc/BitcodeReader.cpp:527-529 + if (llvm::Error Err = readSubBlock(BlockOrCode, I)) { +if (llvm::Error Skipped = Stream.SkipBlock()) + return Skipped; --

[PATCH] D63518: BitStream reader: propagate errors

2019-06-25 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D63518#1558197 , @lhames wrote: > I haven't had a chance to audit the whole patch yet, but in general the error > suppression idioms are unsafe (though maybe no more so than the existing > code?). > > I would be inclined to audit

[PATCH] D62611: [analyzer][Dominators] Add unittests

2019-06-25 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: clang/unittests/Analysis/CFGDominatorTree.cpp:22-32 +template struct FindStmt { + bool operator()(const CFGElement &E) { +if (auto S = E.getAs()) + return isa(S->getStmt()); +r

[PATCH] D63518: BitStream reader: propagate errors

2019-06-25 Thread Francis Visoiu Mistrih via Phabricator via cfe-commits
thegameg added inline comments. Comment at: llvm/include/llvm/Bitcode/BitstreamReader.h:489 bool ReadBlockEnd() { if (BlockScope.empty()) return true; jfb wrote: > thegameg wrote: > > Any reason why this doesn't return `Error`? > I'm not sure it's reall

r364362 - print-supported-cpus quality of life patch.

2019-06-25 Thread Ziang Wan via cfe-commits
Author: ziangwan725 Date: Tue Jun 25 16:57:14 2019 New Revision: 364362 URL: http://llvm.org/viewvc/llvm-project?rev=364362&view=rev Log: print-supported-cpus quality of life patch. Claim all input files so that clang does not give a warning. Add two short-cut aliases: -mcpu=? and -mtune=?. Modi

[PATCH] D63518: BitStream reader: propagate errors

2019-06-25 Thread JF Bastien via Phabricator via cfe-commits
jfb added inline comments. Comment at: clang-tools-extra/clang-doc/BitcodeReader.cpp:611-618 +Expected MaybeCode = Stream.ReadCode(); +if (!MaybeCode) { + // FIXME this drops the error on the floor. + consumeError(MaybeCode.takeError()); +} + +// FIX

[PATCH] D63167: [Clang] Remove unused -split-dwarf and obsolete -enable-split-dwarf

2019-06-25 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:864 default: -if (!CodeGenOpts.SplitDwarfOutput.empty() && -(CodeGenOpts.getSplitDwarfMode() == CodeGenOptions::SplitFileFission)) { +if (!CodeGenOpts.SplitDwarfOutput.empty()) {

[PATCH] D63518: BitStream reader: propagate errors

2019-06-25 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. I've addressed Lang's comments and the re-audited all the new FIXME instances. This patch now actually drops errors on the floor instead of implicitly erroring out unless the error path is tested (which is what I had before). This hides bugs, but I left FIXMEs everywhere an

r364365 - [analyzer] exploded-graph-rewriter: Prettier location context dumps.

2019-06-25 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jun 25 17:14:49 2019 New Revision: 364365 URL: http://llvm.org/viewvc/llvm-project?rev=364365&view=rev Log: [analyzer] exploded-graph-rewriter: Prettier location context dumps. Make them span wider. Modified: cfe/trunk/test/Analysis/exploded-graph-rewriter/environ

[PATCH] D63663: [clang-doc] Add html links to references

2019-06-25 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran updated this revision to Diff 206561. DiegoAstiazaran marked 10 inline comments as done. DiegoAstiazaran retitled this revision from "[clang-doc] Add html links to the parents of a RecordInfo" to "[clang-doc] Add html links to references". DiegoAstiazaran edited the summary of this

[PATCH] D63663: [clang-doc] Add html links to references

2019-06-25 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran added inline comments. Comment at: clang-tools-extra/unittests/clang-doc/SerializeTest.cpp:145-146 void ProtectedMethod(); -};)raw", 3, /*Public=*/false, Infos); +};)raw", + 3, /*Public=*/false, Infos); juliehockett wrot

[PATCH] D63508: make -frewrite-includes also rewrite conditions in #if/#elif

2019-06-25 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Patch generally looks good; just a minor concern about the output format. Comment at: clang/lib/Frontend/Rewrite/InclusionRewriter.cpp:487-490 +OS << " - evaluated by -frewrite-includes */" << MainEOL; +OS << (elif ? "#elif" : "#i

[PATCH] D63681: [clang-scan-deps] Introduce the DependencyScanning library with the thread worker code and better error handling

2019-06-25 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. LGTM! Some quick stats on our end (running Windows 10 on a Intel W-2135, 6-core, 3.7 GHz, NVMe SSD): on a large .SLN compiling approx. 16,000 .CPP files through 600 unity .CPPs and 23,000 .H files, out of **86 secs** spent in `ClangScanDeps`, about **32 secs** are spent

[PATCH] D62970: [clang-doc] De-duplicate comments and locations

2019-06-25 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran updated this revision to Diff 206570. DiegoAstiazaran added a comment. Add comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62970/new/ https://reviews.llvm.org/D62970 Files: clang-tools-extra/clang-doc/Representation.cpp clang-tools-extra/clang-doc/Representa

[PATCH] D51262: Implement P0553 and P0556

2019-06-25 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 206571. mclow.lists marked 4 inline comments as done. mclow.lists added a comment. Address a couple of review comments. Added a few more `uint128_t` rotation tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51262/new/ https://reviews.llvm.org

[PATCH] D63789: [ODRHash] Fix null pointer dereference for ObjC selectors with empty slots.

2019-06-25 Thread Richard Trieu via Phabricator via cfe-commits
rtrieu added inline comments. Comment at: clang/lib/AST/ODRHash.cpp:73 AddBoolean(S.isUnarySelector()); unsigned NumArgs = S.getNumArgs(); for (unsigned i = 0; i < NumArgs; ++i) { There's actually a second bug here as well. When processing an arbi

[PATCH] D63789: [ODRHash] Fix null pointer dereference for ObjC selectors with empty slots.

2019-06-25 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/AST/ODRHash.cpp:73 AddBoolean(S.isUnarySelector()); unsigned NumArgs = S.getNumArgs(); for (unsigned i = 0; i < NumArgs; ++i) { rtrieu wrote: > There's actually a second bug here as well. When p

r364380 - Fix build failure due to missing break

2019-06-25 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Jun 25 20:33:03 2019 New Revision: 364380 URL: http://llvm.org/viewvc/llvm-project?rev=364380&view=rev Log: Fix build failure due to missing break Modified: cfe/trunk/lib/Basic/Targets/ARM.cpp Modified: cfe/trunk/lib/Basic/Targets/ARM.cpp URL: http://llvm.org/viewvc

[PATCH] D62738: [HIP] Support attribute hip_pinned_shadow

2019-06-25 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364381: [HIP] Support attribute hip_pinned_shadow (authored by yaxunl, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llv

r364381 - [HIP] Support attribute hip_pinned_shadow

2019-06-25 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Jun 25 20:47:37 2019 New Revision: 364381 URL: http://llvm.org/viewvc/llvm-project?rev=364381&view=rev Log: [HIP] Support attribute hip_pinned_shadow This patch introduces support of hip_pinned_shadow variable for HIP. A hip_pinned_shadow variable is a global variable wi

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

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

[PATCH] D63623: [clang-tidy] Add a check on expected return values of posix functions (except posix_openpt) in Android module.

2019-06-25 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 206586. jcai19 marked an inline comment as done. jcai19 added a comment. Move the check from android to bugprone. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63623/new/ https://reviews.llvm.org/D63623 Files:

[PATCH] D60943: Delay diagnosing asm constraints that require immediates until after inlining

2019-06-25 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. This should be ready for review now. PTAL. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60943/new/ https://reviews.llvm.org/D60943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[PATCH] D60943: Delay diagnosing asm constraints that require immediates until after inlining

2019-06-25 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 206587. void added a comment. Modify so that no diagnistics are emitted until we can determine if it's an immediate or not. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60943/new/ https://reviews.llvm.org/D60943 Files: lib/C

[PATCH] D63623: [clang-tidy] Add a check on expected return values of posix functions (except posix_openpt) in Android module.

2019-06-25 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked an inline comment as done. jcai19 added inline comments. Comment at: clang-tools-extra/clang-tidy/android/PosixReturnCheck.cpp:39 + const auto &BinOp = *Result.Nodes.getNodeAs("binop"); + diag(BinOp.getOperatorLoc(), "posix functions (except posix_openpt) never r

[PATCH] D63623: [clang-tidy] Add a check on expected return values of posix functions (except posix_openpt) in Android module.

2019-06-25 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 206588. jcai19 marked 4 inline comments as done. jcai19 added a comment. Update a test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63623/new/ https://reviews.llvm.org/D63623 Files: clang-tools-extra/c

<    1   2