search for: getintrinsicid

Displaying 20 results from an estimated 70 matches for "getintrinsicid".

2009 Oct 17
1
[LLVMdev] getIntrinsicID() optimization
Hi Chris, Function is currently 108 bytes large. Could 4 more bytes really be an issue? Actually 2 should suffice. While I understand that some applications value storage more than anything, many applications value compilation time very highly. getIntrinsicID is called all over the place (isIntrinsic uses it as well), and every single time it checks the function name. To me that sounds a lot more dramatic than 2 bytes. Anyway, using SubclassData could work. It's already being used for the calling convention, which has values ranging from 0 to 68...
2009 Oct 17
2
[LLVMdev] getIntrinsicID() optimization, mark 2
Any takers? This patch improves on the previous one by making getIntrinsicID() inline. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091017/9406e0ad/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: FastIntrinsicID-2.patch Type:...
2009 Oct 17
1
[LLVMdev] getIntrinsicID() optimization, mark 2
...function's name changes, but the real question we should ask is do we really want to be able to change the intrinsicID by changing the function's name? Also, the original Function constructor contains this code: // Ensure intrinsics have the right parameter attributes. if (unsigned IID = getIntrinsicID()) setAttributes(Intrinsic::getAttributes(Intrinsic::ID(IID))); Note that if you hypothetically changed an intrinsic's name it's parameter attributes could potentially become invalid... It seems to me that intrinsic names were never intended to be changed in the first place. That soun...
2009 Oct 17
0
[LLVMdev] getIntrinsicID() optimization, mark 2
...d add a test that calls setName("intrinsic.name") to make sure this keeps working, regardless of where this patch goes. You might be able to catch such events in the ValueSymbolTable and update the intrinsic ID, but I can't find an obvious place to put that code. I also noticed that getIntrinsicID (implemented in Intrinsics.gen) is a switch statement on the first letter of the intrinsic name plus a long series of if (Len == 16 && !memcmp(Name, "llvm.alpha.umulh", 16)) return Intrinsic::alpha_umulh; if (Len > 15 && !memcmp(Name, "llvm.annotation.&quot...
2009 Oct 16
2
[LLVMdev] getIntrinsicID() optimization
Hi all, While profiling I discovered that the Function::getIntrinsicID() method is called a lot, and every time it uses string comparison to recompute the ID number. As far as I know the name of an intrinsic function doesn't change, so the ID could be determined just once at Function construction time. I've attached a patch that does this and it appears to...
2009 Oct 17
0
[LLVMdev] getIntrinsicID() optimization
On Oct 16, 2009, at 5:50 AM, Nicolas Capens wrote: > Hi all, > > While profiling I discovered that the Function::getIntrinsicID() > method is called a lot, and every time it uses string comparison to > recompute the ID number. As far as I know the name of an intrinsic > function doesn’t change, so the ID could be determined just once at > Function construction time. > > I’ve attached a patch that d...
2015 Jan 31
2
[LLVMdev] debug info for llvm::IntrinsicInst ???
...member functions or even display the class. (gdb) list 1337 1332 1333 // Finish off the call including any return values. 1334 return finishCall(CLI, RetVT, NumBytes); 1335 } 1336 1337 bool MipsFastISel::fastLowerIntrinsicCall(const IntrinsicInst *II) { 1338 switch (II->getIntrinsicID()) { 1339 default: 1340 return false; 1341 case Intrinsic::bswap: { (gdb) print II $10 = (const llvm::IntrinsicInst *) 0x61b8ec8 (gdb) print *II $11 = <incomplete type> (gdb) call II->getIntrinsicID() Couldn't find method llvm::IntrinsicInst::getIntrinsicID (gdb) How...
2015 Jan 31
2
[LLVMdev] debug info for llvm::IntrinsicInst ???
...1332 > 1333 // Finish off the call including any return values. > 1334 return finishCall(CLI, RetVT, NumBytes); > 1335 } > 1336 > 1337 bool MipsFastISel::fastLowerIntrinsicCall(const > IntrinsicInst *II) { > 1338 switch (II->getIntrinsicID()) { > 1339 default: > 1340 return false; > 1341 case Intrinsic::bswap: { > (gdb) print II > $10 = (const llvm::IntrinsicInst *) 0x61b8ec8 > (gdb) print *II > $11 = <incomplete type> > (gdb) call II->getIntrinsicID()...
2015 Jan 31
0
[LLVMdev] debug info for llvm::IntrinsicInst ???
...gt; > (gdb) list 1337 > 1332 > 1333 // Finish off the call including any return values. > 1334 return finishCall(CLI, RetVT, NumBytes); > 1335 } > 1336 > 1337 bool MipsFastISel::fastLowerIntrinsicCall(const IntrinsicInst > *II) { > 1338 switch (II->getIntrinsicID()) { > 1339 default: > 1340 return false; > 1341 case Intrinsic::bswap: { > (gdb) print II > $10 = (const llvm::IntrinsicInst *) 0x61b8ec8 > (gdb) print *II > $11 = <incomplete type> > (gdb) call II->getIntrinsicID() > Couldn't find method ll...
2015 Jan 31
0
[LLVMdev] debug info for llvm::IntrinsicInst ???
...; 1332 >> 1333 // Finish off the call including any return values. >> 1334 return finishCall(CLI, RetVT, NumBytes); >> 1335 } >> 1336 >> 1337 bool MipsFastISel::fastLowerIntrinsicCall(const IntrinsicInst >> *II) { >> 1338 switch (II->getIntrinsicID()) { >> 1339 default: >> 1340 return false; >> 1341 case Intrinsic::bswap: { >> (gdb) print II >> $10 = (const llvm::IntrinsicInst *) 0x61b8ec8 >> (gdb) print *II >> $11 = <incomplete type> >> (gdb) call II->getIntrinsicID()...
2006 Apr 13
0
[LLVMdev] Re: Creating Release 1.7 Branch at 1:00pm PDT
...nto the branch: > > Running /proj/llvm/build/../llvm/test/Regression/CFrontend/dg.exp ... > FAIL: /proj/llvm/build/../llvm/test/Regression/CFrontend/2004-02-12- > LargeAggregateCopy.c.tr: > gccas: /proj/llvm/build/../llvm/lib/VMCore/Function.cpp:266: unsigned > int llvm::Function::getIntrinsicID() const: Assertion `0 && "Unknown > LLVM intrinsic function!"' failed. > gccas((anonymous namespace)::PrintStackTrace()+0x1a)[0x85a0ebe] > gccas((anonymous namespace)::SignalHandler(int)+0xd3)[0x85a1187] > [0xb7faa420] > [0xb7faa402] > /lib/tls/libc.so.6(gsig...
2006 Apr 13
2
[LLVMdev] Re: Creating Release 1.7 Branch at 1:00pm PDT
...> Running /proj/llvm/build/../llvm/test/Regression/CFrontend/dg.exp ... > > FAIL: /proj/llvm/build/../llvm/test/Regression/CFrontend/2004-02-12- > > LargeAggregateCopy.c.tr: > > gccas: /proj/llvm/build/../llvm/lib/VMCore/Function.cpp:266: unsigned > > int llvm::Function::getIntrinsicID() const: Assertion `0 && "Unknown > > LLVM intrinsic function!"' failed. > > gccas((anonymous namespace)::PrintStackTrace()+0x1a)[0x85a0ebe] > > gccas((anonymous namespace)::SignalHandler(int)+0xd3)[0x85a1187] > > [0xb7faa420] > > [0xb7faa402] &gt...
2004 Apr 14
1
[LLVMdev] Unknown LLVM intrinsic
...* %t12, sbyte* %t13, uint %t9, uint 0) However when trying to compile the llvm program I get this: cpp -I/home/class/cs326/mp/mp2/lib cgen_test.ll | sed -e"s/#.*//" > cgen_test.bc.exp llvm-as -f -o cgen_test.bc cgen_test.bc.exp llvm-as: Function.cpp:232: unsigned int llvm::Function::getIntrinsicID() const: Assertion `0 && "Unknown LLVM intrinsic function!"' failed. make: *** [cgen_test.bc] Aborted (core dumped) Is there something I missed about using intrinsic functions? Thanks, Andrew
2008 Apr 21
0
[LLVMdev] Small problem with intrinsics
...ns about them. As an extreme example, @llvm.gcroot generates no code whatsoever at the call site, but influences codegen; you can't do AOP transformations upon it as you propose without utterly breaking its semantics. The only safe course is to exclude call or invoke instructions where getIntrinsicID() != 0 from your transformation. For intrinsics that you do recognize, you can special-case them. In this case, you can do the equivalent of: template <int align> mymemcpy(...) { @llvm.memcpy(..., align); } — Gordon -------------- next part -------------- An HTML attachment was sc...
2008 Apr 21
2
[LLVMdev] Small problem with intrinsics
Hi Nicolas, > I guess that's because the value of the last argument of llvm.memcpy has > to be known at compile time. Hmmm ok, that's understandable, but it's also a bit of a problem for me. I am writing a pass that creates a 'shadow' copy of each function, so that I can do some bookkeeping with it, and then call the original function afterwards. This would include
2006 Apr 13
3
[LLVMdev] Re: Creating Release 1.7 Branch at 1:00pm PDT
...fter all updates that went into the branch: Running /proj/llvm/build/../llvm/test/Regression/CFrontend/dg.exp ... FAIL: /proj/llvm/build/../llvm/test/Regression/CFrontend/2004-02-12- LargeAggregateCopy.c.tr: gccas: /proj/llvm/build/../llvm/lib/VMCore/Function.cpp:266: unsigned int llvm::Function::getIntrinsicID() const: Assertion `0 && "Unknown LLVM intrinsic function!"' failed. gccas((anonymous namespace)::PrintStackTrace()+0x1a)[0x85a0ebe] gccas((anonymous namespace)::SignalHandler(int)+0xd3)[0x85a1187] [0xb7faa420] [0xb7faa402] /lib/tls/libc.so.6(gsignal+0x55)[0x7e77d5] /lib/tls/l...
2014 Nov 05
3
[LLVMdev] How to lower the intrinsic function 'llvm.objectsize'?
...g to lower this intrinsic function to a constant in a pass. Below is the code snippet that I wrote: for (BasicBlock::iterator i = b.begin(), ie = b.end(); (i != ie) && (block_split == false);) { IntrinsicInst *ii = dyn_cast<IntrinsicInst>(&*i); ++i; if(ii) { switch (ii->getIntrinsicID()) { case Intrinsic::objectsize: { IRBuilder<> builder(ii->getParent(), ii); Value *op1 = ii->getArgOperand(0); //i8* uint64_t bit_size = op1->getType()->getPointerElementType()->getPrimitiveSizeInBits(); Value *result = ConstantInt::get(ii->getType(), bit_size...
2009 Jun 23
2
[LLVMdev] How to add a trivial LLVM intrinsic
....intrinsic"); int bar (int blah) { return llvm_test_intrinsic (blah); } int main() { int x = 3; bar (x); return 0; } ----------------- After invoking: llvm-gcc -g test.c -o test.native ----------------- The compiler returns: cc1: Function.cpp:323: unsigned int llvm::Function::getIntrinsicID(bool) const: Assertion `noAssert && "Invalid LLVM intrinsic name"' failed. test.c:24: internal compiler error: Aborted Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://developer.apple.com/bugreporter> for instructions. -----------...
2014 Nov 05
3
[LLVMdev] lifetime.start/end clarification
...t; // lifetime intrinsics and so we strip them (and the bitcasts+GEPs > // leading to them) here. Eventually it should use them to optimize > the > // scalar values produced. > if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) { > assert(II->getIntrinsicID() == Intrinsic::lifetime_start || > II->getIntrinsicID() == Intrinsic::lifetime_end); > II->eraseFromParent(); > continue; > } > > we need to go through the various places that might delete these > intrinsics and fix them. The same wil...
2006 Apr 13
0
[LLVMdev] Re: Creating Release 1.7 Branch at 1:00pm PDT
...g /proj/llvm/build/../llvm/test/Regression/CFrontend/dg.exp ... >>> FAIL: /proj/llvm/build/../llvm/test/Regression/CFrontend/2004-02-12- >>> LargeAggregateCopy.c.tr: >>> gccas: /proj/llvm/build/../llvm/lib/VMCore/Function.cpp:266: unsigned >>> int llvm::Function::getIntrinsicID() const: Assertion `0 && "Unknown >>> LLVM intrinsic function!"' failed. >>> gccas((anonymous namespace)::PrintStackTrace()+0x1a)[0x85a0ebe] >>> gccas((anonymous namespace)::SignalHandler(int)+0xd3)[0x85a1187] >>> [0xb7faa420] >>> [...