<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Nov 23, 2013, at 6:11 AM, Liu Xin <<a href="mailto:navy.xliu@gmail.com">navy.xliu@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">I think this after a second. I got your point. I can define a pseudo instruction for an instr-pair and expand it after post-RA-sched. as you said, in preEmitPass. <div> <div>The original intrinsic can also be kept. I just convert the intrinsic to pseudo instruction in TargetLower. Thank you for your enlightening suggestion! </div></div></div></blockquote><div><br></div>FYI: If you did want to use the existing ExpandPostRAPseudo pass, then you could probably expand the pseudo into a bundle of machine instructions. See MIBundleBuilder. The PostRAScheduler schedules bundles as a single instructions.</div><div><br></div><div>-Andy</div><div><br><blockquote type="cite"><div dir="ltr"><div>
<div><br></div><div>thanks,</div><div>--lx<br><div><br></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Nov 23, 2013 at 8:37 PM, Amara Emerson <span dir="ltr"><<a href="mailto:amara.emerson@gmail.com" target="_blank">amara.emerson@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What I meant was to write your own expansion pass and run it after the<br>
scheduler passes, e.g. in the pre-emit stage.<br>
> if (addPreEmitPass())<br>
printAndVerify("After PreEmit passes")<br>
<br>
Though if it's too hacky for you then fair enough.<br>
<br>
Amara<br>
<div><div class="h5"><br>
On 23 November 2013 03:17, Liu Xin <<a href="mailto:navy.xliu@gmail.com">navy.xliu@gmail.com</a>> wrote:<br>
> Amara,<br>
><br>
> first, thank you for answering. but I found expandPsuedo instructions<br>
> actually happens before post-RA, like the following code showing:<br>
> your approach is a little hacky, right? : )<br>
><br>
> // Expand pseudo instructions before second scheduling pass.<br>
> addPass(&ExpandPostRAPseudosID);<br>
> printAndVerify("After ExpandPostRAPseudos");<br>
><br>
> // Run pre-sched2 passes.<br>
> if (addPreSched2())<br>
> printAndVerify("After PreSched2 passes");<br>
><br>
> // Second pass scheduler.<br>
> if (getOptLevel() != CodeGenOpt::None) {<br>
> addPass(&PostRASchedulerID);<br>
> printAndVerify("After PostRAScheduler");<br>
> }<br>
><br>
><br>
> secondly, psuedo instruction is kind of compiler internal representation. I<br>
> wish our instruction pair can disclose to programmer. intrinsics can do<br>
> that.<br>
><br>
> thanks,<br>
> --lx<br>
><br>
><br>
> On Fri, Nov 22, 2013 at 9:45 PM, Amara Emerson <<a href="mailto:amara.emerson@arm.com">amara.emerson@arm.com</a>><br>
> wrote:<br>
>><br>
>> What about describing the instruction pairs as pseudo-instructions, and<br>
>> then expanding them in a machine function pass at the pre-emit stage?<br>
>><br>
>><br>
>><br>
>> Amara<br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu/" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
><br>
</blockquote></div><br></div>
_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></blockquote></div><br></body></html>