LLVM API Documentation

CBackend.cpp File Reference

#include "CTargetMachine.h"
#include "llvm/CallingConv.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Module.h"
#include "llvm/Instructions.h"
#include "llvm/Pass.h"
#include "llvm/PassManager.h"
#include "llvm/TypeSymbolTable.h"
#include "llvm/Intrinsics.h"
#include "llvm/IntrinsicInst.h"
#include "llvm/InlineAsm.h"
#include "llvm/Analysis/ConstantsScanner.h"
#include "llvm/Analysis/FindUsedTypes.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/IntrinsicLowering.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Target/TargetMachineRegistry.h"
#include "llvm/Target/TargetAsmInfo.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Support/CallSite.h"
#include "llvm/Support/CFG.h"
#include "llvm/Support/GetElementPtrTypeIterator.h"
#include "llvm/Support/InstVisitor.h"
#include "llvm/Support/Mangler.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Config/config.h"
#include <algorithm>
#include <sstream>
#include "llvm/Intrinsics.gen"

Include dependency graph for CBackend.cpp:

Go to the source code of this file.

Defines

#define GET_GCC_BUILTIN_NAME
#define GET_GCC_BUILTIN_NAME

Enumerations

enum  SpecialGlobalClass { NotSpecial = 0, GlobalCtors, GlobalDtors, NotPrinted }

Functions

static bool isFPCSafeToPrint (const ConstantFP *CFP)
static void generateCompilerSpecificCode (raw_ostream &Out, const TargetData *TD)
static void FindStaticTors (GlobalVariable *GV, std::set< Function * > &StaticTors)
static SpecialGlobalClass getGlobalVariableClass (const GlobalVariable *GV)
static bool isFPIntBitCast (const Instruction &I)
static const char * getFloatBitCastField (const Type *Ty)
static std::string gccifyAsm (std::string asmstr)

Variables

int CBackendTargetMachineModule = 0
static RegisterTarget
< CTargetMachine
X ("c","C backend")


Define Documentation

#define GET_GCC_BUILTIN_NAME

#define GET_GCC_BUILTIN_NAME


Enumeration Type Documentation

Enumerator:
NotSpecial 
GlobalCtors 
GlobalDtors 
NotPrinted 

Definition at line 1763 of file CBackend.cpp.


Function Documentation

static void FindStaticTors ( GlobalVariable GV,
std::set< Function * > &  StaticTors 
) [static]

FindStaticTors - Given a static ctor/dtor list, unpack its contents into the StaticTors set.

Definition at line 1744 of file CBackend.cpp.

References llvm::dyn_cast(), F, llvm::GlobalVariable::getInitializer(), llvm::User::getNumOperands(), llvm::Constant::getOperand(), and llvm::ConstantExpr::isCast().

static std::string gccifyAsm ( std::string  asmstr  )  [static]

Definition at line 3163 of file CBackend.cpp.

static void generateCompilerSpecificCode ( raw_ostream Out,
const TargetData TD 
) [static]

Definition at line 1612 of file CBackend.cpp.

static const char* getFloatBitCastField ( const Type Ty  )  [static]

Definition at line 2729 of file CBackend.cpp.

References llvm::Type::getTypeID().

static SpecialGlobalClass getGlobalVariableClass ( const GlobalVariable GV  )  [static]

getGlobalVariableClass - If this is a global that is specially recognized by LLVM, return a code that indicates how we should handle it.

Definition at line 1771 of file CBackend.cpp.

References llvm::Value::getName(), llvm::GlobalValue::getSection(), GlobalCtors, GlobalDtors, llvm::GlobalValue::hasAppendingLinkage(), NotPrinted, NotSpecial, and llvm::Value::use_empty().

static bool isFPCSafeToPrint ( const ConstantFP CFP  )  [static]

static bool isFPIntBitCast ( const Instruction I  )  [inline, static]


Variable Documentation

std::set<const Argument*> ByValParams

Definition at line 98 of file CBackend.cpp.

CBackendTargetMachineModule - Note that this is used on hosts that cannot link in a library unless there are references into the library. In particular, it seems that it is not possible to get things to work on Win32 without this. Though it is unused, do not remove it.

Definition at line 56 of file CBackend.cpp.

std::map<const ConstantFP *, unsigned> FPConstantMap

Definition at line 96 of file CBackend.cpp.

Definition at line 99 of file CBackend.cpp.

char ID [static]

Definition at line 69 of file CBackend.cpp.

Definition at line 89 of file CBackend.cpp.

Definition at line 97 of file CBackend.cpp.

Definition at line 91 of file CBackend.cpp.

Definition at line 90 of file CBackend.cpp.

Definition at line 88 of file CBackend.cpp.

Definition at line 93 of file CBackend.cpp.

const TargetData* TD

Definition at line 94 of file CBackend.cpp.

const Module* TheModule

Definition at line 92 of file CBackend.cpp.

std::map<const Type *, std::string> TypeNames

Definition at line 95 of file CBackend.cpp.

Referenced by llvm::WriteAsOperand(), and llvm::WriteTypeSymbolic().

RegisterTarget<CTargetMachine> X("c","C backend") [static]




This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.