mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-20 10:42:36 +00:00
Support changed expression api
llvm-svn: 242
This commit is contained in:
parent
9f3245e86b
commit
9416784407
@ -38,20 +38,20 @@ static void PrintClassifiedExprs(Method *M) {
|
||||
cout << *I;
|
||||
|
||||
if ((*I)->getType() == Type::VoidTy) continue;
|
||||
ExprAnalysisResult R = ClassifyExpression(*I);
|
||||
analysis::ExprType R = analysis::ClassifyExpression(*I);
|
||||
if (R.Var == *I) continue; // Doesn't tell us anything
|
||||
|
||||
cout << "\t\tExpr =";
|
||||
switch (R.ExprType) {
|
||||
case ExprAnalysisResult::ScaledLinear:
|
||||
switch (R.ExprTy) {
|
||||
case analysis::ExprType::ScaledLinear:
|
||||
WriteAsOperand(cout, (Value*)R.Scale) << " *";
|
||||
// fall through
|
||||
case ExprAnalysisResult::Linear:
|
||||
case analysis::ExprType::Linear:
|
||||
WriteAsOperand(cout, R.Var);
|
||||
if (R.Offset == 0) break;
|
||||
else cout << " +";
|
||||
// fall through
|
||||
case ExprAnalysisResult::Constant:
|
||||
case analysis::ExprType::Constant:
|
||||
if (R.Offset) WriteAsOperand(cout, (Value*)R.Offset); else cout << " 0";
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user