Revision 66e83e7e1aae4d038567173a3f2f2b6f72ea3c88 authored by Kristoffer Carlsson on 25 September 2023, 10:34:25 UTC, committed by GitHub on 25 September 2023, 10:34:25 UTC
This doesn't really serve any purpose to have and it gets very spammy.
1 parent 3c0d480
llvm-remove-ni.cpp
// This file is a part of Julia. License is MIT: https://julialang.org/license
#include "llvm-version.h"
#include "passes.h"
#include <llvm/Pass.h>
#include <llvm/IR/Module.h>
#include <llvm/IR/PassManager.h>
#include <llvm/Support/Debug.h>
#include "julia.h"
#define DEBUG_TYPE "remove_ni"
using namespace llvm;
namespace {
static bool removeNI(Module &M) JL_NOTSAFEPOINT
{
auto dlstr = M.getDataLayoutStr();
auto nistart = dlstr.find("-ni:");
if (nistart == std::string::npos)
return false;
auto len = dlstr.size();
auto niend = nistart + 1;
for (; niend < len; niend++) {
if (dlstr[niend] == '-') {
break;
}
}
dlstr.erase(nistart, niend - nistart);
M.setDataLayout(dlstr);
return true;
}
}
PreservedAnalyses RemoveNIPass::run(Module &M, ModuleAnalysisManager &AM)
{
if (removeNI(M)) {
return PreservedAnalyses::allInSet<CFGAnalyses>();
}
return PreservedAnalyses::all();
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...