mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-05 13:09:10 +00:00
If the alias analysis algorithm we are using can provide MUST alias information,
expose it directly as value numbering information git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6972 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
62b5c167de
commit
aed2c6d2cb
@ -17,6 +17,7 @@
|
||||
#include "llvm/Analysis/Dominators.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Type.h"
|
||||
#include "llvm/iMemory.h"
|
||||
#include "llvm/BasicBlock.h"
|
||||
#include "llvm/Support/CFG.h"
|
||||
@ -83,6 +84,10 @@ void LoadVN::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
//
|
||||
void LoadVN::getEqualNumberNodes(Value *V,
|
||||
std::vector<Value*> &RetVals) const {
|
||||
// If the alias analysis has any must alias information to share with us, we
|
||||
// can definately use it.
|
||||
if (isa<PointerType>(V->getType()))
|
||||
getAnalysis<AliasAnalysis>().getMustAliases(V, RetVals);
|
||||
|
||||
if (LoadInst *LI = dyn_cast<LoadInst>(V)) {
|
||||
// If we have a load instruction, find all of the load and store
|
||||
|
Loading…
Reference in New Issue
Block a user