Compare commits

...

7 Commits

Author SHA1 Message Date
Hans Wennborg
ed7ec907af ReleaseNotes: fix indent
llvm-svn: 297204
2017-03-07 20:44:17 +00:00
Hans Wennborg
62364efb42 ReleaseNotes: fix the VS version; follow-up to r297097
llvm-svn: 297203
2017-03-07 20:43:19 +00:00
Hans Wennborg
ab7cbc9afc Merging r297075:
------------------------------------------------------------------------
r297075 | hans | 2017-03-06 13:10:40 -0800 (Mon, 06 Mar 2017) | 1 line

Disable gvn-hoist (PR32153)
------------------------------------------------------------------------

llvm-svn: 297165
2017-03-07 17:36:53 +00:00
Hans Wennborg
d251e94e80 Merging r296992:
------------------------------------------------------------------------
r296992 | sanjoy | 2017-03-05 15:49:17 -0800 (Sun, 05 Mar 2017) | 7 lines

[SCEV] Decrease the recursion threshold for CompareValueComplexity

Fixes PR32142.

r287232 accidentally increased the recursion threshold for
CompareValueComplexity from 2 to 32.  This change reverses that change
by introducing a separate flag for CompareValueComplexity's threshold.
------------------------------------------------------------------------

llvm-svn: 297164
2017-03-07 17:33:14 +00:00
Hans Wennborg
ed6aea839d ReleaseNotes: reformulate compiler version change text
llvm-svn: 297097
2017-03-06 23:43:34 +00:00
Renato Golin
2c879f4060 [notes] adding vulcan rename to release notes
llvm-svn: 297090
2017-03-06 22:56:55 +00:00
Eric Fiselier
d07c41fa3e Update ABI lists and changelog for final 4.0 release
llvm-svn: 296804
2017-03-02 19:56:59 +00:00
10 changed files with 6248 additions and 1926 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -47,7 +47,7 @@ Version 4.0
Symbol added: _ZTSSt18bad_variant_access
Symbol added: _ZNKSt18bad_variant_access4whatEv
* rTBD - Remove std::string::append template methods which should be inline
* r285537 - Remove std::string::append template methods which should be inline
These functions should never have had visible definitions in the dylib but
since they were previously not specified with 'inline' they accidentally
@@ -133,3 +133,5 @@ Version 4.0
Symbol added: _ZTISt12bad_any_cast
Symbol added: _ZTSSt12bad_any_cast
Symbol added: _ZTVSt12bad_any_cast

View File

@@ -12,6 +12,7 @@
{'type': 'I', 'is_defined': True, 'name': '__ZNKSt16bad_array_length4whatEv'}
{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt16nested_exception14rethrow_nestedEv'}
{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt18bad_variant_access4whatEv'}
{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt19bad_optional_access4whatEv'}
{'type': 'U', 'is_defined': False, 'name': '__ZNKSt20bad_array_new_length4whatEv'}
{'type': 'I', 'is_defined': True, 'name': '__ZNKSt20bad_array_new_length4whatEv'}
{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__110__time_put8__do_putEPcRS1_PK2tmcc'}

File diff suppressed because it is too large Load Diff

View File

@@ -30,7 +30,8 @@ from now, will be version 5.0.0.
Non-comprehensive list of changes in this release
=================================================
* Minimum compiler version to build has been raised to GCC 4.8 and VS 2015.
* The minimum compiler version required for building LLVM has been raised to
4.8 for GCC and 2015 for Visual Studio.
* The C API functions ``LLVMAddFunctionAttr``, ``LLVMGetFunctionAttr``,
``LLVMRemoveFunctionAttr``, ``LLVMAddAttribute``, ``LLVMRemoveAttribute``,
@@ -56,15 +57,8 @@ Non-comprehensive list of changes in this release
with LLVM option ``-adce-remove-loops`` when the loop body otherwise has
no live operations.
* The GVNHoist pass is now enabled by default. The new pass based on Global
Value Numbering detects similar computations in branch code and replaces
multiple instances of the same computation with a unique expression. The
transform benefits code size and generates better schedules. GVNHoist is
more aggressive at ``-Os`` and ``-Oz``, hoisting more expressions at the
expense of execution time degradations.
* The llvm-cov tool can now export coverage data as json. Its html output mode
has also improved.
* The llvm-cov tool can now export coverage data as json. Its html output mode
has also improved.
Improvements to ThinLTO (-flto=thin)
------------------------------------
@@ -225,6 +219,10 @@ Changes to the ARM Targets
A lot of work has also been done in LLD for ARM, which now supports more
relocations and TLS.
Note: From the next release (5.0), the "vulcan" target will be renamed to
"thunderx2t99", including command line options, assembly directives, etc. This
release (4.0) will be the last one to accept "vulcan" as its name.
Changes to the AVR Target
-----------------------------

View File

@@ -127,10 +127,15 @@ static cl::opt<unsigned> MulOpsInlineThreshold(
cl::desc("Threshold for inlining multiplication operands into a SCEV"),
cl::init(1000));
static cl::opt<unsigned>
MaxCompareDepth("scalar-evolution-max-compare-depth", cl::Hidden,
cl::desc("Maximum depth of recursive compare complexity"),
cl::init(32));
static cl::opt<unsigned> MaxSCEVCompareDepth(
"scalar-evolution-max-scev-compare-depth", cl::Hidden,
cl::desc("Maximum depth of recursive SCEV complexity comparisons"),
cl::init(32));
static cl::opt<unsigned> MaxValueCompareDepth(
"scalar-evolution-max-value-compare-depth", cl::Hidden,
cl::desc("Maximum depth of recursive value complexity comparisons"),
cl::init(2));
//===----------------------------------------------------------------------===//
// SCEV class definitions
@@ -481,7 +486,7 @@ static int
CompareValueComplexity(SmallSet<std::pair<Value *, Value *>, 8> &EqCache,
const LoopInfo *const LI, Value *LV, Value *RV,
unsigned Depth) {
if (Depth > MaxCompareDepth || EqCache.count({LV, RV}))
if (Depth > MaxValueCompareDepth || EqCache.count({LV, RV}))
return 0;
// Order pointer values after integer values. This helps SCEVExpander form
@@ -568,7 +573,7 @@ static int CompareSCEVComplexity(
if (LType != RType)
return (int)LType - (int)RType;
if (Depth > MaxCompareDepth || EqCacheSCEV.count({LHS, RHS}))
if (Depth > MaxSCEVCompareDepth || EqCacheSCEV.count({LHS, RHS}))
return 0;
// Aside from the getSCEVType() ordering, the particular ordering
// isn't very important except that it's beneficial to be consistent,

View File

@@ -141,8 +141,8 @@ static cl::opt<int> PreInlineThreshold(
"(default = 75)"));
static cl::opt<bool> EnableGVNHoist(
"enable-gvn-hoist", cl::init(true), cl::Hidden,
cl::desc("Enable the GVN hoisting pass (default = on)"));
"enable-gvn-hoist", cl::init(false), cl::Hidden,
cl::desc("Enable the GVN hoisting pass"));
static cl::opt<bool>
DisableLibCallsShrinkWrap("disable-libcalls-shrinkwrap", cl::init(false),

View File

@@ -41,7 +41,6 @@ attributes #0 = { optnone noinline }
; OPT-O1-DAG: Skipping pass 'Combine redundant instructions'
; OPT-O1-DAG: Skipping pass 'Dead Store Elimination'
; OPT-O1-DAG: Skipping pass 'Early CSE'
; OPT-O1-DAG: Skipping pass 'Early GVN Hoisting of Expressions'
; OPT-O1-DAG: Skipping pass 'Jump Threading'
; OPT-O1-DAG: Skipping pass 'MemCpy Optimization'
; OPT-O1-DAG: Skipping pass 'Reassociate expressions'

View File

@@ -465,7 +465,7 @@ TEST_F(ScalarEvolutionsTest, CommutativeExprOperandOrder) {
});
}
TEST_F(ScalarEvolutionsTest, SCEVCompareComplexity) {
TEST_F(ScalarEvolutionsTest, CompareSCEVComplexity) {
FunctionType *FTy =
FunctionType::get(Type::getVoidTy(Context), std::vector<Type *>(), false);
Function *F = cast<Function>(M.getOrInsertFunction("f", FTy));
@@ -532,5 +532,41 @@ TEST_F(ScalarEvolutionsTest, SCEVCompareComplexity) {
EXPECT_NE(nullptr, SE.getSCEV(Acc[0]));
}
TEST_F(ScalarEvolutionsTest, CompareValueComplexity) {
IntegerType *IntPtrTy = M.getDataLayout().getIntPtrType(Context);
PointerType *IntPtrPtrTy = IntPtrTy->getPointerTo();
FunctionType *FTy =
FunctionType::get(Type::getVoidTy(Context), {IntPtrTy, IntPtrTy}, false);
Function *F = cast<Function>(M.getOrInsertFunction("f", FTy));
BasicBlock *EntryBB = BasicBlock::Create(Context, "entry", F);
Value *X = &*F->arg_begin();
Value *Y = &*std::next(F->arg_begin());
const int ValueDepth = 10;
for (int i = 0; i < ValueDepth; i++) {
X = new LoadInst(new IntToPtrInst(X, IntPtrPtrTy, "", EntryBB), "",
/*isVolatile*/ false, EntryBB);
Y = new LoadInst(new IntToPtrInst(Y, IntPtrPtrTy, "", EntryBB), "",
/*isVolatile*/ false, EntryBB);
}
auto *MulA = BinaryOperator::CreateMul(X, Y, "", EntryBB);
auto *MulB = BinaryOperator::CreateMul(Y, X, "", EntryBB);
ReturnInst::Create(Context, nullptr, EntryBB);
// This test isn't checking for correctness. Today making A and B resolve to
// the same SCEV would require deeper searching in CompareValueComplexity,
// which will slow down compilation. However, this test can fail (with LLVM's
// behavior still being correct) if we ever have a smarter
// CompareValueComplexity that is both fast and more accurate.
ScalarEvolution SE = buildSE(*F);
auto *A = SE.getSCEV(MulA);
auto *B = SE.getSCEV(MulB);
EXPECT_NE(A, B);
}
} // end anonymous namespace
} // end namespace llvm