From 8cf9a4c472f5819476c9c8ba271e989dee3d17c0 Mon Sep 17 00:00:00 2001 From: Alexei Starovoitov Date: Fri, 5 Jun 2015 16:11:14 +0000 Subject: [PATCH] [bpf] rename triple names bpf_be -> bpfeb llvm-svn: 239162 --- llvm/include/llvm/ADT/Triple.h | 4 +-- llvm/lib/Support/Triple.cpp | 32 +++++++++---------- llvm/lib/Target/BPF/BPFTargetMachine.cpp | 2 +- .../Target/BPF/MCTargetDesc/BPFMCAsmInfo.h | 2 +- .../Target/BPF/TargetInfo/BPFTargetInfo.cpp | 8 ++--- llvm/test/CodeGen/BPF/alu8.ll | 2 +- llvm/test/CodeGen/BPF/atomics.ll | 2 +- llvm/test/CodeGen/BPF/basictest.ll | 2 +- llvm/test/CodeGen/BPF/cc_args.ll | 2 +- llvm/test/CodeGen/BPF/cc_args_be.ll | 2 +- llvm/test/CodeGen/BPF/cc_ret.ll | 2 +- llvm/test/CodeGen/BPF/ex1.ll | 2 +- llvm/test/CodeGen/BPF/intrinsics.ll | 2 +- llvm/test/CodeGen/BPF/load.ll | 2 +- llvm/test/CodeGen/BPF/loops.ll | 2 +- llvm/test/CodeGen/BPF/sanity.ll | 2 +- llvm/test/CodeGen/BPF/setcc.ll | 2 +- llvm/test/CodeGen/BPF/shifts.ll | 2 +- llvm/test/CodeGen/BPF/sockex2.ll | 2 +- 19 files changed, 38 insertions(+), 38 deletions(-) diff --git a/llvm/include/llvm/ADT/Triple.h b/llvm/include/llvm/ADT/Triple.h index eb1bbd641ebb..1362fe37c426 100644 --- a/llvm/include/llvm/ADT/Triple.h +++ b/llvm/include/llvm/ADT/Triple.h @@ -50,8 +50,8 @@ public: armeb, // ARM (big endian): armeb aarch64, // AArch64 (little endian): aarch64 aarch64_be, // AArch64 (big endian): aarch64_be - bpf_le, // eBPF or extended BPF or 64-bit BPF (little endian) - bpf_be, // eBPF or extended BPF or 64-bit BPF (big endian) + bpfel, // eBPF or extended BPF or 64-bit BPF (little endian) + bpfeb, // eBPF or extended BPF or 64-bit BPF (big endian) hexagon, // Hexagon: hexagon mips, // MIPS: mips, mipsallegrex mipsel, // MIPSEL: mipsel, mipsallegrexel diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp index 9312f4ceec5c..ad99386e6574 100644 --- a/llvm/lib/Support/Triple.cpp +++ b/llvm/lib/Support/Triple.cpp @@ -25,8 +25,8 @@ const char *Triple::getArchTypeName(ArchType Kind) { case aarch64_be: return "aarch64_be"; case arm: return "arm"; case armeb: return "armeb"; - case bpf_le: return "bpf_le"; - case bpf_be: return "bpf_be"; + case bpfel: return "bpfel"; + case bpfeb: return "bpfeb"; case hexagon: return "hexagon"; case mips: return "mips"; case mipsel: return "mipsel"; @@ -91,8 +91,8 @@ const char *Triple::getArchTypePrefix(ArchType Kind) { case amdgcn: case r600: return "amdgpu"; - case bpf_le: - case bpf_be: return "bpf"; + case bpfel: + case bpfeb: return "bpf"; case sparcv9: case sparcel: @@ -198,13 +198,13 @@ const char *Triple::getEnvironmentTypeName(EnvironmentType Kind) { static Triple::ArchType parseBPFArch(StringRef ArchName) { if (ArchName.equals("bpf")) { if (sys::IsLittleEndianHost) - return Triple::bpf_le; + return Triple::bpfel; else - return Triple::bpf_be; - } else if (ArchName.equals("bpf_be")) { - return Triple::bpf_be; - } else if (ArchName.equals("bpf_le")) { - return Triple::bpf_le; + return Triple::bpfeb; + } else if (ArchName.equals("bpf_be") || ArchName.equals("bpfeb")) { + return Triple::bpfeb; + } else if (ArchName.equals("bpf_le") || ArchName.equals("bpfel")) { + return Triple::bpfel; } else { return Triple::UnknownArch; } @@ -1009,8 +1009,8 @@ static unsigned getArchPointerBitWidth(llvm::Triple::ArchType Arch) { case llvm::Triple::aarch64: case llvm::Triple::aarch64_be: case llvm::Triple::amdgcn: - case llvm::Triple::bpf_le: - case llvm::Triple::bpf_be: + case llvm::Triple::bpfel: + case llvm::Triple::bpfeb: case llvm::Triple::le64: case llvm::Triple::mips64: case llvm::Triple::mips64el: @@ -1047,8 +1047,8 @@ Triple Triple::get32BitArchVariant() const { case Triple::aarch64: case Triple::aarch64_be: case Triple::amdgcn: - case Triple::bpf_le: - case Triple::bpf_be: + case Triple::bpfel: + case Triple::bpfeb: case Triple::msp430: case Triple::systemz: case Triple::ppc64le: @@ -1112,8 +1112,8 @@ Triple Triple::get64BitArchVariant() const { case Triple::aarch64: case Triple::aarch64_be: - case Triple::bpf_le: - case Triple::bpf_be: + case Triple::bpfel: + case Triple::bpfeb: case Triple::le64: case Triple::amdil64: case Triple::amdgcn: diff --git a/llvm/lib/Target/BPF/BPFTargetMachine.cpp b/llvm/lib/Target/BPF/BPFTargetMachine.cpp index 198fe7ae9999..3329d5f87409 100644 --- a/llvm/lib/Target/BPF/BPFTargetMachine.cpp +++ b/llvm/lib/Target/BPF/BPFTargetMachine.cpp @@ -30,7 +30,7 @@ extern "C" void LLVMInitializeBPFTarget() { // DataLayout: little or big endian static std::string computeDataLayout(StringRef TT) { - if (Triple(TT).getArch() == Triple::bpf_be) + if (Triple(TT).getArch() == Triple::bpfeb) return "E-m:e-p:64:64-i64:64-n32:64-S128"; else return "e-m:e-p:64:64-i64:64-n32:64-S128"; diff --git a/llvm/lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h b/llvm/lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h index edaa9ce24686..d63bbf49294e 100644 --- a/llvm/lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h +++ b/llvm/lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h @@ -25,7 +25,7 @@ class Triple; class BPFMCAsmInfo : public MCAsmInfo { public: explicit BPFMCAsmInfo(const Triple &TT) { - if (TT.getArch() == Triple::bpf_be) + if (TT.getArch() == Triple::bpfeb) IsLittleEndian = false; PrivateGlobalPrefix = ".L"; diff --git a/llvm/lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp b/llvm/lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp index 406165bca1e5..a16dbae867b2 100644 --- a/llvm/lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp +++ b/llvm/lib/Target/BPF/TargetInfo/BPFTargetInfo.cpp @@ -21,8 +21,8 @@ extern "C" void LLVMInitializeBPFTargetInfo() { TargetRegistry::RegisterTarget(TheBPFTarget, "bpf", "BPF (host endian)", [](Triple::ArchType) { return false; }, true); - RegisterTarget X( - TheBPFleTarget, "bpf_le", "BPF (little endian)"); - RegisterTarget Y( - TheBPFbeTarget, "bpf_be", "BPF (big endian)"); + RegisterTarget X( + TheBPFleTarget, "bpfel", "BPF (little endian)"); + RegisterTarget Y( + TheBPFbeTarget, "bpfeb", "BPF (big endian)"); } diff --git a/llvm/test/CodeGen/BPF/alu8.ll b/llvm/test/CodeGen/BPF/alu8.ll index 21083b1aaf8b..c1c2bd29f247 100644 --- a/llvm/test/CodeGen/BPF/alu8.ll +++ b/llvm/test/CodeGen/BPF/alu8.ll @@ -1,4 +1,4 @@ -; RUN: llc -march=bpf_le -show-mc-encoding < %s | FileCheck %s +; RUN: llc -march=bpfel -show-mc-encoding < %s | FileCheck %s define i8 @mov(i8 %a, i8 %b) nounwind { ; CHECK-LABEL: mov: diff --git a/llvm/test/CodeGen/BPF/atomics.ll b/llvm/test/CodeGen/BPF/atomics.ll index b6cb65f3aea4..a2e17d291968 100644 --- a/llvm/test/CodeGen/BPF/atomics.ll +++ b/llvm/test/CodeGen/BPF/atomics.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=bpf_le -verify-machineinstrs -show-mc-encoding | FileCheck %s +; RUN: llc < %s -march=bpfel -verify-machineinstrs -show-mc-encoding | FileCheck %s ; CHECK-LABEL: test_load_add_32 ; CHECK: xadd32 diff --git a/llvm/test/CodeGen/BPF/basictest.ll b/llvm/test/CodeGen/BPF/basictest.ll index b1c1f8081601..82feb43d005c 100644 --- a/llvm/test/CodeGen/BPF/basictest.ll +++ b/llvm/test/CodeGen/BPF/basictest.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=bpf_le | FileCheck %s +; RUN: llc < %s -march=bpfel | FileCheck %s define i32 @test0(i32 %X) { %tmp.1 = add i32 %X, 1 diff --git a/llvm/test/CodeGen/BPF/cc_args.ll b/llvm/test/CodeGen/BPF/cc_args.ll index 42ac830c1ba6..8e3f8604ac88 100644 --- a/llvm/test/CodeGen/BPF/cc_args.ll +++ b/llvm/test/CodeGen/BPF/cc_args.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=bpf_le -show-mc-encoding | FileCheck %s +; RUN: llc < %s -march=bpfel -show-mc-encoding | FileCheck %s define void @test() #0 { entry: diff --git a/llvm/test/CodeGen/BPF/cc_args_be.ll b/llvm/test/CodeGen/BPF/cc_args_be.ll index d5a6539aa5e5..59a7439728ba 100644 --- a/llvm/test/CodeGen/BPF/cc_args_be.ll +++ b/llvm/test/CodeGen/BPF/cc_args_be.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=bpf_be -show-mc-encoding | FileCheck %s +; RUN: llc < %s -march=bpfeb -show-mc-encoding | FileCheck %s ; test big endian define void @test() #0 { diff --git a/llvm/test/CodeGen/BPF/cc_ret.ll b/llvm/test/CodeGen/BPF/cc_ret.ll index ea23bdebd1dd..09574922f325 100644 --- a/llvm/test/CodeGen/BPF/cc_ret.ll +++ b/llvm/test/CodeGen/BPF/cc_ret.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=bpf_le | FileCheck %s +; RUN: llc < %s -march=bpfel | FileCheck %s define void @test() #0 { entry: diff --git a/llvm/test/CodeGen/BPF/ex1.ll b/llvm/test/CodeGen/BPF/ex1.ll index abf068ca9a3f..546e5d49da69 100644 --- a/llvm/test/CodeGen/BPF/ex1.ll +++ b/llvm/test/CodeGen/BPF/ex1.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=bpf_le | FileCheck %s +; RUN: llc < %s -march=bpfel | FileCheck %s %struct.bpf_context = type { i64, i64, i64, i64, i64, i64, i64 } %struct.sk_buff = type { i64, i64, i64, i64, i64, i64, i64 } diff --git a/llvm/test/CodeGen/BPF/intrinsics.ll b/llvm/test/CodeGen/BPF/intrinsics.ll index 586269751de6..483473e922fc 100644 --- a/llvm/test/CodeGen/BPF/intrinsics.ll +++ b/llvm/test/CodeGen/BPF/intrinsics.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=bpf_le -show-mc-encoding | FileCheck %s +; RUN: llc < %s -march=bpfel -show-mc-encoding | FileCheck %s ; Function Attrs: nounwind uwtable define i32 @ld_b(i64 %foo, i64* nocapture %bar, i8* %ctx, i8* %ctx2) #0 { diff --git a/llvm/test/CodeGen/BPF/load.ll b/llvm/test/CodeGen/BPF/load.ll index 9787379c2817..d4ba315b5f18 100644 --- a/llvm/test/CodeGen/BPF/load.ll +++ b/llvm/test/CodeGen/BPF/load.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=bpf_le | FileCheck %s +; RUN: llc < %s -march=bpfel | FileCheck %s define i16 @am1(i16* %a) nounwind { %1 = load i16, i16* %a diff --git a/llvm/test/CodeGen/BPF/loops.ll b/llvm/test/CodeGen/BPF/loops.ll index 7a4d5dbcb348..00be54b3bac5 100644 --- a/llvm/test/CodeGen/BPF/loops.ll +++ b/llvm/test/CodeGen/BPF/loops.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=bpf_le | FileCheck %s +; RUN: llc < %s -march=bpfel | FileCheck %s define zeroext i16 @add(i16* nocapture %a, i16 zeroext %n) nounwind readonly { entry: diff --git a/llvm/test/CodeGen/BPF/sanity.ll b/llvm/test/CodeGen/BPF/sanity.ll index b45f5a1186ea..7f0ef889ff99 100644 --- a/llvm/test/CodeGen/BPF/sanity.ll +++ b/llvm/test/CodeGen/BPF/sanity.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=bpf_le | FileCheck %s +; RUN: llc < %s -march=bpfel | FileCheck %s @foo_printf.fmt = private unnamed_addr constant [9 x i8] c"hello \0A\00", align 1 diff --git a/llvm/test/CodeGen/BPF/setcc.ll b/llvm/test/CodeGen/BPF/setcc.ll index 6198197d244f..f6c6db6c6836 100644 --- a/llvm/test/CodeGen/BPF/setcc.ll +++ b/llvm/test/CodeGen/BPF/setcc.ll @@ -1,4 +1,4 @@ -; RUN: llc -march=bpf_le < %s | FileCheck %s +; RUN: llc -march=bpfel < %s | FileCheck %s define i16 @sccweqand(i16 %a, i16 %b) nounwind { %t1 = and i16 %a, %b diff --git a/llvm/test/CodeGen/BPF/shifts.ll b/llvm/test/CodeGen/BPF/shifts.ll index 77d02d76c059..cb000b92fcd9 100644 --- a/llvm/test/CodeGen/BPF/shifts.ll +++ b/llvm/test/CodeGen/BPF/shifts.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=bpf_le -show-mc-encoding | FileCheck %s +; RUN: llc < %s -march=bpfel -show-mc-encoding | FileCheck %s define zeroext i8 @lshr8(i8 zeroext %a, i8 zeroext %cnt) nounwind readnone { entry: diff --git a/llvm/test/CodeGen/BPF/sockex2.ll b/llvm/test/CodeGen/BPF/sockex2.ll index 99458a965a97..d372a5982f68 100644 --- a/llvm/test/CodeGen/BPF/sockex2.ll +++ b/llvm/test/CodeGen/BPF/sockex2.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=bpf_le -show-mc-encoding | FileCheck %s +; RUN: llc < %s -march=bpfel -show-mc-encoding | FileCheck %s %struct.bpf_map_def = type { i32, i32, i32, i32 } %struct.sk_buff = type opaque