<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 03/28/2013 12:22 PM, Nadav Rotem
wrote:<br>
</div>
<blockquote
cite="mid:5C246ADE-A7BF-4B40-B8D8-7EBBCC9281B2@apple.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
Hi Reed,
<div><br>
<div>
<div>On Mar 28, 2013, at 12:18 PM, Reed Kotler <<a
moz-do-not-send="true" href="mailto:rkotler@mips.com">rkotler@mips.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite"><span style="font-family: Helvetica;
font-size: 12px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent:
0px; text-transform: none; white-space: normal; widows:
auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
float: none; display: inline !important;">As for the
BasicTransformInfoPassass, for this dual mode I'm using
createNoTargetTransformInfoPass right now.</span><br
style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;">
</blockquote>
<div><br>
</div>
<div>So, MIPS does not need LSR, LowerSwitch and other
optimizations that depend on TTI ?</div>
<br>
</div>
</div>
</blockquote>
As an experiment, I built a flavor of llvm inside of Mips that
always uses <span style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; float: none; display: inline
!important;"><big>createNoTargetTransformInfoPass and it passed
make check and ran all of test-suite with no problems for
Mips32.<br>
<br>
This is not a realistic long term solution but the functionality
works at least.</big><br>
</span>
<blockquote
cite="mid:5C246ADE-A7BF-4B40-B8D8-7EBBCC9281B2@apple.com"
type="cite">
<div>
<div>
<blockquote type="cite"><span style="font-family: Helvetica;
font-size: 12px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent:
0px; text-transform: none; white-space: normal; widows:
auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
float: none; display: inline !important;">I will solve
this issue of the BasicTransformInfoPass being immutable
after this initial checking which gets all the
functionality. I was able to make in a function pass but
ran into some issues so I put that</span><br
style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<span style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px; float:
none; display: inline !important;">aside for now.</span><br
style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<br style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;">
</blockquote>
</div>
<br>
<div>IMHO the right way to handle target function attributes is
to re-initialize the target machine and TTI for every function
(if the attributes changed). Do you have another solution in
mind ?</div>
<div><br>
</div>
</div>
</blockquote>
I agree. I need to study that code more to have some ideas as to how
to do this.<br>
Maybe you or Bill Wendling know exactly how to do this. If you guys
want to work on that I can leave it alone or else I'll probably
start to work on it after I push what I have thus far. I will
probably<br>
push my changes sometime next week after more testing and cleanup.<br>
<br>
I will be putting this createNoTargetTransformationInfoPass on a
mips specific switch for now.<br>
<br>
In gcc, they actually have an option which compiles every other
function as either mips16 or nomips16 as a way to test this on a
large source base. I will probably add that option.<br>
<br>
My solution to all of this was surprisingly simple after I got a
good handle on this problem.<br>
It would work for ARM and ARM thumb easily. It's not a very big
patch but I went through many<br>
iterations and was able to eliminate all target independent parts of
the patch in that way.<br>
<br>
<blockquote
cite="mid:5C246ADE-A7BF-4B40-B8D8-7EBBCC9281B2@apple.com"
type="cite">
<div>
<div>Thanks,</div>
<div>Nadav</div>
</div>
</blockquote>
<br>
</body>
</html>