search for: conststr

Displaying 5 results from an estimated 5 matches for "conststr".

Did you mean: constptr
2006 Jun 25
1
[LLVMdev] adding args to func call
...o? I can't find any more documentation on this. Thanks! Another question in reference to Ryan's post, can someone explain the purpose of this code, in particular the last 4 lines? Are the duplicate lines intentional? /* m is Module*, f is Function*, i is Instruction* */ Constant* constStr = ConstantArray::get("test\n"); GlobalVariable* gv = new GlobalVariable (constStr->getType(), true, GlobalValue::InternalLinkage, constStr, "", m); std::vector<Constant*> geplist; geplist.push_back(ConstantUInt::get(Type::UIntTy,0)); geplist.push_...
2006 May 01
0
[LLVMdev] printf decleration
...t out. I talked to someone, and we figured out that when I make a call to printf with a constant string, I need to make a global variable and use getElementPtr to reference it. The modified call for accessing the printf is: /* m is Module*, f is Function*, i is Instruction* */ Constant* constStr = ConstantArray::get("test\n"); GlobalVariable* gv = new GlobalVariable (constStr->getType(), true, GlobalValue::InternalLinkage, constStr, "", m); std::vector<Constant*> geplist; geplist.push_back(ConstantUInt::get(Type::UIntTy,0)); geplist.push_...
2006 May 01
2
[LLVMdev] printf decleration
I am writing a pass where I need to make a function deceleration for printf. Below is the code I'm trying to use. ----- bool MyPass::runOnModule(Module &m) { vector<const Type*> args; args.push_back(PointerType::get(Type::SByteTy)); Function* f = m.getOrInsertFunction("printf", FunctionType::get(Type::IntTy, args, true)); ----- When I insert a call
2006 Jun 30
1
[LLVMdev] instruction sequence
...FILE* %tmp.1, sbyte* getelementptr ([6 x sbyte]* %.str_1, int 0, int 0)) ; ty=int %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% I essentially modified the code example from Ryan Lefever's post on May 1, 2006. Here's a snippet of my code: **************************************** Constant* constStr = ConstantArray::get("test\n"); GlobalVariable* gv = new GlobalVariable (constStr->getType(), true, GlobalValue::InternalLinkage, constStr, "", MP); std::vector<Constant*> geplist; geplist.push_back(ConstantUInt::get(Type::UIntTy,0)); geplist.push...
2017 Apr 28
2
RFC: Improving performance of HashString
According to... https://github.com/rurban/smhasher/blob/master/README.md Bernstein has quality problems (while xx is as good as you get in a non-crypto hash), and xx is 7x (32 bit) - 12x (64 bit) faster. That's on long strings. It would be worth checking the startup overhead for typically short identifiers in programs. See later on in the README: "When used in a hash table the