search for: createxyz

Displaying 8 results from an estimated 8 matches for "createxyz".

Did you mean: createxml
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
...cause if might be add/sub/mul... operations. > > I don't think there is. Realistically, just blindly replacing > instructions with vector equivalents is only going to work in a few > cases anyway. You're probably best to intentionally detect those cases > and call the correct CreateXYZ function. > > Cheers. > > Tim. > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150416/20d07fab/attachment.html>
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
Value * is the instruction. use dyn_cast<Instruction> to get to it. On Thu, Apr 16, 2015 at 11:39 PM zhi chen <zchenhn at gmail.com> wrote: > But IRBuilder.CreateXYZ only returns a "VALUE" type. Can I get the > instruction created by it? For example, > > IRBuilder<> builder(&*pinst); > Value *val = builder.CreateFAdd(LV, RV, ""); > > How can I get the fadd instruction created by builder? > > On Thu, Apr 16,...
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
...el Berlin <dberlin at dberlin.org> > wrote: > >> Value * is the instruction. >> >> use dyn_cast<Instruction> to get to it. >> >> >> On Thu, Apr 16, 2015 at 11:39 PM zhi chen <zchenhn at gmail.com> wrote: >> >>> But IRBuilder.CreateXYZ only returns a "VALUE" type. Can I get the >>> instruction created by it? For example, >>> >>> IRBuilder<> builder(&*pinst); >>> Value *val = builder.CreateFAdd(LV, RV, ""); >>> >>> How can I get the fadd instructio...
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
...the instruction. >> >> use dyn_cast<Instruction> to get to it. >> >> >> On Thu, Apr 16, 2015 at 11:39 PM zhi chen <zchenhn at gmail.com >> <mailto:zchenhn at gmail.com>> wrote: >> >> But IRBuilder.CreateXYZ only returns a "VALUE" type. Can I >> get the instruction created by it? For example, >> >> IRBuilder<> builder(&*pinst); >> Value *val = builder.CreateFAdd(LV, RV, ""); >> >> How can I...
2018 Jan 16
0
Why do backend pass definitions call a seperate function just to call the constructor?
...g it this way instead of just calling `new > ARMExpandPseudo` in any place that you would have called this function? Mostly it's so that everything that relies on knowing the class definition and layout is restricted to a single file. The interface to the rest of LLVM is just a single "createXYZ" standalone function. That speeds up build times and is generally good for abstraction. Cheers. Tim.
2018 Jan 16
2
Why do backend pass definitions call a seperate function just to call the constructor?
Things like this in `lib/Target/ARM/ARMExpandPseudoInsts.cpp` FunctionPass *llvm::createARMExpandPseudoPass() { > return new ARMExpandPseudo(); > } And other functions have basically the same style. What's the point of doing it this way instead of just calling `new ARMExpandPseudo` in any place that you would have called this function? -- Ahmed Samara M.S. Computer Engineering
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
...>> On Thu, Apr 16, 2015 at 11:39 PM zhi chen >> <zchenhn at gmail.com <mailto:zchenhn at gmail.com> >> <mailto:zchenhn at gmail.com <mailto:zchenhn at gmail.com>>> wrote: >> >> But IRBuilder.CreateXYZ only returns a "VALUE" >> type. Can I >> get the instruction created by it? For example, >> >> IRBuilder<> builder(&*pinst); >> Value *val = builder.CreateFAdd(LV, RV, "&quo...
2015 Apr 17
3
[LLVMdev] how to use "new instruction()"
Thanks, Tim. What I want to do is to change the scalar instructions to scalar ones. For example, if I have to the following one: %3 = fadd double %1, double %2 I want to change it into %6 = fadd <2 x double> %4, double %2. I understand that I can detect the operation first, and use "create" to create for each of them. But I don't if there is a generic way to do this because