<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 10/3/17 6:41 PM, Matthias Braun via
llvm-dev wrote:<br>
</div>
<blockquote
cite="mid:565BC902-5C1D-4D79-8B84-8D0C022FDC8C@apple.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Oct 3, 2017, at 3:39 PM, Charith Mendis <<a
moz-do-not-send="true"
href="mailto:char.mendis1989@gmail.com" class="">char.mendis1989@gmail.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" style="font-family: Helvetica; font-size:
12px; font-style: normal; font-variant-caps: normal;
font-weight: normal; letter-spacing: normal; text-align:
start; text-indent: 0px; text-transform: none;
white-space: normal; word-spacing: 0px;
-webkit-text-stroke-width: 0px;" class="">If I know for
sure I am accessing 32 byte chunks at a time, how can I go
about changing the alignment of @u?
<div class=""><br class="">
</div>
<div class="">Should I use DataLayout's reset method? I
couldn't find a method to change alignment of one global
variable.</div>
</div>
</div>
</blockquote>
<div>GlobalObject::setAlignment()?</div>
</div>
</blockquote>
<br>
This is what we used in BBAC and PAMD (ISMM 2017); these systems
transform globals to align them on a power-of-two boundary.<br>
<br>
Regards,<br>
<br>
John Criswell<br>
<br>
<blockquote
cite="mid:565BC902-5C1D-4D79-8B84-8D0C022FDC8C@apple.com"
type="cite">
<div>
<div><br class="">
</div>
<div>- Matthias</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div dir="ltr" style="font-family: Helvetica; font-size:
12px; font-style: normal; font-variant-caps: normal;
font-weight: normal; letter-spacing: normal; text-align:
start; text-indent: 0px; text-transform: none;
white-space: normal; word-spacing: 0px;
-webkit-text-stroke-width: 0px;" class="">
<div class=""><br class="">
</div>
<div class="">Thanks</div>
</div>
<div class="gmail_extra" style="font-family: Helvetica;
font-size: 12px; font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing: normal;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; word-spacing: 0px;
-webkit-text-stroke-width: 0px;"><br class="">
<div class="gmail_quote">On Tue, Oct 3, 2017 at 6:34 PM,
Matthias Braun<span class="Apple-converted-space"> </span><span
dir="ltr" class=""><<a moz-do-not-send="true"
href="mailto:mbraun@apple.com" target="_blank"
class="">mbraun@apple.com</a>></span><span
class="Apple-converted-space"> </span>wrote:<br
class="">
<blockquote class="gmail_quote" style="margin: 0px 0px
0px 0.8ex; border-left-width: 1px; border-left-style:
solid; border-left-color: rgb(204, 204, 204);
padding-left: 1ex;">The effective alignment is part of
the load and store operations. Updating those would
mean that you need to know which ones are based on the
@u address.<br class="">
<br class="">
You can come up with some heuristics that track values
through getelementptr and similar constructs in llvm
IR and which will work in most cases.<br class="">
<br class="">
However as you can have arbitrary computations to
create the address for a load/store tracking the
source of such computations is actually undecidable in
general and you may have cases where you cannot
determine the origin when allowing arbitrary IR.<br
class="">
Because of this I'd recommend to rather adjust the
frontends type system so the loads and stores are
created with the correct alignment in the first place.<br
class="">
<br class="">
- Matthias<br class="">
<div class="">
<div class="h5"><br class="">
> On Oct 3, 2017, at 3:25 PM, Charith Mendis
via llvm-dev <<a moz-do-not-send="true"
href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>>
wrote:<br class="">
><br class="">
><br class="">
> What is the best way to change the alignment
of global variables and allocated structures in
LLVM during one of its optimization passes?<br
class="">
><br class="">
><br class="">
> For example, I want to change,<br class="">
><br class="">
> @u = internal unnamed_addr global [5 x [65 x
[65 x [65 x double]]]] zeroinitializer, align 16<br
class="">
><br class="">
> to align to 32 bytes.<br class="">
><br class="">
> How can this be accomplished so that all
other references in the code accessing this
structure are also updated.<br class="">
><br class="">
> Thank You<br class="">
><br class="">
> --<br class="">
> Kind regards,<br class="">
> Charith Mendis<br class="">
><br class="">
> Graduate Student,<br class="">
> CSAIL,<br class="">
> Massachusetts Institute of Technology<br
class="">
</div>
</div>
> ______________________________<wbr class="">_________________<br
class="">
> LLVM Developers mailing list<br class="">
><span class="Apple-converted-space"> </span><a
moz-do-not-send="true"
href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br
class="">
><span class="Apple-converted-space"> </span><a
moz-do-not-send="true"
href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev"
rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/<wbr
class="">mailman/listinfo/llvm-dev</a><br class="">
<br class="">
</blockquote>
</div>
<br class="">
<br class="" clear="all">
<div class=""><br class="">
</div>
--<span class="Apple-converted-space"> </span><br class="">
<div class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr" class="">
<div class="">Kind regards,<br class="">
Charith Mendis<br class="">
<br class="">
Graduate Student,
<div class="">CSAIL,<br class="">
<div class="">Massachusetts Institute of
Technology</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<br>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
John Criswell
Assistant Professor
Department of Computer Science, University of Rochester
<a class="moz-txt-link-freetext" href="http://www.cs.rochester.edu/u/criswell">http://www.cs.rochester.edu/u/criswell</a></pre>
</body>
</html>