[PATCH] D153740: [llvm][Support] Deprecate llvm::writeFileAtomically API

2023-07-03 Thread Alexey Lapshin via Phabricator via cfe-commits
avl accepted this revision. avl added a comment. This revision is now accepted and ready to land. this LGTM, assuming D154329 is landed. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153740/new/ https:

[PATCH] D154329: [lldb] Replace llvm::writeFileAtomically with llvm::writeToOutput API.

2023-07-03 Thread Alexey Lapshin via Phabricator via cfe-commits
avl added a comment. this LGTM. thanks! Please, wait for approve from Jonas. I think someone from lldb needs to check whether new error reporting is OK. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154329/new/ https://reviews.llvm.org/D154329 __

[PATCH] D154329: [lldb] Replace llvm::writeFileAtomically with llvm::writeToOutput API.

2023-07-03 Thread Alexey Lapshin via Phabricator via cfe-commits
avl added inline comments. Comment at: lldb/tools/lldb-server/lldb-platform.cpp:112 return Status("Failed to atomically write file %s", file_spec.GetPath().c_str()); return status; probably, it would be better to add error text here? `

[PATCH] D153741: [Tooling][Rewriter] Remove the redundant AtomicallyMovedFile Implementation.

2023-07-01 Thread Alexey Lapshin via Phabricator via cfe-commits
avl accepted this revision. avl added a comment. This revision is now accepted and ready to land. LGTM. please pay attention to the clang format issues reported during pre-merge build. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153741/new/ http

[PATCH] D153652: [Support] Don't set "all_exe" mode by default for file written by llvm::writeToOutput

2023-06-28 Thread Alexey Lapshin via Phabricator via cfe-commits
avl added a comment. this LGTM. please, wait if James has any concern. Comment at: llvm/unittests/Support/raw_ostream_test.cpp:525 + ASSERT_TRUE(Perms) << "should be able to get permissions"; + // Verify that writeToOutput doesn't set exe bit. + EXPECT_EQ(Perms.get(), llvm::

[PATCH] D153652: [Support] Don't set "all_exe" mode by default for file written by llvm::writeToOutput

2023-06-26 Thread Alexey Lapshin via Phabricator via cfe-commits
avl added inline comments. Comment at: llvm/test/tools/llvm-dwarfutil/ELF/X86/mirror-permissions-unix.test:2 +## The Unix version of this test must use umask(1) because +## llvm-darfutil respects the umask in setting output permissions. +## Setting the umask to 0 ensures determi

[PATCH] D153740: [llvm][Support] Deprecate llvm::writeFileAtomically API

2023-06-26 Thread Alexey Lapshin via Phabricator via cfe-commits
avl added a reviewer: jkorous. avl added a subscriber: jkorous. avl added a comment. added @jkorous who originally added llvm::writeFileAtomically. > Let me know what you think about it -- I considered keeping the > llvm::writeFileAtomically and migrating its underlying implementation to > llvm

[PATCH] D153652: [Support] Don't set "all_exe" mode by default for file written by llvm::writeToOutput

2023-06-26 Thread Alexey Lapshin via Phabricator via cfe-commits
avl added a comment. In D153652#4448157 , @hokein wrote: > Thanks for the comments. > > In D153652#4447976 , @jhenderson > wrote: > >> Is there anything that can be done to use gtest unit tests for this? The two

[PATCH] D153652: [llvm][Support] Don'tt set "all_exe" mode by default for file written by llvm::writeToOutput.

2023-06-23 Thread Alexey Lapshin via Phabricator via cfe-commits
avl added a reviewer: jhenderson. avl added a comment. Agree that it is safe to remove all_exec from the default permissions. There are currently three usages of writeToOutput API: clang include cleaner, llvm-objcopy, llvm-dwarfutil. Both llvm-objcopy and llvm-dwarfutil use FilePermissionsAppli

[PATCH] D91844: [llvm][clang] Add checks for the smart pointers with the possibility to be null

2020-11-23 Thread Alexey Lapshin via Phabricator via cfe-commits
avl added a comment. The change for DWARFLinker is fine. I also think it is better to split the patch up into separate patches. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91844/new/ https://reviews.llvm.org/D91844 _

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-07-11 Thread Alexey Lapshin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf7907e9d223d: [TRE] allow TRE for non-capturing calls. (authored by avl). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82085/new/ https://reviews.llvm.org/

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-07-09 Thread Alexey Lapshin via Phabricator via cfe-commits
avl added a comment. Thank you, for the review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82085/new/ https://reviews.llvm.org/D82085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-07-09 Thread Alexey Lapshin via Phabricator via cfe-commits
avl updated this revision to Diff 276799. avl added a comment. addressed comments: added test for multiple recursive calls, removed duplicated check for operand bundles, simplified and commented tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-07-08 Thread Alexey Lapshin via Phabricator via cfe-commits
avl marked an inline comment as done. avl added inline comments. Comment at: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:474 + // Operand Bundles or not marked as TailCall. + if (CI->isNoTailCall() || CI->hasOperandBundles() || !CI->isTailCall()) return nullptr

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-07-08 Thread Alexey Lapshin via Phabricator via cfe-commits
avl updated this revision to Diff 276591. avl added a comment. addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82085/new/ https://reviews.llvm.org/D82085 Files: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp llvm/tes

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-07-08 Thread Alexey Lapshin via Phabricator via cfe-commits
avl marked 3 inline comments as done. avl added inline comments. Comment at: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:94 /// If it contains any dynamic allocas, returns false. static bool canTRE(Function &F) { // Because of PR962, we don't TRE dynamic allocas.

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-07-02 Thread Alexey Lapshin via Phabricator via cfe-commits
avl added a comment. @efriedma What do you think about current state of this patch? Is it OK? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82085/new/ https://reviews.llvm.org/D82085 ___ cfe-commits ma

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-07-02 Thread Alexey Lapshin via Phabricator via cfe-commits
avl updated this revision to Diff 275123. avl added a comment. rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82085/new/ https://reviews.llvm.org/D82085 Files: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp llvm/test/Transform

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-06-29 Thread Alexey Lapshin via Phabricator via cfe-commits
avl added a comment. ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82085/new/ https://reviews.llvm.org/D82085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-06-25 Thread Alexey Lapshin via Phabricator via cfe-commits
avl updated this revision to Diff 273457. avl added a comment. removed early check for TRE candidates from canTRE(). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82085/new/ https://reviews.llvm.org/D82085 Files: llvm/lib/Transforms/Scalar/TailR

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-06-25 Thread Alexey Lapshin via Phabricator via cfe-commits
avl marked an inline comment as done. avl added inline comments. Comment at: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:838 +if (isValidTRECandidate(CI)) + HasValidCandidates = true; + } laytonio wrote: > avl wrote: > > laytonio

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-06-25 Thread Alexey Lapshin via Phabricator via cfe-commits
avl marked an inline comment as done. avl added inline comments. Comment at: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:838 +if (isValidTRECandidate(CI)) + HasValidCandidates = true; + } laytonio wrote: > Is there any reason to

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-06-24 Thread Alexey Lapshin via Phabricator via cfe-commits
avl updated this revision to Diff 273174. avl added a comment. check valid TRE candidate into findTRECandidate()(). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82085/new/ https://reviews.llvm.org/D82085 Files: llvm/lib/Transforms/Scalar/TailRe

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-06-24 Thread Alexey Lapshin via Phabricator via cfe-commits
avl marked an inline comment as done. avl added inline comments. Comment at: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:830 + !CI->isTailCall()) +return false; +} laytonio wrote: > Is this correct? I think we want to

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-06-24 Thread Alexey Lapshin via Phabricator via cfe-commits
avl updated this revision to Diff 273029. avl added a comment. removed usages of AllocaDerivedValueTracker from canTRE(). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82085/new/ https://reviews.llvm.org/D82085 Files: llvm/lib/Transforms/Scalar/

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-06-24 Thread Alexey Lapshin via Phabricator via cfe-commits
avl marked an inline comment as done. avl added inline comments. Comment at: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:825 + // The local stack holds all alloca instructions and all byval arguments. + AllocaDerivedValueTracker Tracker; + for (Argument &Arg : F.ar

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-06-23 Thread Alexey Lapshin via Phabricator via cfe-commits
avl marked an inline comment as done. avl added inline comments. Comment at: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:825 + // The local stack holds all alloca instructions and all byval arguments. + AllocaDerivedValueTracker Tracker; + for (Argument &Arg : F.ar

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-06-23 Thread Alexey Lapshin via Phabricator via cfe-commits
avl updated this revision to Diff 272829. avl edited the summary of this revision. avl added a comment. addressed comments: 1. removed PointerMayBeCaptured() used for CalledFunction. 2. rewrote CanTRE() to visiting instructions only once. 3. replaced areAllLastFuncCallsRecursive() with isInTREPos

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-06-23 Thread Alexey Lapshin via Phabricator via cfe-commits
avl marked an inline comment as done. avl added inline comments. Comment at: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:825 + // The local stack holds all alloca instructions and all byval arguments. + AllocaDerivedValueTracker Tracker; + for (Argument &Arg : F.ar

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-06-23 Thread Alexey Lapshin via Phabricator via cfe-commits
avl marked an inline comment as done. avl added inline comments. Comment at: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:825 + // The local stack holds all alloca instructions and all byval arguments. + AllocaDerivedValueTracker Tracker; + for (Argument &Arg : F.ar

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-06-23 Thread Alexey Lapshin via Phabricator via cfe-commits
avl marked an inline comment as done. avl added inline comments. Comment at: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:825 + // The local stack holds all alloca instructions and all byval arguments. + AllocaDerivedValueTracker Tracker; + for (Argument &Arg : F.ar

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-06-22 Thread Alexey Lapshin via Phabricator via cfe-commits
avl marked 3 inline comments as done. avl added inline comments. Comment at: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:823 + +bool TailRecursionEliminator::canTRE(Function &F) { + // The local stack holds all alloca instructions and all byval arguments. ---

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-06-22 Thread Alexey Lapshin via Phabricator via cfe-commits
avl marked 4 inline comments as done. avl added inline comments. Comment at: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:130 +IsNocapture = true; + else if (Function *CalledFunction = CB.getCalledFunction()) { +if (CalledFunction->getB

[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

2020-06-22 Thread Alexey Lapshin via Phabricator via cfe-commits
avl updated this revision to Diff 272378. avl added a comment. 1. deleted code doing more strict tailcall marking. 2. left removal of "AllCallsAreTailCalls". 3. added check for non-capturing calls while tracking alloca. 4. re-titled the patch. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D82085: [TRE] markTails marks call sites as tailcalls though some of them are not.

2020-06-18 Thread Alexey Lapshin via Phabricator via cfe-commits
avl added a comment. > It makes sense to teach tail recursion elimination not to depend so heavily > on tail markings. But I don't think that implies we want to mess with the > markings themselves. Ok. Thus I need to drop part of this patch related to more strict tail marking, and continue wit

[PATCH] D82085: [TRE] markTails marks call sites as tailcalls though some of them are not.

2020-06-18 Thread Alexey Lapshin via Phabricator via cfe-commits
avl added a comment. > It's OK to set "tail" on any call that satisfies these requirements (from > https://llvm.org/docs/LangRef.html#call-instruction): "Both markers [tail and > musttail] imply that the callee does not access allocas from the caller. The > tail marker additionally implies that

[PATCH] D71304: [DWARF5][SplitDwarf] Set default state for -fsplit-dwarf-inlining to be false.

2019-12-11 Thread Alexey Lapshin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG21bc8958668a: [DWARF5][SplitDwarf] Set default state for -fsplit-dwarf-inlining to be false. (authored by avl). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2019-01-03 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin added a comment. Thank you! Aaron, Could you integrate this patch, please? I do not have commit access yet. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55710/new/ https://reviews.llvm.org/D55710 ___ cfe-commits mailing li

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2019-01-03 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin marked an inline comment as done. alexey.lapshin added inline comments. Comment at: test/Sema/pragma-pipeline.cpp:3 + +#pragma clang loop pipeline(disable) /* expected-error {{expected unqualified-id}} */ +int main() { aaron.ballman wrote: > I thi

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2019-01-02 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin updated this revision to Diff 179933. alexey.lapshin added a comment. Thank you. I updated doc, splitted Parser test, added Sema tests. Please check it once more. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55710/new/ https://reviews.llvm.org/D55710 Files: include/c

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2019-01-02 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin updated this revision to Diff 179843. alexey.lapshin added a comment. Thank you. addressed all grammar things. please check it once more. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55710/new/ https://reviews.llvm.org/D55710 Files: include/clang/Basic/Attr.td inclu

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2019-01-02 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin marked an inline comment as done. alexey.lapshin added inline comments. Comment at: include/clang/Basic/AttrDocs.td:2582 specified for the subsequent loop. The directive allows vectorization, -interleaving, and unrolling to be enabled or disabled. Vector width as

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2018-12-24 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin updated this revision to Diff 179459. alexey.lapshin added a comment. please consider changes in AttrDocs.td CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55710/new/ https://reviews.llvm.org/D55710 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2018-12-24 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin marked 2 inline comments as done. alexey.lapshin added inline comments. Comment at: include/clang/Basic/AttrDocs.td:2655 + dependence violated. This constant interval(in cycles) between the start + of iterations called initiation interval. Cycles number of one it

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2018-12-21 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin marked 2 inline comments as done. alexey.lapshin added a comment. will correct all mistakes. please check explanations for the questions. Comment at: include/clang/Basic/AttrDocs.td:2655 + dependence violated. This constant interval(in cycles) between the start

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2018-12-21 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin updated this revision to Diff 179248. alexey.lapshin added a comment. put a better link to doc CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55710/new/ https://reviews.llvm.org/D55710 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2018-12-20 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin updated this revision to Diff 179145. alexey.lapshin added a comment. update documentation section. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55710/new/ https://reviews.llvm.org/D55710 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/c

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2018-12-20 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin marked an inline comment as done. alexey.lapshin added inline comments. Comment at: include/clang/Basic/AttrDocs.td:2677-2678 +`language extensions +`_ +for further details,

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2018-12-20 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin marked an inline comment as done. alexey.lapshin added inline comments. Comment at: include/clang/Basic/AttrDocs.td:2673 + +Check `Software pipelining`, `Modulo scheduling` to get more details on optimisation. + aaron.ballman wrote: > "Check" -- c

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2018-12-19 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin updated this revision to Diff 178956. alexey.lapshin edited the summary of this revision. alexey.lapshin added a comment. Please consider this change: 1. addressed style issues and formatted patch with clang-format 2. renamed pragma pipeline_ii_count to pipeline_initiation_interval

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2018-12-17 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin added a comment. Ok, So thank you for the suggestions. I will implement that way. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55710/new/ https://reviews.llvm.org/D55710 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2018-12-17 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin marked an inline comment as done. alexey.lapshin added inline comments. Comment at: include/clang/Basic/Attr.td:2871-2872 /// distribute: attempt to distribute loop if State == Enable + /// pipeline: disable pipelining loop if State == Disable + /// pipeline_i

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2018-12-17 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin marked 2 inline comments as done. alexey.lapshin added a comment. Ok, I will address all issues. Comment at: include/clang/Basic/Attr.td:2871-2872 /// distribute: attempt to distribute loop if State == Enable + /// pipeline: disable pipelining loop if State =

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2018-12-14 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin updated this revision to Diff 178264. alexey.lapshin added a comment. deleted small typo in CGLoopInfo.cpp CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55710/new/ https://reviews.llvm.org/D55710 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td in

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2018-12-14 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin created this revision. alexey.lapshin added reviewers: bcahoon, kparzysz, aaron.ballman, arphaman, rsmith, marksl, yakush. Herald added a subscriber: zzheng. [PIPELINER] add two pragmas to control Software Pipelining optimisation. #pragma clang loop pipeline(disable)