[SIL] Add attributes to swift builtins, specifically, the readnone attribute.

Use the attribute when deciding if a call to a builtin can be eliminated as dead.

Swift SVN r7391
This commit is contained in:
Anna Zaks
2013-08-21 00:02:25 +00:00
parent 2f05d5c4df
commit 21ce68188d
10 changed files with 140 additions and 98 deletions

View File

@@ -133,8 +133,8 @@ const BuiltinInfo &SILModule::getBuiltinInfo(const FuncDecl* FD) {
} else {
// Switch through the rest of builtins.
Info.ID = llvm::StringSwitch<BuiltinValueKind>(OperationName)
#define BUILTIN(id, name) \
.Case(name, BuiltinValueKind::id)
#define BUILTIN(ID, Name, Attrs) \
.Case(Name, BuiltinValueKind::ID)
#include "swift/AST/Builtins.def"
.Default(BuiltinValueKind::None);
}