(From 1) layout specification: A module may specify a target specific data layout string that specifies how data is to be laid out in memory. The IR syntax for the data layout is simply:
target datalayout = "layout specification"
(From 2) The XXXTargetMachine constructor will specify a TargetDescription string that determines the data layout for the target machine, including characteristics such as pointer size, alignment, and endianness. For example, the constructor for SparcTargetMachine contains the following:
SparcTargetMachine::SparcTargetMachine(const Module &M, const std::string &FS)
: DataLayout("E-p:32:32-f128:128:128"),
Subtarget(M, FS), InstrInfo(Subtarget),
FrameInfo(TargetFrameInfo::StackGrowsDown, 8, 0) {
}
In this example, the layout specification string is "E-p:32:32-f128:128:128"
:
Class definition: DataLayout
Cite: relation between address spaces and physical memory locations
David Chisnall via llvm-dev llvm-dev at lists.llvm.org Wed Mar 23 05:34:32 PDT 2016
On 23 Mar 2016, at 12:33, Hongbin Zheng
DataLayout is per module and describes, among other things, the different size and alignment requirements of pointers to different address spaces.
David
If you could revise
the fundmental principles of
computer system design
to improve security...
... what would you change?