dump_cfg_file_name_(""),
dump_cfg_append_(false),
force_determinism_(false),
- register_allocation_strategy_(RegisterAllocator::kRegisterAllocatorDefault) {
+ register_allocation_strategy_(RegisterAllocator::kRegisterAllocatorDefault),
+ passes_to_run_(nullptr) {
}
CompilerOptions::~CompilerOptions() {
const std::string& dump_cfg_file_name,
bool dump_cfg_append,
bool force_determinism,
- RegisterAllocator::Strategy regalloc_strategy
+ RegisterAllocator::Strategy regalloc_strategy,
+ const std::vector<std::string>* passes_to_run
) : // NOLINT(whitespace/parens)
compiler_filter_(compiler_filter),
huge_method_threshold_(huge_method_threshold),
dump_cfg_file_name_(dump_cfg_file_name),
dump_cfg_append_(dump_cfg_append),
force_determinism_(force_determinism),
- register_allocation_strategy_(regalloc_strategy) {
+ register_allocation_strategy_(regalloc_strategy),
+ passes_to_run_(passes_to_run) {
}
void CompilerOptions::ParseHugeMethodMax(const StringPiece& option, UsageFn Usage) {
const std::string& dump_cfg_file_name,
bool dump_cfg_append,
bool force_determinism,
- RegisterAllocator::Strategy regalloc_strategy);
+ RegisterAllocator::Strategy regalloc_strategy,
+ const std::vector<std::string>* passes_to_run);
CompilerFilter::Filter GetCompilerFilter() const {
return compiler_filter_;
return register_allocation_strategy_;
}
+ const std::vector<std::string>* GetPassesToRun() const {
+ return passes_to_run_;
+ }
+
private:
void ParseDumpInitFailures(const StringPiece& option, UsageFn Usage);
void ParseDumpCfgPasses(const StringPiece& option, UsageFn Usage);
RegisterAllocator::Strategy register_allocation_strategy_;
+ // If not null, specifies optimization passes which will be run instead of defaults.
+ // Note that passes_to_run_ is not checked for correctness and providing an incorrect
+ // list of passes can lead to unexpected compiler behaviour. This is caused by dependencies
+ // between passes. Failing to satisfy them can for example lead to compiler crashes.
+ // Passing pass names which are not recognized by the compiler will result in
+ // compiler-dependant behavior.
+ const std::vector<std::string>* passes_to_run_;
+
friend class Dex2Oat;
DISALLOW_COPY_AND_ASSIGN(CompilerOptions);
/* dump_cfg_file_name */ "",
/* dump_cfg_append */ false,
/* force_determinism */ false,
- RegisterAllocator::kRegisterAllocatorDefault));
+ RegisterAllocator::kRegisterAllocatorDefault,
+ /* passes_to_run */ nullptr));
for (const std::string& argument : Runtime::Current()->GetCompilerOptions()) {
compiler_options_->ParseCompilerOption(argument, Usage);
}
public:
HDeadCodeElimination(HGraph* graph,
OptimizingCompilerStats* stats = nullptr,
- const char* name = kInitialDeadCodeEliminationPassName)
+ const char* name = kDeadCodeEliminationPassName)
: HOptimization(graph, name, stats) {}
void Run() OVERRIDE;
-
- static constexpr const char* kInitialDeadCodeEliminationPassName = "dead_code_elimination";
- static constexpr const char* kFinalDeadCodeEliminationPassName = "dead_code_elimination_final";
+ static constexpr const char* kDeadCodeEliminationPassName = "dead_code_elimination";
private:
void MaybeRecordDeadBlock(HBasicBlock* block);
class DexCacheArrayFixups : public HOptimization {
public:
DexCacheArrayFixups(HGraph* graph, OptimizingCompilerStats* stats)
- : HOptimization(graph, "dex_cache_array_fixups_arm", stats) {}
+ : HOptimization(graph, kDexCacheArrayFixupsArmPassName, stats) {}
+
+ static constexpr const char* kDexCacheArrayFixupsArmPassName = "dex_cache_array_fixups_arm";
void Run() OVERRIDE;
};
class DexCacheArrayFixups : public HOptimization {
public:
DexCacheArrayFixups(HGraph* graph, CodeGenerator* codegen, OptimizingCompilerStats* stats)
- : HOptimization(graph, "dex_cache_array_fixups_mips", stats),
+ : HOptimization(graph, kDexCacheArrayFixupsMipsPassName, stats),
codegen_(codegen) {}
+ static constexpr const char* kDexCacheArrayFixupsMipsPassName = "dex_cache_array_fixups_mips";
+
void Run() OVERRIDE;
private:
void Run() OVERRIDE;
- private:
static constexpr const char* kInductionPassName = "induction_var_analysis";
+ private:
struct NodeInfo {
explicit NodeInfo(uint32_t d) : depth(d), done(false) {}
uint32_t depth;
class InstructionSimplifierArm : public HOptimization {
public:
InstructionSimplifierArm(HGraph* graph, OptimizingCompilerStats* stats)
- : HOptimization(graph, "instruction_simplifier_arm", stats) {}
+ : HOptimization(graph, kInstructionSimplifierArmPassName, stats) {}
+
+ static constexpr const char* kInstructionSimplifierArmPassName = "instruction_simplifier_arm";
void Run() OVERRIDE {
InstructionSimplifierArmVisitor visitor(graph_, stats_);
class InstructionSimplifierArm64 : public HOptimization {
public:
InstructionSimplifierArm64(HGraph* graph, OptimizingCompilerStats* stats)
- : HOptimization(graph, "instruction_simplifier_arm64", stats) {}
-
+ : HOptimization(graph, kInstructionSimplifierArm64PassName, stats) {}
+ static constexpr const char* kInstructionSimplifierArm64PassName
+ = "instruction_simplifier_arm64";
void Run() OVERRIDE {
InstructionSimplifierArm64Visitor visitor(graph_, stats_);
visitor.VisitReversePostOrder();
virtual ~HOptimization() {}
- // Return the name of the pass.
+ // Return the name of the pass. Pass names for a single HOptimization should be of form
+ // <optimization_name> or <optimization_name>$<pass_name> for common <optimization_name> prefix.
+ // Example: 'instruction_simplifier', 'instruction_simplifier$after_bce',
+ // 'instruction_simplifier$before_codegen'.
const char* GetPassName() const { return pass_name_; }
// Perform the analysis itself.
static constexpr size_t kArenaAllocatorMemoryReportThreshold = 8 * MB;
+static constexpr const char* kPassNameSeparator = "$";
+
/**
* Used by the code generator, to allocate the code in a vector.
*/
class OptimizingCompiler FINAL : public Compiler {
public:
explicit OptimizingCompiler(CompilerDriver* driver);
- ~OptimizingCompiler();
+ ~OptimizingCompiler() OVERRIDE;
bool CanCompileMethod(uint32_t method_idx, const DexFile& dex_file) const OVERRIDE;
OVERRIDE
SHARED_REQUIRES(Locks::mutator_lock_);
- protected:
- virtual void RunOptimizations(HGraph* graph,
- CodeGenerator* codegen,
- CompilerDriver* driver,
- const DexCompilationUnit& dex_compilation_unit,
- PassObserver* pass_observer,
- StackHandleScopeCollection* handles) const;
+ private:
+ void RunOptimizations(HGraph* graph,
+ CodeGenerator* codegen,
+ CompilerDriver* driver,
+ const DexCompilationUnit& dex_compilation_unit,
+ PassObserver* pass_observer,
+ StackHandleScopeCollection* handles) const;
- virtual void RunOptimizations(HOptimization* optimizations[],
- size_t length,
- PassObserver* pass_observer) const;
+ void RunOptimizations(HOptimization* optimizations[],
+ size_t length,
+ PassObserver* pass_observer) const;
private:
// Create a 'CompiledMethod' for an optimized graph.
|| instruction_set == kX86_64;
}
+static HOptimization* BuildOptimization(
+ const std::string& opt_name,
+ ArenaAllocator* arena,
+ HGraph* graph,
+ OptimizingCompilerStats* stats,
+ CodeGenerator* codegen,
+ CompilerDriver* driver,
+ const DexCompilationUnit& dex_compilation_unit,
+ StackHandleScopeCollection* handles,
+ SideEffectsAnalysis* most_recent_side_effects,
+ HInductionVarAnalysis* most_recent_induction) {
+ if (opt_name == arm::InstructionSimplifierArm::kInstructionSimplifierArmPassName) {
+ return new (arena) arm::InstructionSimplifierArm(graph, stats);
+ } else if (opt_name == arm64::InstructionSimplifierArm64::kInstructionSimplifierArm64PassName) {
+ return new (arena) arm64::InstructionSimplifierArm64(graph, stats);
+ } else if (opt_name == BoundsCheckElimination::kBoundsCheckEliminationPassName) {
+ CHECK(most_recent_side_effects != nullptr && most_recent_induction != nullptr);
+ return new (arena) BoundsCheckElimination(graph,
+ *most_recent_side_effects,
+ most_recent_induction);
+ } else if (opt_name == GVNOptimization::kGlobalValueNumberingPassName) {
+ CHECK(most_recent_side_effects != nullptr);
+ return new (arena) GVNOptimization(graph, *most_recent_side_effects);
+ } else if (opt_name == HConstantFolding::kConstantFoldingPassName) {
+ return new (arena) HConstantFolding(graph);
+ } else if (opt_name == HDeadCodeElimination::kDeadCodeEliminationPassName) {
+ return new (arena) HDeadCodeElimination(graph, stats);
+ } else if (opt_name == HInliner::kInlinerPassName) {
+ size_t number_of_dex_registers = dex_compilation_unit.GetCodeItem()->registers_size_;
+ return new (arena) HInliner(graph, // outer_graph
+ graph, // outermost_graph
+ codegen,
+ dex_compilation_unit, // outer_compilation_unit
+ dex_compilation_unit, // outermost_compilation_unit
+ driver,
+ handles,
+ stats,
+ number_of_dex_registers,
+ /* depth */ 0);
+ } else if (opt_name == HSharpening::kSharpeningPassName) {
+ return new (arena) HSharpening(graph, codegen, dex_compilation_unit, driver);
+ } else if (opt_name == HSelectGenerator::kSelectGeneratorPassName) {
+ return new (arena) HSelectGenerator(graph, stats);
+ } else if (opt_name == HInductionVarAnalysis::kInductionPassName) {
+ return new (arena) HInductionVarAnalysis(graph);
+ } else if (opt_name == InstructionSimplifier::kInstructionSimplifierPassName) {
+ return new (arena) InstructionSimplifier(graph, stats);
+ } else if (opt_name == IntrinsicsRecognizer::kIntrinsicsRecognizerPassName) {
+ return new (arena) IntrinsicsRecognizer(graph, driver, stats);
+ } else if (opt_name == LICM::kLoopInvariantCodeMotionPassName) {
+ CHECK(most_recent_side_effects != nullptr);
+ return new (arena) LICM(graph, *most_recent_side_effects, stats);
+ } else if (opt_name == LoadStoreElimination::kLoadStoreEliminationPassName) {
+ CHECK(most_recent_side_effects != nullptr);
+ return new (arena) LoadStoreElimination(graph, *most_recent_side_effects);
+ } else if (opt_name == mips::DexCacheArrayFixups::kDexCacheArrayFixupsMipsPassName) {
+ return new (arena) mips::DexCacheArrayFixups(graph, codegen, stats);
+ } else if (opt_name == mips::PcRelativeFixups::kPcRelativeFixupsMipsPassName) {
+ return new (arena) mips::PcRelativeFixups(graph, codegen, stats);
+ } else if (opt_name == SideEffectsAnalysis::kSideEffectsAnalysisPassName) {
+ return new (arena) SideEffectsAnalysis(graph);
+ } else if (opt_name == x86::PcRelativeFixups::kPcRelativeFixupsX86PassName) {
+ return new (arena) x86::PcRelativeFixups(graph, codegen, stats);
+ } else if (opt_name == x86::X86MemoryOperandGeneration::kX86MemoryOperandGenerationPassName) {
+ return new (arena) x86::X86MemoryOperandGeneration(graph, codegen, stats);
+ }
+ return nullptr;
+}
+
+static ArenaVector<HOptimization*> BuildOptimizations(
+ const std::vector<std::string>& pass_names,
+ ArenaAllocator* arena,
+ HGraph* graph,
+ OptimizingCompilerStats* stats,
+ CodeGenerator* codegen,
+ CompilerDriver* driver,
+ const DexCompilationUnit& dex_compilation_unit,
+ StackHandleScopeCollection* handles) {
+ // Few HOptimizations constructors require SideEffectsAnalysis or HInductionVarAnalysis
+ // instances. This method assumes that each of them expects the nearest instance preceeding it
+ // in the pass name list.
+ SideEffectsAnalysis* most_recent_side_effects = nullptr;
+ HInductionVarAnalysis* most_recent_induction = nullptr;
+ ArenaVector<HOptimization*> ret(arena->Adapter());
+ for (std::string pass_name : pass_names) {
+ size_t pos = pass_name.find(kPassNameSeparator); // Strip suffix to get base pass name.
+ std::string opt_name = pos == std::string::npos ? pass_name : pass_name.substr(0, pos);
+
+ HOptimization* opt = BuildOptimization(
+ opt_name,
+ arena,
+ graph,
+ stats,
+ codegen,
+ driver,
+ dex_compilation_unit,
+ handles,
+ most_recent_side_effects,
+ most_recent_induction);
+ CHECK(opt != nullptr) << "Couldn't build optimization: \"" << pass_name << "\"";
+ ret.push_back(opt);
+
+ if (opt_name == SideEffectsAnalysis::kSideEffectsAnalysisPassName) {
+ most_recent_side_effects = down_cast<SideEffectsAnalysis*>(opt);
+ } else if (opt_name == HInductionVarAnalysis::kInductionPassName) {
+ most_recent_induction = down_cast<HInductionVarAnalysis*>(opt);
+ }
+ }
+ return ret;
+}
+
void OptimizingCompiler::RunOptimizations(HOptimization* optimizations[],
size_t length,
PassObserver* pass_observer) const {
}
size_t number_of_dex_registers = dex_compilation_unit.GetCodeItem()->registers_size_;
HInliner* inliner = new (graph->GetArena()) HInliner(
- graph,
- graph,
+ graph, // outer_graph
+ graph, // outermost_graph
codegen,
- dex_compilation_unit,
- dex_compilation_unit,
+ dex_compilation_unit, // outer_compilation_unit
+ dex_compilation_unit, // outermost_compilation_unit
driver,
handles,
stats,
arm::InstructionSimplifierArm* simplifier =
new (arena) arm::InstructionSimplifierArm(graph, stats);
SideEffectsAnalysis* side_effects = new (arena) SideEffectsAnalysis(graph);
- GVNOptimization* gvn = new (arena) GVNOptimization(graph, *side_effects, "GVN_after_arch");
+ GVNOptimization* gvn = new (arena) GVNOptimization(graph, *side_effects, "GVN$after_arch");
HOptimization* arm_optimizations[] = {
simplifier,
side_effects,
arm64::InstructionSimplifierArm64* simplifier =
new (arena) arm64::InstructionSimplifierArm64(graph, stats);
SideEffectsAnalysis* side_effects = new (arena) SideEffectsAnalysis(graph);
- GVNOptimization* gvn = new (arena) GVNOptimization(graph, *side_effects, "GVN_after_arch");
+ GVNOptimization* gvn = new (arena) GVNOptimization(graph, *side_effects, "GVN$after_arch");
HOptimization* arm64_optimizations[] = {
simplifier,
side_effects,
x86::PcRelativeFixups* pc_relative_fixups =
new (arena) x86::PcRelativeFixups(graph, codegen, stats);
x86::X86MemoryOperandGeneration* memory_gen =
- new(arena) x86::X86MemoryOperandGeneration(graph, stats, codegen);
+ new (arena) x86::X86MemoryOperandGeneration(graph, codegen, stats);
HOptimization* x86_optimizations[] = {
pc_relative_fixups,
memory_gen
#ifdef ART_ENABLE_CODEGEN_x86_64
case kX86_64: {
x86::X86MemoryOperandGeneration* memory_gen =
- new(arena) x86::X86MemoryOperandGeneration(graph, stats, codegen);
+ new (arena) x86::X86MemoryOperandGeneration(graph, codegen, stats);
HOptimization* x86_64_optimizations[] = {
memory_gen
};
StackHandleScopeCollection* handles) const {
OptimizingCompilerStats* stats = compilation_stats_.get();
ArenaAllocator* arena = graph->GetArena();
+ if (driver->GetCompilerOptions().GetPassesToRun() != nullptr) {
+ ArenaVector<HOptimization*> optimizations = BuildOptimizations(
+ *driver->GetCompilerOptions().GetPassesToRun(),
+ arena,
+ graph,
+ stats,
+ codegen,
+ driver,
+ dex_compilation_unit,
+ handles);
+ RunOptimizations(&optimizations[0], optimizations.size(), pass_observer);
+ return;
+ }
+
HDeadCodeElimination* dce1 = new (arena) HDeadCodeElimination(
- graph, stats, HDeadCodeElimination::kInitialDeadCodeEliminationPassName);
+ graph, stats, "dead_code_elimination$initial");
HDeadCodeElimination* dce2 = new (arena) HDeadCodeElimination(
- graph, stats, HDeadCodeElimination::kFinalDeadCodeEliminationPassName);
+ graph, stats, "dead_code_elimination$final");
HConstantFolding* fold1 = new (arena) HConstantFolding(graph);
InstructionSimplifier* simplify1 = new (arena) InstructionSimplifier(graph, stats);
HSelectGenerator* select_generator = new (arena) HSelectGenerator(graph, stats);
- HConstantFolding* fold2 = new (arena) HConstantFolding(graph, "constant_folding_after_inlining");
- HConstantFolding* fold3 = new (arena) HConstantFolding(graph, "constant_folding_after_bce");
+ HConstantFolding* fold2 = new (arena) HConstantFolding(
+ graph, "constant_folding$after_inlining");
+ HConstantFolding* fold3 = new (arena) HConstantFolding(graph, "constant_folding$after_bce");
SideEffectsAnalysis* side_effects = new (arena) SideEffectsAnalysis(graph);
GVNOptimization* gvn = new (arena) GVNOptimization(graph, *side_effects);
LICM* licm = new (arena) LICM(graph, *side_effects, stats);
BoundsCheckElimination* bce = new (arena) BoundsCheckElimination(graph, *side_effects, induction);
HSharpening* sharpening = new (arena) HSharpening(graph, codegen, dex_compilation_unit, driver);
InstructionSimplifier* simplify2 = new (arena) InstructionSimplifier(
- graph, stats, "instruction_simplifier_after_bce");
+ graph, stats, "instruction_simplifier$after_bce");
InstructionSimplifier* simplify3 = new (arena) InstructionSimplifier(
- graph, stats, "instruction_simplifier_before_codegen");
+ graph, stats, "instruction_simplifier$before_codegen");
IntrinsicsRecognizer* intrinsics = new (arena) IntrinsicsRecognizer(graph, driver, stats);
HOptimization* optimizations1[] = {
RunOptimizations(optimizations2, arraysize(optimizations2), pass_observer);
RunArchOptimizations(driver->GetInstructionSet(), graph, codegen, pass_observer);
- RegisterAllocator::Strategy regalloc_strategy =
- driver->GetCompilerOptions().GetRegisterAllocationStrategy();
- AllocateRegisters(graph, codegen, pass_observer, regalloc_strategy);
}
static ArenaVector<LinkerPatch> EmitAndSortLinkerPatches(CodeGenerator* codegen) {
&pass_observer,
&handles);
+ RegisterAllocator::Strategy regalloc_strategy =
+ compiler_options.GetRegisterAllocationStrategy();
+ AllocateRegisters(graph, codegen.get(), &pass_observer, regalloc_strategy);
+
codegen->Compile(code_allocator);
pass_observer.DumpDisassembly();
}
: HOptimization(graph, "pc_relative_fixups_mips", stats),
codegen_(codegen) {}
+ static constexpr const char* kPcRelativeFixupsMipsPassName = "pc_relative_fixups_mips";
+
void Run() OVERRIDE;
private:
class PcRelativeFixups : public HOptimization {
public:
PcRelativeFixups(HGraph* graph, CodeGenerator* codegen, OptimizingCompilerStats* stats)
- : HOptimization(graph, "pc_relative_fixups_x86", stats),
+ : HOptimization(graph, kPcRelativeFixupsX86PassName, stats),
codegen_(codegen) {}
+ static constexpr const char* kPcRelativeFixupsX86PassName = "pc_relative_fixups_x86";
+
void Run() OVERRIDE;
private:
};
X86MemoryOperandGeneration::X86MemoryOperandGeneration(HGraph* graph,
- OptimizingCompilerStats* stats,
- CodeGenerator* codegen)
+ CodeGenerator* codegen,
+ OptimizingCompilerStats* stats)
: HOptimization(graph, kX86MemoryOperandGenerationPassName, stats),
do_implicit_null_checks_(codegen->GetCompilerOptions().GetImplicitNullChecks()) {
}
class X86MemoryOperandGeneration : public HOptimization {
public:
X86MemoryOperandGeneration(HGraph* graph,
- OptimizingCompilerStats* stats,
- CodeGenerator* codegen);
+ CodeGenerator* codegen,
+ OptimizingCompilerStats* stats);
void Run() OVERRIDE;
compiled_classes_filename_(nullptr),
compiled_methods_zip_filename_(nullptr),
compiled_methods_filename_(nullptr),
+ passes_to_run_filename_(nullptr),
app_image_(false),
boot_image_(false),
multi_image_(false),
}
}
compiler_options_->force_determinism_ = force_determinism_;
+
+ if (passes_to_run_filename_ != nullptr) {
+ passes_to_run_.reset(ReadCommentedInputFromFile<std::vector<std::string>>(
+ passes_to_run_filename_,
+ nullptr)); // No post-processing.
+ if (passes_to_run_.get() == nullptr) {
+ Usage("Failed to read list of passes to run.");
+ }
+ }
+ compiler_options_->passes_to_run_ = passes_to_run_.get();
}
static bool SupportsDeterministicCompilation() {
compiled_methods_filename_ = option.substr(strlen("--compiled-methods=")).data();
} else if (option.starts_with("--compiled-methods-zip=")) {
compiled_methods_zip_filename_ = option.substr(strlen("--compiled-methods-zip=")).data();
+ } else if (option.starts_with("--run-passes=")) {
+ passes_to_run_filename_ = option.substr(strlen("--run-passes=")).data();
} else if (option.starts_with("--base=")) {
ParseBase(option);
} else if (option.starts_with("--boot-image=")) {
if (compiled_methods_filename_ != nullptr) {
std::string error_msg;
if (compiled_methods_zip_filename_ != nullptr) {
- compiled_methods_.reset(ReadCommentedInputFromZip(compiled_methods_zip_filename_,
- compiled_methods_filename_,
- nullptr, // No post-processing.
- &error_msg));
+ compiled_methods_.reset(ReadCommentedInputFromZip<std::unordered_set<std::string>>(
+ compiled_methods_zip_filename_,
+ compiled_methods_filename_,
+ nullptr, // No post-processing.
+ &error_msg));
} else {
- compiled_methods_.reset(ReadCommentedInputFromFile(compiled_methods_filename_,
- nullptr)); // No post-processing.
+ compiled_methods_.reset(ReadCommentedInputFromFile<std::unordered_set<std::string>>(
+ compiled_methods_filename_,
+ nullptr)); // No post-processing.
}
if (compiled_methods_.get() == nullptr) {
LOG(ERROR) << "Failed to create list of compiled methods from '"
static std::unordered_set<std::string>* ReadImageClassesFromFile(
const char* image_classes_filename) {
std::function<std::string(const char*)> process = DotToDescriptor;
- return ReadCommentedInputFromFile(image_classes_filename, &process);
+ return ReadCommentedInputFromFile<std::unordered_set<std::string>>(image_classes_filename,
+ &process);
}
// Reads the class names (java.lang.Object) and returns a set of descriptors (Ljava/lang/Object;)
const char* image_classes_filename,
std::string* error_msg) {
std::function<std::string(const char*)> process = DotToDescriptor;
- return ReadCommentedInputFromZip(zip_filename, image_classes_filename, &process, error_msg);
+ return ReadCommentedInputFromZip<std::unordered_set<std::string>>(zip_filename,
+ image_classes_filename,
+ &process,
+ error_msg);
}
// Read lines from the given file, dropping comments and empty lines. Post-process each line with
// the given function.
- static std::unordered_set<std::string>* ReadCommentedInputFromFile(
+ template <typename T>
+ static T* ReadCommentedInputFromFile(
const char* input_filename, std::function<std::string(const char*)>* process) {
std::unique_ptr<std::ifstream> input_file(new std::ifstream(input_filename, std::ifstream::in));
if (input_file.get() == nullptr) {
LOG(ERROR) << "Failed to open input file " << input_filename;
return nullptr;
}
- std::unique_ptr<std::unordered_set<std::string>> result(
- ReadCommentedInputStream(*input_file, process));
+ std::unique_ptr<T> result(
+ ReadCommentedInputStream<T>(*input_file, process));
input_file->close();
return result.release();
}
// Read lines from the given file from the given zip file, dropping comments and empty lines.
// Post-process each line with the given function.
- static std::unordered_set<std::string>* ReadCommentedInputFromZip(
+ template <typename T>
+ static T* ReadCommentedInputFromZip(
const char* zip_filename,
const char* input_filename,
std::function<std::string(const char*)>* process,
const std::string input_string(reinterpret_cast<char*>(input_file->Begin()),
input_file->Size());
std::istringstream input_stream(input_string);
- return ReadCommentedInputStream(input_stream, process);
+ return ReadCommentedInputStream<T>(input_stream, process);
}
// Read lines from the given stream, dropping comments and empty lines. Post-process each line
// with the given function.
- static std::unordered_set<std::string>* ReadCommentedInputStream(
+ template <typename T>
+ static T* ReadCommentedInputStream(
std::istream& in_stream,
std::function<std::string(const char*)>* process) {
- std::unique_ptr<std::unordered_set<std::string>> image_classes(
- new std::unordered_set<std::string>);
+ std::unique_ptr<T> output(new T());
while (in_stream.good()) {
std::string dot;
std::getline(in_stream, dot);
}
if (process != nullptr) {
std::string descriptor((*process)(dot.c_str()));
- image_classes->insert(descriptor);
+ output->insert(output->end(), descriptor);
} else {
- image_classes->insert(dot);
+ output->insert(output->end(), dot);
}
}
- return image_classes.release();
+ return output.release();
}
void LogCompletionTime() {
const char* compiled_classes_filename_;
const char* compiled_methods_zip_filename_;
const char* compiled_methods_filename_;
+ const char* passes_to_run_filename_;
std::unique_ptr<std::unordered_set<std::string>> image_classes_;
std::unique_ptr<std::unordered_set<std::string>> compiled_classes_;
std::unique_ptr<std::unordered_set<std::string>> compiled_methods_;
+ std::unique_ptr<std::vector<std::string>> passes_to_run_;
bool app_image_;
bool boot_image_;
bool multi_image_;
* Exercise constant folding on addition.
*/
- /// CHECK-START: int Main.IntAddition1() constant_folding_after_inlining (before)
+ /// CHECK-START: int Main.IntAddition1() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const1:i\d+>> IntConstant 1
/// CHECK-DAG: <<Const2:i\d+>> IntConstant 2
/// CHECK-DAG: <<Add:i\d+>> Add [<<Const1>>,<<Const2>>]
/// CHECK-DAG: Return [<<Add>>]
- /// CHECK-START: int Main.IntAddition1() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.IntAddition1() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const3:i\d+>> IntConstant 3
/// CHECK-DAG: Return [<<Const3>>]
- /// CHECK-START: int Main.IntAddition1() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.IntAddition1() constant_folding$after_inlining (after)
/// CHECK-NOT: Add
public static int IntAddition1() {
return c;
}
- /// CHECK-START: int Main.IntAddition2() constant_folding_after_inlining (before)
+ /// CHECK-START: int Main.IntAddition2() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const1:i\d+>> IntConstant 1
/// CHECK-DAG: <<Const2:i\d+>> IntConstant 2
/// CHECK-DAG: <<Const5:i\d+>> IntConstant 5
/// CHECK-DAG: <<Add3:i\d+>> Add [<<Add1>>,<<Add2>>]
/// CHECK-DAG: Return [<<Add3>>]
- /// CHECK-START: int Main.IntAddition2() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.IntAddition2() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const14:i\d+>> IntConstant 14
/// CHECK-DAG: Return [<<Const14>>]
- /// CHECK-START: int Main.IntAddition2() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.IntAddition2() constant_folding$after_inlining (after)
/// CHECK-NOT: Add
public static int IntAddition2() {
return c;
}
- /// CHECK-START: long Main.LongAddition() constant_folding_after_inlining (before)
+ /// CHECK-START: long Main.LongAddition() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const1:j\d+>> LongConstant 1
/// CHECK-DAG: <<Const2:j\d+>> LongConstant 2
/// CHECK-DAG: <<Add:j\d+>> Add [<<Const1>>,<<Const2>>]
/// CHECK-DAG: Return [<<Add>>]
- /// CHECK-START: long Main.LongAddition() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.LongAddition() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const3:j\d+>> LongConstant 3
/// CHECK-DAG: Return [<<Const3>>]
- /// CHECK-START: long Main.LongAddition() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.LongAddition() constant_folding$after_inlining (after)
/// CHECK-NOT: Add
public static long LongAddition() {
return c;
}
- /// CHECK-START: float Main.FloatAddition() constant_folding_after_inlining (before)
+ /// CHECK-START: float Main.FloatAddition() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const1:f\d+>> FloatConstant 1
/// CHECK-DAG: <<Const2:f\d+>> FloatConstant 2
/// CHECK-DAG: <<Add:f\d+>> Add [<<Const1>>,<<Const2>>]
/// CHECK-DAG: Return [<<Add>>]
- /// CHECK-START: float Main.FloatAddition() constant_folding_after_inlining (after)
+ /// CHECK-START: float Main.FloatAddition() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const3:f\d+>> FloatConstant 3
/// CHECK-DAG: Return [<<Const3>>]
- /// CHECK-START: float Main.FloatAddition() constant_folding_after_inlining (after)
+ /// CHECK-START: float Main.FloatAddition() constant_folding$after_inlining (after)
/// CHECK-NOT: Add
public static float FloatAddition() {
return c;
}
- /// CHECK-START: double Main.DoubleAddition() constant_folding_after_inlining (before)
+ /// CHECK-START: double Main.DoubleAddition() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const1:d\d+>> DoubleConstant 1
/// CHECK-DAG: <<Const2:d\d+>> DoubleConstant 2
/// CHECK-DAG: <<Add:d\d+>> Add [<<Const1>>,<<Const2>>]
/// CHECK-DAG: Return [<<Add>>]
- /// CHECK-START: double Main.DoubleAddition() constant_folding_after_inlining (after)
+ /// CHECK-START: double Main.DoubleAddition() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const3:d\d+>> DoubleConstant 3
/// CHECK-DAG: Return [<<Const3>>]
- /// CHECK-START: double Main.DoubleAddition() constant_folding_after_inlining (after)
+ /// CHECK-START: double Main.DoubleAddition() constant_folding$after_inlining (after)
/// CHECK-NOT: Add
public static double DoubleAddition() {
* Exercise constant folding on subtraction.
*/
- /// CHECK-START: int Main.IntSubtraction() constant_folding_after_inlining (before)
+ /// CHECK-START: int Main.IntSubtraction() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const6:i\d+>> IntConstant 6
/// CHECK-DAG: <<Const2:i\d+>> IntConstant 2
/// CHECK-DAG: <<Sub:i\d+>> Sub [<<Const6>>,<<Const2>>]
/// CHECK-DAG: Return [<<Sub>>]
- /// CHECK-START: int Main.IntSubtraction() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.IntSubtraction() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const4:i\d+>> IntConstant 4
/// CHECK-DAG: Return [<<Const4>>]
- /// CHECK-START: int Main.IntSubtraction() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.IntSubtraction() constant_folding$after_inlining (after)
/// CHECK-NOT: Sub
public static int IntSubtraction() {
return c;
}
- /// CHECK-START: long Main.LongSubtraction() constant_folding_after_inlining (before)
+ /// CHECK-START: long Main.LongSubtraction() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const6:j\d+>> LongConstant 6
/// CHECK-DAG: <<Const2:j\d+>> LongConstant 2
/// CHECK-DAG: <<Sub:j\d+>> Sub [<<Const6>>,<<Const2>>]
/// CHECK-DAG: Return [<<Sub>>]
- /// CHECK-START: long Main.LongSubtraction() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.LongSubtraction() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const4:j\d+>> LongConstant 4
/// CHECK-DAG: Return [<<Const4>>]
- /// CHECK-START: long Main.LongSubtraction() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.LongSubtraction() constant_folding$after_inlining (after)
/// CHECK-NOT: Sub
public static long LongSubtraction() {
return c;
}
- /// CHECK-START: float Main.FloatSubtraction() constant_folding_after_inlining (before)
+ /// CHECK-START: float Main.FloatSubtraction() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const6:f\d+>> FloatConstant 6
/// CHECK-DAG: <<Const2:f\d+>> FloatConstant 2
/// CHECK-DAG: <<Sub:f\d+>> Sub [<<Const6>>,<<Const2>>]
/// CHECK-DAG: Return [<<Sub>>]
- /// CHECK-START: float Main.FloatSubtraction() constant_folding_after_inlining (after)
+ /// CHECK-START: float Main.FloatSubtraction() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const4:f\d+>> FloatConstant 4
/// CHECK-DAG: Return [<<Const4>>]
- /// CHECK-START: float Main.FloatSubtraction() constant_folding_after_inlining (after)
+ /// CHECK-START: float Main.FloatSubtraction() constant_folding$after_inlining (after)
/// CHECK-NOT: Sub
public static float FloatSubtraction() {
return c;
}
- /// CHECK-START: double Main.DoubleSubtraction() constant_folding_after_inlining (before)
+ /// CHECK-START: double Main.DoubleSubtraction() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const6:d\d+>> DoubleConstant 6
/// CHECK-DAG: <<Const2:d\d+>> DoubleConstant 2
/// CHECK-DAG: <<Sub:d\d+>> Sub [<<Const6>>,<<Const2>>]
/// CHECK-DAG: Return [<<Sub>>]
- /// CHECK-START: double Main.DoubleSubtraction() constant_folding_after_inlining (after)
+ /// CHECK-START: double Main.DoubleSubtraction() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const4:d\d+>> DoubleConstant 4
/// CHECK-DAG: Return [<<Const4>>]
- /// CHECK-START: double Main.DoubleSubtraction() constant_folding_after_inlining (after)
+ /// CHECK-START: double Main.DoubleSubtraction() constant_folding$after_inlining (after)
/// CHECK-NOT: Sub
public static double DoubleSubtraction() {
* Exercise constant folding on multiplication.
*/
- /// CHECK-START: int Main.IntMultiplication() constant_folding_after_inlining (before)
+ /// CHECK-START: int Main.IntMultiplication() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const7:i\d+>> IntConstant 7
/// CHECK-DAG: <<Const3:i\d+>> IntConstant 3
/// CHECK-DAG: <<Mul:i\d+>> Mul [<<Const7>>,<<Const3>>]
/// CHECK-DAG: Return [<<Mul>>]
- /// CHECK-START: int Main.IntMultiplication() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.IntMultiplication() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const21:i\d+>> IntConstant 21
/// CHECK-DAG: Return [<<Const21>>]
- /// CHECK-START: int Main.IntMultiplication() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.IntMultiplication() constant_folding$after_inlining (after)
/// CHECK-NOT: Mul
public static int IntMultiplication() {
return c;
}
- /// CHECK-START: long Main.LongMultiplication() constant_folding_after_inlining (before)
+ /// CHECK-START: long Main.LongMultiplication() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const7:j\d+>> LongConstant 7
/// CHECK-DAG: <<Const3:j\d+>> LongConstant 3
/// CHECK-DAG: <<Mul:j\d+>> Mul [<<Const7>>,<<Const3>>]
/// CHECK-DAG: Return [<<Mul>>]
- /// CHECK-START: long Main.LongMultiplication() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.LongMultiplication() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const21:j\d+>> LongConstant 21
/// CHECK-DAG: Return [<<Const21>>]
- /// CHECK-START: long Main.LongMultiplication() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.LongMultiplication() constant_folding$after_inlining (after)
/// CHECK-NOT: Mul
public static long LongMultiplication() {
return c;
}
- /// CHECK-START: float Main.FloatMultiplication() constant_folding_after_inlining (before)
+ /// CHECK-START: float Main.FloatMultiplication() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const7:f\d+>> FloatConstant 7
/// CHECK-DAG: <<Const3:f\d+>> FloatConstant 3
/// CHECK-DAG: <<Mul:f\d+>> Mul [<<Const7>>,<<Const3>>]
/// CHECK-DAG: Return [<<Mul>>]
- /// CHECK-START: float Main.FloatMultiplication() constant_folding_after_inlining (after)
+ /// CHECK-START: float Main.FloatMultiplication() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const21:f\d+>> FloatConstant 21
/// CHECK-DAG: Return [<<Const21>>]
- /// CHECK-START: float Main.FloatMultiplication() constant_folding_after_inlining (after)
+ /// CHECK-START: float Main.FloatMultiplication() constant_folding$after_inlining (after)
/// CHECK-NOT: Mul
public static float FloatMultiplication() {
return c;
}
- /// CHECK-START: double Main.DoubleMultiplication() constant_folding_after_inlining (before)
+ /// CHECK-START: double Main.DoubleMultiplication() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const7:d\d+>> DoubleConstant 7
/// CHECK-DAG: <<Const3:d\d+>> DoubleConstant 3
/// CHECK-DAG: <<Mul:d\d+>> Mul [<<Const7>>,<<Const3>>]
/// CHECK-DAG: Return [<<Mul>>]
- /// CHECK-START: double Main.DoubleMultiplication() constant_folding_after_inlining (after)
+ /// CHECK-START: double Main.DoubleMultiplication() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const21:d\d+>> DoubleConstant 21
/// CHECK-DAG: Return [<<Const21>>]
- /// CHECK-START: double Main.DoubleMultiplication() constant_folding_after_inlining (after)
+ /// CHECK-START: double Main.DoubleMultiplication() constant_folding$after_inlining (after)
/// CHECK-NOT: Mul
public static double DoubleMultiplication() {
* Exercise constant folding on division.
*/
- /// CHECK-START: int Main.IntDivision() constant_folding_after_inlining (before)
+ /// CHECK-START: int Main.IntDivision() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const8:i\d+>> IntConstant 8
/// CHECK-DAG: <<Const3:i\d+>> IntConstant 3
/// CHECK-DAG: <<Div0Chk:i\d+>> DivZeroCheck [<<Const3>>]
/// CHECK-DAG: <<Div:i\d+>> Div [<<Const8>>,<<Div0Chk>>]
/// CHECK-DAG: Return [<<Div>>]
- /// CHECK-START: int Main.IntDivision() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.IntDivision() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const2:i\d+>> IntConstant 2
/// CHECK-DAG: Return [<<Const2>>]
- /// CHECK-START: int Main.IntDivision() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.IntDivision() constant_folding$after_inlining (after)
/// CHECK-NOT: DivZeroCheck
/// CHECK-NOT: Div
return c;
}
- /// CHECK-START: long Main.LongDivision() constant_folding_after_inlining (before)
+ /// CHECK-START: long Main.LongDivision() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const8:j\d+>> LongConstant 8
/// CHECK-DAG: <<Const3:j\d+>> LongConstant 3
/// CHECK-DAG: <<Div0Chk:j\d+>> DivZeroCheck [<<Const3>>]
/// CHECK-DAG: <<Div:j\d+>> Div [<<Const8>>,<<Div0Chk>>]
/// CHECK-DAG: Return [<<Div>>]
- /// CHECK-START: long Main.LongDivision() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.LongDivision() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const2:j\d+>> LongConstant 2
/// CHECK-DAG: Return [<<Const2>>]
- /// CHECK-START: long Main.LongDivision() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.LongDivision() constant_folding$after_inlining (after)
/// CHECK-NOT: DivZeroCheck
/// CHECK-NOT: Div
return c;
}
- /// CHECK-START: float Main.FloatDivision() constant_folding_after_inlining (before)
+ /// CHECK-START: float Main.FloatDivision() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const8:f\d+>> FloatConstant 8
/// CHECK-DAG: <<Const2P5:f\d+>> FloatConstant 2.5
/// CHECK-DAG: <<Div:f\d+>> Div [<<Const8>>,<<Const2P5>>]
/// CHECK-DAG: Return [<<Div>>]
- /// CHECK-START: float Main.FloatDivision() constant_folding_after_inlining (after)
+ /// CHECK-START: float Main.FloatDivision() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const3P2:f\d+>> FloatConstant 3.2
/// CHECK-DAG: Return [<<Const3P2>>]
- /// CHECK-START: float Main.FloatDivision() constant_folding_after_inlining (after)
+ /// CHECK-START: float Main.FloatDivision() constant_folding$after_inlining (after)
/// CHECK-NOT: Div
public static float FloatDivision() {
return c;
}
- /// CHECK-START: double Main.DoubleDivision() constant_folding_after_inlining (before)
+ /// CHECK-START: double Main.DoubleDivision() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const8:d\d+>> DoubleConstant 8
/// CHECK-DAG: <<Const2P5:d\d+>> DoubleConstant 2.5
/// CHECK-DAG: <<Div:d\d+>> Div [<<Const8>>,<<Const2P5>>]
/// CHECK-DAG: Return [<<Div>>]
- /// CHECK-START: double Main.DoubleDivision() constant_folding_after_inlining (after)
+ /// CHECK-START: double Main.DoubleDivision() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const3P2:d\d+>> DoubleConstant 3.2
/// CHECK-DAG: Return [<<Const3P2>>]
- /// CHECK-START: double Main.DoubleDivision() constant_folding_after_inlining (after)
+ /// CHECK-START: double Main.DoubleDivision() constant_folding$after_inlining (after)
/// CHECK-NOT: Div
public static double DoubleDivision() {
* Exercise constant folding on remainder.
*/
- /// CHECK-START: int Main.IntRemainder() constant_folding_after_inlining (before)
+ /// CHECK-START: int Main.IntRemainder() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const8:i\d+>> IntConstant 8
/// CHECK-DAG: <<Const3:i\d+>> IntConstant 3
/// CHECK-DAG: <<Div0Chk:i\d+>> DivZeroCheck [<<Const3>>]
/// CHECK-DAG: <<Rem:i\d+>> Rem [<<Const8>>,<<Div0Chk>>]
/// CHECK-DAG: Return [<<Rem>>]
- /// CHECK-START: int Main.IntRemainder() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.IntRemainder() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const2:i\d+>> IntConstant 2
/// CHECK-DAG: Return [<<Const2>>]
- /// CHECK-START: int Main.IntRemainder() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.IntRemainder() constant_folding$after_inlining (after)
/// CHECK-NOT: DivZeroCheck
/// CHECK-NOT: Rem
return c;
}
- /// CHECK-START: long Main.LongRemainder() constant_folding_after_inlining (before)
+ /// CHECK-START: long Main.LongRemainder() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const8:j\d+>> LongConstant 8
/// CHECK-DAG: <<Const3:j\d+>> LongConstant 3
/// CHECK-DAG: <<Div0Chk:j\d+>> DivZeroCheck [<<Const3>>]
/// CHECK-DAG: <<Rem:j\d+>> Rem [<<Const8>>,<<Div0Chk>>]
/// CHECK-DAG: Return [<<Rem>>]
- /// CHECK-START: long Main.LongRemainder() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.LongRemainder() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const2:j\d+>> LongConstant 2
/// CHECK-DAG: Return [<<Const2>>]
- /// CHECK-START: long Main.LongRemainder() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.LongRemainder() constant_folding$after_inlining (after)
/// CHECK-NOT: DivZeroCheck
/// CHECK-NOT: Rem
return c;
}
- /// CHECK-START: float Main.FloatRemainder() constant_folding_after_inlining (before)
+ /// CHECK-START: float Main.FloatRemainder() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const8:f\d+>> FloatConstant 8
/// CHECK-DAG: <<Const2P5:f\d+>> FloatConstant 2.5
/// CHECK-DAG: <<Rem:f\d+>> Rem [<<Const8>>,<<Const2P5>>]
/// CHECK-DAG: Return [<<Rem>>]
- /// CHECK-START: float Main.FloatRemainder() constant_folding_after_inlining (after)
+ /// CHECK-START: float Main.FloatRemainder() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const0P5:f\d+>> FloatConstant 0.5
/// CHECK-DAG: Return [<<Const0P5>>]
- /// CHECK-START: float Main.FloatRemainder() constant_folding_after_inlining (after)
+ /// CHECK-START: float Main.FloatRemainder() constant_folding$after_inlining (after)
/// CHECK-NOT: Rem
public static float FloatRemainder() {
return c;
}
- /// CHECK-START: double Main.DoubleRemainder() constant_folding_after_inlining (before)
+ /// CHECK-START: double Main.DoubleRemainder() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const8:d\d+>> DoubleConstant 8
/// CHECK-DAG: <<Const2P5:d\d+>> DoubleConstant 2.5
/// CHECK-DAG: <<Rem:d\d+>> Rem [<<Const8>>,<<Const2P5>>]
/// CHECK-DAG: Return [<<Rem>>]
- /// CHECK-START: double Main.DoubleRemainder() constant_folding_after_inlining (after)
+ /// CHECK-START: double Main.DoubleRemainder() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const0P5:d\d+>> DoubleConstant 0.5
/// CHECK-DAG: Return [<<Const0P5>>]
- /// CHECK-START: double Main.DoubleRemainder() constant_folding_after_inlining (after)
+ /// CHECK-START: double Main.DoubleRemainder() constant_folding$after_inlining (after)
/// CHECK-NOT: Rem
public static double DoubleRemainder() {
* Exercise constant folding on left shift.
*/
- /// CHECK-START: int Main.ShlIntLong() constant_folding_after_inlining (before)
+ /// CHECK-START: int Main.ShlIntLong() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const1:i\d+>> IntConstant 1
/// CHECK-DAG: <<Const2L:j\d+>> LongConstant 2
/// CHECK-DAG: <<TypeConv:i\d+>> TypeConversion [<<Const2L>>]
/// CHECK-DAG: <<Shl:i\d+>> Shl [<<Const1>>,<<TypeConv>>]
/// CHECK-DAG: Return [<<Shl>>]
- /// CHECK-START: int Main.ShlIntLong() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.ShlIntLong() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const4:i\d+>> IntConstant 4
/// CHECK-DAG: Return [<<Const4>>]
- /// CHECK-START: int Main.ShlIntLong() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.ShlIntLong() constant_folding$after_inlining (after)
/// CHECK-NOT: Shl
public static int ShlIntLong() {
return lhs << rhs;
}
- /// CHECK-START: long Main.ShlLongInt() constant_folding_after_inlining (before)
+ /// CHECK-START: long Main.ShlLongInt() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const3L:j\d+>> LongConstant 3
/// CHECK-DAG: <<Const2:i\d+>> IntConstant 2
/// CHECK-DAG: <<Shl:j\d+>> Shl [<<Const3L>>,<<Const2>>]
/// CHECK-DAG: Return [<<Shl>>]
- /// CHECK-START: long Main.ShlLongInt() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.ShlLongInt() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const12L:j\d+>> LongConstant 12
/// CHECK-DAG: Return [<<Const12L>>]
- /// CHECK-START: long Main.ShlLongInt() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.ShlLongInt() constant_folding$after_inlining (after)
/// CHECK-NOT: Shl
public static long ShlLongInt() {
* Exercise constant folding on right shift.
*/
- /// CHECK-START: int Main.ShrIntLong() constant_folding_after_inlining (before)
+ /// CHECK-START: int Main.ShrIntLong() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const7:i\d+>> IntConstant 7
/// CHECK-DAG: <<Const2L:j\d+>> LongConstant 2
/// CHECK-DAG: <<TypeConv:i\d+>> TypeConversion [<<Const2L>>]
/// CHECK-DAG: <<Shr:i\d+>> Shr [<<Const7>>,<<TypeConv>>]
/// CHECK-DAG: Return [<<Shr>>]
- /// CHECK-START: int Main.ShrIntLong() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.ShrIntLong() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const1:i\d+>> IntConstant 1
/// CHECK-DAG: Return [<<Const1>>]
- /// CHECK-START: int Main.ShrIntLong() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.ShrIntLong() constant_folding$after_inlining (after)
/// CHECK-NOT: Shr
public static int ShrIntLong() {
return lhs >> rhs;
}
- /// CHECK-START: long Main.ShrLongInt() constant_folding_after_inlining (before)
+ /// CHECK-START: long Main.ShrLongInt() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const9L:j\d+>> LongConstant 9
/// CHECK-DAG: <<Const2:i\d+>> IntConstant 2
/// CHECK-DAG: <<Shr:j\d+>> Shr [<<Const9L>>,<<Const2>>]
/// CHECK-DAG: Return [<<Shr>>]
- /// CHECK-START: long Main.ShrLongInt() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.ShrLongInt() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const2L:j\d+>> LongConstant 2
/// CHECK-DAG: Return [<<Const2L>>]
- /// CHECK-START: long Main.ShrLongInt() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.ShrLongInt() constant_folding$after_inlining (after)
/// CHECK-NOT: Shr
public static long ShrLongInt() {
* Exercise constant folding on unsigned right shift.
*/
- /// CHECK-START: int Main.UShrIntLong() constant_folding_after_inlining (before)
+ /// CHECK-START: int Main.UShrIntLong() constant_folding$after_inlining (before)
/// CHECK-DAG: <<ConstM7:i\d+>> IntConstant -7
/// CHECK-DAG: <<Const2L:j\d+>> LongConstant 2
/// CHECK-DAG: <<TypeConv:i\d+>> TypeConversion [<<Const2L>>]
/// CHECK-DAG: <<UShr:i\d+>> UShr [<<ConstM7>>,<<TypeConv>>]
/// CHECK-DAG: Return [<<UShr>>]
- /// CHECK-START: int Main.UShrIntLong() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.UShrIntLong() constant_folding$after_inlining (after)
/// CHECK-DAG: <<ConstRes:i\d+>> IntConstant 1073741822
/// CHECK-DAG: Return [<<ConstRes>>]
- /// CHECK-START: int Main.UShrIntLong() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.UShrIntLong() constant_folding$after_inlining (after)
/// CHECK-NOT: UShr
public static int UShrIntLong() {
return lhs >>> rhs;
}
- /// CHECK-START: long Main.UShrLongInt() constant_folding_after_inlining (before)
+ /// CHECK-START: long Main.UShrLongInt() constant_folding$after_inlining (before)
/// CHECK-DAG: <<ConstM9L:j\d+>> LongConstant -9
/// CHECK-DAG: <<Const2:i\d+>> IntConstant 2
/// CHECK-DAG: <<UShr:j\d+>> UShr [<<ConstM9L>>,<<Const2>>]
/// CHECK-DAG: Return [<<UShr>>]
- /// CHECK-START: long Main.UShrLongInt() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.UShrLongInt() constant_folding$after_inlining (after)
/// CHECK-DAG: <<ConstRes:j\d+>> LongConstant 4611686018427387901
/// CHECK-DAG: Return [<<ConstRes>>]
- /// CHECK-START: long Main.UShrLongInt() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.UShrLongInt() constant_folding$after_inlining (after)
/// CHECK-NOT: UShr
public static long UShrLongInt() {
* Exercise constant folding on logical and.
*/
- /// CHECK-START: long Main.AndIntLong() constant_folding_after_inlining (before)
+ /// CHECK-START: long Main.AndIntLong() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const10:i\d+>> IntConstant 10
/// CHECK-DAG: <<Const3L:j\d+>> LongConstant 3
/// CHECK-DAG: <<TypeConv:j\d+>> TypeConversion [<<Const10>>]
/// CHECK-DAG: <<And:j\d+>> And [<<TypeConv>>,<<Const3L>>]
/// CHECK-DAG: Return [<<And>>]
- /// CHECK-START: long Main.AndIntLong() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.AndIntLong() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const2:j\d+>> LongConstant 2
/// CHECK-DAG: Return [<<Const2>>]
- /// CHECK-START: long Main.AndIntLong() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.AndIntLong() constant_folding$after_inlining (after)
/// CHECK-NOT: And
public static long AndIntLong() {
return lhs & rhs;
}
- /// CHECK-START: long Main.AndLongInt() constant_folding_after_inlining (before)
+ /// CHECK-START: long Main.AndLongInt() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const10L:j\d+>> LongConstant 10
/// CHECK-DAG: <<Const3:i\d+>> IntConstant 3
/// CHECK-DAG: <<TypeConv:j\d+>> TypeConversion [<<Const3>>]
/// CHECK-DAG: <<And:j\d+>> And [<<TypeConv>>,<<Const10L>>]
/// CHECK-DAG: Return [<<And>>]
- /// CHECK-START: long Main.AndLongInt() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.AndLongInt() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const2:j\d+>> LongConstant 2
/// CHECK-DAG: Return [<<Const2>>]
- /// CHECK-START: long Main.AndLongInt() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.AndLongInt() constant_folding$after_inlining (after)
/// CHECK-NOT: And
public static long AndLongInt() {
* Exercise constant folding on logical or.
*/
- /// CHECK-START: long Main.OrIntLong() constant_folding_after_inlining (before)
+ /// CHECK-START: long Main.OrIntLong() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const10:i\d+>> IntConstant 10
/// CHECK-DAG: <<Const3L:j\d+>> LongConstant 3
/// CHECK-DAG: <<TypeConv:j\d+>> TypeConversion [<<Const10>>]
/// CHECK-DAG: <<Or:j\d+>> Or [<<TypeConv>>,<<Const3L>>]
/// CHECK-DAG: Return [<<Or>>]
- /// CHECK-START: long Main.OrIntLong() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.OrIntLong() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const11:j\d+>> LongConstant 11
/// CHECK-DAG: Return [<<Const11>>]
- /// CHECK-START: long Main.OrIntLong() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.OrIntLong() constant_folding$after_inlining (after)
/// CHECK-NOT: Or
public static long OrIntLong() {
return lhs | rhs;
}
- /// CHECK-START: long Main.OrLongInt() constant_folding_after_inlining (before)
+ /// CHECK-START: long Main.OrLongInt() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const10L:j\d+>> LongConstant 10
/// CHECK-DAG: <<Const3:i\d+>> IntConstant 3
/// CHECK-DAG: <<TypeConv:j\d+>> TypeConversion [<<Const3>>]
/// CHECK-DAG: <<Or:j\d+>> Or [<<TypeConv>>,<<Const10L>>]
/// CHECK-DAG: Return [<<Or>>]
- /// CHECK-START: long Main.OrLongInt() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.OrLongInt() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const11:j\d+>> LongConstant 11
/// CHECK-DAG: Return [<<Const11>>]
- /// CHECK-START: long Main.OrLongInt() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.OrLongInt() constant_folding$after_inlining (after)
/// CHECK-NOT: Or
public static long OrLongInt() {
* Exercise constant folding on logical exclusive or.
*/
- /// CHECK-START: long Main.XorIntLong() constant_folding_after_inlining (before)
+ /// CHECK-START: long Main.XorIntLong() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const10:i\d+>> IntConstant 10
/// CHECK-DAG: <<Const3L:j\d+>> LongConstant 3
/// CHECK-DAG: <<TypeConv:j\d+>> TypeConversion [<<Const10>>]
/// CHECK-DAG: <<Xor:j\d+>> Xor [<<TypeConv>>,<<Const3L>>]
/// CHECK-DAG: Return [<<Xor>>]
- /// CHECK-START: long Main.XorIntLong() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.XorIntLong() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const9:j\d+>> LongConstant 9
/// CHECK-DAG: Return [<<Const9>>]
- /// CHECK-START: long Main.XorIntLong() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.XorIntLong() constant_folding$after_inlining (after)
/// CHECK-NOT: Xor
public static long XorIntLong() {
return lhs ^ rhs;
}
- /// CHECK-START: long Main.XorLongInt() constant_folding_after_inlining (before)
+ /// CHECK-START: long Main.XorLongInt() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const10L:j\d+>> LongConstant 10
/// CHECK-DAG: <<Const3:i\d+>> IntConstant 3
/// CHECK-DAG: <<TypeConv:j\d+>> TypeConversion [<<Const3>>]
/// CHECK-DAG: <<Xor:j\d+>> Xor [<<TypeConv>>,<<Const10L>>]
/// CHECK-DAG: Return [<<Xor>>]
- /// CHECK-START: long Main.XorLongInt() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.XorLongInt() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const9:j\d+>> LongConstant 9
/// CHECK-DAG: Return [<<Const9>>]
- /// CHECK-START: long Main.XorLongInt() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.XorLongInt() constant_folding$after_inlining (after)
/// CHECK-NOT: Xor
public static long XorLongInt() {
* Exercise constant folding on constant (static) condition.
*/
- /// CHECK-START: int Main.StaticCondition() constant_folding_after_inlining (before)
+ /// CHECK-START: int Main.StaticCondition() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const7:i\d+>> IntConstant 7
/// CHECK-DAG: <<Const2:i\d+>> IntConstant 2
/// CHECK-DAG: <<Cond:z\d+>> GreaterThanOrEqual [<<Const7>>,<<Const2>>]
/// CHECK-DAG: Select [{{i\d+}},{{i\d+}},<<Cond>>]
- /// CHECK-START: int Main.StaticCondition() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.StaticCondition() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const1:i\d+>> IntConstant 1
/// CHECK-DAG: Select [{{i\d+}},{{i\d+}},<<Const1>>]
- /// CHECK-START: int Main.StaticCondition() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.StaticCondition() constant_folding$after_inlining (after)
/// CHECK-NOT: GreaterThanOrEqual
public static int StaticCondition() {
* Exercise constant folding on constant (static) condition for null references.
*/
- /// CHECK-START: int Main.StaticConditionNulls() constant_folding_after_inlining (before)
+ /// CHECK-START: int Main.StaticConditionNulls() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Null:l\d+>> NullConstant
/// CHECK-DAG: <<Cond:z\d+>> NotEqual [<<Null>>,<<Null>>]
/// CHECK-DAG: Select [{{i\d+}},{{i\d+}},<<Cond>>]
- /// CHECK-START: int Main.StaticConditionNulls() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.StaticConditionNulls() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const0:i\d+>> IntConstant 0
/// CHECK-DAG: Select [{{i\d+}},{{i\d+}},<<Const0>>]
- /// CHECK-START: int Main.StaticConditionNulls() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.StaticConditionNulls() constant_folding$after_inlining (after)
/// CHECK-NOT: NotEqual
private static Object getNull() {
* (forward) post-order traversal of the the dominator tree.
*/
- /// CHECK-START: int Main.JumpsAndConditionals(boolean) constant_folding_after_inlining (before)
+ /// CHECK-START: int Main.JumpsAndConditionals(boolean) constant_folding$after_inlining (before)
/// CHECK-DAG: <<Cond:z\d+>> ParameterValue
/// CHECK-DAG: <<Const2:i\d+>> IntConstant 2
/// CHECK-DAG: <<Const5:i\d+>> IntConstant 5
/// CHECK-DAG: <<Phi:i\d+>> Select [<<Sub>>,<<Add>>,<<Cond>>]
/// CHECK-DAG: Return [<<Phi>>]
- /// CHECK-START: int Main.JumpsAndConditionals(boolean) constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.JumpsAndConditionals(boolean) constant_folding$after_inlining (after)
/// CHECK-DAG: <<Cond:z\d+>> ParameterValue
/// CHECK-DAG: <<Const3:i\d+>> IntConstant 3
/// CHECK-DAG: <<Const7:i\d+>> IntConstant 7
/// CHECK-DAG: <<Phi:i\d+>> Select [<<Const3>>,<<Const7>>,<<Cond>>]
/// CHECK-DAG: Return [<<Phi>>]
- /// CHECK-START: int Main.JumpsAndConditionals(boolean) constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.JumpsAndConditionals(boolean) constant_folding$after_inlining (after)
/// CHECK-NOT: Add
/// CHECK-NOT: Sub
* Exercise constant folding on type conversions.
*/
- /// CHECK-START: int Main.ReturnInt33() constant_folding_after_inlining (before)
+ /// CHECK-START: int Main.ReturnInt33() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const33:j\d+>> LongConstant 33
/// CHECK-DAG: <<Convert:i\d+>> TypeConversion [<<Const33>>]
/// CHECK-DAG: Return [<<Convert>>]
- /// CHECK-START: int Main.ReturnInt33() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.ReturnInt33() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const33:i\d+>> IntConstant 33
/// CHECK-DAG: Return [<<Const33>>]
- /// CHECK-START: int Main.ReturnInt33() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.ReturnInt33() constant_folding$after_inlining (after)
/// CHECK-NOT: TypeConversion
public static int ReturnInt33() {
return (int) imm;
}
- /// CHECK-START: int Main.ReturnIntMax() constant_folding_after_inlining (before)
+ /// CHECK-START: int Main.ReturnIntMax() constant_folding$after_inlining (before)
/// CHECK-DAG: <<ConstMax:f\d+>> FloatConstant 1e+34
/// CHECK-DAG: <<Convert:i\d+>> TypeConversion [<<ConstMax>>]
/// CHECK-DAG: Return [<<Convert>>]
- /// CHECK-START: int Main.ReturnIntMax() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.ReturnIntMax() constant_folding$after_inlining (after)
/// CHECK-DAG: <<ConstMax:i\d+>> IntConstant 2147483647
/// CHECK-DAG: Return [<<ConstMax>>]
- /// CHECK-START: int Main.ReturnIntMax() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.ReturnIntMax() constant_folding$after_inlining (after)
/// CHECK-NOT: TypeConversion
public static int ReturnIntMax() {
return (int) imm;
}
- /// CHECK-START: int Main.ReturnInt0() constant_folding_after_inlining (before)
+ /// CHECK-START: int Main.ReturnInt0() constant_folding$after_inlining (before)
/// CHECK-DAG: <<ConstNaN:d\d+>> DoubleConstant nan
/// CHECK-DAG: <<Convert:i\d+>> TypeConversion [<<ConstNaN>>]
/// CHECK-DAG: Return [<<Convert>>]
- /// CHECK-START: int Main.ReturnInt0() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.ReturnInt0() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const0:i\d+>> IntConstant 0
/// CHECK-DAG: Return [<<Const0>>]
- /// CHECK-START: int Main.ReturnInt0() constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.ReturnInt0() constant_folding$after_inlining (after)
/// CHECK-NOT: TypeConversion
public static int ReturnInt0() {
return (int) imm;
}
- /// CHECK-START: long Main.ReturnLong33() constant_folding_after_inlining (before)
+ /// CHECK-START: long Main.ReturnLong33() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const33:i\d+>> IntConstant 33
/// CHECK-DAG: <<Convert:j\d+>> TypeConversion [<<Const33>>]
/// CHECK-DAG: Return [<<Convert>>]
- /// CHECK-START: long Main.ReturnLong33() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.ReturnLong33() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const33:j\d+>> LongConstant 33
/// CHECK-DAG: Return [<<Const33>>]
- /// CHECK-START: long Main.ReturnLong33() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.ReturnLong33() constant_folding$after_inlining (after)
/// CHECK-NOT: TypeConversion
public static long ReturnLong33() {
return (long) imm;
}
- /// CHECK-START: long Main.ReturnLong34() constant_folding_after_inlining (before)
+ /// CHECK-START: long Main.ReturnLong34() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const34:f\d+>> FloatConstant 34
/// CHECK-DAG: <<Convert:j\d+>> TypeConversion [<<Const34>>]
/// CHECK-DAG: Return [<<Convert>>]
- /// CHECK-START: long Main.ReturnLong34() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.ReturnLong34() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const34:j\d+>> LongConstant 34
/// CHECK-DAG: Return [<<Const34>>]
- /// CHECK-START: long Main.ReturnLong34() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.ReturnLong34() constant_folding$after_inlining (after)
/// CHECK-NOT: TypeConversion
public static long ReturnLong34() {
return (long) imm;
}
- /// CHECK-START: long Main.ReturnLong0() constant_folding_after_inlining (before)
+ /// CHECK-START: long Main.ReturnLong0() constant_folding$after_inlining (before)
/// CHECK-DAG: <<ConstNaN:d\d+>> DoubleConstant nan
/// CHECK-DAG: <<Convert:j\d+>> TypeConversion [<<ConstNaN>>]
/// CHECK-DAG: Return [<<Convert>>]
- /// CHECK-START: long Main.ReturnLong0() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.ReturnLong0() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const0:j\d+>> LongConstant 0
/// CHECK-DAG: Return [<<Const0>>]
- /// CHECK-START: long Main.ReturnLong0() constant_folding_after_inlining (after)
+ /// CHECK-START: long Main.ReturnLong0() constant_folding$after_inlining (after)
/// CHECK-NOT: TypeConversion
public static long ReturnLong0() {
return (long) imm;
}
- /// CHECK-START: float Main.ReturnFloat33() constant_folding_after_inlining (before)
+ /// CHECK-START: float Main.ReturnFloat33() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const33:i\d+>> IntConstant 33
/// CHECK-DAG: <<Convert:f\d+>> TypeConversion [<<Const33>>]
/// CHECK-DAG: Return [<<Convert>>]
- /// CHECK-START: float Main.ReturnFloat33() constant_folding_after_inlining (after)
+ /// CHECK-START: float Main.ReturnFloat33() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const33:f\d+>> FloatConstant 33
/// CHECK-DAG: Return [<<Const33>>]
- /// CHECK-START: float Main.ReturnFloat33() constant_folding_after_inlining (after)
+ /// CHECK-START: float Main.ReturnFloat33() constant_folding$after_inlining (after)
/// CHECK-NOT: TypeConversion
public static float ReturnFloat33() {
return (float) imm;
}
- /// CHECK-START: float Main.ReturnFloat34() constant_folding_after_inlining (before)
+ /// CHECK-START: float Main.ReturnFloat34() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const34:j\d+>> LongConstant 34
/// CHECK-DAG: <<Convert:f\d+>> TypeConversion [<<Const34>>]
/// CHECK-DAG: Return [<<Convert>>]
- /// CHECK-START: float Main.ReturnFloat34() constant_folding_after_inlining (after)
+ /// CHECK-START: float Main.ReturnFloat34() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const34:f\d+>> FloatConstant 34
/// CHECK-DAG: Return [<<Const34>>]
- /// CHECK-START: float Main.ReturnFloat34() constant_folding_after_inlining (after)
+ /// CHECK-START: float Main.ReturnFloat34() constant_folding$after_inlining (after)
/// CHECK-NOT: TypeConversion
public static float ReturnFloat34() {
return (float) imm;
}
- /// CHECK-START: float Main.ReturnFloat99P25() constant_folding_after_inlining (before)
+ /// CHECK-START: float Main.ReturnFloat99P25() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const:d\d+>> DoubleConstant 99.25
/// CHECK-DAG: <<Convert:f\d+>> TypeConversion [<<Const>>]
/// CHECK-DAG: Return [<<Convert>>]
- /// CHECK-START: float Main.ReturnFloat99P25() constant_folding_after_inlining (after)
+ /// CHECK-START: float Main.ReturnFloat99P25() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const:f\d+>> FloatConstant 99.25
/// CHECK-DAG: Return [<<Const>>]
- /// CHECK-START: float Main.ReturnFloat99P25() constant_folding_after_inlining (after)
+ /// CHECK-START: float Main.ReturnFloat99P25() constant_folding$after_inlining (after)
/// CHECK-NOT: TypeConversion
public static float ReturnFloat99P25() {
return (float) imm;
}
- /// CHECK-START: double Main.ReturnDouble33() constant_folding_after_inlining (before)
+ /// CHECK-START: double Main.ReturnDouble33() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const33:i\d+>> IntConstant 33
/// CHECK-DAG: <<Convert:d\d+>> TypeConversion [<<Const33>>]
/// CHECK-DAG: Return [<<Convert>>]
- /// CHECK-START: double Main.ReturnDouble33() constant_folding_after_inlining (after)
+ /// CHECK-START: double Main.ReturnDouble33() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const33:d\d+>> DoubleConstant 33
/// CHECK-DAG: Return [<<Const33>>]
return (double) imm;
}
- /// CHECK-START: double Main.ReturnDouble34() constant_folding_after_inlining (before)
+ /// CHECK-START: double Main.ReturnDouble34() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const34:j\d+>> LongConstant 34
/// CHECK-DAG: <<Convert:d\d+>> TypeConversion [<<Const34>>]
/// CHECK-DAG: Return [<<Convert>>]
- /// CHECK-START: double Main.ReturnDouble34() constant_folding_after_inlining (after)
+ /// CHECK-START: double Main.ReturnDouble34() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const34:d\d+>> DoubleConstant 34
/// CHECK-DAG: Return [<<Const34>>]
- /// CHECK-START: double Main.ReturnDouble34() constant_folding_after_inlining (after)
+ /// CHECK-START: double Main.ReturnDouble34() constant_folding$after_inlining (after)
/// CHECK-NOT: TypeConversion
public static double ReturnDouble34() {
return (double) imm;
}
- /// CHECK-START: double Main.ReturnDouble99P25() constant_folding_after_inlining (before)
+ /// CHECK-START: double Main.ReturnDouble99P25() constant_folding$after_inlining (before)
/// CHECK-DAG: <<Const:f\d+>> FloatConstant 99.25
/// CHECK-DAG: <<Convert:d\d+>> TypeConversion [<<Const>>]
/// CHECK-DAG: Return [<<Convert>>]
- /// CHECK-START: double Main.ReturnDouble99P25() constant_folding_after_inlining (after)
+ /// CHECK-START: double Main.ReturnDouble99P25() constant_folding$after_inlining (after)
/// CHECK-DAG: <<Const:d\d+>> DoubleConstant 99.25
/// CHECK-DAG: Return [<<Const>>]
- /// CHECK-START: double Main.ReturnDouble99P25() constant_folding_after_inlining (after)
+ /// CHECK-START: double Main.ReturnDouble99P25() constant_folding$after_inlining (after)
/// CHECK-NOT: TypeConversion
public static double ReturnDouble99P25() {
/// CHECK-NOT: BoundsCheck
/// CHECK: ArrayGet
- /// CHECK-START: void Main.foo9(int[], boolean) instruction_simplifier_after_bce (after)
+ /// CHECK-START: void Main.foo9(int[], boolean) instruction_simplifier$after_bce (after)
// Simplification removes the redundant check
/// CHECK: Deoptimize
/// CHECK: Deoptimize
/// CHECK-DAG: <<IOf:z\d+>> InstanceOf
/// CHECK-DAG: If [<<IOf>>]
- /// CHECK-START: void Main.testInstanceOf_Inlined(java.lang.Object) instruction_simplifier_after_bce (before)
+ /// CHECK-START: void Main.testInstanceOf_Inlined(java.lang.Object) instruction_simplifier$after_bce (before)
/// CHECK: CheckCast
/// CHECK-NOT: CheckCast
- /// CHECK-START: void Main.testInstanceOf_Inlined(java.lang.Object) instruction_simplifier_after_bce (after)
+ /// CHECK-START: void Main.testInstanceOf_Inlined(java.lang.Object) instruction_simplifier$after_bce (after)
/// CHECK-NOT: CheckCast
public void testInstanceOf_Inlined(Object o) {
if (!$inline$InstanceofSubclassC(o)) {
/// CHECK-NOT: Neg
/// CHECK-NOT: Add
- /// CHECK-START: int Main.$noinline$NegNeg2(int) constant_folding_after_inlining (after)
+ /// CHECK-START: int Main.$noinline$NegNeg2(int) constant_folding$after_inlining (after)
/// CHECK: <<Const0:i\d+>> IntConstant 0
/// CHECK-NOT: Neg
/// CHECK-NOT: Add
return res;
}
- /// CHECK-START: boolean Main.$noinline$EqualBoolVsIntConst(boolean) instruction_simplifier_after_bce (before)
+ /// CHECK-START: boolean Main.$noinline$EqualBoolVsIntConst(boolean) instruction_simplifier$after_bce (before)
/// CHECK-DAG: <<Arg:z\d+>> ParameterValue
/// CHECK-DAG: <<Const0:i\d+>> IntConstant 0
/// CHECK-DAG: <<Const1:i\d+>> IntConstant 1
/// CHECK-DAG: <<NotCond:i\d+>> Select [<<Const1>>,<<Const0>>,<<Cond>>]
/// CHECK-DAG: Return [<<NotCond>>]
- /// CHECK-START: boolean Main.$noinline$EqualBoolVsIntConst(boolean) instruction_simplifier_after_bce (after)
+ /// CHECK-START: boolean Main.$noinline$EqualBoolVsIntConst(boolean) instruction_simplifier$after_bce (after)
/// CHECK-DAG: <<True:i\d+>> IntConstant 1
/// CHECK-DAG: Return [<<True>>]
return arg;
}
- /// CHECK-START: boolean Main.$noinline$NotEqualBoolVsIntConst(boolean) instruction_simplifier_after_bce (before)
+ /// CHECK-START: boolean Main.$noinline$NotEqualBoolVsIntConst(boolean) instruction_simplifier$after_bce (before)
/// CHECK-DAG: <<Arg:z\d+>> ParameterValue
/// CHECK-DAG: <<Const0:i\d+>> IntConstant 0
/// CHECK-DAG: <<Const1:i\d+>> IntConstant 1
/// CHECK-DAG: <<NotCond:i\d+>> Select [<<Const1>>,<<Const0>>,<<Cond>>]
/// CHECK-DAG: Return [<<NotCond>>]
- /// CHECK-START: boolean Main.$noinline$NotEqualBoolVsIntConst(boolean) instruction_simplifier_after_bce (after)
+ /// CHECK-START: boolean Main.$noinline$NotEqualBoolVsIntConst(boolean) instruction_simplifier$after_bce (after)
/// CHECK-DAG: <<False:i\d+>> IntConstant 0
/// CHECK-DAG: Return [<<False>>]
* remove the second.
*/
- /// CHECK-START: boolean Main.$noinline$NotNotBool(boolean) instruction_simplifier_after_bce (before)
+ /// CHECK-START: boolean Main.$noinline$NotNotBool(boolean) instruction_simplifier$after_bce (before)
/// CHECK-DAG: <<Arg:z\d+>> ParameterValue
/// CHECK-DAG: <<Const0:i\d+>> IntConstant 0
/// CHECK-DAG: <<Const1:i\d+>> IntConstant 1
/// CHECK-DAG: <<NotNotArg:i\d+>> Select [<<Const1>>,<<Const0>>,<<NotArg>>]
/// CHECK-DAG: Return [<<NotNotArg>>]
- /// CHECK-START: boolean Main.$noinline$NotNotBool(boolean) instruction_simplifier_after_bce (after)
+ /// CHECK-START: boolean Main.$noinline$NotNotBool(boolean) instruction_simplifier$after_bce (after)
/// CHECK-DAG: <<Arg:z\d+>> ParameterValue
/// CHECK-DAG: Return [<<Arg>>]
return arg * 31;
}
- /// CHECK-START: int Main.$noinline$booleanFieldNotEqualOne() instruction_simplifier_after_bce (before)
+ /// CHECK-START: int Main.$noinline$booleanFieldNotEqualOne() instruction_simplifier$after_bce (before)
/// CHECK-DAG: <<Const1:i\d+>> IntConstant 1
/// CHECK-DAG: <<Const13:i\d+>> IntConstant 13
/// CHECK-DAG: <<Const54:i\d+>> IntConstant 54
/// CHECK-DAG: <<Select:i\d+>> Select [<<Const13>>,<<Const54>>,<<NE>>]
/// CHECK-DAG: Return [<<Select>>]
- /// CHECK-START: int Main.$noinline$booleanFieldNotEqualOne() instruction_simplifier_after_bce (after)
+ /// CHECK-START: int Main.$noinline$booleanFieldNotEqualOne() instruction_simplifier$after_bce (after)
/// CHECK-DAG: <<doThrow:z\d+>> StaticFieldGet
/// CHECK-DAG: <<Field:z\d+>> StaticFieldGet
/// CHECK-DAG: <<Const13:i\d+>> IntConstant 13
return (booleanField == $inline$true()) ? 13 : 54;
}
- /// CHECK-START: int Main.$noinline$booleanFieldEqualZero() instruction_simplifier_after_bce (before)
+ /// CHECK-START: int Main.$noinline$booleanFieldEqualZero() instruction_simplifier$after_bce (before)
/// CHECK-DAG: <<Const0:i\d+>> IntConstant 0
/// CHECK-DAG: <<Const13:i\d+>> IntConstant 13
/// CHECK-DAG: <<Const54:i\d+>> IntConstant 54
/// CHECK-DAG: <<Select:i\d+>> Select [<<Const13>>,<<Const54>>,<<NE>>]
/// CHECK-DAG: Return [<<Select>>]
- /// CHECK-START: int Main.$noinline$booleanFieldEqualZero() instruction_simplifier_after_bce (after)
+ /// CHECK-START: int Main.$noinline$booleanFieldEqualZero() instruction_simplifier$after_bce (after)
/// CHECK-DAG: <<doThrow:z\d+>> StaticFieldGet
/// CHECK-DAG: <<Field:z\d+>> StaticFieldGet
/// CHECK-DAG: <<Const13:i\d+>> IntConstant 13
return (booleanField != $inline$false()) ? 13 : 54;
}
- /// CHECK-START: int Main.$noinline$intConditionNotEqualOne(int) instruction_simplifier_after_bce (before)
+ /// CHECK-START: int Main.$noinline$intConditionNotEqualOne(int) instruction_simplifier$after_bce (before)
/// CHECK-DAG: <<Arg:i\d+>> ParameterValue
/// CHECK-DAG: <<Const0:i\d+>> IntConstant 0
/// CHECK-DAG: <<Const1:i\d+>> IntConstant 1
/// CHECK-DAG: <<Result:i\d+>> Select [<<Const13>>,<<Const54>>,<<NE>>]
/// CHECK-DAG: Return [<<Result>>]
- /// CHECK-START: int Main.$noinline$intConditionNotEqualOne(int) instruction_simplifier_after_bce (after)
+ /// CHECK-START: int Main.$noinline$intConditionNotEqualOne(int) instruction_simplifier$after_bce (after)
/// CHECK-DAG: <<Arg:i\d+>> ParameterValue
/// CHECK-DAG: <<Const13:i\d+>> IntConstant 13
/// CHECK-DAG: <<Const42:i\d+>> IntConstant 42
return ((i > 42) == $inline$true()) ? 13 : 54;
}
- /// CHECK-START: int Main.$noinline$intConditionEqualZero(int) instruction_simplifier_after_bce (before)
+ /// CHECK-START: int Main.$noinline$intConditionEqualZero(int) instruction_simplifier$after_bce (before)
/// CHECK-DAG: <<Arg:i\d+>> ParameterValue
/// CHECK-DAG: <<Const0:i\d+>> IntConstant 0
/// CHECK-DAG: <<Const1:i\d+>> IntConstant 1
/// CHECK-DAG: <<Result:i\d+>> Select [<<Const13>>,<<Const54>>,<<NE>>]
/// CHECK-DAG: Return [<<Result>>]
- /// CHECK-START: int Main.$noinline$intConditionEqualZero(int) instruction_simplifier_after_bce (after)
+ /// CHECK-START: int Main.$noinline$intConditionEqualZero(int) instruction_simplifier$after_bce (after)
/// CHECK-DAG: <<Arg:i\d+>> ParameterValue
/// CHECK-DAG: <<Const13:i\d+>> IntConstant 13
/// CHECK-DAG: <<Const42:i\d+>> IntConstant 42
/// CHECK-START: int Main.$noinline$floatConditionNotEqualOne(float) builder (after)
/// CHECK: LessThanOrEqual
- /// CHECK-START: int Main.$noinline$floatConditionNotEqualOne(float) instruction_simplifier_before_codegen (after)
+ /// CHECK-START: int Main.$noinline$floatConditionNotEqualOne(float) instruction_simplifier$before_codegen (after)
/// CHECK-DAG: <<Arg:f\d+>> ParameterValue
/// CHECK-DAG: <<Const13:i\d+>> IntConstant 13
/// CHECK-DAG: <<Const54:i\d+>> IntConstant 54
/// CHECK-START: int Main.$noinline$doubleConditionEqualZero(double) builder (after)
/// CHECK: LessThanOrEqual
- /// CHECK-START: int Main.$noinline$doubleConditionEqualZero(double) instruction_simplifier_before_codegen (after)
+ /// CHECK-START: int Main.$noinline$doubleConditionEqualZero(double) instruction_simplifier$before_codegen (after)
/// CHECK-DAG: <<Arg:d\d+>> ParameterValue
/// CHECK-DAG: <<Const13:i\d+>> IntConstant 13
/// CHECK-DAG: <<Const54:i\d+>> IntConstant 54
return false;
}
- /// CHECK-START: int Main.testTrueBranch(int, int) dead_code_elimination_final (before)
+ /// CHECK-START: int Main.testTrueBranch(int, int) dead_code_elimination$final (before)
/// CHECK-DAG: <<ArgX:i\d+>> ParameterValue
/// CHECK-DAG: <<ArgY:i\d+>> ParameterValue
/// CHECK-DAG: If
/// CHECK-DAG: <<Phi:i\d+>> Phi [<<Add>>,<<Sub>>]
/// CHECK-DAG: Return [<<Phi>>]
- /// CHECK-START: int Main.testTrueBranch(int, int) dead_code_elimination_final (after)
+ /// CHECK-START: int Main.testTrueBranch(int, int) dead_code_elimination$final (after)
/// CHECK-DAG: <<ArgX:i\d+>> ParameterValue
/// CHECK-DAG: <<ArgY:i\d+>> ParameterValue
/// CHECK-DAG: <<Add:i\d+>> Add [<<ArgX>>,<<ArgY>>]
/// CHECK-DAG: Return [<<Add>>]
- /// CHECK-START: int Main.testTrueBranch(int, int) dead_code_elimination_final (after)
+ /// CHECK-START: int Main.testTrueBranch(int, int) dead_code_elimination$final (after)
/// CHECK-NOT: If
/// CHECK-NOT: Sub
/// CHECK-NOT: Phi
return z;
}
- /// CHECK-START: int Main.testFalseBranch(int, int) dead_code_elimination_final (before)
+ /// CHECK-START: int Main.testFalseBranch(int, int) dead_code_elimination$final (before)
/// CHECK-DAG: <<ArgX:i\d+>> ParameterValue
/// CHECK-DAG: <<ArgY:i\d+>> ParameterValue
/// CHECK-DAG: If
/// CHECK-DAG: <<Phi:i\d+>> Phi [<<Add>>,<<Sub>>]
/// CHECK-DAG: Return [<<Phi>>]
- /// CHECK-START: int Main.testFalseBranch(int, int) dead_code_elimination_final (after)
+ /// CHECK-START: int Main.testFalseBranch(int, int) dead_code_elimination$final (after)
/// CHECK-DAG: <<ArgX:i\d+>> ParameterValue
/// CHECK-DAG: <<ArgY:i\d+>> ParameterValue
/// CHECK-DAG: <<Sub:i\d+>> Sub [<<ArgX>>,<<ArgY>>]
/// CHECK-DAG: Return [<<Sub>>]
- /// CHECK-START: int Main.testFalseBranch(int, int) dead_code_elimination_final (after)
+ /// CHECK-START: int Main.testFalseBranch(int, int) dead_code_elimination$final (after)
/// CHECK-NOT: If
/// CHECK-NOT: Add
/// CHECK-NOT: Phi
return z;
}
- /// CHECK-START: int Main.testRemoveLoop(int) dead_code_elimination_final (before)
+ /// CHECK-START: int Main.testRemoveLoop(int) dead_code_elimination$final (before)
/// CHECK: Mul
- /// CHECK-START: int Main.testRemoveLoop(int) dead_code_elimination_final (after)
+ /// CHECK-START: int Main.testRemoveLoop(int) dead_code_elimination$final (after)
/// CHECK-NOT: Mul
public static int testRemoveLoop(int x) {
return x;
}
- /// CHECK-START: int Main.testInfiniteLoop(int) dead_code_elimination_final (before)
+ /// CHECK-START: int Main.testInfiniteLoop(int) dead_code_elimination$final (before)
/// CHECK-DAG: Return
/// CHECK-DAG: Exit
- /// CHECK-START: int Main.testInfiniteLoop(int) dead_code_elimination_final (after)
+ /// CHECK-START: int Main.testInfiniteLoop(int) dead_code_elimination$final (after)
/// CHECK-NOT: Return
/// CHECK-NOT: Exit
return x;
}
- /// CHECK-START: int Main.testDeadLoop(int) dead_code_elimination_final (before)
+ /// CHECK-START: int Main.testDeadLoop(int) dead_code_elimination$final (before)
/// CHECK-DAG: If
/// CHECK-DAG: Add
- /// CHECK-START: int Main.testDeadLoop(int) dead_code_elimination_final (after)
+ /// CHECK-START: int Main.testDeadLoop(int) dead_code_elimination$final (after)
/// CHECK-DAG: <<Arg:i\d+>> ParameterValue
/// CHECK-DAG: Return [<<Arg>>]
- /// CHECK-START: int Main.testDeadLoop(int) dead_code_elimination_final (after)
+ /// CHECK-START: int Main.testDeadLoop(int) dead_code_elimination$final (after)
/// CHECK-NOT: If
/// CHECK-NOT: Add
return x;
}
- /// CHECK-START: int Main.testUpdateLoopInformation(int) dead_code_elimination_final (before)
+ /// CHECK-START: int Main.testUpdateLoopInformation(int) dead_code_elimination$final (before)
/// CHECK-DAG: If
/// CHECK-DAG: If
/// CHECK-DAG: Add
- /// CHECK-START: int Main.testUpdateLoopInformation(int) dead_code_elimination_final (after)
+ /// CHECK-START: int Main.testUpdateLoopInformation(int) dead_code_elimination$final (after)
/// CHECK-DAG: <<Arg:i\d+>> ParameterValue
/// CHECK-DAG: Return [<<Arg>>]
- /// CHECK-START: int Main.testUpdateLoopInformation(int) dead_code_elimination_final (after)
+ /// CHECK-START: int Main.testUpdateLoopInformation(int) dead_code_elimination$final (after)
/// CHECK-NOT: If
/// CHECK-NOT: Add
return x;
}
- /// CHECK-START: int Main.testRemoveSuspendCheck(int, int) dead_code_elimination_final (before)
+ /// CHECK-START: int Main.testRemoveSuspendCheck(int, int) dead_code_elimination$final (before)
/// CHECK: SuspendCheck
/// CHECK: SuspendCheck
/// CHECK: SuspendCheck
/// CHECK-NOT: SuspendCheck
- /// CHECK-START: int Main.testRemoveSuspendCheck(int, int) dead_code_elimination_final (after)
+ /// CHECK-START: int Main.testRemoveSuspendCheck(int, int) dead_code_elimination$final (after)
/// CHECK: SuspendCheck
/// CHECK: SuspendCheck
/// CHECK-NOT: SuspendCheck
.end method
-## CHECK-START: int TestCase.testSingleExit(int, boolean) dead_code_elimination_final (before)
+## CHECK-START: int TestCase.testSingleExit(int, boolean) dead_code_elimination$final (before)
## CHECK-DAG: <<ArgX:i\d+>> ParameterValue
## CHECK-DAG: <<ArgY:z\d+>> ParameterValue
## CHECK-DAG: <<Cst1:i\d+>> IntConstant 1
## CHECK-DAG: <<Add7>> Add [<<PhiX>>,<<Cst7>>] loop:<<HeaderY>>
## CHECK-DAG: Return [<<PhiX>>] loop:none
-## CHECK-START: int TestCase.testSingleExit(int, boolean) dead_code_elimination_final (after)
+## CHECK-START: int TestCase.testSingleExit(int, boolean) dead_code_elimination$final (after)
## CHECK-DAG: <<ArgX:i\d+>> ParameterValue
## CHECK-DAG: <<ArgY:z\d+>> ParameterValue
## CHECK-DAG: <<Cst7:i\d+>> IntConstant 7
.end method
-## CHECK-START: int TestCase.testMultipleExits(int, boolean, boolean) dead_code_elimination_final (before)
+## CHECK-START: int TestCase.testMultipleExits(int, boolean, boolean) dead_code_elimination$final (before)
## CHECK-DAG: <<ArgX:i\d+>> ParameterValue
## CHECK-DAG: <<ArgY:z\d+>> ParameterValue
## CHECK-DAG: <<ArgZ:z\d+>> ParameterValue
## CHECK-DAG: <<Add7>> Add [<<PhiX>>,<<Cst7>>] loop:<<HeaderY>>
## CHECK-DAG: Return [<<PhiX>>] loop:none
-## CHECK-START: int TestCase.testMultipleExits(int, boolean, boolean) dead_code_elimination_final (after)
+## CHECK-START: int TestCase.testMultipleExits(int, boolean, boolean) dead_code_elimination$final (after)
## CHECK-DAG: <<ArgX:i\d+>> ParameterValue
## CHECK-DAG: <<ArgY:z\d+>> ParameterValue
## CHECK-DAG: <<ArgZ:z\d+>> ParameterValue
.end method
-## CHECK-START: int TestCase.testExitPredecessors(int, boolean, boolean) dead_code_elimination_final (before)
+## CHECK-START: int TestCase.testExitPredecessors(int, boolean, boolean) dead_code_elimination$final (before)
## CHECK-DAG: <<ArgX:i\d+>> ParameterValue
## CHECK-DAG: <<ArgY:z\d+>> ParameterValue
## CHECK-DAG: <<ArgZ:z\d+>> ParameterValue
## CHECK-DAG: <<Add7>> Add [<<PhiX>>,<<Cst7>>] loop:<<HeaderY>>
## CHECK-DAG: Return [<<SelX>>] loop:none
-## CHECK-START: int TestCase.testExitPredecessors(int, boolean, boolean) dead_code_elimination_final (after)
+## CHECK-START: int TestCase.testExitPredecessors(int, boolean, boolean) dead_code_elimination$final (after)
## CHECK-DAG: <<ArgX:i\d+>> ParameterValue
## CHECK-DAG: <<ArgY:z\d+>> ParameterValue
## CHECK-DAG: <<ArgZ:z\d+>> ParameterValue
.end method
-## CHECK-START: int TestCase.testInnerLoop(int, boolean, boolean) dead_code_elimination_final (before)
+## CHECK-START: int TestCase.testInnerLoop(int, boolean, boolean) dead_code_elimination$final (before)
## CHECK-DAG: <<ArgX:i\d+>> ParameterValue
## CHECK-DAG: <<ArgY:z\d+>> ParameterValue
## CHECK-DAG: <<ArgZ:z\d+>> ParameterValue
## CHECK-DAG: <<Add7>> Add [<<PhiX>>,<<Cst7>>] loop:<<HeaderY>>
## CHECK-DAG: Return [<<PhiX>>] loop:none
-## CHECK-START: int TestCase.testInnerLoop(int, boolean, boolean) dead_code_elimination_final (after)
+## CHECK-START: int TestCase.testInnerLoop(int, boolean, boolean) dead_code_elimination$final (after)
## CHECK-DAG: <<ArgX:i\d+>> ParameterValue
## CHECK-DAG: <<ArgY:z\d+>> ParameterValue
## CHECK-DAG: <<ArgZ:z\d+>> ParameterValue
return 5;
}
- /// CHECK-START: int Main.wholeSwitchDead(int) dead_code_elimination_final (before)
+ /// CHECK-START: int Main.wholeSwitchDead(int) dead_code_elimination$final (before)
/// CHECK-DAG: PackedSwitch
- /// CHECK-START: int Main.wholeSwitchDead(int) dead_code_elimination_final (after)
+ /// CHECK-START: int Main.wholeSwitchDead(int) dead_code_elimination$final (after)
/// CHECK-DAG: <<Const100:i\d+>> IntConstant 100
/// CHECK-DAG: Return [<<Const100>>]
- /// CHECK-START: int Main.wholeSwitchDead(int) dead_code_elimination_final (after)
+ /// CHECK-START: int Main.wholeSwitchDead(int) dead_code_elimination$final (after)
/// CHECK-NOT: PackedSwitch
public static int wholeSwitchDead(int j) {
return l;
}
- /// CHECK-START: int Main.constantSwitch_InRange() dead_code_elimination_final (before)
+ /// CHECK-START: int Main.constantSwitch_InRange() dead_code_elimination$final (before)
/// CHECK-DAG: PackedSwitch
- /// CHECK-START: int Main.constantSwitch_InRange() dead_code_elimination_final (after)
+ /// CHECK-START: int Main.constantSwitch_InRange() dead_code_elimination$final (after)
/// CHECK-DAG: <<Const7:i\d+>> IntConstant 7
/// CHECK-DAG: Return [<<Const7>>]
- /// CHECK-START: int Main.constantSwitch_InRange() dead_code_elimination_final (after)
+ /// CHECK-START: int Main.constantSwitch_InRange() dead_code_elimination$final (after)
/// CHECK-NOT: PackedSwitch
public static int constantSwitch_InRange() {
return i;
}
- /// CHECK-START: int Main.constantSwitch_AboveRange() dead_code_elimination_final (before)
+ /// CHECK-START: int Main.constantSwitch_AboveRange() dead_code_elimination$final (before)
/// CHECK-DAG: PackedSwitch
- /// CHECK-START: int Main.constantSwitch_AboveRange() dead_code_elimination_final (after)
+ /// CHECK-START: int Main.constantSwitch_AboveRange() dead_code_elimination$final (after)
/// CHECK-DAG: <<Const15:i\d+>> IntConstant 15
/// CHECK-DAG: Return [<<Const15>>]
- /// CHECK-START: int Main.constantSwitch_AboveRange() dead_code_elimination_final (after)
+ /// CHECK-START: int Main.constantSwitch_AboveRange() dead_code_elimination$final (after)
/// CHECK-NOT: PackedSwitch
public static int constantSwitch_AboveRange() {
return i;
}
- /// CHECK-START: int Main.constantSwitch_BelowRange() dead_code_elimination_final (before)
+ /// CHECK-START: int Main.constantSwitch_BelowRange() dead_code_elimination$final (before)
/// CHECK-DAG: PackedSwitch
- /// CHECK-START: int Main.constantSwitch_BelowRange() dead_code_elimination_final (after)
+ /// CHECK-START: int Main.constantSwitch_BelowRange() dead_code_elimination$final (after)
/// CHECK-DAG: <<ConstM5:i\d+>> IntConstant -5
/// CHECK-DAG: Return [<<ConstM5>>]
- /// CHECK-START: int Main.constantSwitch_BelowRange() dead_code_elimination_final (after)
+ /// CHECK-START: int Main.constantSwitch_BelowRange() dead_code_elimination$final (after)
/// CHECK-NOT: PackedSwitch
public static int constantSwitch_BelowRange() {
# Test that a throw-catch loop on monitor-exit is eliminated.
# Note that we do not test this until after DCE which merges trivially split blocks.
-## CHECK-START: int Builder.testSynchronized(java.lang.Object) dead_code_elimination (after)
+## CHECK-START: int Builder.testSynchronized(java.lang.Object) dead_code_elimination$initial(after)
## CHECK: flags "catch_block"
## CHECK-NOT: end_block
## CHECK: MonitorOperation kind:exit
.super Ljava/lang/Object;
-## CHECK-START: int Test.synchronizedHashCode(java.lang.Object) dead_code_elimination (before)
+## CHECK-START: int Test.synchronizedHashCode(java.lang.Object) dead_code_elimination$initial(before)
## CHECK: MonitorOperation [<<Param:l\d+>>] kind:enter
## CHECK: MonitorOperation [<<Param>>] kind:exit
-## CHECK-START: int Test.synchronizedHashCode(java.lang.Object) dead_code_elimination (after)
+## CHECK-START: int Test.synchronizedHashCode(java.lang.Object) dead_code_elimination$initial(after)
## CHECK: MonitorOperation [<<Param:l\d+>>] kind:enter
## CHECK: MonitorOperation [<<Param>>] kind:exit
/// CHECK: <<Address2:l\d+>> IntermediateAddress [<<Array>>,<<DataOffset>>]
/// CHECK-NEXT: ArraySet [<<Address2>>,<<Index>>,<<Add>>]
- /// CHECK-START-ARM64: void Main.getSet(int[], int) GVN_after_arch (after)
+ /// CHECK-START-ARM64: void Main.getSet(int[], int) GVN$after_arch (after)
/// CHECK-DAG: <<Const1:i\d+>> IntConstant 1
/// CHECK-DAG: <<DataOffset:i\d+>> IntConstant
/// CHECK: <<Array:l\d+>> NullCheck
/// CHECK: <<Address2:l\d+>> IntermediateAddress [<<Array>>,<<DataOffset>>]
/// CHECK-NEXT: ArraySet [<<Address2>>,<<Index>>,<<Add>>]
- /// CHECK-START-ARM: void Main.getSet(int[], int) GVN_after_arch (after)
+ /// CHECK-START-ARM: void Main.getSet(int[], int) GVN$after_arch (after)
/// CHECK-DAG: <<Const1:i\d+>> IntConstant 1
/// CHECK-DAG: <<DataOffset:i\d+>> IntConstant
/// CHECK: <<Array:l\d+>> NullCheck
/// CHECK: <<Address2:l\d+>> IntermediateAddress [<<Array>>,<<DataOffset>>]
/// CHECK-NEXT: ArraySet [<<Address2>>,<<Index>>,<<Add>>]
- /// CHECK-START-ARM64: int[] Main.accrossGC(int[], int) GVN_after_arch (after)
+ /// CHECK-START-ARM64: int[] Main.accrossGC(int[], int) GVN$after_arch (after)
/// CHECK-DAG: <<Const1:i\d+>> IntConstant 1
/// CHECK-DAG: <<DataOffset:i\d+>> IntConstant
/// CHECK: <<Array:l\d+>> NullCheck
/// CHECK: <<Address2:l\d+>> IntermediateAddress [<<Array>>,<<DataOffset>>]
/// CHECK-NEXT: ArraySet [<<Address2>>,<<Index>>,<<Add>>]
- /// CHECK-START-ARM: int[] Main.accrossGC(int[], int) GVN_after_arch (after)
+ /// CHECK-START-ARM: int[] Main.accrossGC(int[], int) GVN$after_arch (after)
/// CHECK-DAG: <<Const1:i\d+>> IntConstant 1
/// CHECK-DAG: <<DataOffset:i\d+>> IntConstant
/// CHECK: <<Array:l\d+>> NullCheck
/// CHECK: <<Address2:l\d+>> IntermediateAddress [<<Array>>,<<DataOffset>>]
/// CHECK-NEXT: ArraySet [<<Address2>>,<<Index>>,<<Add>>]
- /// CHECK-START-ARM64: int Main.canMergeAfterBCE1() GVN_after_arch (after)
+ /// CHECK-START-ARM64: int Main.canMergeAfterBCE1() GVN$after_arch (after)
/// CHECK-DAG: <<Const1:i\d+>> IntConstant 1
/// CHECK-DAG: <<DataOffset:i\d+>> IntConstant 12
/// CHECK: <<Array:l\d+>> NewArray
/// CHECK: <<Address2:l\d+>> IntermediateAddress [<<Array>>,<<DataOffset>>]
/// CHECK-NEXT: ArraySet [<<Address2>>,<<Index>>,<<Add>>]
- /// CHECK-START-ARM: int Main.canMergeAfterBCE1() GVN_after_arch (after)
+ /// CHECK-START-ARM: int Main.canMergeAfterBCE1() GVN$after_arch (after)
/// CHECK-DAG: <<Const1:i\d+>> IntConstant 1
/// CHECK-DAG: <<DataOffset:i\d+>> IntConstant 12
/// CHECK: <<Array:l\d+>> NewArray
/// CHECK: <<Address3:l\d+>> IntermediateAddress [<<Array>>,<<DataOffset>>]
/// CHECK: ArraySet [<<Address3>>,<<Index1>>,<<Add>>]
- /// CHECK-START-ARM64: int Main.canMergeAfterBCE2() GVN_after_arch (after)
+ /// CHECK-START-ARM64: int Main.canMergeAfterBCE2() GVN$after_arch (after)
/// CHECK-DAG: <<Const1:i\d+>> IntConstant 1
/// CHECK-DAG: <<DataOffset:i\d+>> IntConstant 12
/// CHECK: <<Array:l\d+>> NewArray
// There should be only one intermediate address computation in the loop.
- /// CHECK-START-ARM64: int Main.canMergeAfterBCE2() GVN_after_arch (after)
+ /// CHECK-START-ARM64: int Main.canMergeAfterBCE2() GVN$after_arch (after)
/// CHECK: IntermediateAddress
/// CHECK-NOT: IntermediateAddress
/// CHECK: <<Address3:l\d+>> IntermediateAddress [<<Array>>,<<DataOffset>>]
/// CHECK: ArraySet [<<Address3>>,<<Index1>>,<<Add>>]
- /// CHECK-START-ARM: int Main.canMergeAfterBCE2() GVN_after_arch (after)
+ /// CHECK-START-ARM: int Main.canMergeAfterBCE2() GVN$after_arch (after)
/// CHECK-DAG: <<Const1:i\d+>> IntConstant 1
/// CHECK-DAG: <<DataOffset:i\d+>> IntConstant 12
/// CHECK: <<Array:l\d+>> NewArray
/// CHECK: <<Add:i\d+>> Add [<<ArrayGetI>>,<<ArrayGetI1>>]
/// CHECK: ArraySet [<<Address>>,<<Index1>>,<<Add>>]
- /// CHECK-START-ARM: int Main.canMergeAfterBCE2() GVN_after_arch (after)
+ /// CHECK-START-ARM: int Main.canMergeAfterBCE2() GVN$after_arch (after)
/// CHECK: IntermediateAddress
/// CHECK-NOT: IntermediateAddress
/// CHECK-DAG: Deoptimize loop:none
/// CHECK-NOT: Deoptimize
//
- /// CHECK-START: void Main.multipleUnitStrides(int[], int[]) instruction_simplifier_after_bce (after)
+ /// CHECK-START: void Main.multipleUnitStrides(int[], int[]) instruction_simplifier$after_bce (after)
/// CHECK-DAG: Deoptimize loop:none
/// CHECK-DAG: Deoptimize loop:none
/// CHECK-DAG: Deoptimize loop:none
/// CHECK-DAG: Deoptimize loop:none
/// CHECK-NOT: Deoptimize
//
- /// CHECK-START: void Main.multipleUnitStridesConditional(int[], int[]) instruction_simplifier_after_bce (after)
+ /// CHECK-START: void Main.multipleUnitStridesConditional(int[], int[]) instruction_simplifier$after_bce (after)
/// CHECK-DAG: Deoptimize loop:none
/// CHECK-DAG: Deoptimize loop:none
/// CHECK-DAG: Deoptimize loop:none
/// CHECK-DAG: Deoptimize loop:none
/// CHECK-NOT: Deoptimize
//
- /// CHECK-START: void Main.shifter(int[]) instruction_simplifier_after_bce (after)
+ /// CHECK-START: void Main.shifter(int[]) instruction_simplifier$after_bce (after)
/// CHECK-DAG: Deoptimize loop:none
/// CHECK-DAG: Deoptimize loop:none
/// CHECK-NOT: Deoptimize
/// CHECK: <<Class:l\d+>> LoadClass
/// CHECK: InstanceOf [<<Phi>>,<<Class>>]
- /// CHECK-START: void Main.testKeepInstanceOf(java.lang.Object, boolean) dead_code_elimination (after)
+ /// CHECK-START: void Main.testKeepInstanceOf(java.lang.Object, boolean) dead_code_elimination$initial(after)
/// CHECK: <<Phi:l\d+>> Phi
/// CHECK: <<Class:l\d+>> LoadClass
/// CHECK: InstanceOf [<<Phi>>,<<Class>>]
# Test a case when one entering TryBoundary is dead but the rest of the try
# block remains live.
-## CHECK-START: int TestCase.testDeadEntry(int, int, int, int) dead_code_elimination_final (before)
+## CHECK-START: int TestCase.testDeadEntry(int, int, int, int) dead_code_elimination$final (before)
## CHECK: Add
-## CHECK-START: int TestCase.testDeadEntry(int, int, int, int) dead_code_elimination_final (before)
+## CHECK-START: int TestCase.testDeadEntry(int, int, int, int) dead_code_elimination$final (before)
## CHECK: TryBoundary kind:entry
## CHECK: TryBoundary kind:entry
## CHECK-NOT: TryBoundary kind:entry
-## CHECK-START: int TestCase.testDeadEntry(int, int, int, int) dead_code_elimination_final (after)
+## CHECK-START: int TestCase.testDeadEntry(int, int, int, int) dead_code_elimination$final (after)
## CHECK-NOT: Add
-## CHECK-START: int TestCase.testDeadEntry(int, int, int, int) dead_code_elimination_final (after)
+## CHECK-START: int TestCase.testDeadEntry(int, int, int, int) dead_code_elimination$final (after)
## CHECK: TryBoundary kind:entry
## CHECK-NOT: TryBoundary kind:entry
# Test a case when one exiting TryBoundary is dead but the rest of the try
# block remains live.
-## CHECK-START: int TestCase.testDeadExit(int, int, int, int) dead_code_elimination_final (before)
+## CHECK-START: int TestCase.testDeadExit(int, int, int, int) dead_code_elimination$final (before)
## CHECK: Add
-## CHECK-START: int TestCase.testDeadExit(int, int, int, int) dead_code_elimination_final (before)
+## CHECK-START: int TestCase.testDeadExit(int, int, int, int) dead_code_elimination$final (before)
## CHECK: TryBoundary kind:exit
## CHECK: TryBoundary kind:exit
## CHECK-NOT: TryBoundary kind:exit
-## CHECK-START: int TestCase.testDeadExit(int, int, int, int) dead_code_elimination_final (after)
+## CHECK-START: int TestCase.testDeadExit(int, int, int, int) dead_code_elimination$final (after)
## CHECK-NOT: Add
-## CHECK-START: int TestCase.testDeadExit(int, int, int, int) dead_code_elimination_final (after)
+## CHECK-START: int TestCase.testDeadExit(int, int, int, int) dead_code_elimination$final (after)
## CHECK: TryBoundary kind:exit
## CHECK-NOT: TryBoundary kind:exit
# Test that a catch block remains live and consistent if some of try blocks
# throwing into it are removed.
-## CHECK-START: int TestCase.testOneTryBlockDead(int, int, int, int) dead_code_elimination_final (before)
+## CHECK-START: int TestCase.testOneTryBlockDead(int, int, int, int) dead_code_elimination$final (before)
## CHECK: TryBoundary kind:entry
## CHECK: TryBoundary kind:entry
## CHECK-NOT: TryBoundary kind:entry
-## CHECK-START: int TestCase.testOneTryBlockDead(int, int, int, int) dead_code_elimination_final (before)
+## CHECK-START: int TestCase.testOneTryBlockDead(int, int, int, int) dead_code_elimination$final (before)
## CHECK: TryBoundary kind:exit
## CHECK: TryBoundary kind:exit
## CHECK-NOT: TryBoundary kind:exit
-## CHECK-START: int TestCase.testOneTryBlockDead(int, int, int, int) dead_code_elimination_final (after)
+## CHECK-START: int TestCase.testOneTryBlockDead(int, int, int, int) dead_code_elimination$final (after)
## CHECK: TryBoundary kind:entry
## CHECK-NOT: TryBoundary kind:entry
-## CHECK-START: int TestCase.testOneTryBlockDead(int, int, int, int) dead_code_elimination_final (after)
+## CHECK-START: int TestCase.testOneTryBlockDead(int, int, int, int) dead_code_elimination$final (after)
## CHECK: TryBoundary kind:exit
## CHECK-NOT: TryBoundary kind:exit
# Test that DCE removes catch phi uses of instructions defined in dead try blocks.
-## CHECK-START: int TestCase.testCatchPhiInputs_DefinedInTryBlock(int, int, int, int) dead_code_elimination_final (before)
+## CHECK-START: int TestCase.testCatchPhiInputs_DefinedInTryBlock(int, int, int, int) dead_code_elimination$final (before)
## CHECK-DAG: <<Arg0:i\d+>> ParameterValue
## CHECK-DAG: <<Arg1:i\d+>> ParameterValue
## CHECK-DAG: <<Const0xa:i\d+>> IntConstant 10
## CHECK-DAG: Phi [<<Add>>,<<Const0xc>>,<<Const0xe>>] reg:2 is_catch_phi:true
## CHECK-DAG: Phi [<<Select>>,<<Const0x10>>,<<Const0x11>>] reg:3 is_catch_phi:true
-## CHECK-START: int TestCase.testCatchPhiInputs_DefinedInTryBlock(int, int, int, int) dead_code_elimination_final (after)
+## CHECK-START: int TestCase.testCatchPhiInputs_DefinedInTryBlock(int, int, int, int) dead_code_elimination$final (after)
## CHECK-DAG: <<Const0xb:i\d+>> IntConstant 11
## CHECK-DAG: <<Const0xc:i\d+>> IntConstant 12
## CHECK-DAG: <<Const0xd:i\d+>> IntConstant 13
# Test that DCE does not remove catch phi uses of instructions defined outside
# dead try blocks.
-## CHECK-START: int TestCase.testCatchPhiInputs_DefinedOutsideTryBlock(int, int, int, int) dead_code_elimination_final (before)
+## CHECK-START: int TestCase.testCatchPhiInputs_DefinedOutsideTryBlock(int, int, int, int) dead_code_elimination$final (before)
## CHECK-DAG: <<Const0xa:i\d+>> IntConstant 10
## CHECK-DAG: <<Const0xb:i\d+>> IntConstant 11
## CHECK-DAG: <<Const0xc:i\d+>> IntConstant 12
## CHECK-DAG: Phi [<<Const0xa>>,<<Const0xb>>,<<Const0xd>>] reg:1 is_catch_phi:true
## CHECK-DAG: Phi [<<Const0xf>>,<<Const0xc>>,<<Const0xe>>] reg:2 is_catch_phi:true
-## CHECK-START: int TestCase.testCatchPhiInputs_DefinedOutsideTryBlock(int, int, int, int) dead_code_elimination_final (after)
+## CHECK-START: int TestCase.testCatchPhiInputs_DefinedOutsideTryBlock(int, int, int, int) dead_code_elimination$final (after)
## CHECK-DAG: <<Const0xa:i\d+>> IntConstant 10
## CHECK-DAG: <<Const0xb:i\d+>> IntConstant 11
## CHECK-DAG: <<Const0xc:i\d+>> IntConstant 12
// where TryBoundary still has exception handler successors after having removed
// some already.
- /// CHECK-START: void Main.testDeadTryCatch(boolean) dead_code_elimination_final (after)
+ /// CHECK-START: void Main.testDeadTryCatch(boolean) dead_code_elimination$final (after)
/// CHECK-NOT: TryBoundary
- /// CHECK-START: void Main.testDeadTryCatch(boolean) dead_code_elimination_final (after)
+ /// CHECK-START: void Main.testDeadTryCatch(boolean) dead_code_elimination$final (after)
/// CHECK: begin_block
/// CHECK: begin_block
/// CHECK: begin_block
// (i >>> #distance) | (i << #-distance)
- /// CHECK-START: int Main.ror_int_constant_c_negc(int) instruction_simplifier_after_bce (before)
+ /// CHECK-START: int Main.ror_int_constant_c_negc(int) instruction_simplifier$after_bce (before)
/// CHECK: <<ArgValue:i\d+>> ParameterValue
/// CHECK: <<Const2:i\d+>> IntConstant 2
/// CHECK: <<ConstNeg2:i\d+>> IntConstant -2
/// CHECK: <<Or:i\d+>> Or [<<UShr>>,<<Shl>>]
/// CHECK: Return [<<Or>>]
- /// CHECK-START: int Main.ror_int_constant_c_negc(int) instruction_simplifier_after_bce (after)
+ /// CHECK-START: int Main.ror_int_constant_c_negc(int) instruction_simplifier$after_bce (after)
/// CHECK: <<ArgValue:i\d+>> ParameterValue
/// CHECK: <<Const2:i\d+>> IntConstant 2
/// CHECK: <<Ror:i\d+>> Ror [<<ArgValue>>,<<Const2>>]
/// CHECK: Return [<<Ror>>]
- /// CHECK-START: int Main.ror_int_constant_c_negc(int) instruction_simplifier_after_bce (after)
+ /// CHECK-START: int Main.ror_int_constant_c_negc(int) instruction_simplifier$after_bce (after)
/// CHECK-NOT: UShr
/// CHECK-NOT: Shl
public static int ror_int_constant_c_negc(int value) {
# exit \- \
# other_loop_entry
#
-## CHECK-START: int IrreducibleLoop.simpleLoop(int) dead_code_elimination (before)
+## CHECK-START: int IrreducibleLoop.simpleLoop(int) dead_code_elimination$initial(before)
## CHECK: irreducible:true
.method public static simpleLoop(I)I
.registers 2
# other_loop_entry
# set 30 in p1:myField
#
-## CHECK-START: int IrreducibleLoop.lse(int, Main) dead_code_elimination (after)
+## CHECK-START: int IrreducibleLoop.lse(int, Main) dead_code_elimination$initial(after)
## CHECK: irreducible:true
#
## CHECK-START: int IrreducibleLoop.lse(int, Main) load_store_elimination (after)
# exit \- \
# other_loop_entry
#
-## CHECK-START: int IrreducibleLoop.dce(int) dead_code_elimination (before)
+## CHECK-START: int IrreducibleLoop.dce(int) dead_code_elimination$initial(before)
## CHECK: irreducible:true
-## CHECK-START: int IrreducibleLoop.dce(int) dead_code_elimination (after)
+## CHECK-START: int IrreducibleLoop.dce(int) dead_code_elimination$initial(after)
## CHECK: irreducible:true
.method public static dce(I)I
.registers 3
.super Ljava/lang/Object;
-## CHECK-START-X86: int IrreducibleLoop.simpleLoop(int) dead_code_elimination (before)
+## CHECK-START-X86: int IrreducibleLoop.simpleLoop(int) dead_code_elimination$initial(before)
## CHECK-DAG: <<Method:(i|j)\d+>> CurrentMethod
## CHECK-DAG: <<Constant:i\d+>> IntConstant 42
## CHECK-DAG: InvokeStaticOrDirect [<<Constant>>,<<Method>>] loop:{{B\d+}} irreducible:true
* same pass.
*/
- /// CHECK-START: boolean Main.$opt$noinline$booleanAndToOr(boolean, boolean) instruction_simplifier_after_bce (before)
+ /// CHECK-START: boolean Main.$opt$noinline$booleanAndToOr(boolean, boolean) instruction_simplifier$after_bce (before)
/// CHECK: <<P1:z\d+>> ParameterValue
/// CHECK: <<P2:z\d+>> ParameterValue
/// CHECK-DAG: <<Const0:i\d+>> IntConstant 0
/// CHECK: <<And:i\d+>> And [<<Select2>>,<<Select1>>]
/// CHECK: Return [<<And>>]
- /// CHECK-START: boolean Main.$opt$noinline$booleanAndToOr(boolean, boolean) instruction_simplifier_after_bce (after)
+ /// CHECK-START: boolean Main.$opt$noinline$booleanAndToOr(boolean, boolean) instruction_simplifier$after_bce (after)
/// CHECK: <<Cond1:z\d+>> ParameterValue
/// CHECK: <<Cond2:z\d+>> ParameterValue
/// CHECK: <<Or:i\d+>> Or [<<Cond2>>,<<Cond1>>]
/// CHECK: <<BooleanNot:z\d+>> BooleanNot [<<Or>>]
/// CHECK: Return [<<BooleanNot>>]
- /// CHECK-START: boolean Main.$opt$noinline$booleanAndToOr(boolean, boolean) instruction_simplifier_after_bce (after)
+ /// CHECK-START: boolean Main.$opt$noinline$booleanAndToOr(boolean, boolean) instruction_simplifier$after_bce (after)
/// CHECK: BooleanNot
/// CHECK-NOT: BooleanNot
- /// CHECK-START: boolean Main.$opt$noinline$booleanAndToOr(boolean, boolean) instruction_simplifier_after_bce (after)
+ /// CHECK-START: boolean Main.$opt$noinline$booleanAndToOr(boolean, boolean) instruction_simplifier$after_bce (after)
/// CHECK-NOT: And
public static boolean $opt$noinline$booleanAndToOr(boolean a, boolean b) {
* same pass.
*/
- /// CHECK-START: boolean Main.$opt$noinline$booleanOrToAnd(boolean, boolean) instruction_simplifier_after_bce (before)
+ /// CHECK-START: boolean Main.$opt$noinline$booleanOrToAnd(boolean, boolean) instruction_simplifier$after_bce (before)
/// CHECK: <<P1:z\d+>> ParameterValue
/// CHECK: <<P2:z\d+>> ParameterValue
/// CHECK-DAG: <<Const0:i\d+>> IntConstant 0
/// CHECK: <<Or:i\d+>> Or [<<Select2>>,<<Select1>>]
/// CHECK: Return [<<Or>>]
- /// CHECK-START: boolean Main.$opt$noinline$booleanOrToAnd(boolean, boolean) instruction_simplifier_after_bce (after)
+ /// CHECK-START: boolean Main.$opt$noinline$booleanOrToAnd(boolean, boolean) instruction_simplifier$after_bce (after)
/// CHECK: <<Cond1:z\d+>> ParameterValue
/// CHECK: <<Cond2:z\d+>> ParameterValue
/// CHECK: <<And:i\d+>> And [<<Cond2>>,<<Cond1>>]
/// CHECK: <<BooleanNot:z\d+>> BooleanNot [<<And>>]
/// CHECK: Return [<<BooleanNot>>]
- /// CHECK-START: boolean Main.$opt$noinline$booleanOrToAnd(boolean, boolean) instruction_simplifier_after_bce (after)
+ /// CHECK-START: boolean Main.$opt$noinline$booleanOrToAnd(boolean, boolean) instruction_simplifier$after_bce (after)
/// CHECK: BooleanNot
/// CHECK-NOT: BooleanNot
- /// CHECK-START: boolean Main.$opt$noinline$booleanOrToAnd(boolean, boolean) instruction_simplifier_after_bce (after)
+ /// CHECK-START: boolean Main.$opt$noinline$booleanOrToAnd(boolean, boolean) instruction_simplifier$after_bce (after)
/// CHECK-NOT: Or
public static boolean $opt$noinline$booleanOrToAnd(boolean a, boolean b) {
* same pass.
*/
- /// CHECK-START: boolean Main.$opt$noinline$booleanNotXorToXor(boolean, boolean) instruction_simplifier_after_bce (before)
+ /// CHECK-START: boolean Main.$opt$noinline$booleanNotXorToXor(boolean, boolean) instruction_simplifier$after_bce (before)
/// CHECK: <<P1:z\d+>> ParameterValue
/// CHECK: <<P2:z\d+>> ParameterValue
/// CHECK-DAG: <<Const0:i\d+>> IntConstant 0
/// CHECK: <<Xor:i\d+>> Xor [<<Select2>>,<<Select1>>]
/// CHECK: Return [<<Xor>>]
- /// CHECK-START: boolean Main.$opt$noinline$booleanNotXorToXor(boolean, boolean) instruction_simplifier_after_bce (after)
+ /// CHECK-START: boolean Main.$opt$noinline$booleanNotXorToXor(boolean, boolean) instruction_simplifier$after_bce (after)
/// CHECK: <<Cond1:z\d+>> ParameterValue
/// CHECK: <<Cond2:z\d+>> ParameterValue
/// CHECK: <<Xor:i\d+>> Xor [<<Cond2>>,<<Cond1>>]
/// CHECK: Return [<<Xor>>]
- /// CHECK-START: boolean Main.$opt$noinline$booleanNotXorToXor(boolean, boolean) instruction_simplifier_after_bce (after)
+ /// CHECK-START: boolean Main.$opt$noinline$booleanNotXorToXor(boolean, boolean) instruction_simplifier$after_bce (after)
/// CHECK-NOT: BooleanNot
public static boolean $opt$noinline$booleanNotXorToXor(boolean a, boolean b) {
/// CHECK-START: int Main.rotateLeftBoolean(boolean, int) select_generator (after)
/// CHECK-NOT: Phi
- /// CHECK-START: int Main.rotateLeftBoolean(boolean, int) instruction_simplifier_after_bce (after)
+ /// CHECK-START: int Main.rotateLeftBoolean(boolean, int) instruction_simplifier$after_bce (after)
/// CHECK: <<ArgVal:z\d+>> ParameterValue
/// CHECK: <<ArgDist:i\d+>> ParameterValue
/// CHECK-DAG: <<NegDist:i\d+>> Neg [<<ArgDist>>]
/// CHECK-DAG: <<Result:i\d+>> Ror [<<ArgVal>>,<<NegDist>>]
/// CHECK-DAG: Return [<<Result>>]
- /// CHECK-START: int Main.rotateLeftBoolean(boolean, int) instruction_simplifier_after_bce (after)
+ /// CHECK-START: int Main.rotateLeftBoolean(boolean, int) instruction_simplifier$after_bce (after)
/// CHECK-NOT: Select
private static int rotateLeftBoolean(boolean value, int distance) {
/// CHECK-START: int Main.rotateRightBoolean(boolean, int) select_generator (after)
/// CHECK-NOT: Phi
- /// CHECK-START: int Main.rotateRightBoolean(boolean, int) instruction_simplifier_after_bce (after)
+ /// CHECK-START: int Main.rotateRightBoolean(boolean, int) instruction_simplifier$after_bce (after)
/// CHECK: <<ArgVal:z\d+>> ParameterValue
/// CHECK: <<ArgDist:i\d+>> ParameterValue
/// CHECK-DAG: <<Result:i\d+>> Ror [<<ArgVal>>,<<ArgDist>>]
/// CHECK-DAG: Return [<<Result>>]
- /// CHECK-START: int Main.rotateRightBoolean(boolean, int) instruction_simplifier_after_bce (after)
+ /// CHECK-START: int Main.rotateRightBoolean(boolean, int) instruction_simplifier$after_bce (after)
/// CHECK-NOT: Select
private static int rotateRightBoolean(boolean value, int distance) {
/// CHECK-START: int Main.signBoolean(boolean) select_generator (after)
/// CHECK-NOT: Phi
- /// CHECK-START: int Main.signBoolean(boolean) instruction_simplifier_after_bce (after)
+ /// CHECK-START: int Main.signBoolean(boolean) instruction_simplifier$after_bce (after)
/// CHECK-DAG: <<Arg:z\d+>> ParameterValue
/// CHECK-DAG: <<Zero:i\d+>> IntConstant 0
/// CHECK-DAG: <<Result:i\d+>> Compare [<<Arg>>,<<Zero>>]
/// CHECK-DAG: Return [<<Result>>]
- /// CHECK-START: int Main.signBoolean(boolean) instruction_simplifier_after_bce (after)
+ /// CHECK-START: int Main.signBoolean(boolean) instruction_simplifier$after_bce (after)
/// CHECK-NOT: Select
private static int signBoolean(boolean x) {
/// CHECK-START: int Main.compareBooleans(boolean, boolean) select_generator (after)
/// CHECK-NOT: Phi
- /// CHECK-START: int Main.compareBooleans(boolean, boolean) instruction_simplifier_after_bce (after)
+ /// CHECK-START: int Main.compareBooleans(boolean, boolean) instruction_simplifier$after_bce (after)
/// CHECK: <<ArgX:z\d+>> ParameterValue
/// CHECK: <<ArgY:z\d+>> ParameterValue
/// CHECK-DAG: <<Result:i\d+>> Compare [<<ArgX>>,<<ArgY>>]
/// CHECK-DAG: Return [<<Result>>]
- /// CHECK-START: int Main.compareBooleans(boolean, boolean) instruction_simplifier_after_bce (after)
+ /// CHECK-START: int Main.compareBooleans(boolean, boolean) instruction_simplifier$after_bce (after)
/// CHECK-NOT: Select
private static int compareBooleans(boolean x, boolean y) {
# Check that blocks only havig nops are not merged when they are loop headers.
# This ensures we can do on-stack replacement for branches to those nop blocks.
-## CHECK-START: int Osr.simpleLoop(int, int) dead_code_elimination_final (after)
+## CHECK-START: int Osr.simpleLoop(int, int) dead_code_elimination$final (after)
## CHECK-DAG: SuspendCheck loop:<<OuterLoop:B\d+>> outer_loop:none
## CHECK-DAG: SuspendCheck loop:{{B\d+}} outer_loop:<<OuterLoop>>
.method public static simpleLoop(II)I
.super Ljava/lang/Object;
-## CHECK-START-X86: int IrreducibleLoop.simpleLoop1(int) dead_code_elimination (before)
+## CHECK-START-X86: int IrreducibleLoop.simpleLoop1(int) dead_code_elimination$initial(before)
## CHECK-DAG: <<Method:(i|j)\d+>> CurrentMethod
## CHECK-DAG: <<Constant:i\d+>> IntConstant 42
## CHECK-DAG: Goto irreducible:true
return v0
.end method
-## CHECK-START-X86: int IrreducibleLoop.simpleLoop2(int) dead_code_elimination (before)
+## CHECK-START-X86: int IrreducibleLoop.simpleLoop2(int) dead_code_elimination$initial(before)
## CHECK-DAG: <<Method:(i|j)\d+>> CurrentMethod
## CHECK-DAG: <<Constant:i\d+>> IntConstant 42
## CHECK-DAG: Goto irreducible:true
class Main {
private static boolean $inline$false() { return false; }
- /// CHECK-START: void Main.main(java.lang.String[]) dead_code_elimination (before)
+ /// CHECK-START: void Main.main(java.lang.String[]) dead_code_elimination$initial(before)
/// CHECK-DAG: <<Const0:i\d+>> IntConstant 0
/// CHECK-DAG: <<Const1:i\d+>> IntConstant 1
/// CHECK-DAG: <<Phi:i\d+>> Phi [<<Const0>>,<<Add:i\d+>>] loop:{{B\d+}}
/// CHECK-DAG: <<IToS:b\d+>> TypeConversion [<<Sel>>]
/// CHECK-DAG: Return [<<IToS>>]
- /// CHECK-START: byte Main.booleanToByte(boolean) instruction_simplifier_after_bce (after)
+ /// CHECK-START: byte Main.booleanToByte(boolean) instruction_simplifier$after_bce (after)
/// CHECK: <<Arg:z\d+>> ParameterValue
/// CHECK-DAG: Return [<<Arg>>]
/// CHECK-DAG: <<IToS:s\d+>> TypeConversion [<<Sel>>]
/// CHECK-DAG: Return [<<IToS>>]
- /// CHECK-START: short Main.booleanToShort(boolean) instruction_simplifier_after_bce (after)
+ /// CHECK-START: short Main.booleanToShort(boolean) instruction_simplifier$after_bce (after)
/// CHECK: <<Arg:z\d+>> ParameterValue
/// CHECK-DAG: Return [<<Arg>>]
/// CHECK-DAG: <<IToC:c\d+>> TypeConversion [<<Sel>>]
/// CHECK-DAG: Return [<<IToC>>]
- /// CHECK-START: char Main.booleanToChar(boolean) instruction_simplifier_after_bce (after)
+ /// CHECK-START: char Main.booleanToChar(boolean) instruction_simplifier$after_bce (after)
/// CHECK: <<Arg:z\d+>> ParameterValue
/// CHECK-DAG: Return [<<Arg>>]
/// CHECK-DAG: <<Sel:i\d+>> Select [<<Zero>>,<<One>>,<<Arg>>]
/// CHECK-DAG: Return [<<Sel>>]
- /// CHECK-START: int Main.booleanToInt(boolean) instruction_simplifier_after_bce (after)
+ /// CHECK-START: int Main.booleanToInt(boolean) instruction_simplifier$after_bce (after)
/// CHECK: <<Arg:z\d+>> ParameterValue
/// CHECK-DAG: Return [<<Arg>>]
/// CHECK-DAG: <<IToJ:j\d+>> TypeConversion [<<Sel>>]
/// CHECK-DAG: Return [<<IToJ>>]
- /// CHECK-START: long Main.booleanToLong(boolean) instruction_simplifier_after_bce (after)
+ /// CHECK-START: long Main.booleanToLong(boolean) instruction_simplifier$after_bce (after)
/// CHECK: <<Arg:z\d+>> ParameterValue
/// CHECK-DAG: <<ZToJ:j\d+>> TypeConversion [<<Arg>>]
/// CHECK-DAG: Return [<<ZToJ>>]
/// CHECK-DAG: <<JToI:i\d+>> TypeConversion [<<IToJ>>]
/// CHECK-DAG: Return [<<JToI>>]
- /// CHECK-START: int Main.longToIntOfBoolean() instruction_simplifier_after_bce (after)
+ /// CHECK-START: int Main.longToIntOfBoolean() instruction_simplifier$after_bce (after)
/// CHECK-DAG: <<Method:[ij]\d+>> CurrentMethod
/// CHECK-DAG: <<Sget:z\d+>> StaticFieldGet
/// CHECK-DAG: Return [<<Sget>>]
// Test when a condition is the input of the if.
- /// CHECK-START: void Main.testNoInline(java.lang.String[]) dead_code_elimination (before)
+ /// CHECK-START: void Main.testNoInline(java.lang.String[]) dead_code_elimination$initial(before)
/// CHECK: <<Const0:i\d+>> IntConstant 0
/// CHECK: If
/// CHECK: <<Phi:i\d+>> Phi
/// CHECK: <<Equal:z\d+>> Equal [<<Phi>>,<<Const0>>]
/// CHECK: If [<<Equal>>]
- /// CHECK-START: void Main.testNoInline(java.lang.String[]) dead_code_elimination (after)
+ /// CHECK-START: void Main.testNoInline(java.lang.String[]) dead_code_elimination$initial(after)
/// CHECK: If
/// CHECK-NOT: Phi
/// CHECK-NOT: Equal
// Test when the phi is the input of the if.
- /// CHECK-START: void Main.testInline(java.lang.String[]) dead_code_elimination_final (before)
+ /// CHECK-START: void Main.testInline(java.lang.String[]) dead_code_elimination$final (before)
/// CHECK-DAG: <<Const0:i\d+>> IntConstant 0
/// CHECK-DAG: If
/// CHECK-DAG: <<Phi:i\d+>> Phi
/// CHECK-DAG: If [<<Phi>>]
- /// CHECK-START: void Main.testInline(java.lang.String[]) dead_code_elimination_final (after)
+ /// CHECK-START: void Main.testInline(java.lang.String[]) dead_code_elimination$final (after)
/// CHECK: If
/// CHECK-NOT: Phi
/// CHECK-NOT: If
// Test when one input is not a constant. We can only optimize the constant input.
- /// CHECK-START: void Main.testNonConstantInputs(java.lang.String[]) dead_code_elimination (before)
+ /// CHECK-START: void Main.testNonConstantInputs(java.lang.String[]) dead_code_elimination$initial(before)
/// CHECK-DAG: <<Const34:i\d+>> IntConstant 34
/// CHECK-DAG: <<Const42:i\d+>> IntConstant 42
/// CHECK-DAG: If
/// CHECK-DAG: <<NotEqual:z\d+>> NotEqual [<<Phi>>,<<Const42>>]
/// CHECK-DAG: If [<<NotEqual>>]
- /// CHECK-START: void Main.testNonConstantInputs(java.lang.String[]) dead_code_elimination (after)
+ /// CHECK-START: void Main.testNonConstantInputs(java.lang.String[]) dead_code_elimination$initial(after)
/// CHECK-DAG: <<Const42:i\d+>> IntConstant 42
/// CHECK-DAG: If
/// CHECK-DAG: <<StaticFieldGet:i\d+>> StaticFieldGet
// Test with a condition.
- /// CHECK-START: void Main.testGreaterCondition(java.lang.String[]) dead_code_elimination (before)
+ /// CHECK-START: void Main.testGreaterCondition(java.lang.String[]) dead_code_elimination$initial(before)
/// CHECK-DAG: <<Const34:i\d+>> IntConstant 34
/// CHECK-DAG: <<Const22:i\d+>> IntConstant 22
/// CHECK-DAG: <<Const25:i\d+>> IntConstant 25
/// CHECK-DAG: <<GE:z\d+>> GreaterThanOrEqual [<<Phi>>,<<Const25>>]
/// CHECK-DAG: If [<<GE>>]
- /// CHECK-START: void Main.testGreaterCondition(java.lang.String[]) dead_code_elimination (after)
+ /// CHECK-START: void Main.testGreaterCondition(java.lang.String[]) dead_code_elimination$initial(after)
/// CHECK-DAG: If
/// CHECK-NOT: Phi
/// CHECK-NOT: GreaterThanOrEqual
// Test when comparing non constants.
- /// CHECK-START: void Main.testNonConstantEqual(java.lang.String[]) dead_code_elimination (before)
+ /// CHECK-START: void Main.testNonConstantEqual(java.lang.String[]) dead_code_elimination$initial(before)
/// CHECK-DAG: <<Const34:i\d+>> IntConstant 34
/// CHECK-DAG: <<Const42:i\d+>> IntConstant 42
/// CHECK-DAG: If
/// CHECK-DAG: <<NotEqual:z\d+>> NotEqual [<<Phi>>,<<StaticFieldGet>>]
/// CHECK-DAG: If [<<NotEqual>>]
- /// CHECK-START: void Main.testNonConstantEqual(java.lang.String[]) dead_code_elimination (after)
+ /// CHECK-START: void Main.testNonConstantEqual(java.lang.String[]) dead_code_elimination$initial(after)
/// CHECK-DAG: <<Const34:i\d+>> IntConstant 34
/// CHECK-DAG: If
/// CHECK-DAG: <<StaticFieldGet:i\d+>> StaticFieldGet
return true;
}
- /// CHECK-START: void Main.testSwitch(java.lang.String[]) dead_code_elimination (before)
+ /// CHECK-START: void Main.testSwitch(java.lang.String[]) dead_code_elimination$initial(before)
/// CHECK: If
/// CHECK: If
/// CHECK: If
- /// CHECK-START: void Main.testSwitch(java.lang.String[]) dead_code_elimination (after)
+ /// CHECK-START: void Main.testSwitch(java.lang.String[]) dead_code_elimination$initial(after)
/// CHECK: If
/// CHECK: If
/// CHECK-NOT: If
// Redirect default here.
}
- /// CHECK-START: void Main.testFP(java.lang.String[]) dead_code_elimination (before)
+ /// CHECK-START: void Main.testFP(java.lang.String[]) dead_code_elimination$initial(before)
/// CHECK: If
/// CHECK: If
- /// CHECK-START: void Main.testFP(java.lang.String[]) dead_code_elimination (after)
+ /// CHECK-START: void Main.testFP(java.lang.String[]) dead_code_elimination$initial(after)
/// CHECK: If
/// CHECK: If
public static void testFP(String[] args) {