mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-29 14:40:25 +00:00
extract some more information from the intrinsic table
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27022 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1c070fc10b
commit
7056de375d
@ -124,7 +124,10 @@ void IntrinsicEmitter::run(std::ostream &OS) {
|
||||
// Emit mod/ref info for each function.
|
||||
EmitModRefInfo(Ints, OS);
|
||||
|
||||
// Emit side effect info for each function.
|
||||
// Emit table of non-memory accessing intrinsics.
|
||||
EmitNoMemoryInfo(Ints, OS);
|
||||
|
||||
// Emit side effect info for each intrinsic.
|
||||
EmitSideEffectInfo(Ints, OS);
|
||||
|
||||
// Emit a list of intrinsics with corresponding GCC builtins.
|
||||
@ -253,6 +256,25 @@ void IntrinsicEmitter::EmitModRefInfo(const std::vector<CodeGenIntrinsic> &Ints,
|
||||
OS << "#endif\n\n";
|
||||
}
|
||||
|
||||
void IntrinsicEmitter::
|
||||
EmitNoMemoryInfo(const std::vector<CodeGenIntrinsic> &Ints, std::ostream &OS) {
|
||||
OS << "// SelectionDAGIsel code.\n";
|
||||
OS << "#ifdef GET_NO_MEMORY_INTRINSICS\n";
|
||||
OS << " switch (IntrinsicID) {\n";
|
||||
OS << " default: break;\n";
|
||||
for (unsigned i = 0, e = Ints.size(); i != e; ++i) {
|
||||
switch (Ints[i].ModRef) {
|
||||
default: break;
|
||||
case CodeGenIntrinsic::NoMem:
|
||||
OS << " case Intrinsic::" << Ints[i].EnumName << ":\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
OS << " return true; // These intrinsics have no side effects.\n";
|
||||
OS << " }\n";
|
||||
OS << "#endif\n\n";
|
||||
}
|
||||
|
||||
void IntrinsicEmitter::
|
||||
EmitSideEffectInfo(const std::vector<CodeGenIntrinsic> &Ints, std::ostream &OS){
|
||||
OS << "// isInstructionTriviallyDead code.\n";
|
||||
|
@ -37,6 +37,8 @@ namespace llvm {
|
||||
std::ostream &OS);
|
||||
void EmitModRefInfo(const std::vector<CodeGenIntrinsic> &Ints,
|
||||
std::ostream &OS);
|
||||
void EmitNoMemoryInfo(const std::vector<CodeGenIntrinsic> &Ints,
|
||||
std::ostream &OS);
|
||||
void EmitSideEffectInfo(const std::vector<CodeGenIntrinsic> &Ints,
|
||||
std::ostream &OS);
|
||||
void EmitGCCBuiltinList(const std::vector<CodeGenIntrinsic> &Ints,
|
||||
|
Loading…
Reference in New Issue
Block a user