Add --time-llvm-passes.
This commit is contained in:
parent
813636d52e
commit
d6f1fcff6b
6 changed files with 40 additions and 4 deletions
|
@ -16,6 +16,8 @@
|
|||
#include "llvm/PassManager.h"
|
||||
#include "llvm/ADT/Triple.h"
|
||||
#include "llvm/Support/FormattedStream.h"
|
||||
#include "llvm/Support/Timer.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Target/TargetSelect.h"
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
|
@ -121,3 +123,13 @@ extern "C" LLVMValueRef LLVMRustConstSmallInt(LLVMTypeRef IntTy, unsigned N,
|
|||
LLVMBool SignExtend) {
|
||||
return LLVMConstInt(IntTy, (unsigned long long)N, SignExtend);
|
||||
}
|
||||
|
||||
extern bool llvm::TimePassesIsEnabled;
|
||||
extern "C" void LLVMRustEnableTimePasses() {
|
||||
TimePassesIsEnabled = true;
|
||||
}
|
||||
|
||||
extern "C" void LLVMRustPrintPassTimings() {
|
||||
raw_fd_ostream OS (2, false); // stderr.
|
||||
TimerGroup::printAll(OS);
|
||||
}
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
LLVMRustCreateMemoryBufferWithContentsOfFile
|
||||
LLVMRustEnableTimePasses
|
||||
LLVMRustWriteOutputFile
|
||||
LLVMRustGetLastError
|
||||
LLVMRustGetHostTriple
|
||||
LLVMRustConstSmallInt
|
||||
LLVMRustParseBitcode
|
||||
LLVMRustPrintPassTimings
|
||||
LLVMLinkModules
|
||||
LLVMCreateObjectFile
|
||||
LLVMDisposeObjectFile
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue