<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">why do you want to "ban" certain
instructions?<br>
<br>
is this for some architectural variant?<br>
<br>
the compiler is trying to match patterns from the target
independent part of the code generator.<br>
<br>
if you remove instructions, the compiler in many cases will no
longer be able to match certain patterns<br>
and you will get thos "can not select" messages.<br>
<br>
On 07/20/2012 03:05 AM, Geraint Yang wrote:<br>
</div>
<blockquote
cite="mid:CAAdM-RUtv=81FvCavM6hHbDz14p5hkxC6jiqVkqAim_HS7ez+A@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
Hi everyone,<br>
<br>
<font>I am a newbie to LLVM. I am trying to ban some of
instructions in Mips Instruction, for example, lh, lhu, sh, and
etc.<br>
I have tried to </font><font>directly comment lh, lhu, and sh
to make llvm not to choose these instruction when compiling,
however, it usually cause a 'can not select ...' error when
using 'short' data type in source code.<br>
Then I tried to expand these instructions in</font>
EmitInstrWithCustomInserter in file <font>lib/Target/Mips/MipsISelLowering.cpp,
just as commit in:<br>
<br>
<a moz-do-not-send="true"
href="https://github.com/geraint0923/LLVM-ThuMips/commit/6a9ca907f3e945c2bb1f9627e0e5fdcbd7964da2"
target="_blank">https://github.com/geraint0923/LLVM-ThuMips/commit/6a9ca907f3e945c2bb1f9627e0e5fdcbd7964da2</a><br>
<br>
It works fine for lh and lhu, and fails for sh:<br>
when expanding sh, there are four instruction, but in *.s
generated by modified llvm's llc, there are only two
instructions which are both sb, addiu and srl are gone.<br>
<br>
Is there anything wrong when expanding? <br>
And I wonder if there is another method to do the same thing.<br>
<br>
Any help will be appreciated.</font><br>
<br>
<br>
Thanks,<br>
Yang
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
</blockquote>
<br>
</body>
</html>