aboutsummaryrefslogtreecommitdiff
path: root/test/Verifier
diff options
context:
space:
mode:
authorDan Gohman <sunfish@mozilla.com>2014-02-28 12:39:49 -0800
committerDan Gohman <sunfish@mozilla.com>2014-02-28 12:39:49 -0800
commitdc59054db06864099c1b1051b8ef28a30f13e6c7 (patch)
treeb666500aa3d0eb8e03379f55a43a6391c32ded29 /test/Verifier
parent3ef11173bf12b5fdc0a21bfd883b057718676e8f (diff)
Use range metadata instead of introducing selects.
When GlobalOpt has determined that a GlobalVariable only ever has two values, it would convert the GlobalVariable to a boolean, and introduce SelectInsts at every load, to choose between the two possible values. These SelectInsts introduce overhead and other unpleasantness. This patch makes GlobalOpt just add range metadata to loads from such GlobalVariables instead. This enables the same main optimization (as seen in test/Transforms/GlobalOpt/integer-bool.ll), without introducing selects. The main downside is that it doesn't get the memory savings of shrinking such GlobalVariables, but this is expected to be negligible.
Diffstat (limited to 'test/Verifier')
0 files changed, 0 insertions, 0 deletions