LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

SparcV9AsmPrinter.cpp File Reference

#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Module.h"
#include "llvm/Pass.h"
#include "llvm/Assembly/Writer.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/Support/Mangler.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/Statistic.h"
#include "SparcV9Internals.h"
#include "MachineFunctionInfo.h"
#include <string>

Include dependency graph for SparcV9AsmPrinter.cpp:

Go to the source code of this file.

Functions

std::string getAsCString (const ConstantArray *CVA)
bool ArrayTypeIsString (const ArrayType *arrayType)
unsigned findOptimalStorageSize (const TargetMachine &TM, const Type *Ty)
const std::string TypeToDataDirective (const Type *type)
unsigned int ConstantToSize (const Constant *CV, const TargetMachine &target)
unsigned int SizeToAlignment (unsigned int size, const TargetMachine &target)
unsigned int TypeToAlignment (const Type *type, const TargetMachine &target)
unsigned int ConstantToAlignment (const Constant *CV, const TargetMachine &target)
FunctionPassllvm::createAsmPrinterPass (std::ostream &Out, TargetMachine &TM)


Function Documentation

bool @0::ArrayTypeIsString const ArrayType arrayType  )  [inline, static]
 

Definition at line 72 of file SparcV9AsmPrinter.cpp.

References llvm::SequentialType::getElementType(), llvm::Type::SByteTy, and llvm::Type::UByteTy.

Referenced by ConstantToAlignment(), ConstantToSize(), and TypeToDataDirective().

unsigned int @0::ConstantToAlignment const Constant CV,
const TargetMachine target
[inline, static]
 

Get the size of the constant and then use SizeToAlignment. Handles strings as a special case;

Definition at line 149 of file SparcV9AsmPrinter.cpp.

References ArrayTypeIsString(), SizeToAlignment(), and TypeToAlignment().

unsigned int @0::ConstantToSize const Constant CV,
const TargetMachine target
[inline, static]
 

Get the size of the constant for the given target. If this is an unsized array, return 0.

Definition at line 115 of file SparcV9AsmPrinter.cpp.

References ArrayTypeIsString(), and findOptimalStorageSize().

unsigned @0::findOptimalStorageSize const TargetMachine TM,
const Type Ty
[static]
 

Definition at line 77 of file SparcV9AsmPrinter.cpp.

References llvm::Type::getPrimitiveSize(), llvm::TargetMachine::getTargetData(), llvm::TargetData::getTypeSize(), and llvm::Type::isIntegral().

Referenced by ConstantToSize(), and TypeToAlignment().

std::string @0::getAsCString const ConstantArray CVA  )  [static]
 

getAsCString - Return the specified array as a C compatible string, only if the predicate isString() is true.

Definition at line 46 of file SparcV9AsmPrinter.cpp.

References C, llvm::User::getNumOperands(), llvm::Constant::getOperand(), and llvm::ConstantArray::isString().

unsigned int @0::SizeToAlignment unsigned int  size,
const TargetMachine target
[inline, static]
 

Align data larger than one L1 cache line on L1 cache line boundaries. Align all smaller data on the next higher 2^x boundary (4, 8, ...).

Definition at line 129 of file SparcV9AsmPrinter.cpp.

unsigned int @0::TypeToAlignment const Type type,
const TargetMachine target
[inline, static]
 

Get the size of the type and then use SizeToAlignment.

Definition at line 142 of file SparcV9AsmPrinter.cpp.

References findOptimalStorageSize(), and SizeToAlignment().

Referenced by ConstantToAlignment().

const std::string @0::TypeToDataDirective const Type type  )  [inline, static]
 

Definition at line 87 of file SparcV9AsmPrinter.cpp.

References llvm::Type::ArrayTyID, ArrayTypeIsString(), llvm::Type::BoolTyID, llvm::Type::DoubleTyID, llvm::Type::FloatTyID, llvm::Type::getTypeID(), llvm::Type::IntTyID, llvm::Type::LongTyID, llvm::Type::PointerTyID, llvm::Type::SByteTyID, llvm::Type::ShortTyID, llvm::Type::UByteTyID, llvm::Type::UIntTyID, llvm::Type::ULongTyID, and llvm::Type::UShortTyID.


Variable Documentation

Statistic EmittedInsts("asm-printer","Number of machine instrs printed") [static]