User Details
- User Since
- Apr 13 2022, 2:43 AM (41 w, 5 d)
Today
Sat, Jan 28
Thu, Jan 26
Wed, Jan 25
Thanks for taking a look, see my responses inline. For more information, the RFC is at https://reviews.llvm.org/D139617
- Add missing early return for allocations not for arrays
- Remove braces from if statement with a single statement in its body
- Assert that a correct insertion point is found for the alloca
- Check for a parent implementing LoopLikeOpInterface before searching for a CFG loop
- Don't use recursion when searching for CFG cycles
- Stop hierarchical search at anything implementing FunctionOpInterface, not just func.func
Tue, Jan 24
Ping for review
Ping for any MLIR reviewers
Mon, Jan 23
- Rename option macro to make it clear that it doesn't do marshalling
Fri, Jan 20
Fix newly added tests
Update to ensure that generated code for Options.td does not try to reference
clang::CodegenOpts::StackArrays.
Updated getSourceRank and getDestRank to return size_t to avoid comparison
between int64_t and size_t.
Wed, Jan 18
Handle case where blocks are nested inside of eachother
Clarified a comment in stack-arrays.f90 and clarified the choice of FileCheck
prefix.
Updated a comment and documentation string in the test pass to make it clear
the loop detection is no longer a method in mlir::Block
Tue, Jan 17
@rriddle ping
- Implement operator!= as !(operator==)
- Move insertion point computation to StackArraysAnalysisWrapper::analyseFunction
- Remove special-casing for join(allocated, unknown)
- Add processing of fir.result to AllocationAnalysis::visitOperation so that lattices are propagated out of nested blocks
- Walk function returns not freememops
- Add a test checking that the data flow analysis gives correct results for scf.if
Mon, Jan 16
Update to address review comments
Fri, Jan 13
Updating patch context
Thu, Jan 12
Updated to construct StackArrays as a ModuleOp pass
- Do not move allocations outside of openmp regions
- Detect loops in the control flow graph
- Attempt to use llvm.stacksave/llvm.stackrestore to allow stack allocations inside of loops
Thanks for review @DavidTruby
Updated to use llvm::any_of instead of a for loop and an if.
- Add mention of CFG loops, removed TODO for goto statements
- Specified the conditions under which llvm.stacksave/llvm.stackrestore intrinsics are safe to use
Wed, Jan 11
Moved to a stand alone function in LoopLikeInterface.h
Tue, Jan 10
Fri, Jan 6
Thu, Jan 5
- Remove quote from gfortran's man page
- Fix typo
Wed, Jan 4
Update patch again because I missed a test removal in the last update
Un-WIP'ed, removed tests for the two unsupported cases (see the RFC for more information).
- Added a paragraph explaining handling of fir.call operations during data flow analysis
- Added information about the two known cases where the existing analysis is insufficient (see the section on ConvertExpr.cpp)
Tue, Jan 3
Dec 29 2022
Changes in the new patch version
- Calculate allocmem insertion point in the analysis stage so that we can catch all failures during analysis and then succeed when making real code changes
- Pass the lattice through fir.call operations. This is important so that we move allocations for array temporaries created for function arguments. It is safe to assume that functions do not change the allocation status of the allocations we are tracking because we only track allocations for temporaries created by flang.
- Add some tests. The last three tests in stack-arrays.f90 don't check anything useful yet: they are placeholders for when the stack arrays can handle these cases correctly.
Dec 21 2022
Thanks for review.
Dec 20 2022
There is a WIP implementation of the RFC at https://reviews.llvm.org/D140415
Dec 19 2022
Add a section naming a new FIR attribute to mark allocations which should never be moved to the stack: fir.must_be_heap
Dec 14 2022
Thank you everyone for the feedback so far.
LGTM, thanks for fixing this!
Dec 12 2022
ping @nicolasvasilache
Dec 10 2022
Dec 9 2022
Update with nitpicks to documentation (mostly to re-run Windows CI)
Failed Tests (5):
Flang :: Fir/boxproc.fir Flang :: Fir/target-rewrite-arg-position.fir Flang :: Fir/target-rewrite-boxchar.fir Flang :: Fir/target-rewrite-char-proc.fir Flang :: Fir/target.fir
Update patch to skip the test for linking to crtfastmath.o on Windows as there doesn't seem to be a Windows equivalent of crtfastmath.o.
Dec 8 2022
- Organize document according to the format recommended in DesignGuideline.md
- Explain why a piecemeal approach was chosen instead of a single pass performing this conversion
- Mention that most of the referenced code will be replaced by HLFIR
- Include an example of the changes to array value copy
- Provide a more detailed explanation of ConvertVariable.cpp
- Add a testing plan
Updating patch add documentation of the meaning of -Ofast, -ffast-math, and comparison with gfortran and nvfortran.
Dec 6 2022
Thanks for this! LGTM
Dec 5 2022
Nov 30 2022
Updated comment, updated patch context, fixed unused variable
Sorry about this, it should be fixed by https://github.com/llvm/llvm-project/commit/3a1b40925486c1eea80e2a0e636b208435487daf
Nov 29 2022
Add test for -fstack-arrays usage warning