llvm-project/flang/lib/Semantics/canonicalize-directives.h
David Truby c6b6e18c4d
[flang] Implement !DIR$ VECTOR ALWAYS (#93830)
This patch implements support for the VECTOR ALWAYS directive, which
forces
vectorization to occurr when possible regardless of a decision by the
cost
model. This is done by adding an attribute to the branch into the loop
in LLVM
to indicate that the loop should always be vectorized.

This patch only implements this directive on plan structured do loops 
without labels. Support for unstructured loops and array
expressions is planned for future patches.
2024-06-14 14:10:41 +01:00

23 lines
746 B
C++

//===-- lib/Semantics/canonicalize-directives.h -----------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef FORTRAN_SEMANTICS_CANONICALIZE_DIRECTIVES_H_
#define FORTRAN_SEMANTICS_CANONICALIZE_DIRECTIVES_H_
namespace Fortran::parser {
struct Program;
class Messages;
} // namespace Fortran::parser
namespace Fortran::semantics {
bool CanonicalizeDirectives(
parser::Messages &messages, parser::Program &program);
}
#endif // FORTRAN_SEMANTICS_CANONICALIZE_DIRECTIVES_H_