This is an archive of the discontinued LLVM Phabricator instance.

[GVN] Check the EnablePRE flag prior to calling performScalarPRE
Needs ReviewPublic

Authored by mattd on Jan 9 2019, 3:04 PM.

Details

Summary

The EnablePRE flag is responsible for controlling access to both the BlockRPONumber map and to the routine that uses the map (performScalarPRE). While investigating an issue, it became apparent that there is a path to performScalarPRE that does not check the EnablePRE flag, and in that case we cannot guarantee BlockRPONumber is populated correctly. This patch introduces a guard along the path that accesses performScalarPRE.

This patch is based on a discussion at: https://reviews.llvm.org/D55974

Diff Detail

Event Timeline

mattd created this revision.Jan 9 2019, 3:04 PM