Cleanup for changes failing with std=c++11
authorJacques Pienaar <jpienaar@google.com>
Tue, 19 Mar 2019 19:05:11 +0000 (12:05 -0700)
committerjpienaar <jpienaar@google.com>
Sat, 30 Mar 2019 00:25:24 +0000 (17:25 -0700)
The static constexpr were failing with undefined reference due to lacking definition at namespace scope.

PiperOrigin-RevId: 239241157

mlir/lib/Pass/Pass.cpp
mlir/lib/Transforms/LoopTiling.cpp
mlir/lib/Transforms/Vectorization/VectorizerTestPass.cpp

index 1420f4a..fe114f0 100644 (file)
@@ -343,3 +343,5 @@ void PassInstrumentor::addInstrumentation(PassInstrumentation *pi) {
   llvm::sys::SmartScopedLock<true> instrumentationLock(impl->mutex);
   impl->instrumentations.emplace_back(pi);
 }
+
+constexpr AnalysisID mlir::detail::PreservedAnalyses::allAnalysesID;
index 76ab916..9c97c1b 100644 (file)
@@ -405,4 +405,7 @@ void LoopTiling::runOnFunction() {
   }
 }
 
+constexpr unsigned LoopTiling::kDefaultTileSize;
+constexpr uint64_t LoopTiling::kDefaultCacheMemCapacity;
+
 static PassRegistration<LoopTiling> pass("loop-tile", "Tile loop nests");
index 8fd1cac..af6fc58 100644 (file)
@@ -139,7 +139,7 @@ void VectorizerTestPass::testVectorShapeRatio(Function *f) {
 
 static std::string toString(Instruction *inst) {
   std::string res;
-  auto os = llvm::raw_string_ostream(res);
+  llvm::raw_string_ostream os(res);
   inst->print(os);
   return res;
 }