search for: fnattr

Displaying 13 results from an estimated 13 matches for "fnattr".

Did you mean: fsattr
2013 Apr 08
0
[LLVMdev] Inaccurate comment in LLParser: "align 2" is a synonym for "alignstack 2"?
...cAttrs.hasAlignmentAttr()) { 02977 Alignment = FuncAttrs.getAlignment(); 02978 FuncAttrs.removeAttribute(Attribute::Alignment); 02979 } and through an attribute group: 00088 // If the alignment was parsed as an attribute, move to the alignment 00089 // field. 00090 if (FnAttrs.hasAlignmentAttr()) { 00091 Fn->setAlignment(FnAttrs.getAlignment()); 00092 FnAttrs.removeAttribute(Attribute::Alignment); 00093 } Am I missing something or should this be removed or changed? (It's actually legitimately a hack, just not the one described...) Stephen
2011 Jan 19
3
[LLVMdev] know if individual LLVM's Instruction has a result, and how to obtain it?
...For an other example: <result> = [tail] call [cconv <http://llvm.org/docs/LangRef.html#callingconv>] [ret attrs <http://llvm.org/docs/LangRef.html#paramattrs>]<ty> [<fnty>*]<fnptrval>(<function args>) [fn attrs <http://llvm.org/docs/LangRef.html#fnattrs>] According to the LLVM Language reference, CallInst should always have a result. But for void bar(int) types, there will be no return. So the generated IR will be similar to: call void @bar(i32 %2) nounwind instead of %3 = call void @bar(i32 %2) nounwind How can I handle this or...
2011 Oct 17
1
[LLVMdev] Optimization for size
...t; performance. > > > > -Os doesn’t actually exist for llc, and I can’t see an obvious place where > that condition would be set. Where do we specify if we’re optimizing for > codesize or performance? You can key off off of the optsize attribute (http://llvm.org/docs/LangRef.html#fnattrs); how exactly you access that depends on where you are in the compiler. -Eli
2011 Jan 19
0
[LLVMdev] know if individual LLVM's Instruction has a result, and how to obtain it?
...ther example: > > <result> = [tail] call [cconv <http://llvm.org/docs/LangRef.html#callingconv>] [ret attrs <http://llvm.org/docs/LangRef.html#paramattrs>]<ty> [<fnty>*]<fnptrval>(<function args>) [fn attrs <http://llvm.org/docs/LangRef.html#fnattrs>] > > > According to the LLVM Language reference, CallInst should always have a result. > But for void bar(int) types, there will be no return. So the generated IR will > be similar to: > > call void @bar(i32 %2) nounwind > > instead of > > %3 = call void...
2010 Oct 12
0
[LLVMdev] DCE and external function
...prove that the called function has >> no side effects (such as modifying some global variables or >> causing the program to exit). > > can it prove if the function resides in a shared library? Only if the right function attributes are added. See http://llvm.org/docs/LangRef.html#fnattrs for a list, but 'readonly'/'readnone' and 'nounwind' will be most interesting for you here. I guess calling abort() probably disqualifies a function for 'readonly' (and it's stronger variant 'readnone'). Currently calls to any function that has either of...
2010 Oct 13
1
[LLVMdev] DCE and external function
...impler to declare the > function > as having no side-effects using gcc's "pure" or "const" attribute. Hmm... the library can't be made static so I guess it's OK. > Only if the right function attributes are added. See > http://llvm.org/docs/LangRef.html#fnattrs for a list, but > 'readonly'/'readnone' and 'nounwind' will be most interesting for you > here. I guess calling abort() probably disqualifies a function for > 'readonly' (and it's stronger variant 'readnone'). > Currently calls to any functio...
2010 Oct 12
3
[LLVMdev] DCE and external function
> only if the compiler can prove that the called function has > no side effects (such as modifying some global variables or > causing the program to exit). can it prove if the function resides in a shared library? -- View this message in context: http://old.nabble.com/DCE-and-external-function-tp29932485p29942236.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
2010 Jul 23
1
[LLVMdev] "Attribute" Translation
Hey all, Could anyone give me any hint on how llvm-g++ translates the "__attribute__" annotations (supported by GCC)? (Has GCC already implemented the support for the C++0x attributes?) Suppose a class definition as below: template <typename T> class __attribute__((may_alias)) list { ... }; I understand that each particular attribute may be handled differently. Assuming that
2010 Oct 15
1
[LLVMdev] question about readnone
Hi! if I have a function with readnone attribute. is it then allowed to access an "internal constant" which is defined outside the function in llvm ir assembly? -Jochen
2013 Apr 01
0
[LLVMdev] proposed change to class BasicTTI and dual mode mips16/32 working
...&Mips::CPURegsRegClass); return OptLevel >= CodeGenOpt::Aggressive; } +void MipsSubtarget::resetSubtarget(MachineFunction *MF) { + bool ChangeToMips16 = false, ChangeToNoMips16 = false; + DEBUG(dbgs() << "resetSubtargetFeatures" << "\n"); + AttributeSet FnAttrs = MF->getFunction()->getAttributes(); + ChangeToMips16 = FnAttrs.hasAttribute(AttributeSet::FunctionIndex, + "mips16"); + ChangeToNoMips16 = FnAttrs.hasAttribute(AttributeSet::FunctionIndex, + "nom...
2011 Jan 06
2
[LLVMdev] What are all the LLVM IRs that will write into memory?
...n format for CallInst: <result> = [tail] call [cconv <http://llvm.org/docs/LangRef.html#callingconv>] [ret attrs <http://llvm.org/docs/LangRef.html#paramattrs>]<ty> [<fnty>*]<fnptrval>(<function args>) [fn attrs <http://llvm.org/docs/LangRef.html#fnattrs>] Does that mean any LLVM IR that has a valid result field will be able to store the result into memory? How about those temps allocated into registers via register allocation? Is there a way to tell such temps at compile time before RA? Thank you very much Chuck -------------- next p...
2009 Feb 17
3
[LLVMdev] Function Attributes in LLVM
Hello, I was wondering if there is a way to add more, maybe target dependant, function attributes? I think in certain circumstances they are a good way to give the compiler more information about a function. For example GCC supports attributes to mark an interrupt function witch is very useful for some low level targets. As far as I know function attributes are GCC specific or am I wrong? Is
2013 Apr 01
3
[LLVMdev] proposed change to class BasicTTI and dual mode mips16/32 working
On Thu, Mar 28, 2013 at 12:22 PM, Nadav Rotem <nrotem at apple.com> wrote: > IMHO the right way to handle target function attributes is to > re-initialize the target machine and TTI for every function (if the > attributes changed). Do you have another solution in mind ? I don't really understand this. TargetMachine and TTI may be quite expensive to initialize. Doing so for