summaryrefslogtreecommitdiff
path: root/include/llvm/IR/AutoUpgrade.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/IR/AutoUpgrade.h')
-rw-r--r--include/llvm/IR/AutoUpgrade.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/include/llvm/IR/AutoUpgrade.h b/include/llvm/IR/AutoUpgrade.h
index a4b3c410c4f65..9eb358682c655 100644
--- a/include/llvm/IR/AutoUpgrade.h
+++ b/include/llvm/IR/AutoUpgrade.h
@@ -14,13 +14,14 @@
#ifndef LLVM_IR_AUTOUPGRADE_H
#define LLVM_IR_AUTOUPGRADE_H
-#include <string>
+#include "llvm/ADT/StringRef.h"
namespace llvm {
class CallInst;
class Constant;
class Function;
class Instruction;
+ class MDNode;
class Module;
class GlobalVariable;
class Type;
@@ -46,6 +47,10 @@ namespace llvm {
/// if it requires upgrading.
bool UpgradeGlobalVariable(GlobalVariable *GV);
+ /// This checks for module flags which should be upgraded. It returns true if
+ /// module is modified.
+ bool UpgradeModuleFlags(Module &M);
+
/// If the TBAA tag for the given instruction uses the scalar TBAA format,
/// we upgrade it to the struct-path aware TBAA format.
void UpgradeInstWithTBAATag(Instruction *I);
@@ -64,8 +69,14 @@ namespace llvm {
/// info. Return true if module is modified.
bool UpgradeDebugInfo(Module &M);
- /// Upgrade a metadata string constant in place.
- void UpgradeMDStringConstant(std::string &String);
+ /// Check whether a string looks like an old loop attachment tag.
+ inline bool mayBeOldLoopAttachmentTag(StringRef Name) {
+ return Name.startswith("llvm.vectorizer.");
+ }
+
+ /// Upgrade the loop attachment metadata node.
+ MDNode *upgradeInstructionLoopAttachment(MDNode &N);
+
} // End llvm namespace
#endif