Vendor import of llvm release_38 branch r257836:

https://llvm.org/svn/llvm-project/llvm/branches/release_38@257836
This commit is contained in:
Dimitry Andric 2016-01-16 17:17:12 +00:00
parent 050e163ae8
commit dfab1a98e0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/vendor/llvm/dist/; revision=294160
svn path=/vendor/llvm/llvm-release_38-r257836/; revision=294161; tag=vendor/llvm/llvm-release_38-r257836
13 changed files with 116 additions and 29 deletions

View File

@ -36,7 +36,7 @@ if(NOT DEFINED LLVM_VERSION_PATCH)
set(LLVM_VERSION_PATCH 0)
endif()
if(NOT DEFINED LLVM_VERSION_SUFFIX)
set(LLVM_VERSION_SUFFIX svn)
set(LLVM_VERSION_SUFFIX "")
endif()
if (POLICY CMP0048)

View File

@ -32,12 +32,12 @@ dnl===-----------------------------------------------------------------------===
dnl Initialize autoconf and define the package name, version number and
dnl address for reporting bugs.
AC_INIT([LLVM],[3.8.0svn],[http://llvm.org/bugs/])
AC_INIT([LLVM],[3.8.0],[http://llvm.org/bugs/])
LLVM_VERSION_MAJOR=3
LLVM_VERSION_MINOR=8
LLVM_VERSION_PATCH=0
LLVM_VERSION_SUFFIX=svn
LLVM_VERSION_SUFFIX=
AC_DEFINE_UNQUOTED([LLVM_VERSION_MAJOR], $LLVM_VERSION_MAJOR, [Major version of the LLVM API])
AC_DEFINE_UNQUOTED([LLVM_VERSION_MINOR], $LLVM_VERSION_MINOR, [Minor version of the LLVM API])

20
configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.60 for LLVM 3.8.0svn.
# Generated by GNU Autoconf 2.60 for LLVM 3.8.0.
#
# Report bugs to <http://llvm.org/bugs/>.
#
@ -561,8 +561,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='LLVM'
PACKAGE_TARNAME='llvm'
PACKAGE_VERSION='3.8.0svn'
PACKAGE_STRING='LLVM 3.8.0svn'
PACKAGE_VERSION='3.8.0'
PACKAGE_STRING='LLVM 3.8.0'
PACKAGE_BUGREPORT='http://llvm.org/bugs/'
ac_unique_file="lib/IR/Module.cpp"
@ -1334,7 +1334,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures LLVM 3.8.0svn to adapt to many kinds of systems.
\`configure' configures LLVM 3.8.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1400,7 +1400,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of LLVM 3.8.0svn:";;
short | recursive ) echo "Configuration of LLVM 3.8.0:";;
esac
cat <<\_ACEOF
@ -1584,7 +1584,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
LLVM configure 3.8.0svn
LLVM configure 3.8.0
generated by GNU Autoconf 2.60
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@ -1600,7 +1600,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by LLVM $as_me 3.8.0svn, which was
It was created by LLVM $as_me 3.8.0, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ $0 $@
@ -1957,7 +1957,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
LLVM_VERSION_MAJOR=3
LLVM_VERSION_MINOR=8
LLVM_VERSION_PATCH=0
LLVM_VERSION_SUFFIX=svn
LLVM_VERSION_SUFFIX=
cat >>confdefs.h <<_ACEOF
@ -18279,7 +18279,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by LLVM $as_me 3.8.0svn, which was
This file was extended by LLVM $as_me 3.8.0, which was
generated by GNU Autoconf 2.60. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -18332,7 +18332,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
LLVM config.status 3.8.0svn
LLVM config.status 3.8.0
configured by $0, generated by GNU Autoconf 2.60,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

View File

@ -68,6 +68,17 @@ Non-comprehensive list of changes in this release
Core.h so nothing should change for projects directly including the headers,
but transitive dependencies may be affected.
* llvm-ar now suports thin archives.
* llvm doesn't produce .data.rel.ro.local or .data.rel sections anymore.
* aliases to available_externally globals are now rejected by the verifier.
* the IR Linker has been split into IRMover that moves bits from one module to
another and Linker proper that decides what to link.
* Support for dematerializing has been dropped.
.. NOTE
For small 1-3 sentence descriptions, just add an entry at the end of
this list. If your description won't fit comfortably in one bullet

View File

@ -251,6 +251,10 @@ class MachineFrameInfo {
/// opaque mechanism like inline assembly or Win32 EH.
bool HasOpaqueSPAdjustment;
/// True if the function contains operations which will lower down to
/// instructions which manipulate the stack pointer.
bool HasCopyImplyingStackAdjustment;
/// True if the function contains a call to the llvm.vastart intrinsic.
bool HasVAStart;
@ -288,6 +292,7 @@ class MachineFrameInfo {
LocalFrameMaxAlign = 0;
UseLocalStackAllocationBlock = false;
HasOpaqueSPAdjustment = false;
HasCopyImplyingStackAdjustment = false;
HasVAStart = false;
HasMustTailInVarArgFunc = false;
Save = nullptr;
@ -493,6 +498,15 @@ class MachineFrameInfo {
bool hasOpaqueSPAdjustment() const { return HasOpaqueSPAdjustment; }
void setHasOpaqueSPAdjustment(bool B) { HasOpaqueSPAdjustment = B; }
/// Returns true if the function contains operations which will lower down to
/// instructions which manipulate the stack pointer.
bool hasCopyImplyingStackAdjustment() const {
return HasCopyImplyingStackAdjustment;
}
void setHasCopyImplyingStackAdjustment(bool B) {
HasCopyImplyingStackAdjustment = B;
}
/// Returns true if the function calls the llvm.va_start intrinsic.
bool hasVAStart() const { return HasVAStart; }
void setHasVAStart(bool B) { HasVAStart = B; }

View File

@ -160,9 +160,11 @@ namespace {
(void) llvm::createPostOrderFunctionAttrsPass();
(void) llvm::createReversePostOrderFunctionAttrsPass();
(void) llvm::createMergeFunctionsPass();
(void) llvm::createPrintModulePass(*(llvm::raw_ostream*)nullptr);
(void) llvm::createPrintFunctionPass(*(llvm::raw_ostream*)nullptr);
(void) llvm::createPrintBasicBlockPass(*(llvm::raw_ostream*)nullptr);
std::string buf;
llvm::raw_string_ostream os(buf);
(void) llvm::createPrintModulePass(os);
(void) llvm::createPrintFunctionPass(os);
(void) llvm::createPrintBasicBlockPass(os);
(void) llvm::createModuleDebugInfoPrinterPass();
(void) llvm::createPartialInliningPass();
(void) llvm::createLintPass();
@ -186,10 +188,10 @@ namespace {
(void)new llvm::IntervalPartition();
(void)new llvm::ScalarEvolutionWrapperPass();
((llvm::Function*)nullptr)->viewCFGOnly();
llvm::Function::Create(nullptr, llvm::GlobalValue::ExternalLinkage)->viewCFGOnly();
llvm::RGPassManager RGM;
((llvm::RegionPass*)nullptr)->runOnRegion((llvm::Region*)nullptr, RGM);
llvm::AliasSetTracker X(*(llvm::AliasAnalysis*)nullptr);
llvm::AliasAnalysis AA;
llvm::AliasSetTracker X(AA);
X.add(nullptr, 0, llvm::AAMDNodes()); // for -print-alias-sets
(void) llvm::AreStatisticsEnabled();
(void) llvm::sys::RunningOnValgrind();

View File

@ -2270,7 +2270,7 @@ class TargetLowering : public TargetLoweringBase {
}
/// Return true if the MachineFunction contains a COPY which would imply
/// HasOpaqueSPAdjustment.
/// HasCopyImplyingStackAdjustment.
virtual bool hasCopyImplyingStackAdjustment(MachineFunction *MF) const {
return false;
}

View File

@ -634,7 +634,7 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
}
if (TLI->hasCopyImplyingStackAdjustment(MF))
MFI->setHasOpaqueSPAdjustment(true);
MFI->setHasCopyImplyingStackAdjustment(true);
// Freeze the set of reserved registers now that MachineFrameInfo has been
// set up. All the information required by getReservedRegs() should be

View File

@ -20,7 +20,7 @@ class AMDGPUInstrPrinter;
class AMDGPUSubtarget;
class AMDGPUTargetMachine;
class FunctionPass;
class MachineSchedContext;
struct MachineSchedContext;
class MCAsmInfo;
class raw_ostream;
class ScheduleDAGInstrs;

View File

@ -91,7 +91,8 @@ bool X86FrameLowering::hasFP(const MachineFunction &MF) const {
MFI->isFrameAddressTaken() || MFI->hasOpaqueSPAdjustment() ||
MF.getInfo<X86MachineFunctionInfo>()->getForceFramePointer() ||
MMI.callsUnwindInit() || MMI.hasEHFunclets() || MMI.callsEHReturn() ||
MFI->hasStackMap() || MFI->hasPatchPoint());
MFI->hasStackMap() || MFI->hasPatchPoint() ||
MFI->hasCopyImplyingStackAdjustment());
}
static unsigned getSUBriOpcode(unsigned IsLP64, int64_t Imm) {
@ -943,11 +944,11 @@ void X86FrameLowering::emitPrologue(MachineFunction &MF,
// push and pop from the stack.
if (Is64Bit && !Fn->hasFnAttribute(Attribute::NoRedZone) &&
!TRI->needsStackRealignment(MF) &&
!MFI->hasVarSizedObjects() && // No dynamic alloca.
!MFI->adjustsStack() && // No calls.
!IsWin64CC && // Win64 has no Red Zone
!MFI->hasOpaqueSPAdjustment() && // Don't push and pop.
!MF.shouldSplitStack()) { // Regular stack
!MFI->hasVarSizedObjects() && // No dynamic alloca.
!MFI->adjustsStack() && // No calls.
!IsWin64CC && // Win64 has no Red Zone
!MFI->hasCopyImplyingStackAdjustment() && // Don't push and pop.
!MF.shouldSplitStack()) { // Regular stack
uint64_t MinSize = X86FI->getCalleeSavedFrameSize();
if (HasFP) MinSize += SlotSize;
StackSize = std::max(MinSize, StackSize > 128 ? StackSize - 128 : 0);

View File

@ -17458,7 +17458,7 @@ static SDValue LowerINTRINSIC_W_CHAIN(SDValue Op, const X86Subtarget *Subtarget,
// We need a frame pointer because this will get lowered to a PUSH/POP
// sequence.
MachineFrameInfo *MFI = DAG.getMachineFunction().getFrameInfo();
MFI->setHasOpaqueSPAdjustment(true);
MFI->setHasCopyImplyingStackAdjustment(true);
// Don't do anything here, we will expand these intrinsics out later
// during ExpandISelPseudos in EmitInstrWithCustomInserter.
return SDValue();

View File

@ -0,0 +1,53 @@
; RUN: llc < %s | FileCheck %s
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
target triple = "i686-pc-windows-msvc18.0.0"
%struct.T = type { i64, [3 x i32] }
; Function Attrs: nounwind optsize
define void @f(i8* %p, i8* %q, i32* inalloca nocapture %unused) #0 {
entry:
%g = alloca %struct.T, align 8
%r = alloca i32, align 8
store i32 0, i32* %r, align 4
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %p, i8* %q, i32 24, i32 8, i1 false)
br label %while.body
while.body: ; preds = %while.body, %entry
%load = load i32, i32* %r, align 4
%dec = add nsw i32 %load, -1
store i32 %dec, i32* %r, align 4
call void @g(%struct.T* %g)
%tobool = icmp eq i32 %dec, 0
br i1 %tobool, label %while.end, label %while.body
while.end: ; preds = %while.body
ret void
}
; Function Attrs: argmemonly nounwind
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture readonly, i32, i32, i1) #1
declare void @g(%struct.T*)
; CHECK-LABEL: _f:
; CHECK: pushl %ebp
; CHECK: movl %esp, %ebp
; CHECK: andl $-8, %esp
; CHECK-NOT: movl %esp, %esi
; CHECK: rep;movsl
; CHECK: leal 8(%esp), %esi
; CHECK: decl (%esp)
; CHECK: seto %al
; CHECK: lahf
; CHECK: movl %eax, %edi
; CHECK: pushl %esi
; CHECK: calll _g
; CHECK: addl $4, %esp
; CHECK: movl %edi, %eax
; CHECK: addb $127, %al
; CHECK: sahf
attributes #0 = { nounwind optsize }
attributes #1 = { argmemonly nounwind }

View File

@ -159,6 +159,12 @@ while [ $# -gt 0 ]; do
shift
done
if [ "$use_autoconf" = "no" ]; then
# See llvm.org/PR26146.
echo Skipping test-suite when using CMake.
do_test_suite="no"
fi
# Check required arguments.
if [ -z "$Release" ]; then
echo "error: no release number specified"