search for: constructalignmentfromint

Displaying 9 results from an estimated 9 matches for "constructalignmentfromint".

2008 Apr 26
2
[LLVMdev] ParamAttr Patch - Alignment fix
...============================ > > --- lib/VMCore/Core.cpp (revision 50213) > > +++ lib/VMCore/Core.cpp (working copy) > > +void LLVMSetParamAlignment(LLVMValueRef Arg, unsigned align) > > +{ > > + unwrap<Argument>(Arg)->addAttr( > > + ParamAttr::constructAlignmentFromInt(align)); > > +} > > + > > ... > > > +void LLVMSetInstrParamAlignment(LLVMValueRef Instr, unsigned index, > > unsigned align) { > > + CallSite Call = CallSite(unwrap<Instruction>(Instr)); > > + Call.setParamAttrs( > > + Call.getParamAttrs...
2008 Apr 26
0
[LLVMdev] ParamAttr Patch - Alignment fix
...========================================================== > --- lib/VMCore/Core.cpp (revision 50213) > +++ lib/VMCore/Core.cpp (working copy) > +void LLVMSetParamAlignment(LLVMValueRef Arg, unsigned align) > +{ > + unwrap<Argument>(Arg)->addAttr( > + ParamAttr::constructAlignmentFromInt(align)); > +} > + ... > +void LLVMSetInstrParamAlignment(LLVMValueRef Instr, unsigned index, > unsigned align) { > + CallSite Call = CallSite(unwrap<Instruction>(Instr)); > + Call.setParamAttrs( > + Call.getParamAttrs().addAttr(index, > + ParamAttr::const...
2008 Apr 26
0
[LLVMdev] ParamAttr Patch - Alignment fix
...+void LLVMSetInstrParamAlignment(LLVMValueRef Instr, unsigned index, >>> unsigned align) { >>> + CallSite Call = CallSite(unwrap<Instruction>(Instr)); >>> + Call.setParamAttrs( >>> + Call.getParamAttrs().addAttr(index, >>> + ParamAttr::constructAlignmentFromInt(align))); >>> +} >> >> If I call this twice with different values, don't I get the bitwise >> OR of the two constructAlignmentFromInt values? Does PAListPtr >> provide a better API for this? > > You are not allowed to set alignment twice - tried it, an...
2008 Apr 26
2
[LLVMdev] ParamAttr Patch - Alignment fix
...Alignment(LLVMValueRef Instr, unsigned index, > > unsigned align) { > > + Instruction *I = unwrap<Instruction>(Instr); > > + CallSite Call = CallSite(I); > > + Call.setParamAttrs( > > + Call.getParamAttrs().addAttr(index, > > + llvm::ParamAttr::constructAlignmentFromInt(align))); > > +} > > - Unnecessary variable again. > - The llvm:: prefix is unnecessary because of the using namespace > llvm; at the top of the file. > > This is good. In general, most bindings should be this order of > complexity or simpler. > > — Gordon > >...
2008 Apr 28
3
[LLVMdev] ParamAttr Patch - Alignment fix
...lignment(LLVMValueRef Instr, unsigned index, > >>> unsigned align) { > >>> + CallSite Call = CallSite(unwrap<Instruction>(Instr)); > >>> + Call.setParamAttrs( > >>> + Call.getParamAttrs().addAttr(index, > >>> + ParamAttr::constructAlignmentFromInt(align))); > >>> +} > >> > >> If I call this twice with different values, don't I get the bitwise > >> OR of the two constructAlignmentFromInt values? Does PAListPtr > >> provide a better API for this? > > > > You are not allowed to set...
2008 Apr 26
0
[LLVMdev] ParamAttr Patch - Alignment fix
...on. > +void LLVMInstrSetAlignment(LLVMValueRef Instr, unsigned index, > unsigned align) { > + Instruction *I = unwrap<Instruction>(Instr); > + CallSite Call = CallSite(I); > + Call.setParamAttrs( > + Call.getParamAttrs().addAttr(index, > + llvm::ParamAttr::constructAlignmentFromInt(align))); > +} - Unnecessary variable again. - The llvm:: prefix is unnecessary because of the using namespace llvm; at the top of the file. This is good. In general, most bindings should be this order of complexity or simpler. — Gordon
2008 Apr 24
2
[LLVMdev] ParamAttr Patch - Alignment fix
Hi.. Updated so you now set alignment through LLVMInstrSetAlignment. Anders Johnsen -------------- next part -------------- A non-text attachment was scrubbed... Name: ParamAttr.patch Type: text/x-diff Size: 7420 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080424/cb72b4bb/attachment.patch>
2012 Jan 12
0
[LLVMdev] 64-bit Attributes?
On Jan 12, 2012, at 1:03 PM, Anton Korobeynikov wrote: > Hi Kostya, > >> How about implementing Attributes as a class with 64-bit integer under the >> hood? >> This will protect us from erroneous casts to/from 32-bit unsigned. >> I have a change half-done but I want to know llvmdev's opinion before >> proceeding. > Yes, this sounds like a proper
2012 Jan 12
2
[LLVMdev] 64-bit Attributes?
Hi Kostya, > How about implementing Attributes as a class with 64-bit integer under the > hood? > This will protect us from erroneous casts to/from 32-bit unsigned. > I have a change half-done but I want to know llvmdev's opinion before > proceeding. Yes, this sounds like a proper approach. Which will allow us to switch over other implementation of attributes, if necessary. --