From e62ec45887142a0048f679bf91fefcc81a1e3ed0 Mon Sep 17 00:00:00 2001 From: Misha Brukman Date: Tue, 17 May 2005 02:27:30 +0000 Subject: Recommend writing new instruction selectors using pattern-based mechanisms llvm-svn: 22098 --- llvm/docs/WritingAnLLVMBackend.html | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'llvm/docs/WritingAnLLVMBackend.html') diff --git a/llvm/docs/WritingAnLLVMBackend.html b/llvm/docs/WritingAnLLVMBackend.html index 3bd23b46040..abf91feb8a8 100644 --- a/llvm/docs/WritingAnLLVMBackend.html +++ b/llvm/docs/WritingAnLLVMBackend.html @@ -109,15 +109,14 @@ described the instruction set with the assembly printer generator in mind, that step can be almost automated. -

Now, for static code generation you also need to write an instruction -selector for your platform: see lib/Target/*/*ISelSimple.cpp which -is no longer "simple" but it gives you the idea: you have to be able to create -MachineInstrs for any given LLVM instruction using the InstVisitor -pattern, and produce a MachineFunction with -MachineBasicBlocks full of MachineInstrs for a -corresponding LLVM Function. Creating an instruction selector is perhaps the -most time-consuming part of creating a back-end.

+

You also need to write an instruction selector for your platform. The +recommended method is the pattern-matching instruction selector. You can see +examples in other targets: lib/Target/*/*ISelPattern.cpp. The former +method for writing instruction selectors (not recommended) is +encapsulated in lib/Target/*/*ISelSimple.cpp, which are +InstVisitor-based translators, generating code for an LLVM instruction +at a time. Creating an instruction selector is perhaps the most time-consuming +part of creating a back-end.

To create a JIT for your platform:

-- cgit v1.2.3