LLVM API Documentation
00001 //===-- IA64PCInstrBuilder.h - Aids for building IA64 insts -----*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file exposes functions that may be used with BuildMI from the 00011 // MachineInstrBuilder.h file to simplify generating frame and constant pool 00012 // references. 00013 // 00014 //===----------------------------------------------------------------------===// 00015 00016 #ifndef IA64_INSTRBUILDER_H 00017 #define IA64_INSTRBUILDER_H 00018 00019 #include "llvm/CodeGen/MachineInstrBuilder.h" 00020 00021 namespace llvm { 00022 00023 /// addFrameReference - This function is used to add a reference to the base of 00024 /// an abstract object on the stack frame of the current function. This 00025 /// reference has base register as the FrameIndex offset until it is resolved. 00026 /// This allows a constant offset to be specified as well... 00027 /// 00028 inline const MachineInstrBuilder& 00029 addFrameReference(const MachineInstrBuilder &MIB, int FI, int Offset = 0, 00030 bool mem = true) { 00031 if (mem) 00032 return MIB.addImm(Offset).addFrameIndex(FI); 00033 else 00034 return MIB.addFrameIndex(FI).addImm(Offset); 00035 } 00036 00037 } // End llvm namespace 00038 00039 #endif 00040