Skip to content

Commit

Permalink
Integrate llvm-project @31015240d366e4bf6f114856caa6e9ce90742b7f (ire…
Browse files Browse the repository at this point in the history
…e-org#17799)

Carries the same reverts as the previous integrate
- revert

llvm/llvm-project@2c06fb8
- revert

llvm/llvm-project@fa06668
- revert

llvm/llvm-project@137a745
  • Loading branch information
qedawkins authored Jul 3, 2024
1 parent 698b75c commit dd7d4a1
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pkgci_regression_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ jobs:
--goldendispatch-rocm-clip 1569 \
--goldendispatch-rocm-vae 248 \
--goldensize-rocm-unet-bytes 2062938 \
--goldensize-rocm-clip-bytes 780200 \
--goldensize-rocm-clip-bytes 780328 \
--goldensize-rocm-vae-bytes 757933 \
--gpu-number 6 \
--rocm-chip gfx90a \
Expand Down
1 change: 1 addition & 0 deletions compiler/plugins/target/LLVMCPU/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ iree_compiler_cc_library(
deps = [
"//compiler/src/iree/compiler/Utils",
"@llvm-project//llvm:Analysis",
"@llvm-project//llvm:Core",
"@llvm-project//llvm:MC",
"@llvm-project//llvm:Passes",
"@llvm-project//llvm:Support",
Expand Down
1 change: 1 addition & 0 deletions compiler/plugins/target/LLVMCPU/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ iree_cc_library(
"LLVMTargetOptions.cpp"
DEPS
LLVMAnalysis
LLVMCore
LLVMMC
LLVMPasses
LLVMSupport
Expand Down
1 change: 1 addition & 0 deletions compiler/plugins/target/LLVMCPU/LLVMTargetOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/IR/Module.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ErrorHandling.h"
Expand Down
12 changes: 6 additions & 6 deletions compiler/plugins/target/MetalSPIRV/MSLToMetalLib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ namespace mlir::iree_compiler::IREE::HAL {

/// Returns the command to compile the given MSL source file into Metal library.
static std::string getMetalCompileCommand(MetalTargetPlatform platform,
StringRef mslFile,
StringRef libFile) {
llvm::StringRef mslFile,
llvm::StringRef libFile) {
const char *sdk = "";
switch (platform) {
case MetalTargetPlatform::macOS:
Expand Down Expand Up @@ -51,7 +51,7 @@ static std::string getMetalCompileCommand(MetalTargetPlatform platform,
}

/// Returns the given command via system shell.
static LogicalResult runSystemCommand(StringRef command) {
static LogicalResult runSystemCommand(llvm::StringRef command) {
LLVM_DEBUG(llvm::dbgs() << "Running system command: '" << command << "'\n");
int exitCode = system(command.data());
if (exitCode == 0)
Expand All @@ -62,9 +62,9 @@ static LogicalResult runSystemCommand(StringRef command) {
}

std::unique_ptr<llvm::MemoryBuffer>
compileMSLToMetalLib(MetalTargetPlatform targetPlatform, StringRef mslCode,
StringRef entryPoint) {
SmallString<32> mslFile, airFile, libFile;
compileMSLToMetalLib(MetalTargetPlatform targetPlatform,
llvm::StringRef mslCode, llvm::StringRef entryPoint) {
llvm::SmallString<32> mslFile, airFile, libFile;
int mslFd = 0;
llvm::sys::fs::createTemporaryFile(entryPoint, "metal", mslFd, mslFile);
llvm::sys::fs::createTemporaryFile(entryPoint, "metallib", libFile);
Expand Down
8 changes: 4 additions & 4 deletions compiler/src/iree/compiler/PluginAPI/Client.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ class PipelineExtensions {
// Adds input type mnemonics that this instance supports. At least one plugin
// must advertise support for a custom input type in order for it to be
// considered valid.
virtual void populateCustomInputConversionTypes(StringSet<> &typeMnemonics) {}
virtual void
populateCustomInputConversionTypes(llvm::StringSet<> &typeMnemonics) {}

// Adds input type mnemonics that this instance supports, if those types are
// detected in |module|.
// Requires that |registerDialects| has been called first.
virtual void
populateDetectedCustomInputConversionTypes(ModuleOp &module,
StringSet<> &typeMnemonics) {}
virtual void populateDetectedCustomInputConversionTypes(
ModuleOp &module, llvm::StringSet<> &typeMnemonics) {}

// Adds passes to the input preprocessing pipeline for the given
// InputDialectOptions::Type::plugin type with the given mnemonic.
Expand Down
5 changes: 3 additions & 2 deletions compiler/src/iree/compiler/PluginAPI/PluginManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,15 @@ class PluginManagerSession : public PipelineExtensions {
}
}

void populateCustomInputConversionTypes(StringSet<> &typeMnemonics) override {
void populateCustomInputConversionTypes(
llvm::StringSet<> &typeMnemonics) override {
for (auto *s : initializedSessions) {
s->populateCustomInputConversionTypes(typeMnemonics);
}
}

void populateDetectedCustomInputConversionTypes(
ModuleOp &module, StringSet<> &typeMnemonics) override {
ModuleOp &module, llvm::StringSet<> &typeMnemonics) override {
for (auto *s : initializedSessions) {
s->populateDetectedCustomInputConversionTypes(module, typeMnemonics);
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/iree/compiler/Utils/OptionUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class OptionsBinder {
-> decltype(static_cast<llvm::cl::generic_parser_base &>(parser),
static_cast<int>(*value), LocalOptionInfo::PrintCallback()) {
return [optionName, &parser, value](llvm::raw_ostream &os) {
StringRef valueName("<unknown>");
llvm::StringRef valueName("<unknown>");
for (unsigned i = 0; i < parser.getNumOptions(); ++i) {
V cmpValue = static_cast<const llvm::cl::OptionValue<V> &>(
parser.getOptionValue(i))
Expand Down
2 changes: 1 addition & 1 deletion third_party/llvm-project
Submodule llvm-project updated 1950 files

0 comments on commit dd7d4a1

Please sign in to comment.