blob: 2a08bda2f1c44b563866a99334991c9dda788e55 [file] [log] [blame]
Shih-wei Liao26e93072012-05-30 19:13:08 -07001/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Brian Carlstromfc0e3212013-07-17 14:40:12 -070017#ifndef ART_COMPILER_LLVM_BACKEND_OPTIONS_H_
18#define ART_COMPILER_LLVM_BACKEND_OPTIONS_H_
Shih-wei Liao26e93072012-05-30 19:13:08 -070019
20#include <llvm/Support/CommandLine.h>
21
22#define DECLARE_ARM_BACKEND_OPTIONS \
23extern llvm::cl::opt<bool> EnableARMLongCalls; \
24extern llvm::cl::opt<bool> ReserveR9;
25
26#define INITIAL_ARM_BACKEND_OPTIONS \
Logan Chien14744042012-06-26 17:37:11 +080027EnableARMLongCalls = true; \
Shih-wei Liao26e93072012-05-30 19:13:08 -070028ReserveR9 = true;
29
30#define DECLARE_X86_BACKEND_OPTIONS
31#define INITIAL_X86_BACKEND_OPTIONS
32
33#define DECLARE_Mips_BACKEND_OPTIONS
34#define INITIAL_Mips_BACKEND_OPTIONS
35
36#define LLVM_TARGET(TargetName) DECLARE_##TargetName##_BACKEND_OPTIONS
37#include "llvm/Config/Targets.def"
38
39namespace art {
Ian Rogers4c1c2832013-03-04 18:30:13 -080040namespace llvm {
Shih-wei Liao26e93072012-05-30 19:13:08 -070041
42inline void InitialBackendOptions() {
43#define LLVM_TARGET(TargetName) INITIAL_##TargetName##_BACKEND_OPTIONS
44#include "llvm/Config/Targets.def"
45}
46
Ian Rogers4c1c2832013-03-04 18:30:13 -080047} // namespace llvm
Shih-wei Liao26e93072012-05-30 19:13:08 -070048} // namespace art
49
Brian Carlstromfc0e3212013-07-17 14:40:12 -070050#endif // ART_COMPILER_LLVM_BACKEND_OPTIONS_H_