[PATCH] D7864: This patch introduces MemorySSA, a virtual SSA form for memory.Details on what it looks like are in MemorySSA.h

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 2 11:06:37 PST 2016


Actually, sigh, we didn't do that already because we hand them back to the
user as well.
Anyway, i'm working up a patch to fix these.


On Wed, Mar 2, 2016 at 10:56 AM, Daniel Berlin <dberlin at dberlin.org> wrote:

>
>
> On Wed, Mar 2, 2016 at 10:38 AM, Justin Lebar <jlebar at google.com> wrote:
>
>> jlebar added a comment.
>>
>> > Please let me know if that didn't end up fixing it (I lack an
>> ASAN-instrumented build of LLVM :) ).
>>
>>
>> Works now, although now that it's fixed asan is showing me memory leaks.
>> :)  One seems to be in the test itself, but another appears to be in the
>> actual code.
>>
>> Clearly not as urgent, but here's the report:
>>
>>   ********************
>>   FAIL: LLVM-Unit ::
>> Transforms/Utils/UtilsTests/MemorySSA.RemoveMemoryAccess (15985 of 15994)
>>   ******************** TEST 'LLVM-Unit ::
>> Transforms/Utils/UtilsTests/MemorySSA.RemoveMemoryAccess' FAILED
>> ********************
>>   Note: Google Test filter = MemorySSA.RemoveMemoryAccess
>>   [==========] Running 1 test from 1 test case.
>>   [----------] Global test environment set-up.
>>   [----------] 1 test from MemorySSA
>>   [ RUN      ] MemorySSA.RemoveMemoryAccess
>>   [       OK ] MemorySSA.RemoveMemoryAccess (25 ms)
>>   [----------] 1 test from MemorySSA (25 ms total)
>>
>>   [----------] Global test environment tear-down
>>   [==========] 1 test from 1 test case ran. (26 ms total)
>>   [  PASSED  ] 1 test.
>>
>>   =================================================================
>>   ==147403==ERROR: LeakSanitizer: detected memory leaks
>>
>>   Direct leak of 304 byte(s) in 1 object(s) allocated from:
>>       #0 0x4c66ab in operator new(unsigned long)
>> (/usr/local/google/home/jlebar/code/llvm/asan/unittests/Transforms/Utils/UtilsTests+0x4c66ab)
>>       #1 0xc89da5 in llvm::MemorySSA::buildMemorySSA(llvm::AAResults*,
>> llvm::DominatorTree*)
>> /usr/local/google/home/jlebar/llvm/src/lib/Transforms/Utils/MemorySSA.cpp:234:3
>>       #2 0x58f1eb in MemorySSA_RemoveMemoryAccess_Test::TestBody()
>> /usr/local/google/home/jlebar/llvm/src/unittests/Transforms/Utils/MemorySSA.cpp:55:29
>>       #3 0xd60843 in void
>> testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,
>> void>(testing::Test*, void (testing::Test::*)(), char const*)
>> /usr/local/google/home/jlebar/llvm/src/utils/unittest/googletest/src/gtest.cc:2145:12
>>       #4 0xd60843 in testing::Test::Run()
>> /usr/local/google/home/jlebar/llvm/src/utils/unittest/googletest/src/gtest.cc:2161
>>       #5 0xd651d4 in testing::TestInfo::Run()
>> /usr/local/google/home/jlebar/llvm/src/utils/unittest/googletest/src/gtest.cc:2309:5
>>       #6 0xd66496 in testing::TestCase::Run()
>> /usr/local/google/home/jlebar/llvm/src/utils/unittest/googletest/src/gtest.cc:2416:5
>>       #7 0xd7f5fa in testing::internal::UnitTestImpl::RunAllTests()
>> /usr/local/google/home/jlebar/llvm/src/utils/unittest/googletest/src/gtest.cc:4207:11
>>       #8 0xd7e82f in bool
>> testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
>> bool>(testing::internal::UnitTestImpl*, bool
>> (testing::internal::UnitTestImpl::*)(), char const*)
>> /usr/local/google/home/jlebar/llvm/src/utils/unittest/googletest/src/gtest.cc:2145:12
>>       #9 0xd7e82f in testing::UnitTest::Run()
>> /usr/local/google/home/jlebar/llvm/src/utils/unittest/googletest/src/gtest.cc:3841
>>       #10 0xd365e7 in main
>> /usr/local/google/home/jlebar/llvm/src/utils/unittest/UnitTestMain/TestMain.cpp:47:10
>>       #11 0x7fb091525ec4 in __libc_start_main
>> /build/eglibc-3GlaMS/eglibc-2.19/csu/libc-start.c:287
>>
>>
>
> This is because the walker is not reset when MemorySSALazy::releaseMemory
> is called.
> This is intentional at the time, because people may want MemorySSA built
> with a different non-default walker.  We stopped letting this happen at
> some point, and so we should just add Walker.reset() to
> MemorySSALazy::releaseMemory and declare victory.
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160302/323c6109/attachment.html>


More information about the llvm-commits mailing list