[llvm-commits] Uninitialized EH DWARF in the JIT

Nick Lewycky nlewycky at google.com
Fri Aug 21 11:29:42 PDT 2009

2009/8/21 Reid Kleckner <rnk at mit.edu>

> > This makes emitAlignment dead then, right? Why not change emitAlignment
> to
> > write the nops, and not take an extra parameter?
> No, the JITEmitter uses it for aligning the constant pool, and
> MachineCodeEmitters could potentially use it in other ways that don't
> actually require that the memory be initialized.  The question is, if
> we don't think it matters, should they be initialized to garbage, or
> to zeros?  I'd prefer uninitialized in release mode, and garbage in
> debug mode, which is what this patch implements.

That makes sense to me.

>  > Also, don't reimplement RoundUpToAlignment() as AlignPtr().
> Such a thing exists?  Awesome.  There's some serious proliferation of
> this little alignment bithack, and it involves these ugly casts to
> uintptr_t that are hard to read.

Yes. To quote myself from my first email in the thread, "Please use
RoundUpToAlignment() from llvm/Support/MathExtras.h."

Please fix that and then commit. And then watch the buildbots.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090821/fd4e7ff3/attachment.html>

More information about the llvm-commits mailing list