[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:

[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

[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 + ///

[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" --

[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 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

[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

[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

[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

[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-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

[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)

[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

[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

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

[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

[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

[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

[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

[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 ) { // Because of PR962, we don't TRE dynamic allocas.

[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

[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

[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

[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

[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/

[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

[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

[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 ) { + // 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

[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 :

[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: > >

[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-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:

[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 :

[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:

[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 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:

[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

[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

[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 :

[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 :

[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

[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 :