From 0b118206bf3411722707f2e5cab8fd2eedcd50d6 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Mon, 16 Jan 2006 21:12:35 +0000 Subject: For PR411: This patch is an incremental step towards supporting a flat symbol table. It de-overloads the intrinsic functions by providing type-specific intrinsics and arranging for automatically upgrading from the old overloaded name to the new non-overloaded name. Specifically: llvm.isunordered -> llvm.isunordered.f32, llvm.isunordered.f64 llvm.sqrt -> llvm.sqrt.f32, llvm.sqrt.f64 llvm.ctpop -> llvm.ctpop.i8, llvm.ctpop.i16, llvm.ctpop.i32, llvm.ctpop.i64 llvm.ctlz -> llvm.ctlz.i8, llvm.ctlz.i16, llvm.ctlz.i32, llvm.ctlz.i64 llvm.cttz -> llvm.cttz.i8, llvm.cttz.i16, llvm.cttz.i32, llvm.cttz.i64 New code should not use the overloaded intrinsic names. Warnings will be emitted if they are used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25366 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/Local.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'lib/Transforms/Utils/Local.cpp') diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index c4b69a40d4..cfd67f2d83 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/lib/Transforms/Utils/Local.cpp @@ -297,14 +297,25 @@ bool llvm::isInstructionTriviallyDead(Instruction *I) { case Intrinsic::returnaddress: case Intrinsic::frameaddress: case Intrinsic::stacksave: - case Intrinsic::isunordered: + case Intrinsic::isunordered_f32: + case Intrinsic::isunordered_f64: case Intrinsic::bswap_i16: case Intrinsic::bswap_i32: case Intrinsic::bswap_i64: - case Intrinsic::ctpop: - case Intrinsic::ctlz: - case Intrinsic::cttz: - case Intrinsic::sqrt: + case Intrinsic::ctpop_i8: + case Intrinsic::ctpop_i16: + case Intrinsic::ctpop_i32: + case Intrinsic::ctpop_i64: + case Intrinsic::ctlz_i8: + case Intrinsic::ctlz_i16: + case Intrinsic::ctlz_i32: + case Intrinsic::ctlz_i64: + case Intrinsic::cttz_i8: + case Intrinsic::cttz_i16: + case Intrinsic::cttz_i32: + case Intrinsic::cttz_i64: + case Intrinsic::sqrt_f32: + case Intrinsic::sqrt_f64: return true; // These intrinsics have no side effects. } return false; -- cgit v1.2.3