[llvm-branch-commits] [lldb] [llvm] [ExecutionEngine] Remove interpreter (PR #220113)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Aug 31 17:48:39 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Aiden Grossman (boomanaiden154)

<details>
<summary>Changes</summary>

The interpreter has been supersceded by llubi, so remove it.


---

Patch is 125.97 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/220113.diff


19 Files Affected:

- (modified) lldb/source/Expression/IRExecutionUnit.cpp (+1-2) 
- (modified) llvm/cmake/modules/LLVM-Build.cmake (-2) 
- (modified) llvm/include/llvm/ExecutionEngine/ExecutionEngine.h (-19) 
- (removed) llvm/include/llvm/ExecutionEngine/Interpreter.h (-28) 
- (modified) llvm/lib/ExecutionEngine/CMakeLists.txt (-1) 
- (modified) llvm/lib/ExecutionEngine/ExecutionEngine.cpp (+4-27) 
- (modified) llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp (+4-23) 
- (removed) llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt (-18) 
- (removed) llvm/lib/ExecutionEngine/Interpreter/Execution.cpp (-2084) 
- (removed) llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp (-531) 
- (removed) llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp (-102) 
- (removed) llvm/lib/ExecutionEngine/Interpreter/Interpreter.h (-234) 
- (modified) llvm/lib/ExecutionEngine/TargetSelect.cpp (+1-1) 
- (modified) llvm/tools/lli/CMakeLists.txt (-1) 
- (modified) llvm/tools/lli/lli.cpp (+10-29) 
- (modified) llvm/tools/llvm-config/llvm-config.cpp (+1-1) 
- (modified) llvm/unittests/ExecutionEngine/CMakeLists.txt (-1) 
- (modified) llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp (-1) 
- (modified) llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h (+1-2) 


``````````diff
diff --git a/lldb/source/Expression/IRExecutionUnit.cpp b/lldb/source/Expression/IRExecutionUnit.cpp
index 4f18a5da94e10..67d79d15a49ad 100644
--- a/lldb/source/Expression/IRExecutionUnit.cpp
+++ b/lldb/source/Expression/IRExecutionUnit.cpp
@@ -277,8 +277,7 @@ void IRExecutionUnit::GetRunnableInfo(Status &error, lldb::addr_t &func_addr,
   llvm::EngineBuilder builder(std::move(m_module_up));
   llvm::Triple triple(m_module->getTargetTriple());
 
-  builder.setEngineKind(llvm::EngineKind::JIT)
-      .setErrorStr(&error_string)
+  builder.setErrorStr(&error_string)
       .setRelocationModel(triple.isOSBinFormatMachO() ? llvm::Reloc::PIC_
                                                       : llvm::Reloc::Static)
       .setMCJITMemoryManager(std::make_unique<MemoryManager>(*this))
diff --git a/llvm/cmake/modules/LLVM-Build.cmake b/llvm/cmake/modules/LLVM-Build.cmake
index 525186cbbb19b..806e10f474885 100644
--- a/llvm/cmake/modules/LLVM-Build.cmake
+++ b/llvm/cmake/modules/LLVM-Build.cmake
@@ -88,8 +88,6 @@ function(LLVMBuildResolveComponentsLink)
 
   if(llvm_has_jit_native)
     set_property(TARGET Engine APPEND PROPERTY LLVM_LINK_COMPONENTS "MCJIT" "Native")
-  else()
-    set_property(TARGET Engine APPEND PROPERTY LLVM_LINK_COMPONENTS "Interpreter")
   endif()
 
   get_property(llvm_components GLOBAL PROPERTY LLVM_COMPONENT_LIBS)
diff --git a/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h b/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h
index 27399d93fe587..82e9d31e2968a 100644
--- a/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h
+++ b/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h
@@ -518,24 +518,12 @@ class LLVM_ABI ExecutionEngine {
   void Init(std::unique_ptr<Module> M);
 };
 
-namespace EngineKind {
-
-  // These are actually bitmasks that get or-ed together.
-  enum Kind {
-    JIT         = 0x1,
-    Interpreter = 0x2
-  };
-  const static Kind Either = (Kind)(JIT | Interpreter);
-
-} // end namespace EngineKind
-
 /// Builder class for ExecutionEngines. Use this by stack-allocating a builder,
 /// chaining the various set* methods, and terminating it with a .create()
 /// call.
 class EngineBuilder {
 private:
   std::unique_ptr<Module> M;
-  EngineKind::Kind WhichEngine;
   std::string *ErrorStr;
   CodeGenOptLevel OptLevel;
   std::shared_ptr<MCJITMemoryManager> MemMgr;
@@ -559,13 +547,6 @@ class EngineBuilder {
   // Out-of-line since we don't have the def'n of RTDyldMemoryManager here.
   LLVM_ABI ~EngineBuilder();
 
-  /// setEngineKind - Controls whether the user wants the interpreter, the JIT,
-  /// or whichever engine works.  This option defaults to EngineKind::Either.
-  EngineBuilder &setEngineKind(EngineKind::Kind w) {
-    WhichEngine = w;
-    return *this;
-  }
-
   /// setMCJITMemoryManager - Sets the MCJIT memory manager to use. This allows
   /// clients to customize their memory allocation policies for the MCJIT. This
   /// is only appropriate for the MCJIT; setting this and configuring the builder
diff --git a/llvm/include/llvm/ExecutionEngine/Interpreter.h b/llvm/include/llvm/ExecutionEngine/Interpreter.h
deleted file mode 100644
index b499cd6e0927c..0000000000000
--- a/llvm/include/llvm/ExecutionEngine/Interpreter.h
+++ /dev/null
@@ -1,28 +0,0 @@
-//===-- Interpreter.h - Abstract Execution Engine Interface -----*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file forces the interpreter to link in on certain operating systems.
-// (Windows).
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_EXECUTIONENGINE_INTERPRETER_H
-#define LLVM_EXECUTIONENGINE_INTERPRETER_H
-
-#include "llvm/ExecutionEngine/ExecutionEngine.h"
-#include "llvm/Support/Compiler.h"
-
-extern "C" LLVM_ABI void LLVMLinkInInterpreter();
-
-namespace {
-  struct ForceInterpreterLinking {
-    ForceInterpreterLinking() { LLVMLinkInInterpreter(); }
-  } ForceInterpreterLinking;
-}
-
-#endif
diff --git a/llvm/lib/ExecutionEngine/CMakeLists.txt b/llvm/lib/ExecutionEngine/CMakeLists.txt
index 02178ff526bf8..0b78f53919174 100644
--- a/llvm/lib/ExecutionEngine/CMakeLists.txt
+++ b/llvm/lib/ExecutionEngine/CMakeLists.txt
@@ -33,7 +33,6 @@ if( LLVM_USE_INTEL_JITEVENTS )
   add_subdirectory(IntelJITEvents)
 endif( LLVM_USE_INTEL_JITEVENTS )
 
-add_subdirectory(Interpreter)
 add_subdirectory(JITLink)
 add_subdirectory(MCJIT)
 add_subdirectory(Orc)
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
index eb3833dfdc9f2..4d1bc0d52e2dc 100644
--- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -469,8 +469,8 @@ int ExecutionEngine::runFunctionAsMain(Function *Fn,
 EngineBuilder::EngineBuilder() : EngineBuilder(nullptr) {}
 
 EngineBuilder::EngineBuilder(std::unique_ptr<Module> M)
-    : M(std::move(M)), WhichEngine(EngineKind::Either), ErrorStr(nullptr),
-      OptLevel(CodeGenOptLevel::Default), MemMgr(nullptr), Resolver(nullptr) {
+    : M(std::move(M)), ErrorStr(nullptr), OptLevel(CodeGenOptLevel::Default),
+      MemMgr(nullptr), Resolver(nullptr) {
 // IR module verification is enabled by default in debug builds, and disabled
 // by default in release builds.
 #ifndef NDEBUG
@@ -510,22 +510,9 @@ ExecutionEngine *EngineBuilder::create(TargetMachine *TM) {
   if (sys::DynamicLibrary::LoadLibraryPermanently(nullptr, ErrorStr))
     return nullptr;
 
-  // If the user specified a memory manager but didn't specify which engine to
-  // create, we assume they only want the JIT, and we fail if they only want
-  // the interpreter.
-  if (MemMgr) {
-    if (WhichEngine & EngineKind::JIT)
-      WhichEngine = EngineKind::JIT;
-    else {
-      if (ErrorStr)
-        *ErrorStr = "Cannot create an interpreter with a memory manager.";
-      return nullptr;
-    }
-  }
-
   // Unless the interpreter was explicitly selected or the JIT is not linked,
   // try making a JIT.
-  if ((WhichEngine & EngineKind::JIT) && TheTM) {
+  if (TheTM) {
     if (!TM->getTarget().hasJIT()) {
       errs() << "WARNING: This target JIT is not designed for the host"
              << " you are running.  If bad things happen, please choose"
@@ -543,17 +530,7 @@ ExecutionEngine *EngineBuilder::create(TargetMachine *TM) {
     }
   }
 
-  // If we can't make a JIT and we didn't request one specifically, try making
-  // an interpreter instead.
-  if (WhichEngine & EngineKind::Interpreter) {
-    if (ExecutionEngine::InterpCtor)
-      return ExecutionEngine::InterpCtor(std::move(M), ErrorStr);
-    if (ErrorStr)
-      *ErrorStr = "Interpreter has not been linked in.";
-    return nullptr;
-  }
-
-  if ((WhichEngine & EngineKind::JIT) && !ExecutionEngine::MCJITCtor) {
+  if (!ExecutionEngine::MCJITCtor) {
     if (ErrorStr)
       *ErrorStr = "JIT has not been linked in.";
   }
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp b/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp
index 700fb03addce2..14fa34be7c37a 100644
--- a/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp
+++ b/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp
@@ -105,9 +105,8 @@ LLVMBool LLVMCreateExecutionEngineForModule(LLVMExecutionEngineRef *OutEE,
                                             char **OutError) {
   std::string Error;
   EngineBuilder builder(std::unique_ptr<Module>(unwrap(M)));
-  builder.setEngineKind(EngineKind::Either)
-         .setErrorStr(&Error);
-  if (ExecutionEngine *EE = builder.create()){
+  builder.setErrorStr(&Error);
+  if (ExecutionEngine *EE = builder.create()) {
     *OutEE = wrap(EE);
     return 0;
   }
@@ -115,30 +114,13 @@ LLVMBool LLVMCreateExecutionEngineForModule(LLVMExecutionEngineRef *OutEE,
   return 1;
 }
 
-LLVMBool LLVMCreateInterpreterForModule(LLVMExecutionEngineRef *OutInterp,
-                                        LLVMModuleRef M,
-                                        char **OutError) {
-  std::string Error;
-  EngineBuilder builder(std::unique_ptr<Module>(unwrap(M)));
-  builder.setEngineKind(EngineKind::Interpreter)
-         .setErrorStr(&Error);
-  if (ExecutionEngine *Interp = builder.create()) {
-    *OutInterp = wrap(Interp);
-    return 0;
-  }
-  *OutError = strdup(Error.c_str());
-  return 1;
-}
-
 LLVMBool LLVMCreateJITCompilerForModule(LLVMExecutionEngineRef *OutJIT,
                                         LLVMModuleRef M,
                                         unsigned OptLevel,
                                         char **OutError) {
   std::string Error;
   EngineBuilder builder(std::unique_ptr<Module>(unwrap(M)));
-  builder.setEngineKind(EngineKind::JIT)
-      .setErrorStr(&Error)
-      .setOptLevel((CodeGenOptLevel)OptLevel);
+  builder.setErrorStr(&Error).setOptLevel((CodeGenOptLevel)OptLevel);
   if (ExecutionEngine *JIT = builder.create()) {
     *OutJIT = wrap(JIT);
     return 0;
@@ -194,8 +176,7 @@ LLVMBool LLVMCreateMCJITCompilerForModule(
 
   std::string Error;
   EngineBuilder builder(std::move(Mod));
-  builder.setEngineKind(EngineKind::JIT)
-      .setErrorStr(&Error)
+  builder.setErrorStr(&Error)
       .setOptLevel((CodeGenOptLevel)options.OptLevel)
       .setTargetOptions(targetOptions);
   bool JIT;
diff --git a/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt b/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt
deleted file mode 100644
index 14522ba2a1bff..0000000000000
--- a/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-add_llvm_component_library(LLVMInterpreter
-  Execution.cpp
-  ExternalFunctions.cpp
-  Interpreter.cpp
-
-  DEPENDS
-  intrinsics_gen
-
-  LINK_COMPONENTS
-  CodeGen
-  Core
-  ExecutionEngine
-  Support
-  )
-
-if( LLVM_ENABLE_FFI )
-  target_link_libraries( LLVMInterpreter PRIVATE FFI::ffi )
-endif()
diff --git a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
deleted file mode 100644
index 6b936b0edda17..0000000000000
--- a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
+++ /dev/null
@@ -1,2084 +0,0 @@
-//===-- Execution.cpp - Implement code to simulate the program ------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-//  This file contains the actual instruction interpreter.
-//
-//===----------------------------------------------------------------------===//
-
-#include "Interpreter.h"
-#include "llvm/ADT/APInt.h"
-#include "llvm/ADT/Statistic.h"
-#include "llvm/CodeGen/IntrinsicLowering.h"
-#include "llvm/IR/Constants.h"
-#include "llvm/IR/DerivedTypes.h"
-#include "llvm/IR/GetElementPtrTypeIterator.h"
-#include "llvm/IR/Instructions.h"
-#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/Debug.h"
-#include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/MathExtras.h"
-#include "llvm/Support/raw_ostream.h"
-#include <algorithm>
-#include <cmath>
-using namespace llvm;
-
-#define DEBUG_TYPE "interpreter"
-
-STATISTIC(NumDynamicInsts, "Number of dynamic instructions executed");
-
-static cl::opt<bool> PrintVolatile("interpreter-print-volatile", cl::Hidden,
-          cl::desc("make the interpreter print every volatile load and store"));
-
-//===----------------------------------------------------------------------===//
-//                     Various Helper Functions
-//===----------------------------------------------------------------------===//
-
-static void SetValue(Value *V, GenericValue Val, ExecutionContext &SF) {
-  SF.Values[V] = Val;
-}
-
-//===----------------------------------------------------------------------===//
-//                    Unary Instruction Implementations
-//===----------------------------------------------------------------------===//
-
-static void executeFNegInst(GenericValue &Dest, GenericValue Src, Type *Ty) {
-  switch (Ty->getTypeID()) {
-  case Type::FloatTyID:
-    Dest.FloatVal = -Src.FloatVal;
-    break;
-  case Type::DoubleTyID:
-    Dest.DoubleVal = -Src.DoubleVal;
-    break;
-  default:
-    llvm_unreachable("Unhandled type for FNeg instruction");
-  }
-}
-
-void Interpreter::visitUnaryOperator(UnaryOperator &I) {
-  ExecutionContext &SF = ECStack.back();
-  Type *Ty = I.getOperand(0)->getType();
-  GenericValue Src = getOperandValue(I.getOperand(0), SF);
-  GenericValue R; // Result
-
-  // First process vector operation
-  if (Ty->isVectorTy()) {
-    R.AggregateVal.resize(Src.AggregateVal.size());
-
-    switch(I.getOpcode()) {
-    default:
-      llvm_unreachable("Don't know how to handle this unary operator");
-      break;
-    case Instruction::FNeg:
-      if (cast<VectorType>(Ty)->getElementType()->isFloatTy()) {
-        for (unsigned i = 0; i < R.AggregateVal.size(); ++i)
-          R.AggregateVal[i].FloatVal = -Src.AggregateVal[i].FloatVal;
-      } else if (cast<VectorType>(Ty)->getElementType()->isDoubleTy()) {
-        for (unsigned i = 0; i < R.AggregateVal.size(); ++i)
-          R.AggregateVal[i].DoubleVal = -Src.AggregateVal[i].DoubleVal;
-      } else {
-        llvm_unreachable("Unhandled type for FNeg instruction");
-      }
-      break;
-    }
-  } else {
-    switch (I.getOpcode()) {
-    default:
-      llvm_unreachable("Don't know how to handle this unary operator");
-      break;
-    case Instruction::FNeg: executeFNegInst(R, Src, Ty); break;
-    }
-  }
-  SetValue(&I, R, SF);
-}
-
-//===----------------------------------------------------------------------===//
-//                    Binary Instruction Implementations
-//===----------------------------------------------------------------------===//
-
-#define IMPLEMENT_BINARY_OPERATOR(OP, TY) \
-   case Type::TY##TyID: \
-     Dest.TY##Val = Src1.TY##Val OP Src2.TY##Val; \
-     break
-
-static void executeFAddInst(GenericValue &Dest, GenericValue Src1,
-                            GenericValue Src2, Type *Ty) {
-  switch (Ty->getTypeID()) {
-    IMPLEMENT_BINARY_OPERATOR(+, Float);
-    IMPLEMENT_BINARY_OPERATOR(+, Double);
-  default:
-    dbgs() << "Unhandled type for FAdd instruction: " << *Ty << "\n";
-    llvm_unreachable(nullptr);
-  }
-}
-
-static void executeFSubInst(GenericValue &Dest, GenericValue Src1,
-                            GenericValue Src2, Type *Ty) {
-  switch (Ty->getTypeID()) {
-    IMPLEMENT_BINARY_OPERATOR(-, Float);
-    IMPLEMENT_BINARY_OPERATOR(-, Double);
-  default:
-    dbgs() << "Unhandled type for FSub instruction: " << *Ty << "\n";
-    llvm_unreachable(nullptr);
-  }
-}
-
-static void executeFMulInst(GenericValue &Dest, GenericValue Src1,
-                            GenericValue Src2, Type *Ty) {
-  switch (Ty->getTypeID()) {
-    IMPLEMENT_BINARY_OPERATOR(*, Float);
-    IMPLEMENT_BINARY_OPERATOR(*, Double);
-  default:
-    dbgs() << "Unhandled type for FMul instruction: " << *Ty << "\n";
-    llvm_unreachable(nullptr);
-  }
-}
-
-static void executeFDivInst(GenericValue &Dest, GenericValue Src1,
-                            GenericValue Src2, Type *Ty) {
-  switch (Ty->getTypeID()) {
-    IMPLEMENT_BINARY_OPERATOR(/, Float);
-    IMPLEMENT_BINARY_OPERATOR(/, Double);
-  default:
-    dbgs() << "Unhandled type for FDiv instruction: " << *Ty << "\n";
-    llvm_unreachable(nullptr);
-  }
-}
-
-static void executeFRemInst(GenericValue &Dest, GenericValue Src1,
-                            GenericValue Src2, Type *Ty) {
-  switch (Ty->getTypeID()) {
-  case Type::FloatTyID:
-    Dest.FloatVal = fmod(Src1.FloatVal, Src2.FloatVal);
-    break;
-  case Type::DoubleTyID:
-    Dest.DoubleVal = fmod(Src1.DoubleVal, Src2.DoubleVal);
-    break;
-  default:
-    dbgs() << "Unhandled type for Rem instruction: " << *Ty << "\n";
-    llvm_unreachable(nullptr);
-  }
-}
-
-#define IMPLEMENT_INTEGER_ICMP(OP, TY) \
-   case Type::IntegerTyID:  \
-      Dest.IntVal = APInt(1,Src1.IntVal.OP(Src2.IntVal)); \
-      break;
-
-#define IMPLEMENT_VECTOR_INTEGER_ICMP(OP, TY)                                  \
-  case Type::FixedVectorTyID:                                                  \
-  case Type::ScalableVectorTyID: {                                             \
-    assert(Src1.AggregateVal.size() == Src2.AggregateVal.size());              \
-    Dest.AggregateVal.resize(Src1.AggregateVal.size());                        \
-    for (uint32_t _i = 0; _i < Src1.AggregateVal.size(); _i++)                 \
-      Dest.AggregateVal[_i].IntVal = APInt(                                    \
-          1, Src1.AggregateVal[_i].IntVal.OP(Src2.AggregateVal[_i].IntVal));   \
-  } break;
-
-// Handle pointers specially because they must be compared with only as much
-// width as the host has.  We _do not_ want to be comparing 64 bit values when
-// running on a 32-bit target, otherwise the upper 32 bits might mess up
-// comparisons if they contain garbage.
-#define IMPLEMENT_POINTER_ICMP(OP) \
-   case Type::PointerTyID: \
-      Dest.IntVal = APInt(1,(void*)(intptr_t)Src1.PointerVal OP \
-                            (void*)(intptr_t)Src2.PointerVal); \
-      break;
-
-static GenericValue executeICMP_EQ(GenericValue Src1, GenericValue Src2,
-                                   Type *Ty) {
-  GenericValue Dest;
-  switch (Ty->getTypeID()) {
-    IMPLEMENT_INTEGER_ICMP(eq,Ty);
-    IMPLEMENT_VECTOR_INTEGER_ICMP(eq,Ty);
-    IMPLEMENT_POINTER_ICMP(==);
-  default:
-    dbgs() << "Unhandled type for ICMP_EQ predicate: " << *Ty << "\n";
-    llvm_unreachable(nullptr);
-  }
-  return Dest;
-}
-
-static GenericValue executeICMP_NE(GenericValue Src1, GenericValue Src2,
-                                   Type *Ty) {
-  GenericValue Dest;
-  switch (Ty->getTypeID()) {
-    IMPLEMENT_INTEGER_ICMP(ne,Ty);
-    IMPLEMENT_VECTOR_INTEGER_ICMP(ne,Ty);
-    IMPLEMENT_POINTER_ICMP(!=);
-  default:
-    dbgs() << "Unhandled type for ICMP_NE predicate: " << *Ty << "\n";
-    llvm_unreachable(nullptr);
-  }
-  return Dest;
-}
-
-static GenericValue executeICMP_ULT(GenericValue Src1, GenericValue Src2,
-                                    Type *Ty) {
-  GenericValue Dest;
-  switch (Ty->getTypeID()) {
-    IMPLEMENT_INTEGER_ICMP(ult,Ty);
-    IMPLEMENT_VECTOR_INTEGER_ICMP(ult,Ty);
-    IMPLEMENT_POINTER_ICMP(<);
-  default:
-    dbgs() << "Unhandled type for ICMP_ULT predicate: " << *Ty << "\n";
-    llvm_unreachable(nullptr);
-  }
-  return Dest;
-}
-
-static GenericValue executeICMP_SLT(GenericValue Src1, GenericValue Src2,
-                                    Type *Ty) {
-  GenericValue Dest;
-  switch (Ty->getTypeID()) {
-    IMPLEMENT_INTEGER_ICMP(slt,Ty);
-    IMPLEMENT_VECTOR_INTEGER_ICMP(slt,Ty);
-    IMPLEMENT_POINTER_ICMP(<);
-  default:
-    dbgs() << "Unhandled type for ICMP_SLT predicate: " << *Ty << "\n";
-    llvm_unreachable(nullptr);
-  }
-  return Dest;
-}
-
-static GenericValue executeICMP_UGT(GenericValue Src1, GenericValue Src2,
-                                    Type *Ty) {
-  GenericValue Dest;
-  switch (Ty->getTypeID()) {
-    IMPLEMENT_INTEGER_ICMP(ugt,Ty);
-    IMPLEMENT_VECTOR_INTEGER_ICMP(ugt,Ty);
-    IMPLEMENT_POINTER_ICMP(>);
-  default:
-    dbgs() << "Unhandled type for ICMP_UGT predicate: " << *Ty << "\n";
-    llvm_unreachable(nullptr);
-  }
-  return Dest;
-}
-
-static GenericValue executeICMP_SGT(GenericValue Src1, GenericValue Src2,
-                                    Type *Ty) {
-  GenericValue Dest;
-  switch (Ty->getTypeID()) {
-    IMPLEMENT_INTEGER_ICMP(sgt,Ty);
-    IMPLEMENT_VECTOR_INTEGER_ICMP(sgt,Ty);
-    IMPLEMENT_POINTER_ICMP(>);
-  default:
-    dbgs() << "Unhandled type for ICMP_SGT predicate: " << *Ty << "\n";
-    llvm_unreachable(nullptr);
-  }
-  return Dest;
-}
-
-static GenericValue executeICMP_ULE(GenericValue Src1, GenericValue Src2,
-                                    Type *Ty) {
-  GenericValue Dest;
-  switch (Ty->getTypeID()) {
-    IMPLEMENT_INTEGER_ICMP(ule,Ty);
-    IMPLEMENT_VECTOR_INTEGER_ICMP(ule,Ty);
-    IMPLEMENT_POINTER_ICMP(<=);
-  default:
-    dbgs() << "Unhandled type for ICMP_ULE predicate: " << *Ty << "\n";
-    llvm_unreachable(nullptr);
-  }
-  return Dest;
-}
-
-static GenericValue exec...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/220113


More information about the llvm-branch-commits mailing list