From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>,
Azat Khuzhin <a3at.mail@gmail.com>, Xi Wang <xi.wang@gmail.com>,
Pekka Enberg <penberg@kernel.org>, Jeff Garzik <jeff@garzik.org>
Subject: [PATCH] llvm: remove unneeded OP_COPY support
Date: Sun, 11 Dec 2016 11:17:29 +0100 [thread overview]
Message-ID: <20161211101729.26791-1-luc.vanoostenryck@gmail.com> (raw)
OP_COPY instructions are only introduced by the 'unSSA' phase
which is not used by sparse-llvm.
Remove the code which tried to handle this.
Cc: Azat Khuzhin <a3at.mail@gmail.com>
Cc: Xi Wang <xi.wang@gmail.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
sparse-llvm.c | 30 +-----------------------------
1 file changed, 1 insertion(+), 29 deletions(-)
diff --git a/sparse-llvm.c b/sparse-llvm.c
index 6b41afd8..5af473a3 100644
--- a/sparse-llvm.c
+++ b/sparse-llvm.c
@@ -788,34 +788,6 @@ static void output_op_cast(struct function *fn, struct instruction *insn, LLVMOp
insn->target->priv = target;
}
-static void output_op_copy(struct function *fn, struct instruction *insn,
- pseudo_t pseudo)
-{
- LLVMValueRef src, target;
- LLVMTypeRef const_type;
- char target_name[64];
-
- pseudo_name(insn->target, target_name);
- src = pseudo_to_value(fn, insn, pseudo);
- const_type = insn_symbol_type(fn->module, insn);
-
- /*
- * This is nothing more than 'target = src'
- *
- * TODO: find a better way to provide an identity function,
- * than using "X + 0" simply to produce a new LLVM pseudo
- */
-
- if (symbol_is_fp_type(insn->type))
- target = LLVMBuildFAdd(fn->builder, src,
- LLVMConstReal(const_type, 0.0), target_name);
- else
- target = LLVMBuildAdd(fn->builder, src,
- LLVMConstInt(const_type, 0, 0), target_name);
-
- insn->target->priv = target;
-}
reply other threads:[~2016-12-11 10:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161211101729.26791-1-luc.vanoostenryck@gmail.com \
--to=luc.vanoostenryck@gmail.com \
--cc=a3at.mail@gmail.com \
--cc=jeff@garzik.org \
--cc=linux-sparse@vger.kernel.org \
--cc=penberg@kernel.org \
--cc=xi.wang@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).