mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
remove the MSIL backend. It isn't maintained, is buggy, has no testcases
and hasn't kept up with ToT. Approved by Anton. llvm-svn: 112375
This commit is contained in:
parent
92e13eeec0
commit
d16c80e27f
@ -543,13 +543,13 @@ TARGETS_TO_BUILD=""
|
||||
AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets],
|
||||
[Build specific host targets: all or target1,target2,... Valid targets are:
|
||||
host, x86, x86_64, sparc, powerpc, alpha, arm, mips, spu, pic16,
|
||||
xcore, msp430, systemz, blackfin, cbe, msil, and cpp (default=all)]),,
|
||||
xcore, msp430, systemz, blackfin, cbe, and cpp (default=all)]),,
|
||||
enableval=all)
|
||||
if test "$enableval" = host-only ; then
|
||||
enableval=host
|
||||
fi
|
||||
case "$enableval" in
|
||||
all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend MSIL CppBackend MBlaze" ;;
|
||||
all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend CppBackend MBlaze" ;;
|
||||
*)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do
|
||||
case "$a_target" in
|
||||
x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
|
||||
@ -566,7 +566,6 @@ case "$enableval" in
|
||||
systemz) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;;
|
||||
blackfin) TARGETS_TO_BUILD="Blackfin $TARGETS_TO_BUILD" ;;
|
||||
cbe) TARGETS_TO_BUILD="CBackend $TARGETS_TO_BUILD" ;;
|
||||
msil) TARGETS_TO_BUILD="MSIL $TARGETS_TO_BUILD" ;;
|
||||
cpp) TARGETS_TO_BUILD="CppBackend $TARGETS_TO_BUILD" ;;
|
||||
mblaze) TARGETS_TO_BUILD="MBlaze $TARGETS_TO_BUILD" ;;
|
||||
host) case "$llvm_cv_target_arch" in
|
||||
|
5
configure
vendored
5
configure
vendored
@ -1414,7 +1414,7 @@ Optional Features:
|
||||
--enable-targets Build specific host targets: all or
|
||||
target1,target2,... Valid targets are: host, x86,
|
||||
x86_64, sparc, powerpc, alpha, arm, mips, spu,
|
||||
pic16, xcore, msp430, systemz, blackfin, cbe, msil,
|
||||
pic16, xcore, msp430, systemz, blackfin, cbe,
|
||||
and cpp (default=all)
|
||||
--enable-cbe-printf-a Enable C Backend output with hex floating point via
|
||||
%a (default is YES)
|
||||
@ -4955,7 +4955,7 @@ if test "$enableval" = host-only ; then
|
||||
enableval=host
|
||||
fi
|
||||
case "$enableval" in
|
||||
all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend MSIL CppBackend MBlaze" ;;
|
||||
all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend CppBackend MBlaze" ;;
|
||||
*)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do
|
||||
case "$a_target" in
|
||||
x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
|
||||
@ -4972,7 +4972,6 @@ case "$enableval" in
|
||||
systemz) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;;
|
||||
blackfin) TARGETS_TO_BUILD="Blackfin $TARGETS_TO_BUILD" ;;
|
||||
cbe) TARGETS_TO_BUILD="CBackend $TARGETS_TO_BUILD" ;;
|
||||
msil) TARGETS_TO_BUILD="MSIL $TARGETS_TO_BUILD" ;;
|
||||
cpp) TARGETS_TO_BUILD="CppBackend $TARGETS_TO_BUILD" ;;
|
||||
mblaze) TARGETS_TO_BUILD="MBlaze $TARGETS_TO_BUILD" ;;
|
||||
host) case "$llvm_cv_target_arch" in
|
||||
|
@ -68,7 +68,6 @@ Almost dead code.
|
||||
lib/Transforms/IPO/MergeFunctions.cpp => consider for 2.8.
|
||||
llvm/Analysis/PointerTracking.h => Edwin wants this, consider for 2.8.
|
||||
GEPSplitterPass
|
||||
MSIL backend?
|
||||
-->
|
||||
|
||||
|
||||
@ -77,6 +76,7 @@ Almost dead code.
|
||||
strong phi elim
|
||||
llvm.dbg.value: variable debug info for optimized code
|
||||
loop dependence analysis
|
||||
TBAA
|
||||
-->
|
||||
|
||||
<!-- for announcement email:
|
||||
@ -489,8 +489,9 @@ on LLVM 2.7, this section lists some "gotchas" that you may run into upgrading
|
||||
from the previous release.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>.</li>
|
||||
<li>MSIL Backend removed.</li>
|
||||
<li>ABCD and SSI passes removed.</li>
|
||||
<li>'Union' LLVM IR feature removed.</li>
|
||||
</ul>
|
||||
|
||||
<p>In addition, many APIs have changed in this release. Some of the major LLVM
|
||||
@ -575,7 +576,7 @@ components, please contact us on the <a
|
||||
href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVMdev list</a>.</p>
|
||||
|
||||
<ul>
|
||||
<li>The MSIL, Alpha, SPU, MIPS, PIC16, Blackfin, MSP430, SystemZ and MicroBlaze
|
||||
<li>The Alpha, SPU, MIPS, PIC16, Blackfin, MSP430, SystemZ and MicroBlaze
|
||||
backends are experimental.</li>
|
||||
<li><tt>llc</tt> "<tt>-filetype=asm</tt>" (the default) is the only
|
||||
supported value for this option. XXX Update me</li>
|
||||
|
@ -1,3 +0,0 @@
|
||||
add_llvm_target(MSIL
|
||||
MSILWriter.cpp
|
||||
)
|
File diff suppressed because it is too large
Load Diff
@ -1,258 +0,0 @@
|
||||
//===-- MSILWriter.h - TargetMachine for the MSIL ---------------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file declares the MSILWriter that is used by the MSIL.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
#ifndef MSILWRITER_H
|
||||
#define MSILWRITER_H
|
||||
|
||||
#include "llvm/CallingConv.h"
|
||||
#include "llvm/Constants.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Instructions.h"
|
||||
#include "llvm/IntrinsicInst.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/PassManager.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/Analysis/FindUsedTypes.h"
|
||||
#include "llvm/Analysis/LoopInfo.h"
|
||||
#include "llvm/Support/FormattedStream.h"
|
||||
#include "llvm/Support/GetElementPtrTypeIterator.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
|
||||
namespace llvm {
|
||||
extern Target TheMSILTarget;
|
||||
|
||||
class MSILModule : public ModulePass {
|
||||
Module *ModulePtr;
|
||||
const std::set<const Type *>*& UsedTypes;
|
||||
const TargetData*& TD;
|
||||
|
||||
public:
|
||||
static char ID;
|
||||
MSILModule(const std::set<const Type *>*& _UsedTypes,
|
||||
const TargetData*& _TD)
|
||||
: ModulePass(ID), UsedTypes(_UsedTypes), TD(_TD) {}
|
||||
|
||||
void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<FindUsedTypes>();
|
||||
AU.addRequired<TargetData>();
|
||||
}
|
||||
|
||||
virtual const char *getPassName() const {
|
||||
return "MSIL backend definitions";
|
||||
}
|
||||
|
||||
virtual bool runOnModule(Module &M);
|
||||
|
||||
};
|
||||
|
||||
class MSILWriter : public FunctionPass {
|
||||
struct StaticInitializer {
|
||||
const Constant* constant;
|
||||
uint64_t offset;
|
||||
|
||||
StaticInitializer()
|
||||
: constant(0), offset(0) {}
|
||||
|
||||
StaticInitializer(const Constant* _constant, uint64_t _offset)
|
||||
: constant(_constant), offset(_offset) {}
|
||||
};
|
||||
|
||||
uint64_t UniqID;
|
||||
|
||||
uint64_t getUniqID() {
|
||||
return ++UniqID;
|
||||
}
|
||||
|
||||
public:
|
||||
formatted_raw_ostream &Out;
|
||||
Module* ModulePtr;
|
||||
const TargetData* TD;
|
||||
LoopInfo *LInfo;
|
||||
std::vector<StaticInitializer>* InitListPtr;
|
||||
std::map<const GlobalVariable*,std::vector<StaticInitializer> >
|
||||
StaticInitList;
|
||||
const std::set<const Type *>* UsedTypes;
|
||||
static char ID;
|
||||
DenseMap<const Value*, unsigned> AnonValueNumbers;
|
||||
unsigned NextAnonValueNumber;
|
||||
|
||||
MSILWriter(formatted_raw_ostream &o) : FunctionPass(ID), Out(o),
|
||||
NextAnonValueNumber(0) {
|
||||
UniqID = 0;
|
||||
}
|
||||
|
||||
enum ValueType {
|
||||
UndefVT,
|
||||
GlobalVT,
|
||||
InternalVT,
|
||||
ArgumentVT,
|
||||
LocalVT,
|
||||
ConstVT,
|
||||
ConstExprVT
|
||||
};
|
||||
|
||||
bool isVariable(ValueType V) {
|
||||
return V==GlobalVT || V==InternalVT || V==ArgumentVT || V==LocalVT;
|
||||
}
|
||||
|
||||
bool isConstValue(ValueType V) {
|
||||
return V==ConstVT || V==ConstExprVT;
|
||||
}
|
||||
|
||||
virtual const char *getPassName() const { return "MSIL backend"; }
|
||||
|
||||
void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<LoopInfo>();
|
||||
AU.setPreservesAll();
|
||||
}
|
||||
|
||||
bool runOnFunction(Function &F);
|
||||
|
||||
virtual bool doInitialization(Module &M);
|
||||
|
||||
virtual bool doFinalization(Module &M);
|
||||
|
||||
void printModuleStartup();
|
||||
|
||||
bool isZeroValue(const Value* V);
|
||||
|
||||
std::string getValueName(const Value* V);
|
||||
|
||||
std::string getLabelName(const Value* V);
|
||||
|
||||
std::string getLabelName(const std::string& Name);
|
||||
|
||||
std::string getConvModopt(CallingConv::ID CallingConvID);
|
||||
|
||||
std::string getArrayTypeName(Type::TypeID TyID, const Type* Ty);
|
||||
|
||||
std::string getPrimitiveTypeName(const Type* Ty, bool isSigned);
|
||||
|
||||
std::string getFunctionTypeName(const Type* Ty);
|
||||
|
||||
std::string getPointerTypeName(const Type* Ty);
|
||||
|
||||
std::string getTypeName(const Type* Ty, bool isSigned = false,
|
||||
bool isNested = false);
|
||||
|
||||
ValueType getValueLocation(const Value* V);
|
||||
|
||||
std::string getTypePostfix(const Type* Ty, bool Expand,
|
||||
bool isSigned = false);
|
||||
|
||||
void printConvToPtr();
|
||||
|
||||
void printPtrLoad(uint64_t N);
|
||||
|
||||
void printValuePtrLoad(const Value* V);
|
||||
|
||||
void printConstLoad(const Constant* C);
|
||||
|
||||
void printValueLoad(const Value* V);
|
||||
|
||||
void printValueSave(const Value* V);
|
||||
|
||||
void printBinaryInstruction(const char* Name, const Value* Left,
|
||||
const Value* Right);
|
||||
|
||||
void printSimpleInstruction(const char* Inst, const char* Operand = NULL);
|
||||
|
||||
void printPHICopy(const BasicBlock* Src, const BasicBlock* Dst);
|
||||
|
||||
void printBranchToBlock(const BasicBlock* CurrBB,
|
||||
const BasicBlock* TrueBB,
|
||||
const BasicBlock* FalseBB);
|
||||
|
||||
void printBranchInstruction(const BranchInst* Inst);
|
||||
|
||||
void printSelectInstruction(const Value* Cond, const Value* VTrue,
|
||||
const Value* VFalse);
|
||||
|
||||
void printIndirectLoad(const Value* V);
|
||||
|
||||
void printIndirectSave(const Value* Ptr, const Value* Val);
|
||||
|
||||
void printIndirectSave(const Type* Ty);
|
||||
|
||||
void printCastInstruction(unsigned int Op, const Value* V,
|
||||
const Type* Ty, const Type* SrcTy=0);
|
||||
|
||||
void printGepInstruction(const Value* V, gep_type_iterator I,
|
||||
gep_type_iterator E);
|
||||
|
||||
std::string getCallSignature(const FunctionType* Ty,
|
||||
const Instruction* Inst,
|
||||
std::string Name);
|
||||
|
||||
void printFunctionCall(const Value* FnVal, const Instruction* Inst);
|
||||
|
||||
void printIntrinsicCall(const IntrinsicInst* Inst);
|
||||
|
||||
void printCallInstruction(const Instruction* Inst);
|
||||
|
||||
void printICmpInstruction(unsigned Predicate, const Value* Left,
|
||||
const Value* Right);
|
||||
|
||||
void printFCmpInstruction(unsigned Predicate, const Value* Left,
|
||||
const Value* Right);
|
||||
|
||||
void printInvokeInstruction(const InvokeInst* Inst);
|
||||
|
||||
void printSwitchInstruction(const SwitchInst* Inst);
|
||||
|
||||
void printVAArgInstruction(const VAArgInst* Inst);
|
||||
|
||||
void printAllocaInstruction(const AllocaInst* Inst);
|
||||
|
||||
void printInstruction(const Instruction* Inst);
|
||||
|
||||
void printLoop(const Loop* L);
|
||||
|
||||
void printBasicBlock(const BasicBlock* BB);
|
||||
|
||||
void printLocalVariables(const Function& F);
|
||||
|
||||
void printFunctionBody(const Function& F);
|
||||
|
||||
void printConstantExpr(const ConstantExpr* CE);
|
||||
|
||||
void printStaticInitializerList();
|
||||
|
||||
void printFunction(const Function& F);
|
||||
|
||||
void printDeclarations(const TypeSymbolTable& ST);
|
||||
|
||||
unsigned int getBitWidth(const Type* Ty);
|
||||
|
||||
void printStaticConstant(const Constant* C, uint64_t& Offset);
|
||||
|
||||
void printStaticInitializer(const Constant* C, const std::string& Name);
|
||||
|
||||
void printVariableDefinition(const GlobalVariable* G);
|
||||
|
||||
void printGlobalVariables();
|
||||
|
||||
const char* getLibraryName(const Function* F);
|
||||
|
||||
const char* getLibraryName(const GlobalVariable* GV);
|
||||
|
||||
const char* getLibraryForSymbol(StringRef Name, bool isFunction,
|
||||
CallingConv::ID CallingConv);
|
||||
|
||||
void printExternals();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,16 +0,0 @@
|
||||
##===- lib/Target/MSIL/Makefile ----------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
LEVEL = ../../..
|
||||
LIBRARYNAME = LLVMMSIL
|
||||
DIRS = TargetInfo
|
||||
|
||||
include $(LEVEL)/Makefile.common
|
||||
|
||||
CompileCommonOpts := $(CompileCommonOpts) -Wno-format
|
@ -1,26 +0,0 @@
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
Vector instructions support.
|
||||
|
||||
ShuffleVector
|
||||
ExtractElement
|
||||
InsertElement
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
Add "OpaqueType" type.
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
"switch" instruction emulation with CLI "switch" instruction.
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
Write linker for external function, because function export need to know
|
||||
dynamic library where function located.
|
||||
|
||||
.method static hidebysig pinvokeimpl("msvcrt.dll" cdecl)
|
||||
void free(void*) preservesig {}
|
||||
|
||||
|
||||
|
@ -1,6 +0,0 @@
|
||||
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. )
|
||||
|
||||
add_llvm_library(LLVMMSILInfo
|
||||
MSILTargetInfo.cpp
|
||||
)
|
||||
|
@ -1,26 +0,0 @@
|
||||
//===-- MSILTargetInfo.cpp - MSIL Target Implementation -------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "MSILWriter.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
Target llvm::TheMSILTarget;
|
||||
|
||||
static unsigned MSIL_TripleMatchQuality(const std::string &TT) {
|
||||
// This class always works, but shouldn't be the default in most cases.
|
||||
return 1;
|
||||
}
|
||||
|
||||
extern "C" void LLVMInitializeMSILTargetInfo() {
|
||||
TargetRegistry::RegisterTarget(TheMSILTarget, "msil",
|
||||
"MSIL backend",
|
||||
&MSIL_TripleMatchQuality);
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
##===- lib/Target/MSIL/TargetInfo/Makefile -----------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
LEVEL = ../../../..
|
||||
LIBRARYNAME = LLVMMSILInfo
|
||||
|
||||
# Hack: we need to include 'main' target directory to grab private headers
|
||||
CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..
|
||||
|
||||
include $(LEVEL)/Makefile.common
|
Loading…
Reference in New Issue
Block a user