mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-14 01:20:40 +00:00
Optionally allow comparison operations from affect DSGraphs
llvm-svn: 31511
This commit is contained in:
parent
9182b69155
commit
a79b273ca9
@ -40,6 +40,10 @@ static cl::opt<bool>
|
|||||||
TrackIntegersAsPointers("dsa-track-integers", cl::Hidden,
|
TrackIntegersAsPointers("dsa-track-integers", cl::Hidden,
|
||||||
cl::desc("If this is set, track integers as potential pointers"));
|
cl::desc("If this is set, track integers as potential pointers"));
|
||||||
|
|
||||||
|
static cl::opt<bool>
|
||||||
|
IgnoreSetCC("dsa-ignore-setcc", cl::Hidden,
|
||||||
|
cl::desc("If this is set, do nothing at pointer comparisons"));
|
||||||
|
|
||||||
static cl::list<std::string>
|
static cl::list<std::string>
|
||||||
AllocList("dsa-alloc-list",
|
AllocList("dsa-alloc-list",
|
||||||
cl::value_desc("list"),
|
cl::value_desc("list"),
|
||||||
@ -336,6 +340,7 @@ void GraphBuilder::visitSelectInst(SelectInst &SI) {
|
|||||||
void GraphBuilder::visitSetCondInst(SetCondInst &SCI) {
|
void GraphBuilder::visitSetCondInst(SetCondInst &SCI) {
|
||||||
if (!isPointerType(SCI.getOperand(0)->getType()) ||
|
if (!isPointerType(SCI.getOperand(0)->getType()) ||
|
||||||
isa<ConstantPointerNull>(SCI.getOperand(1))) return; // Only pointers
|
isa<ConstantPointerNull>(SCI.getOperand(1))) return; // Only pointers
|
||||||
|
if(!IgnoreSetCC)
|
||||||
ScalarMap[SCI.getOperand(0)].mergeWith(getValueDest(*SCI.getOperand(1)));
|
ScalarMap[SCI.getOperand(0)].mergeWith(getValueDest(*SCI.getOperand(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user