[llvm-commits] RFC: Disable Constant Island Pass for Native Client (demo CL's)

Jason Kim jasonwkim at google.com
Thu Mar 1 10:06:19 PST 2012


On Thu, Mar 1, 2012 at 8:47 AM, Jim Grosbach <grosbach at apple.com> wrote:

> Why do you want to disable the constant island pass? That seems rather odd.
> -Jim
>

Hi Jim!

NaCl has strict instruction bundling requirements for .text. And  we expand
the .text with guard instructions for each branch and memory access.
We actually did spend quite a lot of effort to get constant islands to work
given that constraint, but our hacks on the CP pass were never very stable,
and caused a lot of headaches.
Instead, what we do downstream is to place the constants in .rodata and use
a pic movw/movt to materialize the address.

Thanks!


> On Mar 1, 2012, at 8:45 AM, Jason Kim <jasonwkim at google.com> wrote:
>
> > Hello everyone
> >
> > Please find enclosed a sequence of three patches, for the goal of
> disabling constant island pass, which is required for Native Client.
> >
> > These patches are based off of r147863, so its pretty far back, but I am
> posting these mainly to get feedback on certain glitches in ARM/thumb2
> tablegen that we ran into when we tried to port our local mods (which
> operate in ARM mode perfectly well) to Thumb2 mode.
> >
> > These patches are by no means "functional", but I deem it to be both
> small enough, AND substantial enough to show our intention/plan for
> disabling Constant Island Pass - and most importantly, get feedback from
> the ARM/Thumb2 tablegen experts on exactly what the right way to do this is:
> > These are distilled subsets of our current set of local mods, and are
> meant as 'for review only' (for now at least). Eventually, we would like to
> upstream as much of these as possible, but that requires a lot of splitting
> of our local mods into digestible chunks.
> > Please consider these patches as a first in a potentially long sequence
> of hopefully coherent split of NaCl localmods for upstreaming purposes.
> >
> > The most questionable bits are in  the second patch, where  the Thumb2
> ISEL match to properly lower a constant pool address to a pc relative
> movw/movt never happens.
> > Matter of fact, the pci pattern in the multiclass T2I_ld seems to be the
> culprit.  Currently, in our local repository, what we do is to generate a
> NaCl version of the pseudo for the *pci expansion and custom expand them to
> the required movw/movt.
> >
> > This methodology, although functional, seems somehow 'dirty' and we were
> wondering if there is a better way to do this. Certainly, in ARM codegen,
> such hackery was NOT necessary.
> >
> > The patches themselves contain comments which will hopefully explain
> some more of the details.
> >
> > Thank you
> >
> > -Jason
> >
> >
> >
> >
> <disable-constantisland-demo-01.patch><disable-constantisland-demo-02.patch><disable-constantisland-demo-03.patch>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120301/cb2af749/attachment.html>


More information about the llvm-commits mailing list