[llvm-dev] About the concept of "materialization"

Pei Wang via llvm-dev llvm-dev at lists.llvm.org
Wed Jun 28 10:55:55 PDT 2017


Thanks for the explanation. But based on my inspection on the source code, it seems that materialization is related to lazily reading LLVM objects (Module, Function, etc.) into the memory from bitcode files, which is possibly useful during LTO. I’m not sure though.


From: <bruce.hoult at gmail.com> on behalf of Bruce Hoult <bruce at hoult.org>
Date: Wednesday, June 28, 2017 at 4:50 AM
To: Pei Wang <pxw172 at ist.psu.edu>
Cc: "llvm-dev at lists.llvm.org" <llvm-dev at lists.llvm.org>
Subject: Re: [llvm-dev] About the concept of "materialization"

You probably see it more often as "rematerialization".


I believe "materialization" by itself (not "re") would usually be about things like getting a large constant (maybe a bit pattern or mask) into a register before it can be used. Some ISAs such as x86 support large constants directly in the instruction, but in RISC you usually have to choose between using a data load instruction to get the constant from a constant pool (maybe global, maybe just after the function using it), or using a series of instructions such as load-high, shift, or-immediate to create the constant.

On Tue, Jun 27, 2017 at 12:07 AM, Pei Wang via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote:
I’m current debugging one of my LLVM passes which utilized inline assembly. I constantly encounter crashes related to “value materialization”, according to the error messages I received. It seems a big concept in LLVM (or maybe generally in compilation), but I cannot find any document that is comprehensive enough to help me understand what exactly materialization is for. Could someone offer some pointers to useful materials introducing this concept or just explain it to me if it is straightforward enough?


Pei Wang

LLVM Developers mailing list
llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170628/72da189b/attachment.html>

More information about the llvm-dev mailing list