[polly] r222360 - Simplify the SCEVAffinator [NFC]

Johannes Doerfert doerfert at cs.uni-saarland.de
Wed Nov 19 07:36:59 PST 2014


Author: jdoerfert
Date: Wed Nov 19 09:36:59 2014
New Revision: 222360

URL: http://llvm.org/viewvc/llvm-project?rev=222360&view=rev
Log:
Simplify the SCEVAffinator [NFC]

Modified:
    polly/trunk/lib/Analysis/ScopInfo.cpp

Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=222360&r1=222359&r2=222360&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Wed Nov 19 09:36:59 2014
@@ -154,13 +154,8 @@ __isl_give isl_pw_aff *SCEVAffinator::vi
   v = isl_valFromAPInt(Ctx, Value->getValue(), /* isSigned */ true);
 
   isl_space *Space = isl_space_set_alloc(Ctx, 0, NbLoopSpaces);
-  isl_local_space *ls = isl_local_space_from_space(isl_space_copy(Space));
-  isl_aff *Affine = isl_aff_zero_on_domain(ls);
-  isl_set *Domain = isl_set_universe(Space);
-
-  Affine = isl_aff_add_constant_val(Affine, v);
-
-  return isl_pw_aff_alloc(Domain, Affine);
+  isl_local_space *ls = isl_local_space_from_space(Space);
+  return isl_pw_aff_from_aff(isl_aff_val_on_domain(ls, v));
 }
 
 __isl_give isl_pw_aff *





More information about the llvm-commits mailing list