Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
All builds and tests correctly. I had some nits and questions. But I'm not sure I understand this well enough to approve. Valentin should take a look.
flang/include/flang/Optimizer/Builder/FIRBuilder.h | ||
---|---|---|
341 | I didn't see anywhere that this interface was called. Is that OK? | |
flang/lib/Lower/ConvertArrayConstructor.cpp | ||
300 | "know" should be "known". | |
301 | This would make more sense if the ")" appeared after the word "reallocation". | |
303 | What does the "extent" argument represent? Does this constructor only apply to singly dimensioned arrays? | |
316 | This is the only place where the data member declare gets assigned a value in this constructor. Is that OK? |
flang/include/flang/Optimizer/Builder/FIRBuilder.h | ||
---|---|---|
341 | It is called twice in RuntimeTempStrategy constructor (initialBoxValue = builder.createBox(...) around line 319 and 338). | |
flang/lib/Lower/ConvertArrayConstructor.cpp | ||
303 | Yes, array constructors are 1 ranked arrays. Extent is the pre-computed extent of the array constructor, if it was possible to compute it. I'll make it an std::optional so that it is more clear that it may be null here. | |
316 | Yes, I added a comment in the else case: The declare operation cannot be emitted in this case since the final array constructor has not yet been allocated. Instead, the resulting temporary variable will be extracted from the allocatable descriptor after all the API calls. And made the member an std::optional so that it is clearer that this member may not be always set (mlir::Value and operation always have a sort of "optional" state were they can be left null and if (value) will tell if it was not yet set, but using std::optional better convey the intent). |
Correct typos in comments, clarify some comments, and make
some members and argument std::optional instead of relying
on the null mlir::Value state.
Thanks for the review Pete.
I didn't see anywhere that this interface was called. Is that OK?