Lines Matching defs:components
275 /// empty, then traverse through the components designated. The base value is
998 fir::emitFatalError(loc, "derived type components must not be "
1011 // For allocatable components, a deep copy is needed.
1012 TODO(loc, "allocatable components in derived type assignment");
1466 // components, ordered from largest/leftmost to smallest/rightmost:
1468 // (nested allocatable/pointer components require nested coordinate_of ops)
1469 // - that does not contain any parent components
1470 // (the front end places parent components directly in the object)
2224 // We have to initialize the temp if it may have components
2225 // that need initialization. If there are no components
2241 // since the temporary's components (if any) are uninitialized
2351 // Destroy components of the temporary (if any).
2352 // If there are no components requiring destruction, then the call
3011 // Whole array symbols or components, and results of transformational
5681 ComponentPath &components) {
5682 return genarr(sym.get(), components);
5729 CC genarr(const ExtValue &extMemref, ComponentPath &components,
5738 if (components.isSlice()) {
5739 if (isBoxValue() && components.substring) {
5744 populateBounds(substringBounds, components.substring);
5778 loc, padSlice(components.trips, shape), components.suffixComponents,
5781 slice = builder.createSlice(loc, extMemref, components.trips,
5782 components.suffixComponents);
5784 if (components.hasComponents()) {
5787 fir::applyPathToType(seqTy.getEleTy(), components.suffixComponents);
5807 !components.hasComponents())
5809 if (components.substring) {
5856 populateBounds(substringBounds, components.substring);
5894 : defaultStoreToDestination(components.substring);
5959 populateBounds(substringBounds, components.substring);
6104 ComponentPath &components) {
6105 components.reversePath.push_back(&x);
6106 return genarr(x.complex(), components);
6110 CC genSlicePath(const A &x, ComponentPath &components) {
6111 return genarr(x, components);
6115 ComponentPath &components) {
6120 CC genarr(const Fortran::evaluate::Substring &x, ComponentPath &components) {
6121 components.substring = &x;
6123 [&](const auto &v) { return genarr(v, components); }, x.parent());
6691 ComponentPath components(des.Rank() > 0);
6693 [&](const auto &x) { return genarr(x, components); }, des.u);
6728 /// path in \p components.
6732 mlir::Type lowerPath(const ExtValue &arrayExv, ComponentPath &components) {
6735 auto &revPath = components.reversePath;
6741 extendComponent(components, ty, vals);
6744 components.prefixComponents.push_back(v);
6747 components.suffixComponents.push_back(v);
6770 components.suffixComponents.push_back(offset);
6775 genSliceIndices(components, arrayExv, *x, atBase);
6791 "multiple components along single path "
6816 loc, "multiple components along single path "
6840 auto currentFunc = components.getExtendCoorRef();
6846 components.extendCoorRef = newCoorRef;
6856 extendComponent(components, ty, {fld});
6866 components.applied = true;
6870 llvm::SmallVector<mlir::Value> genSubstringBounds(ComponentPath &components) {
6872 if (components.substring)
6873 populateBounds(result, components.substring);
6877 CC applyPathToArrayLoad(fir::ArrayLoadOp load, ComponentPath &components) {
6879 auto revPath = components.reversePath;
6882 mlir::Type eleTy = lowerPath(arrayExv, components);
6883 auto currentPC = components.pc;
6884 auto pc = [=, prefix = components.prefixComponents,
6885 suffix = components.suffixComponents](IterSpace iters) {
6889 components.resetPC();
6891 genSubstringBounds(components);
6920 if (components.hasExtendCoorRef()) {
6929 mlir::Value addr = components.getExtendCoorRef()(arrayOp);
6930 components.resetExtendCoorRef();
6994 if (components.hasExtendCoorRef()) {
7002 mlir::Value addr = components.getExtendCoorRef()(access);
7003 components.resetExtendCoorRef();
7015 auto addr = components.getExtendCoorRef()(access);
7016 components.resetExtendCoorRef();
7022 if (components.hasExtendCoorRef())
7040 CC genImplicitArrayAccess(const A &x, ComponentPath &components) {
7041 components.reversePath.push_back(ImplicitSubscripts{});
7043 lowerPath(exv, components);
7044 auto lambda = genarr(exv, components);
7045 return [=](IterSpace iters) { return lambda(components.pc(iters)); };
7048 ComponentPath &components) {
7050 return genImplicitArrayAccess(getFirstSym(x), components);
7051 return genImplicitArrayAccess(x.GetComponent(), components);
7055 ComponentPath &components) {
7063 components.reversePath.push_back(ImplicitSubscripts{});
7065 lowerPath(exv, components);
7066 auto lambda = genarr(exv, components, ptrVal);
7067 return [=](IterSpace iters) { return lambda(components.pc(iters)); };
7099 ComponentPath &components) {
7101 !components.hasComponents();
7104 ComponentPath &components) {
7105 return tailIsPointerInPointerAssignment(getLastSym(x), components);
7108 CC genarr(const Fortran::semantics::Symbol &x, ComponentPath &components) {
7110 if (x.Rank() > 0 && !tailIsPointerInPointerAssignment(x, components))
7111 components.reversePath.push_back(ImplicitSubscripts{});
7113 return applyPathToArrayLoad(load, components);
7115 return genImplicitArrayAccess(x, components);
7117 if (pathIsEmpty(components))
7118 return components.substring ? genAsScalar(*components.substring)
7128 CC genarr(const Fortran::evaluate::Component &x, ComponentPath &components) {
7131 !tailIsPointerInPointerAssignment(x, components))
7132 components.reversePath.push_back(ImplicitSubscripts{});
7134 return applyPathToArrayLoad(load, components);
7137 return genImplicitArrayAccess(x, components);
7139 bool atEnd = pathIsEmpty(components);
7141 // Skip parent components; their components are placed directly in the
7143 components.reversePath.push_back(&x);
7144 auto result = genarr(x.base(), components);
7145 if (components.applied)
7163 CC genarr(const Fortran::evaluate::ArrayRef &x, ComponentPath &components) {
7166 components.reversePath.push_back(ImplicitSubscripts{});
7168 components.reversePath.push_back(&x);
7169 return applyPathToArrayLoad(load, components);
7173 components.reversePath.push_back(&x);
7174 return genImplicitArrayAccess(x.base(), components);
7177 bool atEnd = pathIsEmpty(components);
7178 components.reversePath.push_back(&x);
7179 auto result = genarr(x.base(), components);
7180 if (components.applied)
7193 CC genarr(const Fortran::evaluate::CoarrayRef &x, ComponentPath &components) {
7198 ComponentPath &components) {
7199 return x.IsSymbol() ? genarr(getFirstSym(x), components)
7200 : genarr(x.GetComponent(), components);
7203 CC genarr(const Fortran::evaluate::DataRef &x, ComponentPath &components) {
7205 [&](const auto &v) { return genarr(v, components); }, x.u);
7208 bool pathIsEmpty(const ComponentPath &components) {
7209 return components.reversePath.empty();