Page MenuHomePhabricator

[esan] Add calls from the ctor/dtor to the runtime library
ClosedPublic

Authored by zhaoqin on May 20 2016, 1:38 PM.

Details

Summary

Adds createEsanInitToolGV for creating a tool-specific variable passed
to the runtime library.

Adds dtor "esan.module_dtor" and inserts calls from the dtor to
"__esan_exit" in the runtime library.

Updates the EfficiencySanitizer test.

Diff Detail

Repository
rL LLVM

Event Timeline

zhaoqin updated this revision to Diff 57983.May 20 2016, 1:38 PM
zhaoqin retitled this revision from to [esan] Add calls from the ctor/dtor to the runtime library.
zhaoqin updated this object.
zhaoqin added a reviewer: aizatsky.
zhaoqin added subscribers: llvm-commits, eugenis, vitalybuka and 2 others.
aizatsky added inline comments.May 20 2016, 1:54 PM
lib/Transforms/Instrumentation/EfficiencySanitizer.cpp
209 ↗(On Diff #57983)

Please extract createDestructor function as well.

zhaoqin marked an inline comment as done.May 20 2016, 2:50 PM
zhaoqin updated this revision to Diff 57998.May 20 2016, 2:58 PM

fix the { position

aizatsky accepted this revision.May 20 2016, 3:08 PM
aizatsky edited edge metadata.
This revision is now accepted and ready to land.May 20 2016, 3:08 PM
zhaoqin updated this revision to Diff 58100.May 23 2016, 8:35 AM
zhaoqin edited edge metadata.

set createDestructor return void.

vitalybuka added inline comments.May 23 2016, 11:13 AM
lib/Transforms/Instrumentation/EfficiencySanitizer.cpp
186 ↗(On Diff #58100)

this is always nullptr

zhaoqin added inline comments.May 23 2016, 12:39 PM
lib/Transforms/Instrumentation/EfficiencySanitizer.cpp
186 ↗(On Diff #58100)

yes, xref the FIXME above. tool specific global variable to be added.
Next CL adds tool specific global variable creation, waiting for this CL to be landed before sending the next one.

zhaoqin added inline comments.
lib/Transforms/Instrumentation/EfficiencySanitizer.cpp
186 ↗(On Diff #58100)
This revision was automatically updated to reflect the committed changes.