similar to: [LLVMdev] Value* to Instruction*/LoadInst* casting

Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] Value* to Instruction*/LoadInst* casting"

2013 Jan 28
1
[LLVMdev] Value* to Instruction*/LoadInst* casting
Hi Alexandru, > The compilation error is : `error: ‘LD100’ was not declared in this scope.` > > On Mon, Jan 28, 2013 at 11:31 AM, Alexandru Ionut Diaconescu < > alexandruionutdiaconescu at gmail.com> wrote: > >> Hello everyone, >> >> Can you please tell me if it is possible in LLVM to cast a `Value*` to an >> `Instruction*/LoadInst*` if for example
2013 Jan 28
0
[LLVMdev] Value* to Instruction*/LoadInst* casting
The compilation error is : `error: ‘LD100’ was not declared in this scope.` On Mon, Jan 28, 2013 at 11:31 AM, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > Hello everyone, > > Can you please tell me if it is possible in LLVM to cast a `Value*` to an > `Instruction*/LoadInst*` if for example `isa<LoadInst>(MyValue)` is true? > In my
2013 Jan 28
0
[LLVMdev] Value* to Instruction*/LoadInst* casting
Alexandru Ionut Diaconescu wrote: > Hello everyone, > > Can you please tell me if it is possible in LLVM to cast a `Value*` to > an `Instruction*/LoadInst*` if for example `isa<LoadInst>(MyValue)` is > true? http://llvm.org/docs/ProgrammersManual.html#the-isa-cast-and-dyn-cast-templates In my particular piece of code: > > Value* V1 =
2013 Jan 11
0
[LLVMdev] llvm get Value* iterators
If I1->getOperand(0) is the load, then %c is its pointer argument available with: LoadInst *LD = cast<LoadInst>(I1->getOperand(0)); Value *C = LD->getPointerOperand(); On Fri, Jan 11, 2013 at 7:19 AM, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > Hello everyone ! > > In my LLVM pass, there is `Intruction* I1`. All the used
2013 Jan 11
3
[LLVMdev] llvm get Value* iterators
Hello everyone ! In my LLVM pass, there is `Intruction* I1`. All the used "I1"s are ICMP instructions. *I1->getOperand(0) returns a `Value*` type. From errs()<<"\n"<<*I1->getOperand(0)<<"\n"; //printed : %3 = load i32* %c, align 4 Printed as expected. But I want to use %c. Do you know how I can get %c ? I need to use the value %c in
2013 Mar 05
5
[LLVMdev] LLVM load instruction query
HI, I am creating a pass that will pass loaded value by load instruction to an external function. I don't know how to do it.Please Help.
2014 Feb 01
3
[LLVMdev] LoadInst result
Folks, I have a LLVM instruction like the following %0 = load i32** %pp, align 8 I have a LoadInst &inst handle to this instruction. In addition, i could access the pointer being loaded from using the inst.getPointerOperand... However, is there a way to access the handle to the value being loaded? Essentially, i wanted to access the %0 in the statement listed. The end goal is
2013 Mar 04
2
[LLVMdev] llvm cannot iterate a [3 x i8]
Hello everyone, I am trying to "parse" a part of LLVM IR. More exactly, from @.str = private unnamed_addr constant [3 x i8] c"DS\00", section "llvm.metadata" I want to get "DS". It is the single place in the whole bytecode from where I can get it. I have : ... Value *VV = cast<Value>(LD100->getOperand(1)->getOperand(0));
2018 Feb 06
2
6 separate instances of static getPointerOperand(). Time to consolidate?
LLVM friends, I'm currently trying to make LoopVectorizationLegality class in Transform/Vectorize/LoopVectorize.cpp more modular and eventually move it to Analysis directory tree. It uses several file scope helper functions that do not really belong to LoopVectorize. Let me start from getPointerOperand(). Within LLVM, there are five other similar functions defined. I think it's time to
2018 Feb 06
0
6 separate instances of static getPointerOperand(). Time to consolidate?
"Saito, Hideki via llvm-dev" <llvm-dev at lists.llvm.org> writes: > LLVM friends, > > I'm currently trying to make LoopVectorizationLegality class in > Transform/Vectorize/LoopVectorize.cpp more modular and eventually move > it to Analysis directory tree. It uses several file scope helper > functions that do not really belong to LoopVectorize. Let me start
2018 Feb 06
1
6 separate instances of static getPointerOperand(). Time to consolidate?
What LoopVectorize.cpp has are the following. Each function may have to have a separate consolidation discussion. I'm bringing up getpointerOperand() since I actually found multiple instances defined/used. DependenceAnalysis.cpp has isLoadOrStore(). LoopAccessAnalysis.cpp has getAddressSpaceOperand(). I'm sure there are others that might be worth discussing within this thread or a follow
2013 Jan 25
0
[LLVMdev] llvm alloca dependencies
Hello Duncan, I compiled LLVM without optimizations (because maybe I have to look to memory accesses in the future). Maybe some of these optimizations I can enable when I am running my pass with opt ? It is still one thing that I don't understand. If the memory accesses will be eliminated, and I have the following situation: %i = alloca i32, align 4 %j = alloca i32, align 4 ..... %2 = load
2013 Jan 25
2
[LLVMdev] llvm alloca dependencies
Hi Alexandru, On 25/01/13 10:23, Alexandru Ionut Diaconescu wrote: > Thank you a lot for your response. I will try to use your approach with chasing > back along def-use chains to find instructions that define the registers used in > the load. Can you tell me please what class/methods/existing path are good for > this? I assume that I must have a method with arguments like the
2011 Nov 17
2
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
On 11/17/2011 12:38 AM, Hal Finkel wrote: > Tobias, et al., > > Attached is the my autovectorization pass. Very nice. Will you be at the developer summit? Maybe we could discuss the integration there? Here a first review of the source code. > diff --git a/docs/Passes.html b/docs/Passes.html > index 5c42f3f..076effa 100644 > --- a/docs/Passes.html > +++ b/docs/Passes.html
2011 Oct 12
1
[LLVMdev] getting object from BitCastInst?
My pass is looking at StoreInsts acting on global variable that happen to be function pointers. From these StoreInsts I would like to get useful information(the function used if a direct assignment, function pointer used, etc) from the getValueOperand() method. Looking through several examples I see that this can return several things like: GlobalVariable, Function, LoadInst or BitCastInst
2013 Jan 10
1
[LLVMdev] LLVM Instruction to ICmpInst conversion
Hello ! I want some piece of advice regarding a LLVM pass. My particular problem is: There is a method bool patternDC::runOnFunction(Function &F) { ... if ( CC->operEquiv(icmpInstrArray[i], icmpInstrArray[j]) ) {...} ... } having the array elements of type Instruction* : http://llvm.org/doxygen/classllvm_1_1Instruction.html The called method is bool
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
2009 May 21
3
[LLVMdev] Passing a pointer to a function
I recently began hacking around with my first LLVM pass. The big picture is that I would like to insert function calls for each instruction type, and pass some parameters based on the instruction type. Then I will link the output to some C file that implements those functions. Things were going well until I started trying to make function calls with a pointer as a parameter. For example, I would
2014 Feb 03
2
[LLVMdev] LoadInst result
Thanks Sean. It clarified my query. Do you have an answer to my other question (in a different mail-chain) listed below Is there a simple way to check if a given instruction operand (represented by Value *) is a virtual register or otherwise? Context: I am creating a ModulePass for pointer Analysis. BR/Nizam From: "Sean Silva" <chisophugis at gmail.com> To: nizam
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