llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.92k stars 11.52k forks source link

Update SchedMachineModel for Swift with all instruction for ARM #25519

Open cddouma-arm opened 8 years ago

cddouma-arm commented 8 years ago
Bugzilla Link 25145
Version trunk
OS All
CC @MatzeB

Extended Description

Swift Machine Scheduler Model is incomplete. There are instructions missing which can trigger the "incomplete machine model" abort. This was observed when a downstream SchedMachineModel was added to the ARM target.

The SchedMachineModel of Swift should be updated so that it covers all instruction defined in the ARM code generator.

cddouma-arm commented 8 years ago

The instruction that triggered this abort for me, is the pseudo instruction COPY.

Problem that it is dependent on the instructions in any other scheduler model in the same code generator for that abort to trigger. As you said: It might be nice if tablegen itself gave an error instead.

A possible solution is to make sure all instructions are covered using InstRW mapping to a resource that represents the defaults ached info for missing instructions, perhaps.

Best thing LLVM currently has to check for missing instructions is the utils/schedcover.py script I committed. As long as there is any instruction that has an empty field in your sched-model's column and in the default column it can in theory trigger this abort if another zched-model is added in the future (or downstream).

MatzeB commented 8 years ago

Can you give an example, which instructions are missing? The Swift SchedMachineModel is enabled by default for us and I haven't seen any test failures in the last months.

cddouma-arm commented 8 years ago

Commit r250033 marks the Swift Machine Scheduler Model as incomplete, which works around the abort until it covers all instructions of the ARM code generator.