diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2022-05-15 15:13:48 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2022-05-15 15:25:12 +0200 |
| commit | bac878c9a334e60291f8c77cd02f24e35ac7b637 (patch) | |
| tree | 8a45a676e8423bc44db75ce4c867c143e56d0e72 | |
| parent | e25e2c3b94e1f89fb1d38f77a8a58da5e8a2d581 (diff) | |
Add instrinsics from aweinstock314's llvmint as well
| -rw-r--r-- | tools/generate_intrinsics.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/tools/generate_intrinsics.py b/tools/generate_intrinsics.py index 4129c8cb447..849c6e9c981 100644 --- a/tools/generate_intrinsics.py +++ b/tools/generate_intrinsics.py @@ -16,7 +16,7 @@ def run_command(command, cwd=None): def clone_repository(repo_name, path, repo_url, sub_path=None): if os.path.exists(path): while True: - choice = input("There is already a `{}` folder, do you want to update it? [y/N]".format(repo_name)) + choice = input("There is already a `{}` folder, do you want to update it? [y/N]".format(path)) if choice == "" or choice.lower() == "n": print("Skipping repository update.") return @@ -159,13 +159,14 @@ def fill_intrinsics(intrinsics, from_intrinsics, all_intrinsics): all_intrinsics[entry[0]] = entry[1] -def update_intrinsics(llvm_path, llvmint): +def update_intrinsics(llvm_path, llvmint, llvmint2): intrinsics_llvm = {} intrinsics_llvmint = {} all_intrinsics = {} extract_instrinsics_from_llvm(llvm_path, intrinsics_llvm) extract_instrinsics_from_llvmint(llvmint, intrinsics_llvmint) + extract_instrinsics_from_llvmint(llvmint2, intrinsics_llvmint) intrinsics = {} # We give priority to translations from LLVM over the ones from llvmint. @@ -208,6 +209,10 @@ def main(): os.path.dirname(os.path.abspath(__file__)), "llvmint", ) + llvmint2_path = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "llvmint-2", + ) # First, we clone the LLVM repository if it's not already here. clone_repository( @@ -221,7 +226,12 @@ def main(): llvmint_path, "https://github.com/GuillaumeGomez/llvmint", ) - update_intrinsics(llvm_path, llvmint_path) + clone_repository( + "llvmint2", + llvmint2_path, + "https://github.com/antoyo/llvmint", + ) + update_intrinsics(llvm_path, llvmint_path, llvmint2_path) if __name__ == "__main__": |
