Page MenuHomePhabricator

[asan] Improve moving of non-instrumented allocas
ClosedPublic

Authored by kubamracek on Jul 19 2015, 3:52 AM.

Details

Summary

In r242510, non-instrumented allocas are now moved into the first basic block. This patch limits that to:

  1. Only move allocas that were originally in the first basic block.
  2. Only move allocas that are present *after* the first instrumented one (i.e. only move allocas up).

A testcase was updated to show behavior in these two cases. Without the patch, an alloca could be moved down, and could cause an invalid IR.

Diff Detail

Repository
rL LLVM

Event Timeline

kubamracek updated this revision to Diff 30114.Jul 19 2015, 3:52 AM
kubamracek retitled this revision from to [asan] Improve moving of non-instrumented allocas.
kubamracek updated this object.
kubamracek added subscribers: llvm-commits, samsonov, kcc and 4 others.
kcc accepted this revision.Jul 20 2015, 1:11 PM
kcc added a reviewer: kcc.

LGTM

This revision is now accepted and ready to land.Jul 20 2015, 1:11 PM
kubamracek updated this revision to Diff 30283.Jul 21 2015, 1:26 PM
kubamracek edited edge metadata.

Updated patch with one more assert (InsBefore is always in the entry block).

LGTM as well. Thanks Kuba!

atrick accepted this revision.Jul 21 2015, 3:50 PM
atrick added a reviewer: atrick.
atrick added a subscriber: atrick.

LGTM!

This revision was automatically updated to reflect the committed changes.