Home | History | Annotate | Download | only in IPO

Lines Matching refs:Attribute

57 ForceAttributes("force-attribute", cl::Hidden,
58 cl::desc("Add an attribute to a function. This should be a "
59 "pair of 'function-name:attribute-name', for "
60 "example -force-add-attribute=foo:noinline. This "
242 // Give them the appropriate attribute.
257 B.addAttribute(Attribute::ReadOnly).addAttribute(Attribute::ReadNone);
262 // Add in the new attribute.
264 ReadsMemory ? Attribute::ReadOnly : Attribute::ReadNone);
403 /// Returns Attribute::None, Attribute::ReadOnly or Attribute::ReadNone.
404 static Attribute::AttrKind
413 return Attribute::None;
466 return Attribute::None;
486 return Attribute::None;
502 return Attribute::None;
520 return Attribute::None;
524 return IsRead ? Attribute::ReadOnly : Attribute::ReadNone;
534 B.addAttribute(Attribute::NoCapture);
598 Attribute::AttrKind R = determinePointerReadAttrs(&*A, Self);
599 if (R != Attribute::None) {
604 R == Attribute::ReadOnly ? ++NumReadOnlyArg : ++NumReadNoneArg;
614 // made. If the definition doesn't have a 'nocapture' attribute by now, it
687 Attribute::AttrKind ReadAttr = Attribute::ReadNone;
690 Attribute::AttrKind K = determinePointerReadAttrs(A, ArgumentSCCNodes);
691 if (K == Attribute::ReadNone)
693 if (K == Attribute::ReadOnly) {
694 ReadAttr = Attribute::ReadOnly;
701 if (ReadAttr != Attribute::None) {
704 R.addAttribute(Attribute::ReadOnly).addAttribute(Attribute::ReadNone);
710 ReadAttr == Attribute::ReadOnly ? ++NumReadOnlyArg : ++NumReadNoneArg;
769 if (CS.paramHasAttr(0, Attribute::NoAlias))
905 Attribute::NonNull))
924 F->addAttribute(AttributeSet::ReturnIndex, Attribute::NonNull);
938 Attribute::NonNull) ||
943 F->addAttribute(AttributeSet::ReturnIndex, Attribute::NonNull);
1007 if (F.hasFnAttribute(Attribute::OptimizeNone))
1854 static Attribute::AttrKind parseAttrKind(StringRef Kind) {
1855 return StringSwitch<Attribute::AttrKind>(Kind)
1856 .Case("alwaysinline", Attribute::AlwaysInline)
1857 .Case("builtin", Attribute::Builtin)
1858 .Case("cold", Attribute::Cold)
1859 .Case("convergent", Attribute::Convergent)
1860 .Case("inlinehint", Attribute::InlineHint)
1861 .Case("jumptable", Attribute::JumpTable)
1862 .Case("minsize", Attribute::MinSize)
1863 .Case("naked", Attribute::Naked)
1864 .Case("nobuiltin", Attribute::NoBuiltin)
1865 .Case("noduplicate", Attribute::NoDuplicate)
1866 .Case("noimplicitfloat", Attribute::NoImplicitFloat)
1867 .Case("noinline", Attribute::NoInline)
1868 .Case("nonlazybind", Attribute::NonLazyBind)
1869 .Case("noredzone", Attribute::NoRedZone)
1870 .Case("noreturn", Attribute::NoReturn)
1871 .Case("norecurse", Attribute::NoRecurse)
1872 .Case("nounwind", Attribute::NoUnwind)
1873 .Case("optnone", Attribute::OptimizeNone)
1874 .Case("optsize", Attribute::OptimizeForSize)
1875 .Case("readnone", Attribute::ReadNone)
1876 .Case("readonly", Attribute::ReadOnly)
1877 .Case("argmemonly", Attribute::ArgMemOnly)
1878 .Case("returns_twice", Attribute::ReturnsTwice)
1879 .Case("safestack", Attribute::SafeStack)
1880 .Case("sanitize_address", Attribute::SanitizeAddress)
1881 .Case("sanitize_memory", Attribute::SanitizeMemory)
1882 .Case("sanitize_thread", Attribute::SanitizeThread)
1883 .Case("ssp", Attribute::StackProtect)
1884 .Case("sspreq", Attribute::StackProtectReq)
1885 .Case("sspstrong", Attribute::StackProtectStrong)
1886 .Case("uwtable", Attribute::UWTable)
1887 .Default(Attribute::None);
1899 if (Kind == Attribute::None) {
1935 if (!F || F->hasFnAttribute(Attribute::OptimizeNone)) {