|
|
|
@ -12,7 +12,7 @@ namespace {
|
|
|
|
typedef std::vector<callPair > replacementVector;
|
|
|
|
typedef std::vector<callPair > replacementVector;
|
|
|
|
static char ID;
|
|
|
|
static char ID;
|
|
|
|
uint32_t callsiteCount;
|
|
|
|
uint32_t callsiteCount;
|
|
|
|
LLVMIntegerType *Int32Ty;
|
|
|
|
LLVMIntegerTy *Int32Ty;
|
|
|
|
GNUObjCTypeFeedback() : ModulePass(ID), callsiteCount(0) {}
|
|
|
|
GNUObjCTypeFeedback() : ModulePass(ID), callsiteCount(0) {}
|
|
|
|
|
|
|
|
|
|
|
|
void profileFunction(Function &F, Constant *ModuleID) {
|
|
|
|
void profileFunction(Function &F, Constant *ModuleID) {
|
|
|
|
@ -47,7 +47,7 @@ namespace {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
LLVMContext &VMContext = M.getContext();
|
|
|
|
LLVMContext &VMContext = M.getContext();
|
|
|
|
Int32Ty = IntegerType::get(VMContext, 32);
|
|
|
|
Int32Ty = IntegerType::get(VMContext, 32);
|
|
|
|
LLVMPointerType *PtrTy = Type::getInt8PtrTy(VMContext);
|
|
|
|
LLVMPointerTy *PtrTy = Type::getInt8PtrTy(VMContext);
|
|
|
|
Constant *moduleName =
|
|
|
|
Constant *moduleName =
|
|
|
|
#if (LLVM_MAJOR > 3) || ((LLVM_MAJOR == 3) && (LLVM_MINOR > 0))
|
|
|
|
#if (LLVM_MAJOR > 3) || ((LLVM_MAJOR == 3) && (LLVM_MINOR > 0))
|
|
|
|
ConstantDataArray::getString(VMContext, M.getModuleIdentifier(), true);
|
|
|
|
ConstantDataArray::getString(VMContext, M.getModuleIdentifier(), true);
|
|
|
|
|