Add --time-llvm-passes.

This commit is contained in:
Graydon Hoare 2011-05-10 16:10:08 -07:00
parent 813636d52e
commit d6f1fcff6b
6 changed files with 40 additions and 4 deletions

View file

@ -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);
}

View file

@ -1,9 +1,11 @@
LLVMRustCreateMemoryBufferWithContentsOfFile
LLVMRustEnableTimePasses
LLVMRustWriteOutputFile
LLVMRustGetLastError
LLVMRustGetHostTriple
LLVMRustConstSmallInt
LLVMRustParseBitcode
LLVMRustPrintPassTimings
LLVMLinkModules
LLVMCreateObjectFile
LLVMDisposeObjectFile