Use real types instead of "Self" for the IR value names of local type data.

Since that's somewhat expensive, allow the generation of meaningful
IR value names to be efficiently controlled in IRGen.  By default,
enable meaningful value names only when generating .ll output.

I considered giving protocol witness tables the name T:Protocol
instead of T.Protocol, but decided that I didn't want to update that
many test cases.
This commit is contained in:
John McCall
2016-01-13 17:42:41 -08:00
parent b38b27cfac
commit f1682cd9a8
29 changed files with 190 additions and 96 deletions

View File

@@ -181,6 +181,12 @@ def disable_llvm_slp_vectorizer : Flag<["-"], "disable-llvm-slp-vectorizer">,
def disable_llvm_verify : Flag<["-"], "disable-llvm-verify">,
HelpText<"Don't run the LLVM IR verifier.">;
def disable_llvm_value_names : Flag<["-"], "disable-llvm-value-names">,
HelpText<"Don't add names to local values in LLVM IR">;
def enable_llvm_value_names : Flag<["-"], "enable-llvm-value-names">,
HelpText<"Add names to local values in LLVM IR">;
def stack_promotion_checks : Flag<["-"], "emit-stack-promotion-checks">,
HelpText<"Emit runtime checks for correct stack promotion of objects.">;