Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
include/llvm/IR/Function.h
Show First 20 Lines • Show All 558 Lines • ▼ Show 20 Lines | public: | ||||
/// Determine if the call has sideeffects. | /// Determine if the call has sideeffects. | ||||
bool isSpeculatable() const { | bool isSpeculatable() const { | ||||
return hasFnAttribute(Attribute::Speculatable); | return hasFnAttribute(Attribute::Speculatable); | ||||
} | } | ||||
void setSpeculatable() { | void setSpeculatable() { | ||||
addFnAttr(Attribute::Speculatable); | addFnAttr(Attribute::Speculatable); | ||||
} | } | ||||
/// Determine if the call might deallocate memory. | |||||
bool doesNotFreeMemory() const { | |||||
return onlyReadsMemory() || hasFnAttribute(Attribute::NoFree); | |||||
} | |||||
void setDoesNotFreeMemory() { | |||||
addFnAttr(Attribute::NoFree); | |||||
} | |||||
/// Determine if the function is known not to recurse, directly or | /// Determine if the function is known not to recurse, directly or | ||||
/// indirectly. | /// indirectly. | ||||
bool doesNotRecurse() const { | bool doesNotRecurse() const { | ||||
return hasFnAttribute(Attribute::NoRecurse); | return hasFnAttribute(Attribute::NoRecurse); | ||||
} | } | ||||
void setDoesNotRecurse() { | void setDoesNotRecurse() { | ||||
addFnAttr(Attribute::NoRecurse); | addFnAttr(Attribute::NoRecurse); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 272 Lines • Show Last 20 Lines |