mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-13 14:35:54 +00:00
extract some more information from the intrinsic table
llvm-svn: 27022
This commit is contained in:
parent
76fdc46b2c
commit
e6a8522990
@ -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