search for: hasfnattr

Displaying 14 results from an estimated 14 matches for "hasfnattr".

Did you mean: hasattr
2012 Nov 29
0
[LLVMdev] noreturn attribute on a call instruction vs noreturn on afunction
You can use CallInst::hasFnAttr(). It checks for attributes in the instruction and in the function decl. http://llvm.org/docs/doxygen/html/Instructions_8cpp_source.html#l00345 Nuno ----- Original Message ----- > Hi, > > Building the following C code I get a call instruction that has no > noreturn > attribute,...
2013 Aug 01
2
[LLVMdev] can i avoid saving CSRs for functions with noreturn
...791ffb..f19b47a 100644 --- a/lib/CodeGen/PrologEpilogInserter.cpp +++ b/lib/CodeGen/PrologEpilogInserter.cpp @@ -96,7 +96,7 @@ bool PEI::runOnMachineFunction(MachineFunction &Fn) { placeCSRSpillsAndRestores(Fn); // Add the code to save and restore the callee saved registers - if (!F->hasFnAttr(Attribute::Naked)) + if (!F->hasFnAttr(Attribute::Naked) && !F->hasFnAttr(Attribute::NoReturn)) insertCSRSpillsAndRestores(Fn); // Allow the target machine to make final modifications to the function thanks, --lx -------------- next part -------------- An HTML attachment w...
2012 Nov 28
4
[LLVMdev] noreturn attribute on a call instruction vs noreturn on a function
Hi, Building the following C code I get a call instruction that has no noreturn attribute, while the function itself does have it. void foo(void **b) { __builtin_longjmp(b, 1); } define void @_Z3fooPPv(i8** %b) noreturn nounwind uwtable { entry: %0 = bitcast i8** %b to i8* tail call void @llvm.eh.sjlj.longjmp(i8* %0)
2012 Apr 03
1
[LLVMdev] Possible typo in LoopUnrollPass.cpp
...is normally set // from UnrollThreshold, it is overridden to a smaller value if the current // function is marked as optimize-for-size, and the unroll threshold was // not user specified. unsigned Threshold = CurrentThreshold; if (!UserThreshold && Header->getParent()->hasFnAttr(Attribute::OptimizeForSize)) Threshold = OptSizeUnrollThreshold; As a result, the OptimizeForSize attribute is ignored when the pass calculating the reduced count, which is not I expected. Am i correct or i missed something? If i am correct, i am going to fix this. best regards ether ps: th...
2013 May 20
1
[LLVMdev] _Znwm is not a builtin
...adds a 'builtin' attribute which can only be present on a call site for a direct call to a function declared with the 'nobuiltin' attribute. The 'builtin' attribute has the effect of canceling out the 'nobuiltin' attribute on the declaration. Ok. Please make "hasFnAttr(Attribute::NoBuiltin)" abort though: it will be a common bug to call this instead of your new accessor. > This (incidentally) also exactly matches what we want for another Clang feature: we want a -fno-builtin-foo which makes 'foo' not be a builtin (but we still want __builtin_foo...
2012 Jan 24
0
[LLVMdev] load widening conflicts with AddressSanitizer
...ug may look as simple as this: --- lib/Analysis/MemoryDependenceAnalysis.cpp (revision 148708) +++ lib/Analysis/MemoryDependenceAnalysis.cpp (working copy) @@ -323,6 +323,14 @@ !TD.fitsInLegalInteger(NewLoadByteSize*8)) return 0; + if (LI->getParent()->getParent()->hasFnAttr(Attribute::AddressSafety) && + LIOffs+NewLoadByteSize > MemLocEnd) { + // We will be reading past the location accessed by the original program. + // While this is safe in a regular build, Address Safety analysys tools + // may start reporting false warnings. So, do...
2010 Jan 09
0
[LLVMdev] Inlining
Hi Alastair, > Forgive my confusion, but I can't help notice that LangRef states: > > Globals with "linkonce" linkage are merged with other globals of the same name when linkage occurs. This is typically used to implement inline functions, templates, or other code which must be generated in each translation unit that uses it. Unreferenced linkonce globals are allowed to be
2010 Aug 11
1
[LLVMdev] Unnecessary Win64 stack allocations...
.../ If this is x86-64 and the Red Zone is not disabled, if we are a leaf // function, and use up to 128 bytes of stack space, don't have a frame // pointer, calls, or dynamic alloca then we do not need to adjust the // stack pointer (we fit in the Red Zone). if (Is64Bit && !Fn->hasFnAttr(Attribute::NoRedZone) && !needsStackRealignment(MF) && !MFI->hasVarSizedObjects() && // No dynamic alloca. !MFI->adjustsStack() && // No calls. !IsWin64) { // Win64 has...
2011 Oct 17
1
[LLVMdev] Optimization for size
Hi, Looking at bugzilla PR11087, I'd like to conditionalise a transformation in ARMIselLowering.cpp based on whether we're compiling for codesize or 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? Cheers, James --------------
2010 Jan 09
3
[LLVMdev] Inlining
Hi Duncan- Forgive my confusion, but I can't help notice that LangRef states: Globals with "linkonce" linkage are merged with other globals of the same name when linkage occurs. This is typically used to implement inline functions, templates, or other code which must be generated in each translation unit that uses it. Unreferenced linkonce globals are allowed to be discarded. Why
2011 Dec 28
2
[LLVMdev] load widening conflicts with AddressSanitizer
________________________________ From: Kostya Serebryany [kcc at google.com] Sent: Wednesday, December 28, 2011 2:46 PM To: Criswell, John T Cc: llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] load widening conflicts with AddressSanitizer On Wed, Dec 28, 2011 at 12:40 PM, Criswell, John T <criswell at illinois.edu<mailto:criswell at illinois.edu>> wrote: Dear All, I think adding
2013 May 16
0
[LLVMdev] _Znwm is not a builtin
On Thu, May 16, 2013 at 10:13 AM, Chris Lattner <clattner at apple.com> wrote: > On May 15, 2013, at 10:32 PM, Richard Smith <richard at metafoo.co.uk> wrote: > > Initially, I'm just concerned about keeping the optimizations we already >>> perform, such as globalopt lowering a new/delete pair into a global, while >>> disabling the non-conforming
2013 May 16
2
[LLVMdev] _Znwm is not a builtin
On May 15, 2013, at 10:32 PM, Richard Smith <richard at metafoo.co.uk> wrote: >>> Initially, I'm just concerned about keeping the optimizations we already perform, such as globalopt lowering a new/delete pair into a global, while disabling the non-conforming variations of those optimizations. But we're also permitted to merge multiple allocations into one if they have
2012 Jan 24
4
[LLVMdev] load widening conflicts with AddressSanitizer
...> --- lib/Analysis/MemoryDependenceAnalysis.cpp (revision 148708) > +++ lib/Analysis/MemoryDependenceAnalysis.cpp (working copy) > @@ -323,6 +323,14 @@ > !TD.fitsInLegalInteger(NewLoadByteSize*8)) > return 0; > + if (LI->getParent()->getParent()->hasFnAttr(Attribute::AddressSafety) && > + LIOffs+NewLoadByteSize > MemLocEnd) { > + // We will be reading past the location accessed by the original program. > + // While this is safe in a regular build, Address Safety analysys tools > + // may start reporting fa...