OpenASIP
2.0
|
#include <string>
#include <tuple>
#include <map>
#include <vector>
#include "llvm/IR/InlineAsm.h"
Go to the source code of this file.
Namespaces | |
llvm | |
Typedefs | |
using | AsmOperands = std::tuple< unsigned, std::vector< const llvm::MachineOperand * > > |
First = Inline asm kind defined in llvm/IR/InlineAsm.h Second = The associated operands. More... | |
using | AsmPosition = unsigned |
Inline assembly operand position. The numbers are matched to template strings in inline asm texts - e.g. 2 => "$2". More... | |
using | AsmOperandMap = std::map< AsmPosition, AsmOperands > |
Functions | |
std::tuple< std::string, size_t > | getSourceLocationInfo (const llvm::MachineInstr &mi) |
std::string | getSourceLocationString (const llvm::MachineInstr &mi) |
AsmOperandMap | getInlineAsmOperands (const llvm::MachineInstr &mi) |
using AsmOperandMap = std::map<AsmPosition, AsmOperands> |
Definition at line 60 of file LLVMUtilities.hh.
using AsmOperands = std::tuple< unsigned, std::vector<const llvm::MachineOperand*> > |
First = Inline asm kind defined in llvm/IR/InlineAsm.h Second = The associated operands.
Definition at line 56 of file LLVMUtilities.hh.
using AsmPosition = unsigned |
Inline assembly operand position. The numbers are matched to template strings in inline asm texts - e.g. 2 => "$2".
Definition at line 59 of file LLVMUtilities.hh.
AsmOperandMap getInlineAsmOperands | ( | const llvm::MachineInstr & | mi | ) |
Decodes operands of INLINEASM instruction into more manageable struct.
Definition at line 92 of file LLVMUtilities.cc.
Referenced by InlineAsmParser::addLiveRangeData(), llvm::LLVMTCEBuilder::emitInlineAsm(), and InlineAsmParser::substituteAsmString().
std::tuple<std::string, size_t> getSourceLocationInfo | ( | const llvm::MachineInstr & | mi | ) |
Extracts source location info from the instruction.
If the instruction does not have debug info returns ("", 0);
Definition at line 54 of file LLVMUtilities.cc.
Referenced by InlineAsmParser::addDebugInfoToInlineAsmBB(), llvm::LLVMTCEBuilder::emitInlineAsm(), getSourceLocationString(), and InlineAsmParser::substituteAsmString().
std::string getSourceLocationString | ( | const llvm::MachineInstr & | mi | ) |
Returns source location as "<src-file>:<src-line>: " string if available.
Otherwise return empty string.
Definition at line 78 of file LLVMUtilities.cc.
References getSourceLocationInfo().
Referenced by llvm::LLVMTCEBuilder::emitInlineAsm().