[PATCH] MIR Serialization: Serialize global address machine operands.
Duncan P. N. Exon Smith
dexonsmith at apple.com
Thu Jun 25 12:38:51 PDT 2015
> On 2015-Jun-23, at 16:07, Alex Lorenz <arphaman at gmail.com> wrote:
>
> Hi dexonsmith, bob.wilson, bogner,
>
> This patch is based on a previous serialization patch that serializes MBB operands (http://reviews.llvm.org/D10608).
>
> This patch serializes the global address machine operands.
>
> REPOSITORY
> rL LLVM
>
> http://reviews.llvm.org/D10671
>
> Files:
> lib/CodeGen/MIRParser/MILexer.cpp
> lib/CodeGen/MIRParser/MILexer.h
> lib/CodeGen/MIRParser/MIParser.cpp
> lib/CodeGen/MIRParser/MIParser.h
> lib/CodeGen/MIRParser/MIRParser.cpp
> lib/CodeGen/MIRPrinter.cpp
> test/CodeGen/MIR/X86/global-value-operands.mir
> test/CodeGen/MIR/X86/invalid-global-value-index.mir
> test/CodeGen/MIR/X86/undefined-global-value.mir
>
> EMAIL PREFERENCES
> http://reviews.llvm.org/settings/panel/emailpreferences/
> <D10671.28299.patch>
> Index: lib/CodeGen/MIRParser/MIParser.cpp
> ===================================================================
> --- lib/CodeGen/MIRParser/MIParser.cpp
> +++ lib/CodeGen/MIRParser/MIParser.cpp
> @@ -34,15 +36,18 @@
> MIToken Token;
> /// Maps from basic block numbers to MBBs.
> const DenseMap<unsigned, MachineBasicBlock *> &MBBMapping;
> + /// Maps from indices to unnamed global values and metadata nodes.
> + const SlotMapping &LLVMModuleMapping;
Everything here is LLVM, so this is a bit confusing; so is the word
Module here. What you're really talking about is a mapping at the
IR-level (as opposed to the MIR-level, or the MC-level).
I suggest "IRSlots". (For consistency, you could (in a separate commit)
change "MBBMapping" to "MBBSlots" ("mapping" doesn't really tell you
anything about the key or the value; could also just be "MBBs").)
LGTM after that.
More information about the llvm-commits
mailing list