[Mem2Reg] Respect optnone
commit9c695e4fee1cfda08227872e8ca6a406f64173b0
authorJames Molloy <james.molloy@arm.com>
Fri, 11 Dec 2015 13:36:59 +0000 (11 13:36 +0000)
committerJames Molloy <james.molloy@arm.com>
Fri, 11 Dec 2015 13:36:59 +0000 (11 13:36 +0000)
tree214d02f0c726fb1d5ce7f58c5414263e28341c04
parente15387964886dcb3d919648218da958f9707d988
[Mem2Reg] Respect optnone

Mem2Reg shouldn't be optimizing a function that is marked
optnone. There is a test checking this that fails when mem2reg is
explicitly added to the standard pass pipeline.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255336 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/Mem2Reg.cpp
test/Transforms/Mem2Reg/optnone.ll [new file with mode: 0644]