mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-19 08:35:45 +00:00
Less template, more virtual! Refactoring suggested by Chris in code review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145014 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -336,7 +336,7 @@ getLoadLoadClobberFullWidthSize(const Value *MemLocBase, int64_t MemLocOffs,
|
||||
namespace {
|
||||
/// Only find pointer captures which happen before the given instruction. Uses
|
||||
/// the dominator tree to determine whether one instruction is before another.
|
||||
struct CapturesBefore {
|
||||
struct CapturesBefore : public CaptureTracker {
|
||||
CapturesBefore(const Instruction *I, DominatorTree *DT)
|
||||
: BeforeHere(I), DT(DT), Captured(false) {}
|
||||
|
||||
@@ -381,7 +381,7 @@ MemoryDependenceAnalysis::getModRefInfo(const Instruction *Inst,
|
||||
if (!CS.getInstruction()) return AliasAnalysis::ModRef;
|
||||
|
||||
CapturesBefore CB(Inst, DT);
|
||||
llvm::PointerMayBeCaptured(Object, CB);
|
||||
llvm::PointerMayBeCaptured(Object, &CB);
|
||||
|
||||
if (isa<Constant>(Object) || CS.getInstruction() == Object || CB.Captured)
|
||||
return AliasAnalysis::ModRef;
|
||||
|
||||
Reference in New Issue
Block a user