Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
7fcacffc
Commit
7fcacffc
authored
Nov 30, 2015
by
Marius Wachtler
Committed by
Dean Moldovan
Nov 30, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #1016 by backporting llvm r236316
parent
b33228cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
0 deletions
+67
-0
llvm_patches/0012-Remove-move-warning.patch
llvm_patches/0012-Remove-move-warning.patch
+65
-0
tools/git_svn_gotorev.py
tools/git_svn_gotorev.py
+2
-0
No files found.
llvm_patches/0012-Remove-move-warning.patch
0 → 100644
View file @
7fcacffc
From fda9fd463dae38840cc02c5ae668cb1097395b9a Mon Sep 17 00:00:00 2001
From: Benjamin Kramer <benny.kra@googlemail.com>
Date: Fri, 1 May 2015 15:16:11 +0000
Subject: [PATCH] Remove std::move on return when it could prevent copy
elision.
Found by -Wpessimizing-move, no functional change. The APFloat and
PassManager change doesn't affect codegen as returning a by-value
argument will always result in a move.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236316 91177308-0d34-0410-b5e6-96231b3b80d8
---
include/llvm/ADT/APFloat.h | 2 +-
include/llvm/IR/PassManager.h | 4 ++--
utils/yaml-bench/YAMLBench.cpp | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/llvm/ADT/APFloat.h b/include/llvm/ADT/APFloat.h
index 53b53c5..958e3fd 100644
--- a/include/llvm/ADT/APFloat.h
+++ b/include/llvm/ADT/APFloat.h
@@ -343,7 +343,7 @@
class APFloat {
/// copied from some other APFloat.
static APFloat copySign(APFloat Value, const APFloat &Sign) {
Value.copySign(Sign);
- return std::move(Value);
+ return Value;
}
/// @}
diff --git a/include/llvm/IR/PassManager.h b/include/llvm/IR/PassManager.h
index 3c24e72..b566f01 100644
--- a/include/llvm/IR/PassManager.h
+++ b/include/llvm/IR/PassManager.h
@@ -509,7 +509,7 @@
class AnalysisManager
PreservedAnalyses invalidateImpl(IRUnitT &IR, PreservedAnalyses PA) {
// Short circuit for a common case of all analyses being preserved.
if (PA.areAllPreserved())
- return std::move(PA);
+ return PA;
if (DebugLogging)
dbgs() << "Invalidating all non-preserved analyses for: "
@@ -549,7 +549,7 @@
class AnalysisManager
if (ResultsList.empty())
AnalysisResultLists.erase(&IR);
- return std::move(PA);
+ return PA;
}
/// \brief List of function analysis pass IDs and associated concept pointers.
diff --git a/utils/yaml-bench/YAMLBench.cpp b/utils/yaml-bench/YAMLBench.cpp
index 872f586..0fb3138 100644
--- a/utils/yaml-bench/YAMLBench.cpp
+++ b/utils/yaml-bench/YAMLBench.cpp
@@ -69,7 +69,7 @@
static std::string prettyTag(yaml::Node *N) {
if (StringRef(Tag).startswith("tag:yaml.org,2002:")) {
std::string Ret = "!!";
Ret += StringRef(Tag).substr(18);
- return std::move(Ret);
+ return Ret;
}
std::string Ret = "!<";
Ret += Tag;
tools/git_svn_gotorev.py
View file @
7fcacffc
...
...
@@ -92,6 +92,8 @@ if __name__ == "__main__":
continue
if
"Expose-getSymbolLoadAddress"
in
patch_fn
and
svn_rev
<=
222840
:
continue
if
"Remove-move-warning"
in
patch_fn
and
svn_rev
>=
236316
:
continue
patch_fn
=
os
.
path
.
abspath
(
os
.
path
.
join
(
patch_dir
,
patch_fn
))
code
=
subprocess
.
call
([
"git"
,
"am"
,
patch_fn
],
cwd
=
repo
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment