[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2020-03-31 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @manojgupta prior to this patch, clang was using its version of `memcpy` and not the one provided inline. I slightly modified your reproducer to showcase that aspect: https://godbolt.org/z/NmxC0v Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2020-04-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D71082#1958597 , @manojgupta wrote: > Yes, it'd be nice if all of the FORTIFY handling can be improved. For a > simple call like memcpy of 8 bytes in the example, there is no reason to emit > all these stack/range ch

[PATCH] D74757: Fix compiler extension in standalone mode

2020-02-18 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 245327. serge-sans-paille added a comment. Take @Meinersbur review into account. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74757/new/ https://reviews.llvm.org/D74757 Files: clang/CMakeLists.txt

[PATCH] D74871: Fix interaction between -fdiscard-value-names and LLVM Bitcode

2020-02-19 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: EricWF, mehdi_amini. Herald added a project: clang. Herald added a subscriber: cfe-commits. Without that patch, the test case associated to this patch segfaults in Release mode. This also makes the llvm-test-suite build f

[PATCH] D74871: Fix interaction between -fdiscard-value-names and LLVM Bitcode

2020-02-19 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 245578. serge-sans-paille added a comment. Added test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74871/new/ https://reviews.llvm.org/D74871 Files: clang/include/clang/Basic/DiagnosticDrive

[PATCH] D74871: Fix interaction between -fdiscard-value-names and LLVM Bitcode

2020-02-19 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D74871#1883884 , @EricWF wrote: > Why is this not a bug in w/e is handling the IR? It may totally be. Consider this review as a way to start the discussion. The problem, as it appears, is triggered when some value i

[PATCH] D74757: Fix compiler extension in standalone mode

2020-02-19 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3a0f6e699bb6: Fix compiler extension in standalone mode (authored by serge-sans-paille). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74757/new/ https://re

[PATCH] D74871: Fix interaction between -fdiscard-value-names and LLVM Bitcode

2020-02-20 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 245594. serge-sans-paille added a comment. Finally, the test case :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74871/new/ https://reviews.llvm.org/D74871 Files: clang/include/clang/Basic/Diagn

[PATCH] D74871: Fix interaction between -fdiscard-value-names and LLVM Bitcode

2020-02-20 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 245606. serge-sans-paille added a comment. Herald added subscribers: llvm-commits, hiraditya. Herald added a project: LLVM. Other approach to the problem: modify `Value::SetNameImpl` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D74878: [remark][diagnostics] [codegen] Fix PR44896

2020-02-20 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @lebedev.ri maybe we should at least warn the user if there was a flag at clang level to force discarding? That's what I've been doing in https://reviews.llvm.org/D74871?id=245594 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74878/new/ https://revie

[PATCH] D74704: Support -fuse-ld=lld for riscv

2020-02-20 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. For the record: http://lab.llvm.org:8011/builders/llvm-clang-win-x-armv7l/builds/4749/steps/test-check-clang/logs/FAIL%3A%20Clang%3A%3Ariscv64-toolchain.c fails Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74704

[PATCH] D74704: Support -fuse-ld=lld for riscv

2020-02-21 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 245805. serge-sans-paille added a comment. Add a configure feature test to filter out tests that depend on platform linker, as hinted by @MaskRay Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74704/ne

[PATCH] D74878: [remark][diagnostics] [codegen] Fix PR44896

2020-02-21 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Let's go that way then. @xur I leave it to you to add the appropriate warning at least on the clang side? Feel free to just use the code from https://reviews.llvm.org/D74871?id=245594. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74878/new/ https://

[PATCH] D75057: Syndicate, test and fix base64 implementation

2020-02-24 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: jvikstrom, george.karpenkov. Herald added subscribers: llvm-commits, Sanitizers, cfe-commits, usaxena95, kadircet, arphaman, jkorous, mgorny. Herald added projects: clang, Sanitizers, LLVM. As an answer to https://github.

[PATCH] D74878: [remark][diagnostics] [codegen] Fix PR44896

2020-02-24 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D74878#1889460 , @jeroen.dobbelaere wrote: > Will this also give a warning when passing a .ll file to a release clang, > without explicitly passing the '-fdiscard-value-names' ? Is this what we > want it to be ?

[PATCH] D75057: Syndicate, test and fix base64 implementation

2020-02-24 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 246240. serge-sans-paille added a comment. Restore duplication, fix the bug in two separate locations. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75057/new/ https://reviews.llvm.org/D75057 Files:

[PATCH] D75057: Syndicate, test and fix base64 implementation

2020-02-24 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 246243. serge-sans-paille added a comment. Fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75057/new/ https://reviews.llvm.org/D75057 Files: clang-tools-extra/clangd/SemanticHighlighting.cpp

[PATCH] D75057: Syndicate, test and fix base64 implementation

2020-02-24 Thread serge via Phabricator via cfe-commits
serge-sans-paille removed a reviewer: lebedev.ri. serge-sans-paille added a comment. As a side note, pre-reserving the buffer size gives interesting speedup, see http://quick-bench.com/Lp6OwO2etW1YEmJayVWn3U8JDiY Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D75057: Syndicate, test and fix base64 implementation

2020-02-24 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 246248. serge-sans-paille added a comment. Other copy/paste typo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75057/new/ https://reviews.llvm.org/D75057 Files: clang-tools-extra/clangd/SemanticHi

[PATCH] D75057: Syndicate, test and fix base64 implementation

2020-02-24 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 246279. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75057/new/ https://reviews.llvm.org/D75057 Files: clang-tools-extra/clangd/SemanticHighlighting.cpp compiler-rt/lib/fuzzer/FuzzerUtil.cpp llv

[PATCH] D75057: Syndicate, test and fix base64 implementation

2020-02-24 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 246290. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75057/new/ https://reviews.llvm.org/D75057 Files: clang-tools-extra/clangd/SemanticHighlighting.cpp compiler-rt/lib/fuzzer/FuzzerUtil.cpp llv

[PATCH] D74878: [remark][diagnostics] [codegen] Fix PR44896

2020-02-25 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Nice work, LGTM too. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74878/new/ https://reviews.llvm.org/D74878 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[PATCH] D74704: Support -fuse-ld=lld for riscv

2020-02-26 Thread serge via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rGe058667a2e01: Support -fuse-ld=lld for riscv (authored by serge-sans-paille). Repository: rG LLVM Github Monorepo CHAN

[PATCH] D74871: Fix interaction between -fdiscard-value-names and LLVM Bitcode

2020-02-26 Thread serge via Phabricator via cfe-commits
serge-sans-paille abandoned this revision. serge-sans-paille added a comment. Obsoleted by https://reviews.llvm.org/D74878 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74871/new/ https://reviews.llvm.org/D74871 _

[PATCH] D75057: Syndicate, test and fix base64 implementation

2020-02-27 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Up? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75057/new/ https://reviews.llvm.org/D75057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D75057: Syndicate, test and fix base64 implementation

2020-02-27 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D75057#1895550 , @hokein wrote: > thanks for doing this! didn't look into details yet. Could you explain what > was the bug in the previous code? Yeah, the code was using + operator instead of | to combine the resul

[PATCH] D75057: Syndicate, test and fix base64 implementation

2020-02-27 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 247039. serge-sans-paille added a comment. Add a test case that exhibits the overflow in previous implementation + minor nits from @hokein Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75057/new/ htt

[PATCH] D75057: Syndicate, test and fix base64 implementation

2020-02-27 Thread serge via Phabricator via cfe-commits
serge-sans-paille marked 3 inline comments as done. serge-sans-paille added inline comments. Comment at: llvm/unittests/Support/Base64Test.cpp:30 + // from: https://tools.ietf.org/html/rfc4648#section-10 + TestBase64("", ""); + TestBase64("f", "Zg=="); hokein

[PATCH] D75057: Syndicate, test and fix base64 implementation

2020-03-02 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5a1958f2673f: Syndicate, test and fix base64 implementation (authored by serge-sans-paille). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75057/new/ https:

[PATCH] D75579: [WIP] Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by libraries

2020-03-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: MaskRay, tstellar. Herald added subscribers: llvm-commits, cfe-commits, dexonsmith, steven_wu, gbedwell, aheejin, hiraditya, mgorny, dschuff. Herald added a reviewer: JDevlieghere. Herald added a reviewer: andreadb. Herald

[PATCH] D75579: [WIP] Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by libraries

2020-03-04 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 248130. serge-sans-paille added a comment. Fix lto-test bugs + convert more files, still not ready for review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75579/new/ https://reviews.llvm.org/D75579

[PATCH] D75579: [WIP] Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by libraries

2020-03-04 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 248328. serge-sans-paille added a comment. This passes the following configurations: -DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra;lld' -DBUILD_SHARED_LIBS=on -DLLVM_LINK_LLVM_DYLIB=off -DCLANG_LINK_CLANG_DYLIB=off -DLLVM_ENABLE_PROJECTS='clang;

[PATCH] D68720: Support -fstack-clash-protection for x86

2019-10-30 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 227194. serge-sans-paille edited the summary of this revision. serge-sans-paille added a comment. Moved to a simpler, easier to review, less error prone implementation. Validates just fines on llvm bootstrap an cpython code base. @sylvestre.ledru t

[PATCH] D68720: Support -fstack-clash-protection for x86

2019-10-30 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @rnk what's your take on that version? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68720/new/ https://reviews.llvm.org/D68720 ___ cfe-commits mailing list cfe-commi

[PATCH] D68720: Support -fstack-clash-protection for x86

2019-10-30 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @sylvestre.ledru : quick backport for llvm9: https://sergesanspaille.fedorapeople.org/0001-Stack-clash-mir-attempt.patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68720/new/ https://reviews.llvm.org/D68720

[PATCH] D68720: Support -fstack-clash-protection for x86

2019-11-05 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @sylvestre.ledru did the testing and benchmarking on firefox (see https://bugzilla.mozilla.org/show_bug.cgi?id=1588710#c12), everything seems ok, let's move forward? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D61446: Generalize the pass registration mechanism used by Polly to any third-party tool

2019-11-13 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 229127. serge-sans-paille added a comment. First rework pass, sevral comments have been taken into account but not all of them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61446/new/ https://review

[PATCH] D68720: Support -fstack-clash-protection for x86

2019-11-20 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @rnk : up ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68720/new/ https://reviews.llvm.org/D68720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[PATCH] D61446: Generalize the pass registration mechanism used by Polly to any third-party tool

2019-11-21 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D61446#1681841 , @Meinersbur wrote: > Keep in mind that for static linking you will need something that pulls-in a > symbol from the pass static library. In this patch, `NewPMDriver.cpp` does it > for `opt` by callin

[PATCH] D61446: Generalize the pass registration mechanism used by Polly to any third-party tool

2019-11-21 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 230415. serge-sans-paille marked an inline comment as done. serge-sans-paille added a comment. Take into account most of the reviews. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61446/new/ https://r

[PATCH] D61446: Generalize the pass registration mechanism used by Polly to any third-party tool

2019-11-21 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @Meinersbur to make your reviewer job easier, I've setup validation for that patch, see https://github.com/serge-sans-paille/llvm-project/pull/2/checks It build and validates fine. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D68720: Support -fstack-clash-protection for x86

2019-11-21 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 230494. serge-sans-paille added a comment. Added extra test for arch support (warns if the flag is used on unsupported targets, and checks it's effectively unused), cc @sylvestre.ledru Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D68720: Support -fstack-clash-protection for x86

2019-11-25 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D68720#1755546 , @xbolva00 wrote: > https://reviews.llvm.org/rG397fa687691876de9ff0fbaaf0def3ac5a48899c > > Commited? No, still waiting for @rnk feedback. This commit is just me using the wrong remote when pushing f

[PATCH] D68720: Support -fstack-clash-protection for x86

2019-11-25 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. For the record : this validates fine on OSX, Linux and Windows, using the github actions setup by @tstellar https://github.com/serge-sans-paille/llvm-project/pull/3 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D6

[PATCH] D68720: Support -fstack-clash-protection for x86

2019-11-25 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @sylvestre.ledru backport for release/9.x branch: https://sergesanspaille.fedorapeople.org/0001-Stack-clash-mir-attempt.patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68720/new/ https://reviews.llvm.org/D68

[PATCH] D61446: Generalize the pass registration mechanism used by Polly to any third-party tool

2019-11-26 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 231092. serge-sans-paille added a comment. Handle all @Meinersbur comment, rebuild on github with extra flags pending. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61446/new/ https://reviews.llvm.org

[PATCH] D61446: Generalize the pass registration mechanism used by Polly to any third-party tool

2019-11-28 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @Alouest thanks for the reproducer. I confirm your issue, and also confirm that if you pass `-fexperimental-new-pass-manager -O1` to clang (i.e. use the new pass manager) it works fine. As far as I can tell, the segfault happens because `RegisterPass` also reg

[PATCH] D61446: Generalize the pass registration mechanism used by Polly to any third-party tool

2019-11-28 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @Meinersbur I have a strange symbol issue when activating the GPu part: https://github.com/serge-sans-paille/llvm-project/pull/2/checks?check_run_id=324901896#step:5:4888 Any hint? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D68720: Support -fstack-clash-protection for x86

2019-12-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @rnk up? the mozilla folks confirmed there's no significant regression (see https://bugzilla.mozilla.org/show_bug.cgi?id=1588710#c12). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68720/new/ https://reviews.llvm

[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2019-12-05 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: mstorsjo, george.burgess.iv, efriedma. Herald added a project: clang. Herald added a subscriber: cfe-commits. If a system header provides an (inline) implementation of some of their function, clang still matches on the fu

[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2019-12-05 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 232425. serge-sans-paille marked an inline comment as done. serge-sans-paille added a comment. test case updated Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71082/new/ https://reviews.llvm.org/D7108

[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2019-12-06 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 232667. serge-sans-paille added a comment. Fix interaction with fortify warnings (cc @efriedma) Also I've checked interactions with the test suite I wrote here https://github.com/serge-sans-paille/fortify-test-suite/ and clang now passes all the d

[PATCH] D61446: Generalize the pass registration mechanism used by Polly to any third-party tool

2019-12-07 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 232690. serge-sans-paille added a comment. @Meinersbur : with this version, validation passes using static build on three platforms, with the following config: -DLLVM_ENABLE_PROJECTS='polly;clang' -DPOLLY_ENABLE_GPGPU_CODEGEN=ON -DLLVM_ENABLE_A

[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2019-12-09 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 232894. serge-sans-paille added a comment. - Be less intrusive in the getBuiltinID() system, just hook inside CGExpr.cpp - Take into account @george.burgess.iv remark on builtins referencing themselves in an override. Add a test case for that scenar

[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2019-12-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Validation OK: https://github.com/serge-sans-paille/llvm-project/pull/4/checks Comment at: clang/lib/AST/Decl.cpp:3006 +bool FunctionDecl::isReplaceableSystemFunction() const { + FunctionDecl const *Definition; Note to revi

[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2019-12-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @george.burgess.iv : up? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71082/new/ https://reviews.llvm.org/D71082 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D71374: Improve support of GNU mempcpy

2019-12-11 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: ddunbar. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Lower to the memcpy intrinsic - Raise warnings when size/bounds are known Repository: rG LLVM Github Monorepo https://reviews.llvm.org

[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2019-12-11 Thread serge via Phabricator via cfe-commits
serge-sans-paille marked an inline comment as done. serge-sans-paille added inline comments. Comment at: clang/lib/AST/Decl.cpp:3006 +bool FunctionDecl::isReplaceableSystemFunction() const { + FunctionDecl const *Definition; george.burgess.iv wrote: > serge-sa

[PATCH] D71374: Improve support of GNU mempcpy

2019-12-11 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. On going validation: https://github.com/serge-sans-paille/llvm-project/pull/5/checks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71374/new/ https://reviews.llvm.org/D71374 ___

[PATCH] D71374: Improve support of GNU mempcpy

2019-12-12 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D71374#1780402 , @serge-sans-paille wrote: > On going validation: > https://github.com/serge-sans-paille/llvm-project/pull/5/checks Validation succeeded, waiting for review! Repository: rG LLVM Github Monorepo

[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2019-12-12 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 233585. serge-sans-paille added a comment. @george.burgess.iv : take into account reviews, extra testing and function renaming. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71082/new/ https://review

[PATCH] D71374: Improve support of GNU mempcpy

2019-12-12 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 233587. serge-sans-paille added a comment. @Jim obviously :-) Thanks for spotting that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71374/new/ https://reviews.llvm.org/D71374 Files: clang/include

[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2019-12-12 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 233648. serge-sans-paille added a comment. Improve test case portability. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71082/new/ https://reviews.llvm.org/D71082 Files: clang/include/clang/AST/Dec

[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2019-12-13 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 233746. serge-sans-paille marked 6 inline comments as done. serge-sans-paille added a comment. Handle comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71082/new/ https://reviews.llvm.org/D71082

[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2019-12-13 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 233753. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71082/new/ https://reviews.llvm.org/D71082 Files: clang/include/clang/AST/Decl.h clang/lib/AST/Decl.cpp clang/lib/CodeGen/CGExpr.cpp clang/

[PATCH] D71374: Improve support of GNU mempcpy

2019-12-13 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D71374#1783032 , @Jim wrote: > I am curious what is difference of code generation after applying your > changes? Before, when compiling #define _GNU_SOURCE #include void* foo(void* to, void* from, unsigne

[PATCH] D71374: Improve support of GNU mempcpy

2019-12-13 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D71374#1783245 , @xbolva00 wrote: > LLVM already converts mempcpy to memcpy.. Indeed, the clang version I was using as base reference was clang-9, and the mempcpy optimisation at IR level got introduced after that.

[PATCH] D71374: Improve support of GNU mempcpy

2019-12-13 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. [[edited the example to reflect actual state]] Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71374/new/ https://reviews.llvm.org/D71374 ___ cfe-commits mailing list c

[PATCH] D71374: Improve support of GNU mempcpy

2019-12-13 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 233797. serge-sans-paille added a comment. Added test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71374/new/ https://reviews.llvm.org/D71374 Files: clang/include/clang/Basic/Builtins.def

[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2019-12-13 Thread serge via Phabricator via cfe-commits
serge-sans-paille marked an inline comment as done. serge-sans-paille added inline comments. Comment at: clang/lib/AST/Decl.cpp:3019 +if (SL.isValid()) + return SM.isInSystemHeader(SL); + } efriedma wrote: > I'm a little concerned about this; we're subt

[PATCH] D71374: Improve support of GNU mempcpy

2019-12-14 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @xbolva00 : validation is ok: https://github.com/serge-sans-paille/llvm-project/pull/5/checks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71374/new/ https://reviews.llvm.org/D71374 __

[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2019-12-14 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 233923. serge-sans-paille marked an inline comment as done. serge-sans-paille added a comment. Take comment into account. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71082/new/ https://reviews.llvm.

[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2019-12-14 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 233924. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71082/new/ https://reviews.llvm.org/D71082 Files: clang/include/clang/AST/Decl.h clang/lib/AST/Decl.cpp clang/lib/CodeGen/CGExpr.cpp clang/

[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2019-12-16 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @efriedma validation passes without the checks you were pointed out, see https://github.com/serge-sans-paille/llvm-project/pull/4/checks Thanks for making the code simpler! Comment at: clang/lib/AST/Decl.cpp:3019 +if (SL.isValid()) +

[PATCH] D71566: New checks for fortified sprintf

2019-12-16 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: erik.pilkington. serge-sans-paille added a project: clang. Herald added subscribers: cfe-commits, dexonsmith. Implement a pessimistic evaluator of the minimal required size for a buffer based on the format string, and co

[PATCH] D71566: New checks for fortified sprintf

2019-12-17 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 234262. serge-sans-paille added a comment. Take remarks into account: - support sprintf when the buffer has a known static size - use llvm::Optional - some extra minor tweaks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D71566: New checks for fortified sprintf

2019-12-17 Thread serge via Phabricator via cfe-commits
serge-sans-paille marked 7 inline comments as done. serge-sans-paille added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:370 // FIXME: There are some more useful checks we could be doing here: // - Analyze the format string of sprintf to see how much of buf

[PATCH] D71566: New checks for fortified sprintf

2019-12-17 Thread serge via Phabricator via cfe-commits
serge-sans-paille marked 2 inline comments as done. serge-sans-paille added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:392 + EstimateSizeFormatHandler H(StrE); + StringRef StrRef = StrE->getString(); + const char *Str = StrRef.data();

[PATCH] D71566: New checks for fortified sprintf

2019-12-17 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 234282. serge-sans-paille marked an inline comment as done. serge-sans-paille added a comment. - Prevent assert upon wide string format - More test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7

[PATCH] D71566: New checks for fortified sprintf

2019-12-17 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 234327. serge-sans-paille added a comment. Support %% and %c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71566/new/ https://reviews.llvm.org/D71566 Files: clang/include/clang/Basic/DiagnosticSema

[PATCH] D61446: Generalize the pass registration mechanism used by Polly to any third-party tool

2019-12-18 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 234501. serge-sans-paille added a comment. Patch rebased, validation ongoing. I'll merge that once I'm back from holidays, don't feel like commiting that 3h before holidays. Thanks **a lot** @Meinersbur for all the reviews! Repository: rG LLVM

[PATCH] D75579: [WIP] Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by libraries

2020-03-09 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 249109. serge-sans-paille added a comment. @MaskRay The library version prooved to be a bad path: we wanted clang-cpp to always link to a shared library, which interacts in ungraceful ways with BUILD_SHARED_LIBS. This is another attempt that looks

[PATCH] D75579: [WIP] Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by libraries

2020-03-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 249378. serge-sans-paille added a comment. Cleaned up code, using a few macros to avoid duplication. No longer a WIP Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75579/new/ https://reviews.llvm.org/

[PATCH] D75579: [WIP] Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by libraries

2020-03-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @MaskRay > because that will cause duplicate registration of llvm::cl::opt flags. Not with this setup, if I'm not mistaken: the static registration is triggered by the static variables inside the constructor call, and if I'm not mistaken, initialization of

[PATCH] D75579: [WIP] Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by libraries

2020-03-11 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @MaskRay are you ok with that version? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75579/new/ https://reviews.llvm.org/D75579 ___ cfe-commits mailing list cfe-commi

[PATCH] D75579: [WIP] Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by libraries

2020-03-16 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @MaskRay gentle up :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75579/new/ https://reviews.llvm.org/D75579 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D75579: Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by runtime-registration

2020-03-16 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @MaskRay no longer a WIP ;-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75579/new/ https://reviews.llvm.org/D75579 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D75579: Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by runtime-registration

2020-03-16 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 250631. serge-sans-paille added a comment. Renamed registration constructor to use a more llvm-ish name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75579/new/ https://reviews.llvm.org/D75579 Files

[PATCH] D75579: Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by runtime-registration

2020-03-17 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGac1d23ed7de0: Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by runtime… (authored by serge-sans-paille). Changed prior to commit: https://reviews.llvm.org/D75579?vs=250631&id=250747#toc

[PATCH] D75579: Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by runtime-registration

2020-03-18 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @modocache : thanks for the heads up, I'm investigating the issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75579/new/ https://reviews.llvm.org/D75579 ___ cfe-co

[PATCH] D75579: Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by runtime-registration

2020-03-18 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @modocache: fixed by 8d019cda851a1031fbce3c50be0975438147f11d Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75579/new/ https://reviews.llvm.or

[PATCH] D68720: Support -fstack-clash-protection for x86

2020-02-06 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @craig.topper up :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68720/new/ https://reviews.llvm.org/D68720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D74129: Prefer __vector over vector keyword for altivec use

2020-02-06 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a subscriber: hans. serge-sans-paille added a comment. @hans : clang 10.0.0rc1 doesn't build on ppc64le in Fedora without that patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74129/new/ https://reviews.llvm.org/D74129

[PATCH] D74129: Prefer __vector over vector keyword for altivec use

2020-02-06 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. serge-sans-paille added a subscriber: hans. serge-sans-paille added a comment. serge-sans-paille added a reviewer: hans. @hans : clang 10.0.0

[PATCH] D68720: Support -fstack-clash-protection for x86

2020-02-06 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a subscriber: hans. serge-sans-paille added a comment. I would love too, @hans what do you think? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68720/new/ https://reviews.llvm.org/D68720 __

[PATCH] D68720: Support -fstack-clash-protection for x86

2020-02-07 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG39f50da2a357: Support -fstack-clash-protection for x86 (authored by serge-sans-paille). Changed prior to commit: https://reviews.llvm.org/D68720?vs=240844&id=243101#toc Repository: rG LLVM Github Mon

[PATCH] D74129: Prefer __vector over vector keyword for altivec use

2020-02-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. > Do you know why it's started failing now? Not quite, probably a gcc update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74129/new/ https://reviews.llvm.org/D74129 __

[PATCH] D74129: Prefer __vector over vector keyword for altivec use

2020-02-10 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3185c30c54d0: Prefer __vector over vector keyword for altivec (authored by serge-sans-paille). Changed prior to commit: https://reviews.llvm.org/D74129?vs=242902&id=243641#toc Repository: rG LLVM Git

[PATCH] D68720: Support -fstack-clash-protection for x86

2020-02-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. For the record: tests have been updated, option handling cleaned up and expansive check failure fixed in commit e67cbac81211d40332a79d98c9d5953624cc1202 . Repository: rG LLVM Github Monor

[PATCH] D73865: [CodeGenModule] Assume dso_local for -fpic -fno-semantic-interposition

2020-02-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Herald added a subscriber: miyuki. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:871 if (!Var->isThreadLocal() && -(RM == llvm::Reloc::Static || CGOpts.PIECopyRelocations)) +(RM == llvm::Reloc::Static || (LOpts.PIE &

<    1   2   3   4   5   6   7   8   9   >