summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/lib/Assembler.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/Assembler.h')
-rw-r--r--llvm/tools/llvm-exegesis/lib/Assembler.h39
1 files changed, 17 insertions, 22 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/Assembler.h b/llvm/tools/llvm-exegesis/lib/Assembler.h
index 5937de9f053..5d4204e4a50 100644
--- a/llvm/tools/llvm-exegesis/lib/Assembler.h
+++ b/llvm/tools/llvm-exegesis/lib/Assembler.h
@@ -38,7 +38,7 @@ class ExegesisTarget;
// Gather the set of reserved registers (depends on function's calling
// convention and target machine).
-llvm::BitVector getFunctionReservedRegs(const llvm::TargetMachine &TM);
+BitVector getFunctionReservedRegs(const TargetMachine &TM);
// Helper to fill in a basic block.
class BasicBlockFiller {
@@ -47,8 +47,7 @@ public:
const MCInstrInfo *MCII);
void addInstruction(const MCInst &Inst, const DebugLoc &DL = DebugLoc());
- void addInstructions(ArrayRef<llvm::MCInst> Insts,
- const DebugLoc &DL = DebugLoc());
+ void addInstructions(ArrayRef<MCInst> Insts, const DebugLoc &DL = DebugLoc());
void addReturn(const DebugLoc &DL = DebugLoc());
@@ -88,47 +87,43 @@ using FillFunction = std::function<void(FunctionFiller &)>;
// epilogue. Once the MachineFunction is ready, it is assembled for TM to
// AsmStream, the temporary function is eventually discarded.
void assembleToStream(const ExegesisTarget &ET,
- std::unique_ptr<llvm::LLVMTargetMachine> TM,
- llvm::ArrayRef<unsigned> LiveIns,
- llvm::ArrayRef<RegisterValue> RegisterInitialValues,
- const FillFunction &Fill,
- llvm::raw_pwrite_stream &AsmStream);
+ std::unique_ptr<LLVMTargetMachine> TM,
+ ArrayRef<unsigned> LiveIns,
+ ArrayRef<RegisterValue> RegisterInitialValues,
+ const FillFunction &Fill, raw_pwrite_stream &AsmStream);
// Creates an ObjectFile in the format understood by the host.
// Note: the resulting object keeps a copy of Buffer so it can be discarded once
// this function returns.
-llvm::object::OwningBinary<llvm::object::ObjectFile>
-getObjectFromBuffer(llvm::StringRef Buffer);
+object::OwningBinary<object::ObjectFile> getObjectFromBuffer(StringRef Buffer);
// Loads the content of Filename as on ObjectFile and returns it.
-llvm::object::OwningBinary<llvm::object::ObjectFile>
-getObjectFromFile(llvm::StringRef Filename);
+object::OwningBinary<object::ObjectFile> getObjectFromFile(StringRef Filename);
// Consumes an ObjectFile containing a `void foo(char*)` function and make it
// executable.
struct ExecutableFunction {
explicit ExecutableFunction(
- std::unique_ptr<llvm::LLVMTargetMachine> TM,
- llvm::object::OwningBinary<llvm::object::ObjectFile> &&ObjectFileHolder);
+ std::unique_ptr<LLVMTargetMachine> TM,
+ object::OwningBinary<object::ObjectFile> &&ObjectFileHolder);
// Retrieves the function as an array of bytes.
- llvm::StringRef getFunctionBytes() const { return FunctionBytes; }
+ StringRef getFunctionBytes() const { return FunctionBytes; }
// Executes the function.
void operator()(char *Memory) const {
((void (*)(char *))(intptr_t)FunctionBytes.data())(Memory);
}
- std::unique_ptr<llvm::LLVMContext> Context;
- std::unique_ptr<llvm::ExecutionEngine> ExecEngine;
- llvm::StringRef FunctionBytes;
+ std::unique_ptr<LLVMContext> Context;
+ std::unique_ptr<ExecutionEngine> ExecEngine;
+ StringRef FunctionBytes;
};
// Creates a void(int8*) MachineFunction.
-llvm::MachineFunction &
-createVoidVoidPtrMachineFunction(llvm::StringRef FunctionID,
- llvm::Module *Module,
- llvm::MachineModuleInfo *MMI);
+MachineFunction &createVoidVoidPtrMachineFunction(StringRef FunctionID,
+ Module *Module,
+ MachineModuleInfo *MMI);
} // namespace exegesis
} // namespace llvm
OpenPOWER on IntegriCloud