Home | History | Annotate | Download | only in llvm
      1 /*
      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 
     17 #ifndef ART_COMPILER_LLVM_BACKEND_OPTIONS_H_
     18 #define ART_COMPILER_LLVM_BACKEND_OPTIONS_H_
     19 
     20 #include <llvm/Support/CommandLine.h>
     21 
     22 #define DECLARE_ARM_BACKEND_OPTIONS \
     23 extern llvm::cl::opt<bool> EnableARMLongCalls; \
     24 extern llvm::cl::opt<bool> ReserveR9;
     25 
     26 #define INITIAL_ARM_BACKEND_OPTIONS \
     27 EnableARMLongCalls = true; \
     28 ReserveR9 = 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 
     39 namespace art {
     40 namespace llvm {
     41 
     42 inline void InitialBackendOptions() {
     43 #define LLVM_TARGET(TargetName) INITIAL_##TargetName##_BACKEND_OPTIONS
     44 #include "llvm/Config/Targets.def"
     45 }
     46 
     47 }  // namespace llvm
     48 }  // namespace art
     49 
     50 #endif  // ART_COMPILER_LLVM_BACKEND_OPTIONS_H_
     51