diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2015-04-15 14:17:44 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2015-04-15 14:17:44 +0100 |
commit | 0d9f17de8f21a10702de1510b73e89d07b3b9bbf (patch) | |
tree | 3d58a2a165ee2bc5af0e813b1ffa893fba72ed6d /compiler/optimizing/live_ranges_test.cc | |
parent | 9bb3e8e10d7d9230a323511094a9e260062a1473 (diff) | |
download | art-0d9f17de8f21a10702de1510b73e89d07b3b9bbf.tar.gz art-0d9f17de8f21a10702de1510b73e89d07b3b9bbf.tar.bz2 art-0d9f17de8f21a10702de1510b73e89d07b3b9bbf.zip |
Move the linear order to the HGraph.
Bug found by Zheng Xu: SsaLivenessAnalysis being a stack allocated
object, we should not refer to it in later phases of the compiler.
Specifically, the code generator was using the linear order, which
was stored in the liveness analysis object.
Change-Id: I574641f522b7b86fc43f3914166108efc72edb3b
Diffstat (limited to 'compiler/optimizing/live_ranges_test.cc')
-rw-r--r-- | compiler/optimizing/live_ranges_test.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/optimizing/live_ranges_test.cc b/compiler/optimizing/live_ranges_test.cc index 61d6593f2b..52367730ed 100644 --- a/compiler/optimizing/live_ranges_test.cc +++ b/compiler/optimizing/live_ranges_test.cc @@ -69,7 +69,7 @@ TEST(LiveRangesTest, CFG1) { std::unique_ptr<const X86InstructionSetFeatures> features_x86( X86InstructionSetFeatures::FromCppDefines()); x86::CodeGeneratorX86 codegen(graph, *features_x86.get(), CompilerOptions()); - SsaLivenessAnalysis liveness(*graph, &codegen); + SsaLivenessAnalysis liveness(graph, &codegen); liveness.Analyze(); LiveInterval* interval = liveness.GetInstructionFromSsaIndex(0)->GetLiveInterval(); @@ -117,7 +117,7 @@ TEST(LiveRangesTest, CFG2) { std::unique_ptr<const X86InstructionSetFeatures> features_x86( X86InstructionSetFeatures::FromCppDefines()); x86::CodeGeneratorX86 codegen(graph, *features_x86.get(), CompilerOptions()); - SsaLivenessAnalysis liveness(*graph, &codegen); + SsaLivenessAnalysis liveness(graph, &codegen); liveness.Analyze(); LiveInterval* interval = liveness.GetInstructionFromSsaIndex(0)->GetLiveInterval(); @@ -168,7 +168,7 @@ TEST(LiveRangesTest, CFG3) { std::unique_ptr<const X86InstructionSetFeatures> features_x86( X86InstructionSetFeatures::FromCppDefines()); x86::CodeGeneratorX86 codegen(graph, *features_x86.get(), CompilerOptions()); - SsaLivenessAnalysis liveness(*graph, &codegen); + SsaLivenessAnalysis liveness(graph, &codegen); liveness.Analyze(); // Test for the 4 constant. @@ -247,7 +247,7 @@ TEST(LiveRangesTest, Loop1) { std::unique_ptr<const X86InstructionSetFeatures> features_x86( X86InstructionSetFeatures::FromCppDefines()); x86::CodeGeneratorX86 codegen(graph, *features_x86.get(), CompilerOptions()); - SsaLivenessAnalysis liveness(*graph, &codegen); + SsaLivenessAnalysis liveness(graph, &codegen); liveness.Analyze(); // Test for the 0 constant. @@ -327,7 +327,7 @@ TEST(LiveRangesTest, Loop2) { std::unique_ptr<const X86InstructionSetFeatures> features_x86( X86InstructionSetFeatures::FromCppDefines()); x86::CodeGeneratorX86 codegen(graph, *features_x86.get(), CompilerOptions()); - SsaLivenessAnalysis liveness(*graph, &codegen); + SsaLivenessAnalysis liveness(graph, &codegen); liveness.Analyze(); // Test for the 0 constant. @@ -405,7 +405,7 @@ TEST(LiveRangesTest, CFG4) { std::unique_ptr<const X86InstructionSetFeatures> features_x86( X86InstructionSetFeatures::FromCppDefines()); x86::CodeGeneratorX86 codegen(graph, *features_x86.get(), CompilerOptions()); - SsaLivenessAnalysis liveness(*graph, &codegen); + SsaLivenessAnalysis liveness(graph, &codegen); liveness.Analyze(); // Test for the 0 constant. |