Skip to content

Amd common merge 161031 #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 87 commits into from
Oct 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
7117050
[SelectionDAG] Tidyup UDIV computeKnownBits implementation
RKSimon Oct 28, 2016
734d68c
[SelectionDAG] computeKnownBits - early-out if any BUILD_VECTOR eleme…
RKSimon Oct 28, 2016
889ff7b
[LV] Correct misleading comments in test (NFC)
mssimpso Oct 28, 2016
749a022
[cmake] Temporarily revert enforcement of minimum GCC version increase
teresajohnson Oct 28, 2016
d0b25b0
[Loads] Fix crash in is isDereferenceableAndAlignedPointer()
tstellarAMD Oct 28, 2016
fe1e3ec
[Hexagon] Maintain kill flags through splitting in expand-condsets
Oct 28, 2016
95d4f2c
[lli] Pass command line arguments in to the orc-lazy JIT.
lhames Oct 28, 2016
db3dd81
[InstCombine] move/add tests for smin/smax folds
rotateright Oct 28, 2016
a3dd1fe
[libFuzzer] a bit more docs
kcc Oct 28, 2016
05af2b2
More swift calling convention tests
aschwaighofer Oct 28, 2016
9fd3a76
Import/update constants from the DWARF 5 public review draft document.
adrian-prantl Oct 28, 2016
23ea6d3
TargetPassConfig: Move addPass of IPRA RegUsageInfoProp down.
MatzeB Oct 28, 2016
15cdf2c
MachineRegisterInfo: Remove unused arg from isConstantPhysReg(); NFC
MatzeB Oct 28, 2016
f2e1fce
Move the DWARF attribute constants into Dwarf.def and delete 300 line…
adrian-prantl Oct 28, 2016
60699bf
[Error] Unify +Asserts/-Asserts behavior for checked flags in Error/E…
lhames Oct 28, 2016
3dc20a0
[x86] add tests for missed umin/umax
rotateright Oct 28, 2016
9943293
Make swift calling convention test specific to armv7
aschwaighofer Oct 28, 2016
d7cf4df
[MemorySSA] Add const to getClobberingMemoryAccess.
gburgessiv Oct 28, 2016
4c68e05
[ThinLTO] Use flags from summary when writing variable summary (NFC)
teresajohnson Oct 28, 2016
0b61b12
Implement vector count leading/trailing bytes with zero lsb and vecto…
nemanjai Oct 28, 2016
2d7bc6b
AMDGPU: Fix using incorrect private resource with no allocation
arsenm Oct 28, 2016
593670b
SpeculativeExecution: Allow speculating more inst types
arsenm Oct 28, 2016
1adbd7e
Handle non-~0 lane masks on live-in registers in LivePhysRegs
Oct 28, 2016
b3c6b68
[APFloat] Use std::move() in move assignment operator
timshen91 Oct 28, 2016
7dcc2cb
Remove redundant prefixes from constants and unbreak the LLDB bots.
adrian-prantl Oct 28, 2016
6cabc8f
AMDGPU: Diagnose using too many SGPRs
arsenm Oct 28, 2016
a654819
Fix a copy&paste error in the macro definition for HANDLE_DW_MACRO and
adrian-prantl Oct 28, 2016
0e18bbf
AMDGPU: Change check prefix in test
arsenm Oct 28, 2016
10df7e9
cmake: Enable the lto cache when building with -flto=thin on darwin
bogner Oct 28, 2016
9488f1f
Don't claim the udiv created in BypassSlowDivision is exact.
Oct 28, 2016
f644e7b
Don't leave unused divs/rems sitting around in BypassSlowDivision.
Oct 28, 2016
30c499d
[NVPTX] Compute 'rem' using the result of 'div', if possible.
Oct 28, 2016
be4e1c4
AMDGPU: Rename glc operand type
arsenm Oct 28, 2016
d6028cd
AMDGPU: Add definitions for scalar store instructions
arsenm Oct 28, 2016
27d02ea
Add missing lit.local.cfg to llvm/test/Transforms/CodeGenPrepare/NVPTX.
Oct 28, 2016
51fb510
[libFuzzer] mention one more trophie
kcc Oct 28, 2016
342cdd8
SDAG: Make sure we use an allocatable reg class when we create this vreg
bogner Oct 28, 2016
88ccb3e
[APFloat] Fix memory bugs revealed by MSan
timshen91 Oct 28, 2016
b292fb2
Refactor all DW_FORM_* constants into Dwarf.def
adrian-prantl Oct 28, 2016
73525b9
Remove whitespace
adrian-prantl Oct 28, 2016
3807607
Refactor DW_CFA_* into Dwarf.def
adrian-prantl Oct 28, 2016
832e271
Refactor DW_APPLE_PROPERTY_* into Dwarf.def
adrian-prantl Oct 28, 2016
64660bf
Refactor DW_LNS_* into Dwarf.def
adrian-prantl Oct 28, 2016
2149107
Refactor DW_LNE_* into Dwarf.def
adrian-prantl Oct 28, 2016
0f0ebbd
AMDGPU: Fix instruction flags for s_endpgm
arsenm Oct 28, 2016
b15bbca
AMDGPU/SI: Don't use non-0 waitcnt values when waiting on Flat instru…
tstellarAMD Oct 28, 2016
c576394
[DAGCombiner] Fix a crash visiting `AND` nodes.
dcci Oct 28, 2016
d5b5d46
Do not print out Flags field twice.
rui314 Oct 28, 2016
b53c2b0
Resubmit "Add support for advanced number formatting."
Oct 29, 2016
b7f36bc
[APFloat] Remove the redundent function body of uninitialized ctor, w…
timshen91 Oct 29, 2016
33eabd9
Define calculateDbgStreamSize for consistency.
rui314 Oct 29, 2016
d75f7ec
AArch64DeadRegisterDefinitionsPass: Cleanup; NFC
MatzeB Oct 29, 2016
ac5efca
AMDGPU: Use 1/2pi inline imm on VI
arsenm Oct 29, 2016
2fd6330
Fixed FMA + FNEG combine.
Oct 29, 2016
6722cc3
[DAGCombiner] (REAPPLIED) Add vector demanded elements support to com…
RKSimon Oct 29, 2016
9978e17
[InstCombine] re-use bitcasted compare operands in selects (PR28001)
rotateright Oct 29, 2016
c69fe17
[x86] add tests for smin/smax matchSelPattern (D26091)
rotateright Oct 29, 2016
14ebdf2
[ValueTracking] recognize more variants of smin/smax
rotateright Oct 29, 2016
c4589d7
[X86] Use intrinsics table for VPMULHRSW intrincis so that the legacy…
topperc Oct 29, 2016
2203707
IR: Remove a no longer needed assert.
pcc Oct 29, 2016
8c54a79
[ThinLTO] Use NoPromote flag in summary during promotion
teresajohnson Oct 29, 2016
8108a04
[ThinLTO] Rename doPromoteLocalToGlobal to shouldPromoteLocalToGlobal…
teresajohnson Oct 29, 2016
37111b2
NativeFormatting.cpp: Fix build for mingw. Where would writePadding()…
chapuni Oct 29, 2016
0a87051
[X86] Don't use loadv2i64 on SSE version of PMULHRSW. Use memopv2i64 …
topperc Oct 30, 2016
39970a7
[ThinLTO] Correctly resolve linkonce when importing aliasee
teresajohnson Oct 30, 2016
9fd0638
[ThinLTO] Use per-summary flag to prevent exporting locals used in in…
teresajohnson Oct 30, 2016
56c6464
[Polly] Remove the unused POLLY_LINK_LIBS for linking polly into
etherzhhb Oct 30, 2016
648888d
[X86] Use intrinsics table for PMADDUBSW and PMADDWD so that we can u…
topperc Oct 30, 2016
b10d927
[LoopVectorize] Make interleaved-accesses analysis less conservative …
dnuzman Oct 30, 2016
6d3c9bd
Revert r285517 due to build failures.
dnuzman Oct 30, 2016
6c05e2a
[x86] add tests for basic logic op folds
rotateright Oct 30, 2016
73a78bf
[DAG] x & x --> x
rotateright Oct 30, 2016
d43c4b8
[DAG] x | x --> x
rotateright Oct 30, 2016
abf46ba
Clean up test a little bit; NFC
sanjoy Oct 30, 2016
641d727
[SCEV] Use auto for consistency with an upcoming change; NFC
sanjoy Oct 30, 2016
39fd0bb
[SCEV] In CompareValueComplexity, order global values by their name
sanjoy Oct 30, 2016
399f721
[SCEV] Reduce boilerplate in unit tests
sanjoy Oct 31, 2016
5c51de1
[SCEV] Try to order n-ary expressions in CompareValueComplexity
sanjoy Oct 31, 2016
472e478
Make a test case more rigorous; NFC
sanjoy Oct 31, 2016
ddcef0e
[AVX-512] Add missing patterns for selecting masked vector extracts t…
topperc Oct 31, 2016
951469b
Add getOffset to ELFSectionRef
eleviant777 Oct 31, 2016
ef99bbd
Delete .s file that did not test anything, and check in test that works.
r4nt Oct 31, 2016
8b9bc3d
Add triple to test so it does not fail on windows.
r4nt Oct 31, 2016
7af02fc
Improved cost model for FDIV and FSQRT, by Andrew Tischenko
alexey-bataev Oct 31, 2016
eeb178c
[SystemZ] Model 2 VBU units (not 1) in SystemZScheduleZ13.td.
JonPsson Oct 31, 2016
3aa3118
Second attempt at r285517.
dnuzman Oct 31, 2016
179d21c
Merge branch 'amd-master' into amd-common
tstellarAMD Oct 31, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions cmake/modules/CheckCompilerVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ if(NOT DEFINED LLVM_COMPILER_CHECKED)

if(NOT LLVM_FORCE_USE_OLD_TOOLCHAIN)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
message(FATAL_ERROR "Host GCC version must be at least 4.8!")
# FIXME: Change this to 4.8 once documentation builder bot is upgraded
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
message(FATAL_ERROR "Host GCC version must be at least 4.7!")
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.1)
Expand All @@ -35,7 +36,8 @@ std::atomic<float> x(0.0f);
int main() { return (float)x; }"
LLVM_NO_OLD_LIBSTDCXX)
if(NOT LLVM_NO_OLD_LIBSTDCXX)
message(FATAL_ERROR "Host Clang must be able to find libstdc++4.8 or newer!")
# FIXME: Change this to 4.8 once documentation builder bot is upgraded
message(FATAL_ERROR "Host Clang must be able to find libstdc++4.7 or newer!")
endif()
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
set(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES})
Expand Down
5 changes: 5 additions & 0 deletions cmake/modules/HandleLLVMOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,11 @@ string(TOUPPER "${LLVM_ENABLE_LTO}" uppercase_LLVM_ENABLE_LTO)
if(uppercase_LLVM_ENABLE_LTO STREQUAL "THIN")
append("-flto=thin" CMAKE_CXX_FLAGS CMAKE_C_FLAGS
CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
# On darwin, enable the lto cache. This improves initial build time a little
# since we re-link a lot of the same objects, and significantly improves
# incremental build time.
append_if(APPLE "-Wl,-cache_path_lto,${PROJECT_BINARY_DIR}/lto.cache"
CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
elseif(uppercase_LLVM_ENABLE_LTO STREQUAL "FULL")
append("-flto=full" CMAKE_CXX_FLAGS CMAKE_C_FLAGS
CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
Expand Down
6 changes: 5 additions & 1 deletion docs/LibFuzzer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ Some important things to remember about fuzz targets:
* The fuzzing engine will execute the fuzz target many times with different inputs in the same process.
* It must tolerate any kind of input (empty, huge, malformed, etc).
* It must not `exit()` on any input.
* It may use multiple threads but ideally all threads should be joined at the end of the function.
* It may use threads but ideally all threads should be joined at the end of the function.
* It must be as deterministic as possible. Non-determinism (e.g. random decisions not based on the input byte) will make fuzzing inefficient.
* It must be fast. Try avoiding cubic or greater complexity.
* Ideally, it should not modify any global state (although that's not strict).


Expand Down Expand Up @@ -759,6 +761,8 @@ Trophies

* Tensorflow: `[1] <https://github.com/tensorflow/tensorflow/commit/7231d01fcb2cd9ef9ffbfea03b724892c8a4026e>`__

* Ffmpeg: `[1] <https://github.com/FFmpeg/FFmpeg/commit/c92f55847a3d9cd12db60bfcd0831ff7f089c37c>`__ `[2] <https://github.com/FFmpeg/FFmpeg/commit/25ab1a65f3acb5ec67b53fb7a2463a7368f1ad16>`__ `[3] <https://github.com/FFmpeg/FFmpeg/commit/85d23e5cbc9ad6835eef870a5b4247de78febe56>`__

.. _pcre2: http://www.pcre.org/
.. _AFL: http://lcamtuf.coredump.cx/afl/
.. _Radamsa: https://github.com/aoh/radamsa
Expand Down
3 changes: 2 additions & 1 deletion include/llvm/ADT/APFloat.h
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ class APFloat : public APFloatBase {
Double = std::move(RHS.Double);
} else if (this != &RHS) {
this->~Storage();
new (this) Storage(RHS);
new (this) Storage(std::move(RHS));
}
return *this;
}
Expand Down Expand Up @@ -777,6 +777,7 @@ class APFloat : public APFloatBase {
APFloat(const fltSemantics &Semantics) : U(Semantics) {}
APFloat(const fltSemantics &Semantics, StringRef S);
APFloat(const fltSemantics &Semantics, integerPart I) : U(Semantics, I) {}
// TODO: Remove this constructor. This isn't faster than the first one.
APFloat(const fltSemantics &Semantics, uninitializedTag)
: U(Semantics, uninitialized) {}
APFloat(const fltSemantics &Semantics, const APInt &I) : U(Semantics, I) {}
Expand Down
5 changes: 0 additions & 5 deletions include/llvm/Analysis/ModuleSummaryAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ class ModuleSummaryIndexWrapperPass : public ModulePass {
// object for the module, to be written to bitcode or LLVM assembly.
//
ModulePass *createModuleSummaryIndexWrapperPass();

/// Returns true if \p M is eligible for ThinLTO promotion.
///
/// Currently we check if it has any any InlineASM that uses an internal symbol.
bool moduleCanBeRenamedForThinLTO(const Module &M);
}

#endif
2 changes: 1 addition & 1 deletion include/llvm/CodeGen/MachineRegisterInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ class MachineRegisterInfo {
/// isConstantPhysReg - Returns true if PhysReg is unallocatable and constant
/// throughout the function. It is safe to move instructions that read such
/// a physreg.
bool isConstantPhysReg(unsigned PhysReg, const MachineFunction &MF) const;
bool isConstantPhysReg(unsigned PhysReg) const;

/// Get an iterator over the pressure sets affected by the given physical or
/// virtual register. If RegUnit is physical, it must be a register unit (from
Expand Down
16 changes: 13 additions & 3 deletions include/llvm/CodeGen/SelectionDAG.h
Original file line number Diff line number Diff line change
Expand Up @@ -1256,12 +1256,22 @@ class SelectionDAG {
const;

/// Determine which bits of Op are known to be either zero or one and return
/// them in the KnownZero/KnownOne bitsets. Targets can implement the
/// computeKnownBitsForTargetNode method in the TargetLowering class to allow
/// target nodes to be understood.
/// them in the KnownZero/KnownOne bitsets. For vectors, the known bits are
/// those that are shared by every vector element.
/// Targets can implement the computeKnownBitsForTargetNode method in the
/// TargetLowering class to allow target nodes to be understood.
void computeKnownBits(SDValue Op, APInt &KnownZero, APInt &KnownOne,
unsigned Depth = 0) const;

/// Determine which bits of Op are known to be either zero or one and return
/// them in the KnownZero/KnownOne bitsets. The DemandedElts argument allows
/// us to only collect the known bits that are shared by the requested vector
/// elements.
/// Targets can implement the computeKnownBitsForTargetNode method in the
/// TargetLowering class to allow target nodes to be understood.
void computeKnownBits(SDValue Op, APInt &KnownZero, APInt &KnownOne,
const APInt &DemandedElts, unsigned Depth = 0) const;

/// Test if the given value is known to have exactly one bit set. This differs
/// from computeKnownBits in that it doesn't necessarily determine which bit
/// is set.
Expand Down
1 change: 1 addition & 0 deletions include/llvm/DebugInfo/PDB/Raw/DbiStreamBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class DbiStreamBuilder {
uint32_t calculateModiSubstreamSize() const;
uint32_t calculateFileInfoSubstreamSize() const;
uint32_t calculateNamesBufferSize() const;
uint32_t calculateDbgStreamsSize() const;

Error generateModiSubstream();
Error generateFileInfoSubstream();
Expand Down
11 changes: 11 additions & 0 deletions include/llvm/IR/IntrinsicsPowerPC.td
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,17 @@ let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.".
def int_ppc_altivec_vcmpnezb_p : GCCBuiltin<"__builtin_altivec_vcmpnezb_p">,
Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v16i8_ty,llvm_v16i8_ty],
[IntrNoMem]>;
def int_ppc_altivec_vclzlsbb : GCCBuiltin<"__builtin_altivec_vclzlsbb">,
Intrinsic<[llvm_i32_ty],[llvm_v16i8_ty],[IntrNoMem]>;
def int_ppc_altivec_vctzlsbb : GCCBuiltin<"__builtin_altivec_vctzlsbb">,
Intrinsic<[llvm_i32_ty],[llvm_v16i8_ty],[IntrNoMem]>;
def int_ppc_altivec_vprtybw : GCCBuiltin<"__builtin_altivec_vprtybw">,
Intrinsic<[llvm_v4i32_ty],[llvm_v4i32_ty],[IntrNoMem]>;
def int_ppc_altivec_vprtybd : GCCBuiltin<"__builtin_altivec_vprtybd">,
Intrinsic<[llvm_v2i64_ty],[llvm_v2i64_ty],[IntrNoMem]>;
def int_ppc_altivec_vprtybq : GCCBuiltin<"__builtin_altivec_vprtybq">,
Intrinsic<[llvm_v1i128_ty],[llvm_v1i128_ty],[IntrNoMem]>;

}

// Vector average.
Expand Down
4 changes: 4 additions & 0 deletions include/llvm/IR/ModuleSummaryIndex.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ class GlobalValueSummary {
/// possibly referenced from inline assembly, etc).
bool noRename() const { return Flags.NoRename; }

/// Flag that this global value cannot be renamed (in a specific section,
/// possibly referenced from inline assembly, etc).
void setNoRename() { Flags.NoRename = true; }

/// Record a reference from this global value to the global value identified
/// by \p RefGUID.
void addRefEdge(GlobalValue::GUID RefGUID) { RefEdgeList.push_back(RefGUID); }
Expand Down
11 changes: 11 additions & 0 deletions include/llvm/Object/ELFObjectFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class ELFObjectFileBase : public ObjectFile {

virtual uint32_t getSectionType(DataRefImpl Sec) const = 0;
virtual uint64_t getSectionFlags(DataRefImpl Sec) const = 0;
virtual uint64_t getSectionOffset(DataRefImpl Sec) const = 0;

virtual ErrorOr<int64_t> getRelocationAddend(DataRefImpl Rel) const = 0;

Expand Down Expand Up @@ -90,6 +91,10 @@ class ELFSectionRef : public SectionRef {
uint64_t getFlags() const {
return getObject()->getSectionFlags(getRawDataRefImpl());
}

uint64_t getOffset() const {
return getObject()->getSectionOffset(getRawDataRefImpl());
}
};

class elf_section_iterator : public section_iterator {
Expand Down Expand Up @@ -245,6 +250,7 @@ template <class ELFT> class ELFObjectFile : public ELFObjectFileBase {

uint32_t getSectionType(DataRefImpl Sec) const override;
uint64_t getSectionFlags(DataRefImpl Sec) const override;
uint64_t getSectionOffset(DataRefImpl Sec) const override;
StringRef getRelocationTypeName(uint32_t Type) const;

/// \brief Get the relocation section that contains \a Rel.
Expand Down Expand Up @@ -380,6 +386,11 @@ uint32_t ELFObjectFile<ELFT>::getSectionType(DataRefImpl Sec) const {
return getSection(Sec)->sh_type;
}

template <class ELFT>
uint64_t ELFObjectFile<ELFT>::getSectionOffset(DataRefImpl Sec) const {
return getSection(Sec)->sh_offset;
}

template <class ELFT>
uint64_t ELFObjectFile<ELFT>::getSymbolValueImpl(DataRefImpl Symb) const {
const Elf_Sym *ESym = getSymbol(Symb);
Expand Down
Loading