mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 05:46:06 +00:00

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.
23 lines
746 B
C++
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_
|