search for: aend

Displaying 13 results from an estimated 13 matches for "aend".

Did you mean: _end
2009 Jun 18
2
[LLVMdev] Referring to an argument in another function
I would like to instrument certain function calls with a function call of my own that takes some of the same arguments. For example, I would like to instrument calls to free with some function foo, so the C code would look like: foo(myarg1, myarg2, ptr); free(ptr); The problem occurs when I grab the arg from the free function and try to pass it to foo... if (isCallToFree(&I)) { Value*
2009 Jun 18
0
[LLVMdev] Referring to an argument in another function
...on, not the arguments of the function being called. So if you're sure it's a call or invoke (not a 'free' instruction), try something like this: #include "llvm/Support/CallSite.h" // ... CallSite CS(&I); CallSite::arg_iterator ait = CS.arg_begin(), aend = CS.arg_end(); > if (ait) { You want if (ait != aend) { here. > P = &(*ait); > } > createCallInst(mem_fcall, &I, 3, getOpcodeValue(I), > getInstrIDValue(), P); > } > } > > createCallInst is my own...
2002 Dec 02
1
[LLVMdev] Function Formal parameters
can we assume that for(Function::aiterator I = F.abegin(); E = F.aend(); I!=E; ++I) { .... } or Argument *FA = &F.afront(); do { FA = FA->getNext(); .... } while (FA != &F.aback()); would iterate over function "F" formal parameters in order? All the tests I've run so far indicate so, but unless it is guaranteed, I don...
2010 Apr 21
12
Using AR.connection.execute(sql) -- messing with my string?
...to use near ''DELIMITER $$ ==== FWIW, I''ve pawed over the sources and see that mysql_adapter''s execute() calls @connection(query), but I lose the thread after that. Here''s the function (some lines elided for brevity): ==== sql = <<SQL -- COVERAGE(astart, aend, bstart, bend) -- DELIMITER $$ DROP FUNCTION IF EXISTS `coverage`$$ CREATE FUNCTION `coverage`(abeg DATETIME, aend DATETIME, bbeg DATETIME, bend DATETIME) RETURNS FLOAT DETERMINISTIC BEGIN <snip> END; $$ DELIMITER ; SQL ActiveRecord::Base.establish_connection ActiveRecord::Base.connec...
2004 Aug 17
5
[LLVMdev] JIT API example (fibonacci)
...// Get pointers to the constants ... > > Value *One = ConstantSInt::get(Type::IntTy, 1); > > Value *Two = ConstantSInt::get(Type::IntTy, 2); > > > > // Get pointers to the integer argument of the add1 function... > > assert(FibF->abegin() != FibF->aend()); // Make sure there's an arg > > > > Argument &ArgX = FibF->afront(); // Get the arg > > ArgX.setName("AnArg"); // Give it a nice symbolic name for fun. > > > > SetCondInst* CondInst > > = new SetCondInst( Ins...
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
...FibF); > > // Get pointers to the constants ... > Value *One = ConstantSInt::get(Type::IntTy, 1); > Value *Two = ConstantSInt::get(Type::IntTy, 2); > > // Get pointers to the integer argument of the add1 function... > assert(FibF->abegin() != FibF->aend()); // Make sure there's an arg > > Argument &ArgX = FibF->afront(); // Get the arg > ArgX.setName("AnArg"); // Give it a nice symbolic name for fun. > > SetCondInst* CondInst > = new SetCondInst( Instruction::SetLE, >...
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
...ters to the constants ... >>> Value *One = ConstantSInt::get(Type::IntTy, 1); >>> Value *Two = ConstantSInt::get(Type::IntTy, 2); >>> >>> // Get pointers to the integer argument of the add1 function... >>> assert(FibF->abegin() != FibF->aend()); // Make sure there's an arg >>> >>> Argument &ArgX = FibF->afront(); // Get the arg >>> ArgX.setName("AnArg"); // Give it a nice symbolic name for fun. >>> >>> SetCondInst* CondInst >>> = new Se...
2004 Aug 18
1
[LLVMdev] JIT API example (fibonacci)
...> >>> Value *One = ConstantSInt::get(Type::IntTy, 1); > >>> Value *Two = ConstantSInt::get(Type::IntTy, 2); > >>> > >>> // Get pointers to the integer argument of the add1 function... > >>> assert(FibF->abegin() != FibF->aend()); // Make sure there's an arg > >>> > >>> Argument &ArgX = FibF->afront(); // Get the arg > >>> ArgX.setName("AnArg"); // Give it a nice symbolic name for fun. > >>> > >>> SetCondInst* CondInst &...
2005 Jan 11
2
[LLVMdev] Loop IR insertion
Hi, I am trying to insert a Loop IR into the existed bytecode file. insertion part by C code, char *p[n]; // pointer array for storing the address of strings int i; for(i=0;i<n;i++){ (p[i])[2] = (p[i])[2] ^ 0x27; } My questions are 1. for local variable 'char *p[n]' , it is represented by IR as alloca ...., so could I insert local variable (pointer array) directly as same way
2004 Aug 17
4
[LLVMdev] JIT API example (fibonacci)
Hi LLVMers, the example attached I have used to prove that JIT and some visible optimizations are really invoked. Proved OK. I got 30% speed-up in comparison to gcc 3.3.3 on my Athlon XP 1500. Nice. P.S. guys, no fears, I don't plan to flood the cvs repository with my "brilliant" examples ;) --- Valery A.Khamenya -------------- next part -------------- An
2004 Aug 10
1
[LLVMdev] API on JIT, code snippets
...cBlock("EntryBlock of add1 function", Add1F); > > // Get pointers to the constant `1'... > Value *One = ConstantSInt::get(Type::IntTy, 1); > > // Get pointers to the integer argument of the add1 function... > assert(Add1F->abegin() != Add1F->aend()); // Make sure there's an arg > Argument &ArgX = Add1F->afront(); // Get the arg > > // Create the add instruction... does not insert... > Instruction *Add = BinaryOperator::create(Instruction::Add, One, &ArgX, >...
2004 Aug 10
0
[LLVMdev] API on JIT, code snippets
Reid Spencer, thank you for your quick responce, finally i got to my PC at home. You wrote: > Attached are three files: "valery.cpp" which contains your original, > "reid.cpp" which contains corrections to most of the FIXME items and > "diffs" which shows the differences between them. The differences > should be instructive on what to do. You were
2004 Aug 09
5
[LLVMdev] API on JIT, code snippets
Valery, Attached are three files: "valery.cpp" which contains your original, "reid.cpp" which contains corrections to most of the FIXME items and "diffs" which shows the differences between them. The differences should be instructive on what to do. You were really, really close .. just a few details changing. The code in "reid.cpp" compiles but I