LLVM API Documentation
#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.
Enumerations | |
| enum | Sections { Unknown, Text, ReadOnlyData, InitRWData, ZeroInitRWData } |
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) |
| FunctionPass * | llvm::createAsmPrinterPass (std::ostream &Out, TargetMachine &TM) |
Variables | |
| Statistic | EmittedInsts ("asm-printer","Number of machine instrs printed") |
| Mangler * | Mang |
| std::ostream & | O |
| const TargetMachine & | TM |
| enum Sections | CurSection |
| const Function * | currFunction |
| enum Sections |
Definition at line 160 of file SparcV9AsmPrinter.cpp.
| bool @166::ArrayTypeIsString | ( | const ArrayType * | arrayType | ) | [inline, static] |
Definition at line 72 of file SparcV9AsmPrinter.cpp.
References llvm::SequentialType::getElementType().
Referenced by ConstantToAlignment(), ConstantToSize(), and TypeToDataDirective().
| unsigned int @166::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(), target, and TypeToAlignment().
| unsigned int @166::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(), findOptimalStorageSize(), and target.
| unsigned @166::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(), llvm::Type::isIntegral(), TM, and Ty.
Referenced by ConstantToSize(), and TypeToAlignment().
| std::string @166::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 llvm::CallingConv::C, llvm::User::getNumOperands(), llvm::Constant::getOperand(), and llvm::ConstantArray::isString().
| unsigned int @166::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.
References sz.
| unsigned int @166::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(), SizeToAlignment(), and target.
Referenced by ConstantToAlignment().
| const std::string @166::TypeToDataDirective | ( | const Type * | type | ) | [inline, static] |
Definition at line 87 of file SparcV9AsmPrinter.cpp.
References ArrayTypeIsString(), and llvm::Type::getTypeID().
| const Function* currFunction |
Definition at line 513 of file SparcV9AsmPrinter.cpp.
| enum Sections CurSection |
Definition at line 176 of file SparcV9AsmPrinter.cpp.
Statistic EmittedInsts("asm-printer","Number of machine instrs printed") [static] |
Definition at line 170 of file SparcV9AsmPrinter.cpp.
| std::ostream& O |
Definition at line 173 of file SparcV9AsmPrinter.cpp.
Referenced by llvm::cl::value_desc::apply(), llvm::cl::desc::apply(), llvm::TargetLowering::TargetLoweringOpt::CombineTo(), llvm::MSScheduleSB::constructKernel(), EatsUnboundedNumberOfValues(), llvm::DOTGraphTraits< const DSGraph * >::edgeTargetsEdgeSource(), llvm::DOTGraphTraits< const DSGraph * >::getEdgeTarget(), llvm::cl::generic_parser_base::getOptionWidth(), llvm::cl::basic_parser_impl::getOptionWidth(), getValueStr(), llvm::TargetNameParser::initialize(), llvm::PassNameParser::initialize(), llvm::cl::generic_parser_base::initialize(), isGrouping(), isPrefixedOrGrouping(), llvm::DSNode::mergeTypeInfo(), llvm::SDOperand::operator!=(), llvm::SDOperand::operator<(), llvm::SDOperand::operator==(), llvm::cl::applicator< MiscFlags >::opt(), llvm::cl::applicator< FormattingFlags >::opt(), llvm::cl::applicator< OptionHidden >::opt(), llvm::cl::applicator< ValueExpected >::opt(), llvm::cl::applicator< NumOccurrences >::opt(), llvm::cl::parser< const llvm::PassInfo * >::parse(), parseDouble(), llvm::PassNameParser::printOptionInfo(), llvm::cl::generic_parser_base::printOptionInfo(), llvm::cl::basic_parser_impl::printOptionInfo(), llvm::ConstantStruct::replaceUsesOfWithOnConstant(), llvm::ConstantArray::replaceUsesOfWithOnConstant(), RequiresValue(), llvm::cl::alias::setAliasFor(), llvm::cl::bits_storage< DataType, Storage >::setLocation(), llvm::cl::list_storage< DataType, Storage >::setLocation(), llvm::cl::opt_storage< DataType, ExternalStorage, llvm::is_class< DataType >::value >::setLocation(), and llvm::MachineInstr::substituteValue().
| const TargetMachine& TM |
Definition at line 174 of file SparcV9AsmPrinter.cpp.