aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/LLVMContextImpl.cpp
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2014-05-06 19:14:00 +0000
committerDiego Novillo <dnovillo@google.com>2014-05-06 19:14:00 +0000
commitdd49157db138ac04dea1c3fc65d75ac4d43f18da (patch)
treed734e467241ee99bbda520028bace93d6fad7381 /llvm/lib/IR/LLVMContextImpl.cpp
parentaa30ccffa8b3dc79feebea1d93b8e60a14b43f10 (diff)
downloadllvm-dd49157db138ac04dea1c3fc65d75ac4d43f18da.zip
llvm-dd49157db138ac04dea1c3fc65d75ac4d43f18da.tar.gz
llvm-dd49157db138ac04dea1c3fc65d75ac4d43f18da.tar.bz2
Do not make -pass-remarks additive.
Summary: When I initially introduced -pass-remarks, I thought it would be a neat idea to make it additive. So, if one used it as: $ llc -pass-remarks=inliner --pass-remarks=loop.* the compiler would build the regular expression '(inliner)|(loop.*)'. The more I think about it, the more I regret it. This is not how other flags work. The standard semantics are right-to-left overrides. This is how clang interprets -Rpass. And I think the two should be compatible in this respect. Reviewers: qcolombet Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D3614 llvm-svn: 208122
Diffstat (limited to 'llvm/lib/IR/LLVMContextImpl.cpp')
-rw-r--r--llvm/lib/IR/LLVMContextImpl.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/llvm/lib/IR/LLVMContextImpl.cpp b/llvm/lib/IR/LLVMContextImpl.cpp
index 50740a0..2bccd2a 100644
--- a/llvm/lib/IR/LLVMContextImpl.cpp
+++ b/llvm/lib/IR/LLVMContextImpl.cpp
@@ -73,22 +73,12 @@ namespace {
/// LLVMContext::emitOptimizationRemark.
static Regex *OptimizationRemarkPattern = nullptr;
-/// \brief String to hold all the values passed via -pass-remarks. Every
-/// instance of -pass-remarks on the command line will be concatenated
-/// to this string. Values are stored inside braces and concatenated with
-/// the '|' operator. This implements the expected semantics that multiple
-/// -pass-remarks are additive.
-static std::string OptimizationRemarkExpr;
-
struct PassRemarksOpt {
void operator=(const std::string &Val) const {
// Create a regexp object to match pass names for emitOptimizationRemark.
if (!Val.empty()) {
- if (!OptimizationRemarkExpr.empty())
- OptimizationRemarkExpr += "|";
- OptimizationRemarkExpr += "(" + Val + ")";
delete OptimizationRemarkPattern;
- OptimizationRemarkPattern = new Regex(OptimizationRemarkExpr);
+ OptimizationRemarkPattern = new Regex(Val);
std::string RegexError;
if (!OptimizationRemarkPattern->isValid(RegexError))
report_fatal_error("Invalid regular expression '" + Val +