Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Unified Diff: include/llvm/Transforms/NaCl.h

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/llvm/Transforms/MinSFI.h ('k') | lib/Analysis/CMakeLists.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/llvm/Transforms/NaCl.h
diff --git a/include/llvm/Transforms/NaCl.h b/include/llvm/Transforms/NaCl.h
new file mode 100644
index 0000000000000000000000000000000000000000..9de6c23fccc464b4e7e44e4f838875a1ec1bc38d
--- /dev/null
+++ b/include/llvm/Transforms/NaCl.h
@@ -0,0 +1,94 @@
+//===-- NaCl.h - NaCl Transformations ---------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_TRANSFORMS_NACL_H
+#define LLVM_TRANSFORMS_NACL_H
+
+#include "llvm/CodeGen/Passes.h"
+#include "llvm/IR/Instructions.h"
+#include "llvm/IR/LLVMContext.h"
+
+namespace llvm {
+
+class BasicBlockPass;
+class Function;
+class FunctionPass;
+class FunctionType;
+class Instruction;
+class ModulePass;
+class Use;
+class Value;
+
+BasicBlockPass *createConstantInsertExtractElementIndexPass();
+BasicBlockPass *createExpandGetElementPtrPass();
+BasicBlockPass *createExpandShuffleVectorPass();
+BasicBlockPass *createFixVectorLoadStoreAlignmentPass();
+BasicBlockPass *createPromoteI1OpsPass();
+BasicBlockPass *createSimplifyAllocasPass();
+FunctionPass *createBackendCanonicalizePass();
+FunctionPass *createExpandConstantExprPass();
+FunctionPass *createExpandLargeIntegersPass();
+FunctionPass *createExpandStructRegsPass();
+FunctionPass *createInsertDivideCheckPass();
+FunctionPass *createPromoteIntegersPass();
+FunctionPass *createRemoveAsmMemoryPass();
+FunctionPass *createResolvePNaClIntrinsicsPass();
+ModulePass *createAddPNaClExternalDeclsPass();
+ModulePass *createCanonicalizeMemIntrinsicsPass();
+ModulePass *createExpandArithWithOverflowPass();
+ModulePass *createExpandByValPass();
+ModulePass *createExpandCtorsPass();
+ModulePass *createExpandIndirectBrPass();
+ModulePass *createExpandSmallArgumentsPass();
+ModulePass *createExpandTlsConstantExprPass();
+ModulePass *createExpandTlsPass();
+ModulePass *createExpandVarArgsPass();
+ModulePass *createFlattenGlobalsPass();
+ModulePass *createGlobalCleanupPass();
+ModulePass *createGlobalizeConstantVectorsPass();
+ModulePass *createPNaClSjLjEHPass();
+ModulePass *createReplacePtrsWithIntsPass();
+ModulePass *createResolveAliasesPass();
+ModulePass *createRewriteAtomicsPass();
+ModulePass *createRewriteLLVMIntrinsicsPass();
+ModulePass *createRewritePNaClLibraryCallsPass();
+ModulePass *createStripAttributesPass();
+ModulePass *createStripMetadataPass();
+ModulePass *createStripModuleFlagsPass();
+
+void PNaClABISimplifyAddPreOptPasses(PassManagerBase &PM);
+void PNaClABISimplifyAddPostOptPasses(PassManagerBase &PM);
+
+Instruction *PhiSafeInsertPt(Use *U);
+void PhiSafeReplaceUses(Use *U, Value *NewVal);
+
+// Copy debug information from Original to New, and return New.
+template <typename T> T *CopyDebug(T *New, Instruction *Original) {
+ New->setDebugLoc(Original->getDebugLoc());
+ return New;
+}
+
+template <class InstType>
+static void CopyLoadOrStoreAttrs(InstType *Dest, InstType *Src) {
+ Dest->setVolatile(Src->isVolatile());
+ Dest->setAlignment(Src->getAlignment());
+ Dest->setOrdering(Src->getOrdering());
+ Dest->setSynchScope(Src->getSynchScope());
+}
+
+// In order to change a function's type, the function must be
+// recreated. RecreateFunction() recreates Func with type NewType.
+// It copies or moves across everything except the argument values,
+// which the caller must update because the argument types might be
+// different.
+Function *RecreateFunction(Function *Func, FunctionType *NewType);
+
+}
+
+#endif
« no previous file with comments | « include/llvm/Transforms/MinSFI.h ('k') | lib/Analysis/CMakeLists.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698