[PATCH] D141389: [DFSAN] Add support for strnlen, strncat, strsep, sscanf and _tolower

2023-04-24 Thread Andrew via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG74f00516e5ce: [DFSAN] Add support for strsep. (authored by tkuchta, committed by browneee). Herald added a subscriber: Sanitizers. Changed prior to commit: https://reviews.llvm.org/D141389?vs=51&id=

[PATCH] D141389: [DFSAN] Add support for strnlen, strncat, strsep, sscanf and _tolower

2023-04-17 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. Separate review. Keep patches as small as possible, do one review for each patch. If you'd like me to submit it for you, please provide your email to credit the patch to. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141389/new/ https://reviews.llvm.org/D141

[PATCH] D148496: [compiler-rt] [test] Mark dfsan tests XFAIL on glibc-2.37

2023-04-17 Thread Andrew via Phabricator via cfe-commits
browneee accepted this revision. browneee added a comment. LGTM `release_shadow_space.c:29: size_t get_rss_kb(): Assertion ```feof(f)' failed.` `custom.cpp:1858: void test_sprintf(): Assertion ```strcmp(buf, "Hello world!") == 0' failed.` Issue appears to be with the program rather than the in

[PATCH] D141389: [DFSAN] Add support for strnlen, strncat, strsep, sscanf and _tolower

2023-04-13 Thread Andrew via Phabricator via cfe-commits
browneee accepted this revision. browneee added a comment. This revision is now accepted and ready to land. Please fix the additional &. Do you need me to submit it for you? Comment at: compiler-rt/test/dfsan/custom.cpp:1645 + // taint the string pointer + dfsan_set_label(m_

[PATCH] D141389: [DFSAN] Add support for strnlen, strncat, strsep, sscanf and _tolower

2023-03-31 Thread Andrew via Phabricator via cfe-commits
browneee added inline comments. Comment at: compiler-rt/lib/dfsan/dfsan_custom.cpp:221 + if (flags().strict_data_dependencies) { +*ret_label = res ? dfsan_read_label(base, sizeof(base)) : 0; + } else { tkuchta wrote: > browneee wrote: > > `base, sizeof(base

[PATCH] D141389: [DFSAN] Add support for strnlen, strncat, strsep, sscanf and _tolower

2023-03-31 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. We're getting really close! Yes, that build error looks unrelated. Someone should fix it soon. Comment at: compiler-rt/lib/dfsan/dfsan_custom.cpp:221 + if (flags().strict_data_dependencies) { +*ret_label = res ? dfsan_read_label(base, sizeof(base

[PATCH] D141389: [DFSAN] Add support for strnlen, strncat, strsep, sscanf and _tolower

2023-03-02 Thread Andrew via Phabricator via cfe-commits
browneee added inline comments. Comment at: compiler-rt/lib/dfsan/dfsan_custom.cpp:221 + if (flags().strict_data_dependencies) { +*ret_label = res ? s_label : 0; + } else { tkuchta wrote: > browneee wrote: > > When `res != NULL`, then `res` is derived from

[PATCH] D141389: [DFSAN] Add support for strnlen, strncat, strsep, sscanf and _tolower

2023-02-07 Thread Andrew via Phabricator via cfe-commits
browneee added inline comments. Comment at: compiler-rt/lib/dfsan/dfsan_custom.cpp:221 + if (flags().strict_data_dependencies) { +*ret_label = res ? s_label : 0; + } else { When `res != NULL`, then `res` is derived from `*s`, not from `s`. e.g. ``` *ret_l

[PATCH] D141389: [DFSAN] Add support for strnlen, strncat, strsep, sscanf and _tolower

2023-02-03 Thread Andrew via Phabricator via cfe-commits
browneee added inline comments. Comment at: compiler-rt/lib/dfsan/dfsan_custom.cpp:213 + char *res = strsep(s, delim); + s_label = dfsan_read_label(base, strlen(base)); + if (res && (res != base)) { tkuchta wrote: > browneee wrote: > > tkuchta wrote: > > > bro

[PATCH] D141389: [DFSAN] Add support for strnlen, strncat, strsep, sscanf and _tolower

2023-02-02 Thread Andrew via Phabricator via cfe-commits
browneee added inline comments. Comment at: compiler-rt/lib/dfsan/dfsan_custom.cpp:213 + char *res = strsep(s, delim); + s_label = dfsan_read_label(base, strlen(base)); + if (res && (res != base)) { tkuchta wrote: > browneee wrote: > > tkuchta wrote: > > > bro

[PATCH] D141389: [DFSAN] Add support for strnlen, strncat, strsep, sscanf and _tolower

2023-01-17 Thread Andrew via Phabricator via cfe-commits
browneee added inline comments. Comment at: compiler-rt/lib/dfsan/dfsan_custom.cpp:213 + char *res = strsep(s, delim); + s_label = dfsan_read_label(base, strlen(base)); + if (res && (res != base)) { tkuchta wrote: > browneee wrote: > > The `s_label` represents

[PATCH] D141389: [DFSAN] Add support for strnlen, strncat, strsep, sscanf and _tolower

2023-01-11 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. Please send separate changes one by one (e.g. first patch would be for `strsep` alone and would include several functions of implementation `__dfsw_strsep` + `__dfso_strsep` + test code for this). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141389/new/ http

[PATCH] D141389: [DFSAN] Add support for strnlen, strncat, strsep, sscanf and _tolower

2023-01-10 Thread Andrew via Phabricator via cfe-commits
browneee requested changes to this revision. browneee added a comment. This revision now requires changes to proceed. Hello! Thank you for the patch. I think your changes for `__dfsw_strsep` are conflating the taint value of a pointer with the taint value of the value(s) it points to. This is su

[PATCH] D140743: [DFSan] Fix overuse of REQUIRES: in tests.

2022-12-29 Thread Andrew via Phabricator via cfe-commits
browneee abandoned this revision. browneee added a comment. Abandon due to D140744 being submitted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140743/new/ https://reviews.llvm.org/D140743 _

[PATCH] D140743: [DFSan] Fix overuse of REQUIRES: in tests.

2022-12-28 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 485552. browneee added a comment. Fix other line number. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140743/new/ https://reviews.llvm.org/D140743 Files: clang/lib/Driver/ToolChains/Linux.cpp compiler-rt

[PATCH] D140743: [DFSan] Fix overuse of REQUIRES: in tests.

2022-12-28 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 485547. browneee added a comment. Fix updated line numbers in test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140743/new/ https://reviews.llvm.org/D140743 Files: clang/lib/Driver/ToolChains/Linux.cpp

[PATCH] D140743: [DFSan] Fix overuse of REQUIRES: in tests.

2022-12-28 Thread Andrew via Phabricator via cfe-commits
browneee created this revision. browneee added a reviewer: MaskRay. Herald added subscribers: Enna1, StephenFan. Herald added a project: All. browneee requested review of this revision. Herald added projects: clang, Sanitizers. Herald added subscribers: Sanitizers, cfe-commits. Following suggestio

[PATCH] D140690: [compiler-rt][dfsan] Enable loongarch64 and add test support

2022-12-28 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. In D140690#4018043 , @SixWeining wrote: > We notice that DFSan is a work in progress > , > currently under development for x86_64 Linux. So maybe we can defer

[PATCH] D140690: [compiler-rt][dfsan] Enable loongarch64 and add test support

2022-12-27 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. Who will use DFSan on loongarch64? Who will maintain DFSan on loongarch64? Is there a loongarch64 buildbot? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140690/new/ https://reviews.llvm.org/D140690

[PATCH] D126944: [Clang] Fix memory leak due to TemplateArgumentListInfo used in AST node.

2022-06-08 Thread Andrew 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 rGc7689fd552cd: [Clang] Fix memory leak due to TemplateArgumentListInfo used in AST node. (authored by browneee). Repository: rG LLVM Github Monorep

[PATCH] D126944: [Clang] Fix memory leak due to TemplateArgumentListInfo used in AST node.

2022-06-08 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 435224. browneee marked an inline comment as done. browneee added a comment. Added release notes and fixed variable naming. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126944/new/ https://reviews.llvm.org/D1

[PATCH] D126944: [Clang] Fix memory leak due to TemplateArgumentListInfo used in AST node.

2022-06-07 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. Bump Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126944/new/ https://reviews.llvm.org/D126944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D126944: [Clang] Fix memory leak due to TemplateArgumentListInfo used in AST node.

2022-06-03 Thread Andrew via Phabricator via cfe-commits
browneee added inline comments. Comment at: clang/include/clang/AST/DeclTemplate.h:2776 void setTemplateArgsInfo(const TemplateArgumentListInfo &ArgsInfo); + void setTemplateArgsInfo(const ASTTemplateArgumentListInfo *ArgsInfo); aaron.ballman wrote: > Can w

[PATCH] D126944: [Clang] Fix memory leak due to TemplateArgumentListInfo used in AST node.

2022-06-03 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 434135. browneee marked 3 inline comments as done. browneee added a comment. Formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126944/new/ https://reviews.llvm.org/D126944 Files: clang-tools-extra/c

[PATCH] D126944: [Clang] Fix memory leak due to TemplateArgumentListInfo used in AST node.

2022-06-03 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 434075. browneee added a comment. Remove auto used under clang/. Format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126944/new/ https://reviews.llvm.org/D126944 Files: clang-tools-extra/clangd/AST.cpp

[PATCH] D126944: [Clang] Fix memory leak due to TemplateArgumentListInfo used in AST node.

2022-06-02 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. More details on the bug: https://reviews.llvm.org/D125802#3551305 Alternative implementation for fix: https://reviews.llvm.org/D126937 I'm not yet sure if these changes are correct. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D126937: Fix memleak in VarTemplateSpecializationDecl

2022-06-02 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. I was also looking into fixing this: https://reviews.llvm.org/D126944 I'm not yet sure if my changes are correct. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126937/new/ https://reviews.llvm.org/D126937 ___

[PATCH] D126944: [Clang] Fix memory leak due to TemplateArgumentListInfo used in AST node.

2022-06-02 Thread Andrew via Phabricator via cfe-commits
browneee created this revision. Herald added subscribers: usaxena95, kadircet, arphaman, martong. Herald added a reviewer: shafik. Herald added a project: All. browneee requested review of this revision. Herald added projects: clang, clang-tools-extra. Herald added a subscriber: cfe-commits. It lo

[PATCH] D125802: Fix std::has_unique_object_representations for _BitInt types with padding bits

2022-06-01 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. It looks like the leak is rooted at the allocation here: https://github.com/llvm/llvm-project/blob/1a155ee7de3b62a2fabee86fb470a1554fadc54d/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp#L3857 The VarTemplateSpecializationDecl is allocated using placement new which uses

[PATCH] D125802: Fix std::has_unique_object_representations for _BitInt types with padding bits

2022-06-01 Thread Andrew via Phabricator via cfe-commits
browneee added inline comments. Comment at: clang/test/SemaCXX/has_unique_object_reps_bitint.cpp:1 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -verify -std=c++17 -Wno-bitfield-width %s +// expected-no-diagnostics This unit test appears to t

[PATCH] D124594: [LegacyPM] Remove DataFlowSanitizerLegacyPass

2022-04-27 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. I know this is currently used in at least one other place: https://github.com/tensorflow/tensorflow/blob/dde12a690476650573a0ef3f8f681271a2016224/tensorflow/compiler/xla/service/cpu/compiler_functor.cc#L111 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D119621: [SanitizerCoverage] Add instrumentation callbacks for FP cmp instructions

2022-03-29 Thread Andrew via Phabricator via cfe-commits
browneee added inline comments. Comment at: compiler-rt/lib/dfsan/dfsan_custom.cpp:2515-2540 SANITIZER_INTERFACE_WEAK_DEF(void, __dfsw___sanitizer_cov_trace_cmp, void) {} SANITIZER_INTERFACE_WEAK_DEF(void, __dfsw___sanitizer_cov_trace_cmp1, void) {} SANITIZER_INTERFACE_WEAK_DE

[PATCH] D118199: [AArch64] ACLE feature macro for Armv8.8-A MOPS

2022-02-08 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. Hi, This change appears to break on of the buildbots (clang-ppc64le-linux-lnt ): https://lab.llvm.org/buildbot/#/builders/105/builds/21233/steps/7/logs/FAIL__Clang__aarch64-mops_c TEST 'Clang :: CodeG

[PATCH] D117177: [NFC][DFSan] Update DataFlowSanitizer user docs for -dfsan-conditional-callbacks, added in https://reviews.llvm.org/D116207

2022-01-13 Thread Andrew via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG529f098789d3: [NFC][DFSan] Update DataFlowSanitizer user docs for -dfsan-conditional… (authored by browneee). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D117177: [NFC][DFSan] Update DataFlowSanitizer user docs for -dfsan-conditional-callbacks, added in https://reviews.llvm.org/D116207

2022-01-12 Thread Andrew via Phabricator via cfe-commits
browneee created this revision. browneee added a reviewer: morehouse. browneee requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D117177 Files: clang/docs/DataFlowSanitizer.rs

[PATCH] D103745: [dfsan] Add full fast8 support

2021-10-28 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. Sorry, I was thinking/describing fast-16 to fast-8. The same reasons apply for legacy mode (2^16 labels) to fast-8. - simplify code (smaller codesize overhead) - share more code and shadow/origin memory layout with MSan (which also has a 1:1 shadow) - reduce memory ove

[PATCH] D103745: [dfsan] Add full fast8 support

2021-10-28 Thread Andrew via Phabricator via cfe-commits
browneee added a subscriber: kcc. browneee added a comment. In D103745#3094831 , @twoh wrote: > @gbalats @stephan.yichao.zhao Hello sorry for the late comment but I wonder > what was the reason behind this change (changing taint label representation > f

[PATCH] D109847: [DFSan] Add force_zero_label abilist option to DFSan. This can be used as a work-around for overtainting.

2021-09-17 Thread Andrew 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 rGc533b88a6dc9: [DFSan] Add force_zero_label abilist option to DFSan. This can be used as a… (authored by browneee). Repository: rG LLVM Github Mono

[PATCH] D109847: [DFSan] Add force_zero_label abilist option to DFSan. This can be used as a work-around for overtainting.

2021-09-17 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 373274. browneee marked 3 inline comments as done. browneee added a comment. Update comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109847/new/ https://reviews.llvm.org/D109847 Files: clang/docs/Dat

[PATCH] D109847: [DFSan] Add force_zero_label abilist option to DFSan. This can be used as a work-around for overtainting.

2021-09-17 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 373271. browneee added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109847/new/ https://reviews.llvm.org/D109847 Files: clang/docs/DataFlowSanitizer.rst compiler-rt/test/dfsan/Inputs/fl

[PATCH] D109847: [DFSan] Add force_zero_label abilist option to DFSan. This can be used as a work-around for overtainting.

2021-09-16 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 373065. browneee added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109847/new/ https://reviews.llvm.org/D109847 Files:

[PATCH] D104896: [DFSan] Change shadow and origin memory layouts to match MSan.

2021-06-25 Thread Andrew via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG45f6d5522f8d: [DFSan] Change shadow and origin memory layouts to match MSan. (authored by browneee). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104896/new

[PATCH] D104896: [DFSan] Change shadow and origin memory layouts to match MSan.

2021-06-25 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 354558. browneee marked 8 inline comments as done. browneee added a comment. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104896/new/ https://reviews.llvm.org/D104896 Files: clang/docs/

[PATCH] D104896: [DFSan] Change shadow and origin memory layouts to match MSan.

2021-06-24 Thread Andrew via Phabricator via cfe-commits
browneee created this revision. browneee added reviewers: stephan.yichao.zhao, gbalats. Herald added subscribers: pengfei, hiraditya. browneee requested review of this revision. Herald added projects: clang, Sanitizers, LLVM. Herald added subscribers: llvm-commits, Sanitizers, cfe-commits. Previou

[PATCH] D103745: [dfsan] Add full fast8 support

2021-06-07 Thread Andrew via Phabricator via cfe-commits
browneee accepted this revision. browneee added inline comments. Comment at: llvm/test/Instrumentation/DataFlowSanitizer/external_mask.ll:6 define i32 @test(i32 %a, i32* nocapture readonly %b) #0 { -; CHECK: @"dfs$test" -; CHECK: %[[RV:.*]] load{{.*}}__dfsan_shadow_ptr_mask -; C

[PATCH] D77621: ADT: SmallVector size/capacity use word-size integers when elements are small

2020-04-30 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. https://reviews.llvm.org/D79214 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77621/new/ https://reviews.llvm.org/D77621 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D77621: ADT: SmallVector size/capacity use word-size integers when elements are small

2020-04-30 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. In D77621#2013546 , @nikic wrote: > @browneee Looks like LLVM already defines `LLVM_PTR_SIZE` as a more portable > version of `__SIZEOF_POINTER__`. I saw LLVM_PTR_SIZE, but its definition may be based on sizeof()

[PATCH] D77621: ADT: SmallVector size/capacity use word-size integers when elements are small

2020-04-30 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. Thanks for the tips, MaskRay. Yes, I expect this would fix that issue. smeenai, SizeTypeMax() is intended to return size_t. --- I see a couple of options for fixing the truncation warning on 32-bit platforms: 1. Add an explicit cast to remove the warning. - Disadva

[PATCH] D77621: ADT: SmallVector size/capacity use word-size integers when elements are small

2020-04-24 Thread Andrew via Phabricator via cfe-commits
browneee marked an inline comment as done. browneee added inline comments. Comment at: llvm/include/llvm/ADT/SmallVector.h:19 #include "llvm/Support/Compiler.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/MathExtras.h" nikic wrote: > Is this

[PATCH] D77621: ADT: SmallVector size/capacity use word-size integers when elements are small

2020-04-24 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 260064. browneee added a comment. Change uintptr_t to uint64_t to ensure this does not instantiate the same template twice on platforms where uintptr_t is equivalent to uint32_t. Also considered using the preprocessor to disable the uintptr_t instantiation,

[PATCH] D77621: ADT: SmallVector size/capacity use word-size integers when elements are small

2020-04-24 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. Reverted in 5cb4c3776a34d48e43d9118921d2191aee0e3d21 Fails on plaforms where uintptr_t is the same type as uint32_t. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D77621: ADT: SmallVector size/capacity use word-size integers when elements are small

2020-04-24 Thread Andrew via Phabricator via cfe-commits
browneee closed this revision. browneee added a comment. Comitted: b5f0eae1dc3c09c020cdf9d07238dec9acdacf5f Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77621/new/ https://revi

[PATCH] D77621: ADT: SmallVector size/capacity use word-size integers when elements are small

2020-04-24 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 260006. browneee marked 4 inline comments as done. browneee added a comment. - Change SizeTypeMax to a static constexpr function. - Fix comment typos. - Add comment to alert others to possible performance loss if that function is moved to the header. @nikic

[PATCH] D77621: ADT: SmallVector size/capacity use word-size integers when elements are small

2020-04-24 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 259949. browneee added a comment. Switch back to size and capacity type conditionally larger approach (appologies for the noise here). Apply performance regression solutions from @nikic Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D77621: Change BitcodeWriter buffer to std::vector instead of SmallVector.

2020-04-23 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. I resubmitted the report_fatal_error checks again under D77601 http://llvm-compile-time-tracker.com/compare.php?from=7375212172951d2fc283c81d03c1a8588c3280c6&to=a30e7ea88e75568feed020aedae73c52de35&stat=max-rss http://llvm-compile-t

[PATCH] D77621: ADT: SmallVector size & capacity use word-size integers when elements are small.

2020-04-22 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 259480. browneee added a comment. Switch approach back to std::vector change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77621/new/ https://reviews.llvm.org/D77621 Files: clang-tools-extra/clang-doc/Seri

[PATCH] D77621: ADT: SmallVector size & capacity use word-size integers when elements are small.

2020-04-21 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. Thanks for the revert explanation and notes, nikic. @dexonsmith what is your current thinking on going back to the original std::vector approach? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77621/new/ https://reviews.l

[PATCH] D77621: ADT: SmallVector size & capacity use word-size integers when elements are small.

2020-04-17 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 258444. browneee added a comment. Rebase to latest HEAD. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77621/new/ https://reviews.llvm.org/D77621 Files: llvm/include/llvm/ADT/SmallVector.h llvm/lib/Suppor

[PATCH] D77621: ADT: SmallVector size & capacity use word-size integers when elements are small.

2020-04-15 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 257861. browneee added a comment. Rebase to latest HEAD. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77621/new/ https://reviews.llvm.org/D77621 Files: llvm/include/llvm/ADT/SmallVector.h llvm/lib/Suppor

[PATCH] D77621: ADT: SmallVector size & capacity use word-size integers when elements are small.

2020-04-13 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. GIT_COMMITTER_NAME=Andrew Browne GIT_COMMITTER_EMAIL=brown...@google.com This would be my second commit. I will request access next time - thanks @dexonsmith! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77621/new/ http

[PATCH] D77621: ADT: SmallVector size & capacity use word-size integers when elements are small.

2020-04-13 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. I'm open to suggestions to resolve the clang tidy naming warnings. I would prefer to leave grow_pod the same, to minimize changes. @dexonsmith I am not a committer, if the last changes looks good please submit for me. Thanks! Comment at: llvm/includ

[PATCH] D77621: ADT: SmallVector size & capacity use word-size integers when elements are small.

2020-04-13 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 257130. browneee marked 3 inline comments as done. browneee added a comment. Rename SizeMax() to SizeTypeMax(). Fix max_size(). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77621/new/ https://reviews.llvm.org

[PATCH] D77621: ADT: SmallVector size & capacity use word-size integers when elements are small.

2020-04-13 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 257044. browneee added a comment. Changed SizeMax to static constexpr function. Changed static asserts. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77621/new/ https://reviews.llvm.org/D77621 Files: llvm/i

[PATCH] D77621: ADT: SmallVector size & capacity use word-size integers when elements are small.

2020-04-11 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 256803. browneee marked 3 inline comments as done. browneee added a comment. Address comments from dblaikie. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77621/new/ https://reviews.llvm.org/D77621 Files: l

[PATCH] D77621: Change BitcodeWriter buffer to std::vector instead of SmallVector.

2020-04-10 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 256621. browneee added a comment. Change to suggested approach: size and capacity type conditionally larger for small element types. Also incorporate https://reviews.llvm.org/D77601 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D77621: Change BitcodeWriter buffer to std::vector instead of SmallVector.

2020-04-07 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. In D77621#1968437 , @dexonsmith wrote: > This is thanks to a commit of mine that shaved a word off of `SmallVector`. > Some options to consider: > > 1. Revert to word-size integers (`size_t`? `uintptr_t`?) for Size and > Capaci

[PATCH] D77621: Change BitcodeWriter buffer to std::vector instead of SmallVector.

2020-04-07 Thread Andrew via Phabricator via cfe-commits
browneee added inline comments. Comment at: llvm/include/llvm/Bitstream/BitstreamWriter.h:19 #include "llvm/ADT/Optional.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" RKSimon wrote: > Can this be dropped? It is still used to construct re

[PATCH] D77621: Change BitcodeWriter buffer to std::vector instead of SmallVector.

2020-04-07 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 255891. browneee added a comment. Fix formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77621/new/ https://reviews.llvm.org/D77621 Files: clang-tools-extra/clang-doc/Serialize.cpp clang-tools-extr

[PATCH] D77621: Change BitcodeWriter buffer to std::vector instead of SmallVector.

2020-04-07 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 255875. browneee marked 2 inline comments as done and an inline comment as not done. browneee added a comment. Build fixes in additional projects. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77621/new/ https

[PATCH] D77621: Change BitcodeWriter buffer to std::vector instead of SmallVector.

2020-04-07 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 255856. browneee added a comment. Fix build errors. Missed -DLLVM_ENABLE_PROJECTS in previous local test builds. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77621/new/ https://reviews.llvm.org/D77621 Files:

[PATCH] D77621: Change BitcodeWriter buffer to std::vector instead of SmallVector.

2020-04-07 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 255831. browneee added a comment. Fix more build errors. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77621/new/ https://reviews.llvm.org/D77621 Files: clang/include/clang/Serialization/ASTWriter.h clang

[PATCH] D77621: Change BitcodeWriter buffer to std::vector instead of SmallVector.

2020-04-07 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 255773. browneee marked an inline comment as done. browneee added a comment. Herald added subscribers: cfe-commits, arphaman. Herald added a project: clang. Fix build. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o