This is an archive of the discontinued LLVM Phabricator instance.

[dfsan] Refactor defining TLS variables
ClosedPublic

Authored by stephan.yichao.zhao on Feb 18 2021, 12:17 AM.

Diff Detail

Event Timeline

stephan.yichao.zhao requested review of this revision.Feb 18 2021, 12:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 18 2021, 12:17 AM
morehouse added inline comments.Feb 18 2021, 7:55 AM
llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
1073

Considering this function is only useful inside runImpl, it might be better to use a lambda there instead. Then we can also capture Mod and Changed instead of passing them every time.

Then we could also probably avoid passing the Ty.

stephan.yichao.zhao retitled this revision from [dfsan] Refactor defining TLS variables to [dfsan] Refactor defining TLS variables.

chanegd getOrInsertGlobal to be a lambda.

We still keep Ty because it is different at callsites.

stephan.yichao.zhao marked an inline comment as done.Feb 18 2021, 10:00 AM
This revision is now accepted and ready to land.Feb 18 2021, 10:02 AM
This revision was landed with ongoing or failed builds.Feb 18 2021, 10:04 AM
This revision was automatically updated to reflect the committed changes.