Commit Graph

162130 Commits

Author SHA1 Message Date
Benjamin Kramer c8160d6523 MachineBlockPlacement: Strengthen the source order bias when picking an exit block.
We now only allow breaking source order if the exit block frequency is
significantly higher than the other exit block. The actual bias is
currently under a flag so the best cut-off can be found; the flag
defaults to the old behavior. The idea is to get some benchmark coverage
over different values for the flag and pick the best one.

When we require the new frequency to be at least 20% higher than the old
frequency I see a 5% speedup on zlib's deflate when compressing a random
file on x86_64/westmere. Hal reported a small speedup on Fhourstones on
a BG/Q and no regressions in the test suite.

The test case is the full long_match function from zlib's deflate. I was
reluctant to add it for previous tweaks to branch probabilities because
it's large and potentially fragile, but changed my mind since it's an
important use case and more likely to break with all the current work
going into the PGO infrastructure.

Differential Revision: http://llvm-reviews.chandlerc.com/D2202

llvm-svn: 195265
2013-11-20 19:08:44 +00:00
Fariborz Jahanian 91fb0be96a ObjectiveC ARC. Better checking of toll free briding
from qualified-id objects to CF types with 
objc_bridge annotation. // rdar://15454846

llvm-svn: 195264
2013-11-20 19:01:50 +00:00
David Blaikie beee345ab0 DwarfCompileUnit: Initialize DebugInfoOffset.
While not strictly necessary (the class has an invariant that
"setDebugInfoOffset" is called before "getDebugInfoOffset" - anyone
client that actually gets the default zero offset is buggy/broken) this
is consistent with the code as originally written and the removal of the
initialization was an accident in r195166.

Suggested by Manman Ren.

llvm-svn: 195263
2013-11-20 18:52:39 +00:00
David Blaikie bcb418e56f CR feedback for r195166: Add comments regarding type unit mapping and type units disabling cross-CU sharing.
Changes suggested by Manman Ren.

llvm-svn: 195262
2013-11-20 18:40:16 +00:00
Chandler Carruth c74010df48 Make the moved-from SmallPtrSet be a valid, empty, small-state object.
Enhance the tests to actually require moves in C++11 mode, in addition
to testing the moved-from state. Further enhance the tests to cover
copy-assignment into a moved-from object and moving a large-state
object. (Note that we can't really test small-state vs. large-state as
that isn't an observable property of the API really.) This should finish
addressing review on r195239.

llvm-svn: 195261
2013-11-20 18:29:56 +00:00
Chandler Carruth 6d888bc0da Add a test for assignment operator behavior which was changed in
r195239, as well as a comment about the fact that assigning over
a moved-from object was in fact tested. Addresses some of the review
feedback on r195239.

llvm-svn: 195260
2013-11-20 18:21:25 +00:00
Ted Kremenek cb42dbe7ad Refine 'deprecated' checking for Objective-C classes/methods.
- If a deprecated class refers to another deprecated class, do not warn.
- @implementations of a deprecated class can refer to other deprecated things.

Fixes <rdar://problem/15407366> and <rdar://problem/15466783>.

llvm-svn: 195259
2013-11-20 17:24:03 +00:00
Alexander Kornienko 3cfa973978 Added an option to allow short function bodies be placed on a single line.
Summary:
The AllowShortFunctionsOnASingleLine option now controls short function
body placement on a single line independent of the BreakBeforeBraces option.
Updated tests using BreakBeforeBraces other than BS_Attach.

Addresses http://llvm.org/PR17888

Reviewers: klimek, djasper

Reviewed By: klimek

CC: cfe-commits, klimek

Differential Revision: http://llvm-reviews.chandlerc.com/D2230

llvm-svn: 195256
2013-11-20 16:33:05 +00:00
Enea Zaffanella d8430928f1 When wrapping lazily generated builtins in an extern "C" context,
flag the LinkageSpecDecl as being implicitly generated too.

llvm-svn: 195255
2013-11-20 15:41:05 +00:00
Colin Riley 61979ccad6 Fix MSVC build
The demangler added in r193708 from cxa_demangle.cpp uses language features which are not supported by the latest visual studio. In order to preserve the msvc build, this patch restores the previous (non)functionality in windows under msvc by disabling the demangler. 

llvm-svn: 195254
2013-11-20 15:19:08 +00:00
Daniel Jasper 48437ce508 Simplify fix proposed in r195240.
llvm-svn: 195253
2013-11-20 14:54:39 +00:00
Daniel Sanders f93e8152c4 [mips][msa] Pseudo instructions require HasMSA too. Inherit from MSAPseudo instead of MipsPseudo
There's no test case for this commit. This is because it is doubtful that the
incorrect behaviour can actually trigger. When MSA is not enabled, the type
legalizer should have eliminated all occurrences of patterns the affected
pseudo-instruction could possibly match before instruction selection occurs.

llvm-svn: 195252
2013-11-20 14:32:28 +00:00
Alexander Kornienko 7c9c050769 Support for JavaScript === and !== operators.
Reviewers: klimek, djasper

Reviewed By: klimek

CC: cfe-commits, klimek

Differential Revision: http://llvm-reviews.chandlerc.com/D2231

llvm-svn: 195251
2013-11-20 14:30:26 +00:00
Evgeniy Stepanov 3e29c6bf22 [asan] Fix OSX tests.
llvm-svn: 195250
2013-11-20 14:21:56 +00:00
Simon Atanasyan 5c5b5daab2 [Mips] Take in account the -mfp64 command line option when build paths
to the crt*.o files, libraries and headers for the MIPS FSFS toolchain.

llvm-svn: 195249
2013-11-20 13:53:20 +00:00
Daniel Sanders 43b5f572fa FileCheck: fix a bug with multiple --check-prefix options. Similar to r194565
Summary:
Directives are being ignored, when they occur between a partial-word false
match and any match on another prefix.

For example, with FOO and BAR prefixes:
   _FOO
   FOO: foo
   BAR: bar
FileCheck incorrectly matches:
   fog
   bar

This happens because FOO falsely matched as a partial word at '_FOO' and was
ignored while BAR matched at 'BAR:'. The match of BAR is incorrectly returned
as the 'first match' causing the FOO directive to be discarded.

Fixed this the same way as r194565 (D2166) did for a similar test case.
The partial-word false match should be counted as a match for the purposes of
finding the first match of a prefix, but should be returned as a false match
using CheckTy::CheckNone so that it isn't treated as a directive.

Fixes PR17995

Reviewers: samsonov, arsenm

Reviewed By: samsonov

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2228

llvm-svn: 195248
2013-11-20 13:25:05 +00:00
NAKAMURA Takumi a5997c4e4a llvm/CMakeLists.txt: Update LLVM_VERSION_MINOR to 5.
llvm-svn: 195247
2013-11-20 13:11:48 +00:00
Evgeniy Stepanov 0958ecca7e [msan] Tweak io_submit syscall hook.
llvm-svn: 195246
2013-11-20 13:04:23 +00:00
Daniel Sanders 6b97d604ff [mips][msa] Remove unused instruction class MSA_I8_X_DESC_BASE
llvm-svn: 195245
2013-11-20 13:01:10 +00:00
Evgeniy Stepanov 584fd96e9e [msan] Unpoison memory that is returned to the OS and flush its shadow.
llvm-svn: 195244
2013-11-20 12:51:14 +00:00
Evgeniy Stepanov 115ef14548 [asan] Test that LargeAllocator unpoisons memory before releasing it to the OS.
llvm-svn: 195243
2013-11-20 12:49:53 +00:00
Colin Riley 4442546be9 Test commit. Capitalize 'os'.
llvm-svn: 195242
2013-11-20 12:35:52 +00:00
Chandler Carruth c0bfa8c231 [PM] Add the preservation system to the new pass manager.
This adds a new set-like type which represents a set of preserved
analysis passes. The set is managed via the opaque PassT::ID() void*s.
The expected convenience templates for interacting with specific passes
are provided. It also supports a symbolic "all" state which is
represented by an invalid pointer in the set. This state is nicely
saturating as it comes up often. Finally, it supports intersection which
is used when finding the set of preserved passes after N different
transforms.

The pass API is then changed to return the preserved set rather than
a bool. This is much more self-documenting than the previous system.
Returning "none" is a conservatively correct solution just like
returning "true" from todays passes and not marking any passes as
preserved. Passes can also be dynamically preserved or not throughout
the run of the pass, and whatever gets returned is the binding state.
Finally, preserving "all" the passes is allowed for no-op transforms
that simply can't harm such things.

Finally, the analysis managers are changed to instead of blindly
invalidating all of the analyses, invalidate those which were not
preserved. This should rig up all of the basic preservation
functionality. This also correctly combines the preservation moving up
from one IR-layer to the another and the preservation aggregation across
N pass runs. Still to go is incrementally correct invalidation and
preservation across IR layers incrementally during N pass runs. That
will wait until we have a device for even exposing analyses across IR
layers.

While the core of this change is obvious, I'm not happy with the current
testing, so will improve it to cover at least some of the invalidation
that I can test easily in a subsequent commit.

llvm-svn: 195241
2013-11-20 11:31:50 +00:00
Manuel Klimek 06c84f2e07 Fix bug where optimization would lead to strange line breaks.
Before:
  void f() {
    CHECK_EQ(aaaa, (
                       *bbbbbbbbb)->cccccc)
        << "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq";
  }

After:
  void f() {
    CHECK_EQ(aaaa, (*bbbbbbbbb)->cccccc)
        << "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq";
  }

llvm-svn: 195240
2013-11-20 11:20:32 +00:00
Chandler Carruth 55758e9691 Give SmallPtrSet move semantics when we have R-value references.
Somehow, this ADT got missed which is moderately terrifying considering
the efficiency of move for it.

The code to implement move semantics for it is pretty horrible
currently but was written to reasonably closely match the rest of the
code. Unittests that cover both copying and moving (at a basic level)
added.

llvm-svn: 195239
2013-11-20 11:14:33 +00:00
NAKAMURA Takumi 3dedf827f8 X86ISelLowering.cpp: Mark a variable VT as LLVM_ATTRIBUTE_UNUSED. [-Wunused-variable]
llvm-svn: 195238
2013-11-20 10:55:22 +00:00
NAKAMURA Takumi f2392ebb94 Whitespace.
llvm-svn: 195237
2013-11-20 10:55:15 +00:00
Bill Wendling 0a794a4b78 Update to next release numbers.
llvm-svn: 195236
2013-11-20 10:13:37 +00:00
Bill Wendling 70d39e6fa3 Update to reflect the next release.
llvm-svn: 195235
2013-11-20 10:10:50 +00:00
Elena Demikhovsky a5967af97d Fixed compilation error.
llvm-svn: 195230
2013-11-20 09:23:22 +00:00
Elena Demikhovsky e1f9bf054f AVX-512: Concat 4 128-bit vectors in one 512-bit vector.
llvm-svn: 195229
2013-11-20 09:10:40 +00:00
Duncan P. N. Exon Smith 2f234f4908 Fixing ordering of definition of IOSSIM_SDK_PATH
llvm-svn: 195216
2013-11-20 05:36:52 +00:00
Bill Wendling d607384d88 Add -triple option.
The -triple option is used to create a named tarball of the release binaries.

Also disable the RPATH modifications on Mac OS X. It's not needed.

llvm-svn: 195193
2013-11-20 04:55:20 +00:00
Chandler Carruth d895e29e88 [PM] Make the function pass manager more regular.
The FunctionPassManager is now itself a function pass. When run over
a function, it runs all N of its passes over that function. This is the
1:N mapping in the pass dimension only. This allows it to be used in
either a ModulePassManager or potentially some other manager that
works on IR units which are supersets of Functions.

This commit also adds the obvious adaptor to map from a module pass to
a function pass, running the function pass across every function in the
module.

The test has been updated to use this new pattern.

llvm-svn: 195192
2013-11-20 04:39:16 +00:00
Yuchen Wu babe749125 llvm-cov: Added file checksum to gcno and gcda files.
Instead of permanently outputting "MVLL" as the file checksum, clang
will create gcno and gcda checksums by hashing the destination block
numbers of every arc. This allows for llvm-cov to check if the two gcov
files are synchronized.

Regenerated the test files so they contain the checksum. Also added
negative test to ensure error when the checksums don't match.

llvm-svn: 195191
2013-11-20 04:15:05 +00:00
Yuchen Wu ea7611c53c compiler-rt: Support for file checksum in GCDAProfiling.cpp.
Takes file checksum as an argument to write to .gcda file.

llvm-svn: 195190
2013-11-20 04:14:48 +00:00
Chandler Carruth ed1ffe0197 [PM] Split the analysis manager into a function-specific interface and
a module-specific interface. This is the first of many steps necessary
to generalize the infrastructure such that we can support both
a Module-to-Function and Module-to-SCC-to-Function pass manager
nestings.

After a *lot* of attempts that never worked and didn't even make it to
a committable state, it became clear that I had gotten the layering
design of analyses flat out wrong. Four days later, I think I have most
of the plan for how to correct this, and I'm starting to reshape the
code into it. This is just a baby step I'm afraid, but starts separating
the fundamentally distinct concepts of function analysis passes and
module analysis passes so that in subsequent steps we can effectively
layer them, and have a consistent design for the eventual SCC layer.

As part of this, I've started some interface changes to make passes more
regular. The module pass accepts the module in the run method, and some
of the constructor parameters are gone. I'm still working out exactly
where constructor parameters vs. method parameters will be used, so
I expect this to fluctuate a bit.

This actually makes the invalidation less "correct" at this phase,
because now function passes don't invalidate module analysis passes, but
that was actually somewhat of a misfeature. It will return in a better
factored form which can scale to other units of IR. The documentation
has gotten less verbose and helpful.

llvm-svn: 195189
2013-11-20 04:01:38 +00:00
Aaron Ballman dbb634f882 Removing a custom error diagnostic and replacing it with a stock one. Added a test case to ensure the diagnostic was firing properly.
llvm-svn: 195188
2013-11-20 01:35:23 +00:00
Dmitri Gribenko 1a1d30d43b Comment parsing tests: introduce a little more structure in testcase
llvm-svn: 195187
2013-11-20 01:23:26 +00:00
Aaron Ballman 693c15b103 Ensuring the warning for attribute decl types matches the error for attribute decl types.
llvm-svn: 195186
2013-11-20 01:14:35 +00:00
Hal Finkel 22498fa6e3 PPC: Optimize rldicl generation for masked shifts
Masking operations (where only some number of the low bits are being kept) are
selected to rldicl(x, 0, mb). If x is a logical right shift (which would become
rldicl(y, 64-n, n)), we might be able to fold the two instructions together:

  rldicl(rldicl(x, 64-n, n), 0, mb) -> rldicl(x, 64-n, mb) for n <= mb

The right shift is really a left rotate followed by a mask, and if the explicit
mask is a more-restrictive sub-mask of the mask implied by the shift, only one
rldicl is needed.

llvm-svn: 195185
2013-11-20 01:10:15 +00:00
Dmitri Gribenko 8af68f9bdf Revert r195176, it is breaking buildbots for unclear reason
llvm-svn: 195184
2013-11-20 00:59:02 +00:00
Eric Christopher 3262a11680 Remove polymorphic destruction for DIE. DIEBlocks are owned elsewhere
and not polymorphically deleted and they are the only thing that derive
from DIE.

llvm-svn: 195183
2013-11-20 00:54:31 +00:00
Eric Christopher b7dee8a606 Remove capability for polymorphic destruction from LexicalScope
and LexicalScopes, we're not using it.

llvm-svn: 195182
2013-11-20 00:54:28 +00:00
Eric Christopher 9d7d5da6a1 Grammar.
llvm-svn: 195181
2013-11-20 00:54:25 +00:00
Eric Christopher 6211e4b995 Formatting, 80-col, trailing whitespace.
llvm-svn: 195180
2013-11-20 00:54:19 +00:00
Jack Carter d4b22dcbf3 long line correction
llvm-svn: 195179
2013-11-20 00:32:32 +00:00
Fariborz Jahanian 92ab2985da ObjectiveC ARC. validate toll free bridge casting
to or from 'id' and qualified-id types.
// rdar://15454846

llvm-svn: 195178
2013-11-20 00:32:12 +00:00
Jason Molenda 4ff132610a Flush the Process' cache of extended threads every time the
natural stop id is updated.
<rdar://problem/15496603> 

llvm-svn: 195177
2013-11-20 00:31:38 +00:00
Dmitri Gribenko 0ae51cb4ff Comment parsing tests: introduce a little more structure in testcase
llvm-svn: 195176
2013-11-20 00:15:58 +00:00