Page MenuHomePhabricator

Add address-space mangling for stack related intrinsics
ClosedPublic

Authored by cdevadas on Jul 11 2019, 5:56 AM.

Details

Summary

This patch includes the changes for intrinsics
int_addressofreturnaddress,
int_frameaddress & int_sponentry.
A few more intrinsics will be coming with
similar changes in future patches.

Diff Detail

Repository
rL LLVM

Event Timeline

cdevadas created this revision.Jul 11 2019, 5:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2019, 5:56 AM

There also need to be some codegen changes. SelectionDAG uses the wrong pointer type as well when lowering

lib/CodeGen/SjLjEHPrepare.cpp
481 ↗(On Diff #209189)

This needs to use the alloca address space

lib/Target/X86/X86WinEHState.cpp
343 ↗(On Diff #209189)

Ditto

lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
769 ↗(On Diff #209189)

Ditto

903 ↗(On Diff #209189)

Ditto

lib/Transforms/Instrumentation/SanitizerCoverage.cpp
846 ↗(On Diff #209189)

Ditto

cdevadas updated this revision to Diff 209465.Jul 12 2019, 5:42 AM

Added allocaAddressSpace.

arsenm added inline comments.Jul 15 2019, 6:11 AM
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
5557–5559 ↗(On Diff #209465)

You can use TLI.getFrameIndexTy

cdevadas updated this revision to Diff 210082.Jul 16 2019, 6:19 AM

Used TLI.getFrameIndexTy. Thanks.

arsenm accepted this revision.Jul 19 2019, 10:45 AM

LGTM

This revision is now accepted and ready to land.Jul 19 2019, 10:45 AM
This revision was automatically updated to reflect the committed changes.