Page MenuHomePhabricator

[NFC][CodeGen] Remove rarely used DL variable from SelectionDAGBuilder
Needs ReviewPublic

Authored by david-arm on Tue, Nov 23, 9:21 AM.

Details

Summary

There is a pointer to the DataLayout in SelectionDAGBuilder called
'DL' that is hardly ever used. In most cases the code seems to just
use DAG.getDataLayout() instead. Given that DL is also often used
as a shadowed variable for the debug location it seems sensible to
just kill off the few remaining uses and be consistent with the rest
of the code.

Diff Detail

Event Timeline

david-arm created this revision.Tue, Nov 23, 9:21 AM
david-arm requested review of this revision.Tue, Nov 23, 9:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptTue, Nov 23, 9:21 AM

Have you encountered many -wShadow issues? I ask because I always thought it odd that most shadow variable warnings are disabled on MSVC builds, and enabling them creates a LOT of warnings.

-wd4456 # Suppress 'declaration of 'var' hides local variable'
-wd4457 # Suppress 'declaration of 'var' hides function parameter'
-wd4458 # Suppress 'declaration of 'var' hides class member'
-wd4459 # Suppress 'declaration of 'var' hides global declaration'