HomePhabricator

[X86] Extract HiPE prologue constants into metadata

Authored by mkuper on Jun 23 2016, 11:17 AM.

Description

[X86] Extract HiPE prologue constants into metadata

X86FrameLowering::adjustForHiPEPrologue() contains a hard-coded offset
into an Erlang Runtime System-internal data structure (the PCB). As the
layout of this data structure is prone to change, this poses problems
for maintaining compatibility.

To address this problem, the compiler can produce this information as
module-level named metadata. For example (where P_NSP_LIMIT is the
offending offset):

!hipe.literals = !{ !2, !3, !4 }
!2 = !{ !"P_NSP_LIMIT", i32 152 }
!3 = !{ !"X86_LEAF_WORDS", i32 24 }
!4 = !{ !"AMD64_LEAF_WORDS", i32 24 }

Patch by Magnus Lang

Differential Revision: http://reviews.llvm.org/D20363

llvm-svn: 273593

Details

Committed
mkuperJun 23 2016, 11:17 AM
Differential Revision
D20363: [X86] Extract HiPE prologue constants into metadata
Parents
rGe3ffbc38d92a: Typo.
Branches
Unknown
Tags
Unknown