diff options
author | Eli Bendersky <eliben@chromium.org> | 2013-03-11 15:16:37 -0700 |
---|---|---|
committer | Eli Bendersky <eliben@chromium.org> | 2013-03-11 15:16:37 -0700 |
commit | 23c00401dad33ca247d2818e71540079bed63c5b (patch) | |
tree | df9f25d60f9538fbde84b78cf3c4e4a00eb6c3db /include/llvm/Transforms | |
parent | 79da56afe68a0c5b2c2227681014dd13705d78cc (diff) | |
parent | 279b9184c2ff4fea93b198a3519b8cb3a1d8d195 (diff) |
Merge commit '279b9184c2ff4fea93b198a3519b8cb3a1d8d195'
Conflicts:
include/llvm/CodeGen/LexicalScopes.h
include/llvm/MC/MCAsmInfo.h
lib/Linker/LinkArchives.cpp
lib/Linker/LinkItems.cpp
lib/MC/MCAsmInfo.cpp
lib/MC/MCDwarf.cpp
lib/Target/ARM/ARMInstrInfo.td
lib/Target/ARM/ARMSubtarget.cpp
lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp
lib/Target/Mips/MipsAsmPrinter.cpp
lib/Target/Mips/MipsDelaySlotFiller.cpp
lib/Target/Mips/MipsISelDAGToDAG.cpp
lib/Target/Mips/MipsSubtarget.cpp
lib/Target/Mips/MipsSubtarget.h
lib/Target/Mips/MipsTargetObjectFile.cpp
lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
lib/Target/X86/X86FastISel.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86TargetMachine.cpp
lib/Transforms/CMakeLists.txt
lib/Transforms/LLVMBuild.txt
lib/Transforms/Makefile
test/MC/ARM/arm_instructions.s
test/MC/X86/AlignedBundling/pad-align-to-bundle-end.s
Diffstat (limited to 'include/llvm/Transforms')
-rw-r--r-- | include/llvm/Transforms/Instrumentation.h | 9 | ||||
-rw-r--r-- | include/llvm/Transforms/ObjCARC.h | 49 | ||||
-rw-r--r-- | include/llvm/Transforms/Scalar.h | 24 | ||||
-rw-r--r-- | include/llvm/Transforms/Utils/BasicBlockUtils.h | 1 | ||||
-rw-r--r-- | include/llvm/Transforms/Utils/BlackList.h | 58 | ||||
-rw-r--r-- | include/llvm/Transforms/Utils/IntegerDivision.h | 14 | ||||
-rw-r--r-- | include/llvm/Transforms/Vectorize.h | 3 |
7 files changed, 130 insertions, 28 deletions
diff --git a/include/llvm/Transforms/Instrumentation.h b/include/llvm/Transforms/Instrumentation.h index 5504dc90f6..a57e0f3e8a 100644 --- a/include/llvm/Transforms/Instrumentation.h +++ b/include/llvm/Transforms/Instrumentation.h @@ -34,14 +34,17 @@ ModulePass *createPathProfilerPass(); ModulePass *createGCOVProfilerPass(bool EmitNotes = true, bool EmitData = true, bool Use402Format = false, bool UseExtraChecksum = false, - bool NoRedZone = false); + bool NoRedZone = false, + bool NoFunctionNamesInData = false); // Insert AddressSanitizer (address sanity checking) instrumentation FunctionPass *createAddressSanitizerFunctionPass( bool CheckInitOrder = false, bool CheckUseAfterReturn = false, - bool CheckLifetime = false, StringRef BlacklistFile = StringRef()); + bool CheckLifetime = false, StringRef BlacklistFile = StringRef(), + bool ZeroBaseShadow = false); ModulePass *createAddressSanitizerModulePass( - bool CheckInitOrder = false, StringRef BlacklistFile = StringRef()); + bool CheckInitOrder = false, StringRef BlacklistFile = StringRef(), + bool ZeroBaseShadow = false); // Insert MemorySanitizer instrumentation (detection of uninitialized reads) FunctionPass *createMemorySanitizerPass(bool TrackOrigins = false, diff --git a/include/llvm/Transforms/ObjCARC.h b/include/llvm/Transforms/ObjCARC.h new file mode 100644 index 0000000000..b3c19c077e --- /dev/null +++ b/include/llvm/Transforms/ObjCARC.h @@ -0,0 +1,49 @@ +//===-- ObjCARC.h - ObjCARC Scalar Transformations --------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This header file defines prototypes for accessor functions that expose passes +// in the ObjCARC Scalar Transformations library. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_TRANSFORMS_OBJCARC_H +#define LLVM_TRANSFORMS_OBJCARC_H + +namespace llvm { + +class Pass; + +//===----------------------------------------------------------------------===// +// +// ObjCARCAPElim - ObjC ARC autorelease pool elimination. +// +Pass *createObjCARCAPElimPass(); + +//===----------------------------------------------------------------------===// +// +// ObjCARCExpand - ObjC ARC preliminary simplifications. +// +Pass *createObjCARCExpandPass(); + +//===----------------------------------------------------------------------===// +// +// ObjCARCContract - Late ObjC ARC cleanups. +// +Pass *createObjCARCContractPass(); + +//===----------------------------------------------------------------------===// +// +// ObjCARCOpt - ObjC ARC optimization. +// +Pass *createObjCARCOptPass(); + +} // End llvm namespace + +#endif + diff --git a/include/llvm/Transforms/Scalar.h b/include/llvm/Transforms/Scalar.h index fdb63115a8..ef7df68ca4 100644 --- a/include/llvm/Transforms/Scalar.h +++ b/include/llvm/Transforms/Scalar.h @@ -334,30 +334,6 @@ Pass *createCorrelatedValuePropagationPass(); //===----------------------------------------------------------------------===// // -// ObjCARCAPElim - ObjC ARC autorelease pool elimination. -// -Pass *createObjCARCAPElimPass(); - -//===----------------------------------------------------------------------===// -// -// ObjCARCExpand - ObjC ARC preliminary simplifications. -// -Pass *createObjCARCExpandPass(); - -//===----------------------------------------------------------------------===// -// -// ObjCARCContract - Late ObjC ARC cleanups. -// -Pass *createObjCARCContractPass(); - -//===----------------------------------------------------------------------===// -// -// ObjCARCOpt - ObjC ARC optimization. -// -Pass *createObjCARCOptPass(); - -//===----------------------------------------------------------------------===// -// // InstructionSimplifier - Remove redundant instructions. // FunctionPass *createInstructionSimplifierPass(); diff --git a/include/llvm/Transforms/Utils/BasicBlockUtils.h b/include/llvm/Transforms/Utils/BasicBlockUtils.h index f1398fa651..8f1a6e2b75 100644 --- a/include/llvm/Transforms/Utils/BasicBlockUtils.h +++ b/include/llvm/Transforms/Utils/BasicBlockUtils.h @@ -19,7 +19,6 @@ #include "llvm/IR/BasicBlock.h" #include "llvm/Support/CFG.h" -#include "llvm/Support/DebugLoc.h" namespace llvm { diff --git a/include/llvm/Transforms/Utils/BlackList.h b/include/llvm/Transforms/Utils/BlackList.h new file mode 100644 index 0000000000..f19470e19d --- /dev/null +++ b/include/llvm/Transforms/Utils/BlackList.h @@ -0,0 +1,58 @@ +//===-- BlackList.h - blacklist for sanitizers ------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +//===----------------------------------------------------------------------===// +// +// This is a utility class for instrumentation passes (like AddressSanitizer +// or ThreadSanitizer) to avoid instrumenting some functions or global +// variables based on a user-supplied blacklist. +// +// The blacklist disables instrumentation of various functions and global +// variables. Each line contains a prefix, followed by a wild card expression. +// Empty lines and lines starting with "#" are ignored. +// --- +// # Blacklisted items: +// fun:*_ZN4base6subtle* +// global:*global_with_bad_access_or_initialization* +// global-init:*global_with_initialization_issues* +// global-init-type:*Namespace::ClassName* +// src:file_with_tricky_code.cc +// --- +// Note that the wild card is in fact an llvm::Regex, but * is automatically +// replaced with .* +// This is similar to the "ignore" feature of ThreadSanitizer. +// http://code.google.com/p/data-race-test/wiki/ThreadSanitizerIgnores +// +//===----------------------------------------------------------------------===// +// + +#include "llvm/ADT/StringMap.h" + +namespace llvm { +class Function; +class GlobalVariable; +class Module; +class Regex; +class StringRef; + +class BlackList { + public: + BlackList(const StringRef Path); + // Returns whether either this function or it's source file are blacklisted. + bool isIn(const Function &F) const; + // Returns whether either this global or it's source file are blacklisted. + bool isIn(const GlobalVariable &G) const; + // Returns whether this module is blacklisted by filename. + bool isIn(const Module &M) const; + // Returns whether a global should be excluded from initialization checking. + bool isInInit(const GlobalVariable &G) const; + private: + StringMap<Regex*> Entries; + + bool inSection(const StringRef Section, const StringRef Query) const; +}; + +} // namespace llvm diff --git a/include/llvm/Transforms/Utils/IntegerDivision.h b/include/llvm/Transforms/Utils/IntegerDivision.h index ff4a31f8e0..27d3c588b5 100644 --- a/include/llvm/Transforms/Utils/IntegerDivision.h +++ b/include/llvm/Transforms/Utils/IntegerDivision.h @@ -43,6 +43,20 @@ namespace llvm { /// @brief Replace Div with generated code. bool expandDivision(BinaryOperator* Div); + /// Generate code to calculate the remainder of two integers, replacing Rem + /// with the generated code. Uses the above 32bit routine, therefore adequate + /// for targets with little or no support for less than 32 bit arithmetic. + /// + /// @brief Replace Rem with generated code. + bool expandRemainderUpTo32Bits(BinaryOperator *Rem); + + /// Generate code to divide two integers, replacing Div with the generated + /// code. Uses the above 32bit routine, therefore adequate for targets with + /// little or no support for less than 32 bit arithmetic. + /// + /// @brief Replace Rem with generated code. + bool expandDivisionUpTo32Bits(BinaryOperator *Div); + } // End llvm namespace #endif diff --git a/include/llvm/Transforms/Vectorize.h b/include/llvm/Transforms/Vectorize.h index 1ba4d22d5f..d205dbdede 100644 --- a/include/llvm/Transforms/Vectorize.h +++ b/include/llvm/Transforms/Vectorize.h @@ -84,6 +84,9 @@ struct VectorizeConfig { /// @brief The maximum number of pairable instructions per group. unsigned MaxInsts; + /// @brief The maximum number of candidate instruction pairs per group. + unsigned MaxPairs; + /// @brief The maximum number of pairing iterations. unsigned MaxIter; |