From b40eddfc96b9ac235dea562e55ce2ad7b1cfb7c9 Mon Sep 17 00:00:00 2001 From: Dragos Sbirlea Date: Wed, 31 Jul 2013 13:37:31 -0700 Subject: Added SEA IR type infrastructure (and a bit of cleanup). compiler/Android.mk: Added new files to compile. instruction_nodes.h, code_gen.cc: Renamed GetSSAUses to GetSSAProducers to avoid confusion (uses of what?). sea.cc: Added invoke of type inference framework. sea.h: Expose dex_file through GetDexFile(). Added GetPositionInSIgnature() for SignatureNodes. sea.cc: Cleanup of debug output. visitor.h: Removed dependence on LLVM (now only in code_gen.*). Corrected minor typo in comment. frontend.cc: Renamed access_flags for clarity. Change-Id: I211d2e9ff1e0c4f910de73a52a5ac2c50e4ca7df --- compiler/sea_ir/instruction_nodes.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'compiler/sea_ir/instruction_nodes.h') diff --git a/compiler/sea_ir/instruction_nodes.h b/compiler/sea_ir/instruction_nodes.h index 6f9bdddf77..1b81e9add3 100644 --- a/compiler/sea_ir/instruction_nodes.h +++ b/compiler/sea_ir/instruction_nodes.h @@ -61,7 +61,7 @@ class InstructionNode: public SeaNode { } // Returns the ordered set of Instructions that define the input operands of this instruction. // Precondition: SeaGraph.ConvertToSSA(). - std::vector GetSSAUses() { + std::vector GetSSAProducers() { std::vector uses = GetUses(); std::vector ssa_uses; for (std::vector::const_iterator cit = uses.begin(); cit != uses.end(); cit++) { @@ -70,6 +70,10 @@ class InstructionNode: public SeaNode { return ssa_uses; } + std::vector GetSSAConsumers() { + return used_in_; + } + virtual void AddSSAUse(InstructionNode* use) { used_in_.push_back(use); } -- cgit v1.2.3-59-g8ed1b