summaryrefslogtreecommitdiff
path: root/compiler/sea_ir/instruction_nodes.h
diff options
context:
space:
mode:
author Dragos Sbirlea <dragoss@google.com> 2013-07-31 13:37:31 -0700
committer Dragos Sbirlea <dragoss@google.com> 2013-08-01 10:37:12 -0700
commitb40eddfc96b9ac235dea562e55ce2ad7b1cfb7c9 (patch)
tree9f33a14f2dd37980ff7e0434f913ad2aa91b1b2f /compiler/sea_ir/instruction_nodes.h
parent8d4fb0eb94ea3dd5db9461230e2c11926e4ebdb4 (diff)
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
Diffstat (limited to 'compiler/sea_ir/instruction_nodes.h')
-rw-r--r--compiler/sea_ir/instruction_nodes.h6
1 files changed, 5 insertions, 1 deletions
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<InstructionNode*> GetSSAUses() {
+ std::vector<InstructionNode*> GetSSAProducers() {
std::vector<int> uses = GetUses();
std::vector<InstructionNode*> ssa_uses;
for (std::vector<int>::const_iterator cit = uses.begin(); cit != uses.end(); cit++) {
@@ -70,6 +70,10 @@ class InstructionNode: public SeaNode {
return ssa_uses;
}
+ std::vector<InstructionNode*> GetSSAConsumers() {
+ return used_in_;
+ }
+
virtual void AddSSAUse(InstructionNode* use) {
used_in_.push_back(use);
}