mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Ban rematerializable instructions with side effects.
TableGen infers unmodeled side effects on instructions without a pattern. Fix some instruction definitions where that was overlooked. Also raise an error if a rematerializable instruction has unmodeled side effects. That doen't make any sense. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141929 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2829,6 +2829,12 @@ void CodeGenDAGPatterns::InferInstructionFlags() {
|
||||
InstInfo.isBitcast = IsBitcast;
|
||||
InstInfo.hasSideEffects = HasSideEffects;
|
||||
InstInfo.Operands.isVariadic = IsVariadic;
|
||||
|
||||
// Sanity checks.
|
||||
if (InstInfo.isReMaterializable && InstInfo.hasSideEffects)
|
||||
throw TGError(InstInfo.TheDef->getLoc(), "The instruction " +
|
||||
InstInfo.TheDef->getName() +
|
||||
" is rematerializable AND has unmodeled side effects?");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user