search for: iscast

Displaying 15 results from an estimated 15 matches for "iscast".

2014 Sep 01
2
[LLVMdev] Instrumenting Various Types Using Single Instrumentation Function
...to create different instrumentation functions for different data types. Can I cast say i32 value to NumericType value in my instrumentation code, without inserting additional instructions in my benchmark code. I tried inserting bitcast instructions and it doesn't work for me... if(!CastInst::isCastable(Lvals[j]->getType(), UnionVar->getType())){ errs()<<"CAST TO NumericType NOT POSSIBLE\n"; exit(0); } CastInst *I = CastInst::CreateZExtOrBitCast(Lvals[j], UnionVar->getType(), "", F); Is this even possible or some other method will be bet...
2011 Nov 17
2
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...gt; + } if (LoadInst *Load = dyn_cast<LoadInst>(I)) { isLdStr = Load->isSimple(); } else if (StoreInst *Store = dyn_cast<StoreInst>(I)) { isLdStr = Store->isSimple(); } > + > + // We can vectorize casts, but not casts of pointer types, etc. > + bool isCast = false; > + if (I->isCast()) { > + isCast = true; > + if (!cast<CastInst>(I)->getSrcTy()->isSingleValueType()) { > + isCast = false; > + } else if (!cast<CastInst>(I)->getDestTy()->isSingleValueType()) { > + i...
2011 Nov 21
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...ast<LoadInst>(I)) { > isLdStr = Load->isSimple(); > } else if (StoreInst *Store = dyn_cast<StoreInst>(I)) { > isLdStr = Store->isSimple(); > } > > > + > > + // We can vectorize casts, but not casts of pointer types, etc. > > + bool isCast = false; > > + if (I->isCast()) { > > + isCast = true; > > + if (!cast<CastInst>(I)->getSrcTy()->isSingleValueType()) { > > + isCast = false; > > + } else if (!cast<CastInst>(I)->getDestTy()->isSingleValueTy...
2016 Jul 22
2
HEAD compilation causes gcc internal error
After worked around the problem in SimplifyCFG.cpp (calling isCast() instead of comparing opcode), I hit another gcc crash for FunctionImport.cpp line 480, which I have no idea what's wrong with the code. "Luckily", I found gcc4.8.2 and gave it a try, both crashes are gone. *New problem though:* /llvm-clang-trunk/src/tools/clang/lib/CodeGen/CGBuilti...
2011 Nov 16
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
Tobias, et al., Attached is the my autovectorization pass. I've fixed a bug that appears when using -bb-vectorize-aligned-only, fixed some 80-col violations, etc., and at least on x86_64, all test cases pass except for a few; and all of these failures look like instruction-selection bugs. For example: MultiSource/Applications/ClamAV - fails to compile shared_sha256.c with an error: error in
2011 Nov 15
3
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
Tobias, I've attached the latest version of my autovectorization patch. I was able to add support for using the ScalarEvolution analysis for load/store pairing (thanks for your help!). This led to a modest performance increase and a modest compile-time increase. This version also has a cutoff as you suggested (although the default value is set high (4000 instructions between pairs) because
2010 Jul 15
1
[LLVMdev] Figuring out the parameters of the Call Instruction
Hi Duncan, Thanks for pointing out my mistake. I will reword my questions. //C code int var1; //global int a, b; foo(a, b); bar(c); generates following //LLVM IR %1 = load a; %2 = load b; call foo(%1, %2) call bar(@var1) CallInst.getOperand(1).getNameStr() on foo, returns null, but on bar returns var1. Similarly, for call void @p_ptr(i64 ptrtoint (%struct.my_struct* @abc to i64)) nounwind,
2019 Dec 19
2
Moving to ORCv2 - Where are my global constructors and destructors?
...nd(n); if(!CS) { continue; } llvm::Constant *FP = CS->getOperand(1); if(FP->isNullValue()) continue; llvm::ConstantExpr *CE = (llvm::ConstantExpr*)FP; if(CE->isCast()) { FP = CE->getOperand(0); } ((llvm::Function*)FP)->getName(); } } I then printed the name of the llvm::Function but it was exactly the name I expected "_GLOBAL__sub_I_VectorBIOS.cpp". This code was executed before...
2011 Dec 02
5
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...IsSimpleLoadStore = false; return false; } } else if (StorInst *S = dyn_cast<StoreInst>(S)) { if (!S->isSimple() || NoMemOps) { IsSimpleLoadStore = false; return false; } } > + // We can vectorize casts, but not casts of pointer types, etc. > + bool IsCast = false; > + if (I->isCast()) { > + IsCast = true; > + if (!cast<CastInst>(I)->getSrcTy()->isSingleValueType()) { > + IsCast = false; > + } else if (!cast<CastInst>(I)->getDestTy()->isSingleValueType()) { > + IsCast = fals...
2011 Dec 14
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...> } > } else if (StorInst *S = dyn_cast<StoreInst>(S)) { > if (!S->isSimple() || NoMemOps) { > IsSimpleLoadStore = false; > return false; > } > } > > > + // We can vectorize casts, but not casts of pointer types, etc. > > + bool IsCast = false; > > + if (I->isCast()) { > > + IsCast = true; > > + if (!cast<CastInst>(I)->getSrcTy()->isSingleValueType()) { > > + IsCast = false; > > + } else if (!cast<CastInst>(I)->getDestTy()->isSingleValueType()) { &g...
2011 Nov 23
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
On Mon, 2011-11-21 at 21:22 -0600, Hal Finkel wrote: > On Mon, 2011-11-21 at 11:55 -0600, Hal Finkel wrote: > > Tobias, > > > > I've attached an updated patch. It contains a few bug fixes and many > > (refactoring and coding-convention) changes inspired by your comments. > > > > I'm currently trying to fix the bug responsible for causing a compile
2011 Dec 02
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...> } > } else if (StorInst *S = dyn_cast<StoreInst>(S)) { > if (!S->isSimple() || NoMemOps) { > IsSimpleLoadStore = false; > return false; > } > } > > > + // We can vectorize casts, but not casts of pointer types, etc. > > + bool IsCast = false; > > + if (I->isCast()) { > > + IsCast = true; > > + if (!cast<CastInst>(I)->getSrcTy()->isSingleValueType()) { > > + IsCast = false; > > + } else if (!cast<CastInst>(I)->getDestTy()->isSingleValueType()) { &g...
2011 Nov 22
5
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
On Mon, 2011-11-21 at 11:55 -0600, Hal Finkel wrote: > Tobias, > > I've attached an updated patch. It contains a few bug fixes and many > (refactoring and coding-convention) changes inspired by your comments. > > I'm currently trying to fix the bug responsible for causing a compile > failure when compiling >
2016 Jul 22
2
HEAD compilation causes gcc internal error
Sure this is more likely a gcc bug. However, same toolchain compiled without any problems a week ago. Also, in some organizations, upgrading gcc is very hard if not impossible. On Fri, Jul 22, 2016 at 11:11 AM, Paulo Matos via llvm-dev < llvm-dev at lists.llvm.org> wrote: > > > On 22/07/16 20:08, Welson Sun via llvm-dev wrote: > > This is gcc4.8.0 compiling HEAD synced on
2012 Jan 27
3
[LLVMdev] How to get the string value?
Thanks Duncan, Yes, it is a ConstantExpr! Thank you! Now trying to find a clue in ConstantExpr's functions to get that string :-) Regards, Welson On Thu, Jan 26, 2012 at 9:04 PM, Duncan Sands <baldrick at free.fr> wrote: > Hi Welson Sun, > > > Hi, if I have some LLVM code like this: > > > > @.str = private unnamed_addr constant [7 x i8]