[PATCH] Require an MCContext when constructing an MCDisassembler.

Lang Hames lhames at gmail.com
Mon Apr 14 21:49:17 PDT 2014


Committed in r206241. Thanks Jim!



On Mon, Apr 14, 2014 at 5:00 PM, Jim Grosbach <grosbach at apple.com> wrote:

> LGTM. Thanks!
>
> On Apr 11, 2014, at 8:15 PM, Lang Hames <lhames at gmail.com> wrote:
>
> Hi All,
>
> I would like to require that MCDisassemblers be constructed with
> MCContexts.
>
> There are two main reasons for this:
>
> (1) It is reasonable for an MCDisassembler to want to create constant
> and/or target-specific MCExprs, but there is currently no attached
> MCContext to create the expr in. (There was previously an MCContext member
> in MCDisassembler, but this was removed in r 206063, and only
> ever initialised in an ad-hoc fashion.)
>
> (2) Many in-tree targets are redundantly constructing MCRegisterInfo
> instances that could be obtained via the MCContext.
>
> The attached patch adds an MCContext member to MCDisassembler, and adds an
> MCContext argument to the MCDisassembler constructor. All in-tree targets
> and tools are updated. Any out-of-tree targets should be easily updated by
> following the template used in this patch. There should be no functional
> change to the behaviour of any disassembler.
>
> Cheers,
> Lang.
>
>
> <RequireMCContextForMCDisassembler.patch>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140414/950e718d/attachment.html>


More information about the llvm-commits mailing list