Displaying 8 results from an estimated 8 matches for "getint32".
Did you mean:
getint32ty
2015 May 28
1
[LLVMdev] Passing ConstantDataArray to GetElementPtrInst
...GetElementPtrInst. For example, this snippet:
std::vector<llvm::Value*> args;
auto strValue =
llvm::ConstantDataArray::getString(llvm::getGlobalContext(),
llvm::StringRef("Hello world."));
std::vector<llvm::Value*> index_vector;
index_vector.push_back(Builder.getInt32(0));
index_vector.push_back(Builder.getInt32(0));
auto valueAsPtr = Builder.CreateGEP(strValue, index_vector, "tmp1");
args.push_back(valueAsPtr);
Builder.CreateCall(TheModule->getFunction("printf"), args, "callprintf");
Note that this is summarize...
2012 Feb 01
1
[LLVMdev] Function Insertion Error
...nclude "llvm/Support/IRBuilder.h"
using namespace llvm;
namespace {
struct FunctionInsert : public ModulePass {
static char ID;
FunctionInsert() : ModulePass(ID) {}
};
virtual bool runOnModule(Module &M) {
FunctionType* ty=FunctionType::get(Type::getInt32Ty(M.getContext()),false);
Function *func = cast<Function>(M.getOrInsertFunction("func", ty,Type::getInt32Ty(M.getContext()), (Type *)0));
BasicBlock *BB = BasicBlock::Create(M.getContext(), "bb1", func);
IRBuilder<> builder(BB);
Valu...
2011 Oct 13
1
[LLVMdev] problems running JIT code on Mac 32-bit
...ot;
#include "llvm/Support/IRBuilder.h"
using namespace std;
using namespace llvm;
int main(int argc, char** argv){
InitializeNativeTarget();
LLVMContext context;
Module* module = new Module("test", context);
vector<Type*> args;
args.push_back(Type::getInt32Ty(context));
FunctionType* ft = FunctionType::get(Type::getInt32Ty(context),
args, false);
Function* f = Function::Create(ft,
GlobalValue::ExternalLinkage,
"f", module);
Value* arg = f->arg_begin();
BasicBlock* bb = BasicBlock::Create(context, "entry&...
2017 Apr 08
3
How to insert vector type input parameter for function in C/C++ API?
Fantastic! It's working! Thank you so much Craig!!!
On Fri, Apr 7, 2017 at 6:05 PM, Craig Topper <craig.topper at gmail.com> wrote:
> It should be VectorType::get(Type::getInt32Ty(Context),4). You need the
> word "get" after VectorType::
>
> ~Craig
>
> On Fri, Apr 7, 2017 at 6:01 PM, Michael Choi <choimichael103 at gmail.com>
> wrote:
>
>> Thank you so much Craig!
>>
>> I tried it. But still complaining. Here is the e...
2012 Apr 12
0
[LLVMdev] detection of constant diagonal matrix * vector
...ConstantFP* constant = leftConst;
if (!rightConst->isZero())
{
index = rightIndex;
constant = rightConst;
}
newShuffleMask[i] = Builder->getInt32(index);
newConst[i] = constant;
noShuffle &= index == i;
}
// check if we made it through
if (i == numElements)
{
Value* newShuffle = noShuffle ? value :
Builder...
2014 Feb 21
12
[LLVMdev] asan coverage
...e =
CGM.GetAddrOfConstantCString(CGM.getMangledName(GD),
"__llvm_pgo_name");
MangledName = llvm::ConstantExpr::getBitCast(MangledName, Int8PtrTy);
- PGOBuilder.CreateCall3(EmitFunc, MangledName,
+ PGOBuilder.CreateCall4(EmitFunc, MangledName,
PGOBuilder.getInt32(NumRegionCounters),
- PGOBuilder.CreateBitCast(RegionCounters,
Int64PtrTy));
+ PGOBuilder.CreateBitCast(RegionCounters,
Int64PtrTy),
+ PGOBuilder.CreateBitCast(RegionPCs, Int64PtrTy));
}
llvm::Function *CodeGenPGO::emitIniti...
2012 Sep 05
1
[LLVMdev] Calling a function with a pointer to a global char array as argument
...kes a char pointer and return an
insteger.
I am doing the following in the code -
Function Creation:
PointerType* array =
PointerType::get(IntegerType::getInt8Ty(getGlobalContext())
/*CI->getPointerOperand()->getType()*/, 0);
printFunc = M.getOrInsertFunction("print",
IntegerType::getInt32Ty(getGlobalContext()), array, NULL);
Global Declaration:
Constant *fname = ConstantDataArray::getString(getGlobalContext(),"hi",
true);
Value *FBloc;
FBloc = new GlobalVariable(M,
fnam...
2014 Feb 19
2
[LLVMdev] asan coverage
I've built chromium with " -fprofile-instr-generate -fsanitize=address" --
the performance looks good!
The file format from r198638 is indeed rudimentary.
Do you already know how the real output format will look like?
Just to summarize what I think is important:
- minimal size on disk, minimal amount of files
- minimal i/o while writing to disk, no lockf or some such
-