Mercurial > hg > truffle
comparison src/share/vm/c1/c1_CodeStubs.hpp @ 8860:46f6f063b272
7153771: array bound check elimination for c1
Summary: when possible optimize out array bound checks, inserting predicates when needed.
Reviewed-by: never, kvn, twisti
Contributed-by: thomaswue <thomas.wuerthinger@oracle.com>
author | roland |
---|---|
date | Thu, 21 Mar 2013 09:27:54 +0100 |
parents | db9981fd3124 |
children | f98f5d48f511 |
comparison
equal
deleted
inserted
replaced
8780:98f3af397705 | 8860:46f6f063b272 |
---|---|
164 #ifndef PRODUCT | 164 #ifndef PRODUCT |
165 virtual void print_name(outputStream* out) const { out->print("RangeCheckStub"); } | 165 virtual void print_name(outputStream* out) const { out->print("RangeCheckStub"); } |
166 #endif // PRODUCT | 166 #endif // PRODUCT |
167 }; | 167 }; |
168 | 168 |
169 // stub used when predicate fails and deoptimization is needed | |
170 class PredicateFailedStub: public CodeStub { | |
171 private: | |
172 CodeEmitInfo* _info; | |
173 | |
174 public: | |
175 PredicateFailedStub(CodeEmitInfo* info); | |
176 virtual void emit_code(LIR_Assembler* e); | |
177 virtual CodeEmitInfo* info() const { return _info; } | |
178 virtual void visit(LIR_OpVisitState* visitor) { | |
179 visitor->do_slow_case(_info); | |
180 } | |
181 #ifndef PRODUCT | |
182 virtual void print_name(outputStream* out) const { out->print("PredicateFailedStub"); } | |
183 #endif // PRODUCT | |
184 }; | |
169 | 185 |
170 class DivByZeroStub: public CodeStub { | 186 class DivByZeroStub: public CodeStub { |
171 private: | 187 private: |
172 CodeEmitInfo* _info; | 188 CodeEmitInfo* _info; |
173 int _offset; | 189 int _offset; |