Intrinsics: introduce llvm_any_ty aka ValueType Any

Specifically, gc.result benefits from this greatly. Instead of:

gc.result.int.*
gc.result.float.*
gc.result.ptr.*
...

We now have a gc.result.* that can specialize to literally any type.

Differential Revision: http://reviews.llvm.org/D7020

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226857 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ramkumar Ramachandra
2015-01-22 20:14:38 +00:00
parent 7ed0364cee
commit 230796b278
15 changed files with 58 additions and 53 deletions

View File

@@ -54,7 +54,8 @@ bool llvm::isGCResult(const Instruction *inst) {
if (Function *F = call->getCalledFunction()) {
return (F->getIntrinsicID() == Intrinsic::experimental_gc_result_int ||
F->getIntrinsicID() == Intrinsic::experimental_gc_result_float ||
F->getIntrinsicID() == Intrinsic::experimental_gc_result_ptr);
F->getIntrinsicID() == Intrinsic::experimental_gc_result_ptr ||
F->getIntrinsicID() == Intrinsic::experimental_gc_result);
}
}
return false;