mirror of
https://github.com/RPCSX/llvm.git
synced 2026-01-31 01:05:23 +01:00
Add speculatable function attribute
This attribute tells the optimizer that the function may be speculated. Patch by Tom Stellard git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301680 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1119,6 +1119,7 @@ static uint64_t getRawAttributeMask(Attribute::AttrKind Val) {
|
||||
case Attribute::SwiftSelf: return 1ULL << 51;
|
||||
case Attribute::SwiftError: return 1ULL << 52;
|
||||
case Attribute::WriteOnly: return 1ULL << 53;
|
||||
case Attribute::Speculatable: return 1ULL << 54;
|
||||
case Attribute::Dereferenceable:
|
||||
llvm_unreachable("dereferenceable attribute not supported in raw format");
|
||||
break;
|
||||
@@ -1315,6 +1316,8 @@ static Attribute::AttrKind getAttrFromCode(uint64_t Code) {
|
||||
return Attribute::ReturnsTwice;
|
||||
case bitc::ATTR_KIND_S_EXT:
|
||||
return Attribute::SExt;
|
||||
case bitc::ATTR_KIND_SPECULATABLE:
|
||||
return Attribute::Speculatable;
|
||||
case bitc::ATTR_KIND_STACK_ALIGNMENT:
|
||||
return Attribute::StackAlignment;
|
||||
case bitc::ATTR_KIND_STACK_PROTECT:
|
||||
|
||||
Reference in New Issue
Block a user