Make the popcnt support enums and methods have more clear names and
[oota-llvm.git] / lib / Transforms / Scalar / LoopIdiomRecognize.cpp
index 999bf57500d332a0b2ff1ef5a47137ba4f145901..59109a786564ba825947db5d27fcbdaf2e4df7b1 100644 (file)
@@ -48,6 +48,7 @@
 #include "llvm/Analysis/LoopPass.h"
 #include "llvm/Analysis/ScalarEvolutionExpander.h"
 #include "llvm/Analysis/ScalarEvolutionExpressions.h"
+#include "llvm/Analysis/TargetTransformInfo.h"
 #include "llvm/Analysis/ValueTracking.h"
 #include "llvm/IR/DataLayout.h"
 #include "llvm/IR/IRBuilder.h"
@@ -56,7 +57,6 @@
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Target/TargetLibraryInfo.h"
-#include "llvm/TargetTransformInfo.h"
 #include "llvm/Transforms/Utils/Local.h"
 using namespace llvm;
 
@@ -311,7 +311,7 @@ NclPopcountRecognize::NclPopcountRecognize(LoopIdiomRecognize &TheLIR):
 
 bool NclPopcountRecognize::preliminaryScreen() {
   const TargetTransformInfo *TTI = LIR.getTargetTransformInfo();
-  if (TTI->getPopcntHwSupport(32) != TargetTransformInfo::Fast)
+  if (TTI->getPopcntSupport(32) != TargetTransformInfo::PSK_FastHardware)
     return false;
 
   // Counting population are usually conducted by few arithmetic instrutions.