1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "VectorizeOptions.h"
10#include "llvm/Analysis/LoopInfo.h"
11#include "llvm/Analysis/TargetTransformInfo.h"
12#include "llvm/Option/LibraryOptions.h"
13#include "llvm/SandboxIR/Context.h"
14#include "llvm/Transforms/Vectorize/LoopIdiomVectorize.h"
15
16#define OPTIONS_STRUCT_DEFS
17#include "VectorizeOptions.inc"
18
19using namespace llvm;
20
21LLVM_REGISTER_LIBRARY_OPTIONS(llvm::VectorizeOptions)
22
23const VectorizeOptions &llvm::getVectorizeOptions(const Loop &L) {
24 return getVectorizeOptions(C: L.getHeader()->getContext());
25}
26
27const VectorizeOptions &llvm::getVectorizeOptions(const sandboxir::Context &C) {
28 return C.getLibraryOptions().get<VectorizeOptions>();
29}
30