This is an archive of the discontinued LLVM Phabricator instance.

[dfsan] Remove deadcode from DFSanFunction::get*TLS*()
ClosedPublic

Authored by stephan.yichao.zhao on Nov 18 2020, 9:29 PM.

Details

Summary

clean more deadcode after D84704

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptNov 18 2020, 9:29 PM
stephan.yichao.zhao requested review of this revision.Nov 18 2020, 9:29 PM
stephan.yichao.zhao retitled this revision from Remove deadcode from DFSanFunction::get*TLS*() to [dfsan] Remove deadcode from DFSanFunction::get*TLS*().
morehouse accepted this revision.Nov 19 2020, 6:25 AM
morehouse added inline comments.
llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
1071

Since these functions are now just assigning and returning variables, can we completely remove the functions and the *TLSPtr variables, and just use DFS.*TLS directly?

This revision is now accepted and ready to land.Nov 19 2020, 6:25 AM
stephan.yichao.zhao marked an inline comment as done.

addressed comments

This revision was landed with ongoing or failed builds.Nov 19 2020, 1:13 PM
This revision was automatically updated to reflect the committed changes.

FYI this results in unused private fields which causes diagnostic errors for -Wunused-private-field.

llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:365:13: error: private field 'GetArgTLS' is not used [-Werror,-Wunused-private-field]
  Constant *GetArgTLS;
            ^
llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:366:13: error: private field 'GetRetvalTLS' is not used [-Werror,-Wunused-private-field]
  Constant *GetRetvalTLS;

FYI this results in unused private fields which causes diagnostic errors for -Wunused-private-field.

llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:365:13: error: private field 'GetArgTLS' is not used [-Werror,-Wunused-private-field]
  Constant *GetArgTLS;
            ^
llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:366:13: error: private field 'GetRetvalTLS' is not used [-Werror,-Wunused-private-field]
  Constant *GetRetvalTLS;

Fixed in https://reviews.llvm.org/D91820/