rL162640 introduced CodeGenTarget::guessInstructionProperties. If a target sets guessInstructionProperties=0 in its FootgtInstrInfo, tablegen will error if it has to guess properties from patterns. Unfortunately, this can't be used with current upstream LLVM as GenericOpcodes.td instructions are always included and have inferred properties for mayLoad and mayStore. This patch provides the simplest possible fix to this problem, enclosing these instruction definitions in a scope where mayLoad and mayStore default to 0. The local definitions take precedence, so definitions like G_LOAD have their expected properties and there is no functional change.
Other solutions are of course possible, including:
* Explicitly setting mayLoad and mayStore for each instruction
* Defining a new GInstruction class where mayLoad and mayStore are set to 0, and using this in GenericOpcodes.td
* Deciding guessInstructionProperties is a failed experiment, and remove support for it from LLVM
I've submitted this patch with the most straight-forward solution in order to make things concrete. What do you think?