mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-23 22:23:00 +00:00
Do not hoist @llvm.dbg.value. Here, @llvm.dbg.value is "referring" a value that is modified inside loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125529 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#define DEBUG_TYPE "loop-rotate"
|
||||
#include "llvm/Transforms/Scalar.h"
|
||||
#include "llvm/Function.h"
|
||||
#include "llvm/IntrinsicInst.h"
|
||||
#include "llvm/Analysis/CodeMetrics.h"
|
||||
#include "llvm/Analysis/LoopPass.h"
|
||||
#include "llvm/Analysis/InstructionSimplify.h"
|
||||
@@ -231,7 +232,7 @@ bool LoopRotate::rotateLoop(Loop *L) {
|
||||
// memory (without proving that the loop doesn't write).
|
||||
if (L->hasLoopInvariantOperands(Inst) &&
|
||||
!Inst->mayReadFromMemory() && !Inst->mayWriteToMemory() &&
|
||||
!isa<TerminatorInst>(Inst)) {
|
||||
!isa<TerminatorInst>(Inst) && !isa<DbgInfoIntrinsic>(Inst)) {
|
||||
Inst->moveBefore(LoopEntryBranch);
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user