Commit Graph

147651 Commits

Author SHA1 Message Date
Jordan Rose 2820e3dfca [analyzer] Be lazy about struct/array global invalidation too.
Structs and arrays can take advantage of the single top-level global
symbol optimization (described in the previous commit) just as well
as scalars.

No intended behavioral change.

llvm-svn: 179555
2013-04-15 20:39:48 +00:00
Jordan Rose fa80736bca [analyzer] Re-enable using global regions as a symbolic base.
Now that we're invalidating global regions properly, we want to continue
taking advantage of a particular optimization: if all global regions are
invalidated together, we can represent the bindings of each region with
a "derived region value" symbol. Essentially, this lazily links each
global region with a single symbol created at invalidation time, rather
than binding each region with a new symbolic value.

We used to do this, but haven't been for a while; the previous commit
re-enabled this code path, and this handles the fallout.

<rdar://problem/13464044>

llvm-svn: 179554
2013-04-15 20:39:45 +00:00
Jordan Rose 577749a337 [analyzer] Properly invalidate global regions on opaque function calls.
This fixes a regression where a call to a function we can't reason about
would not actually invalidate global regions that had explicit bindings.

  void test_that_now_works() {
    globalInt = 42;
    clang_analyzer_eval(globalInt == 42); // expected-warning{{TRUE}}

    invalidateGlobals();
    clang_analyzer_eval(globalInt == 42); // expected-warning{{UNKNOWN}}
  }

This has probably been around since the initial "cluster" refactoring of
RegionStore, if not longer.

<rdar://problem/13464044>

llvm-svn: 179553
2013-04-15 20:39:41 +00:00
Jordan Rose d02adbf03c [analyzer] Tests: move system functions into system header simulator files.
Some checkers ascribe different behavior to functions declared in system
headers, so when working with standard library functions it's probably best
to always have them in a standard location.

Test change only (no functionality change), but necessary for the next commit.

llvm-svn: 179552
2013-04-15 20:39:37 +00:00
Rafael Espindola 6e221097ea Fix silly typo that broke big endian hosts.
llvm-svn: 179551
2013-04-15 20:13:59 +00:00
Enrico Granata b349efe6dd Enabling test case to write the average+stddev pair to the results
The sketch test case writes avg+stddev for all its metrics:
	<key>fetch-frames</key>
	<dict>
		<key>description</key>
		<string>time to dump backtrace for every frame in every thread</string>
		<key>stddev</key>
		<real>0.006270938361432314</real>
		<key>value</key>
		<real>0.011568079851851851</real>
	</dict>

llvm-svn: 179550
2013-04-15 19:57:32 +00:00
Rafael Espindola a652799f70 Fix endianness on some MSVC versions.
Looks like it was evaluating undef == undef to true.

llvm-svn: 179549
2013-04-15 19:28:45 +00:00
Enrico Granata a571e21c4e - Adding a relaunch feature to the performance tester: you can use the relaunch if you want to measure multiple runs of your app keeping the same metrics alive. New arguments must be supplied - and the step counter will not be reset (this makes it easy to avoid endless loops)
- Having the Sketch test case relaunch itself

llvm-svn: 179548
2013-04-15 19:07:38 +00:00
Argyrios Kyrtzidis fe7a59d9c2 Revert "Speed-up ObjCMethodDecl::getOverriddenMethods()."
This reverts commit r179436.

Due to caching, it was possible that we could miss overridden methods that
were introduced by categories later on.

Along with reverting the commit I also included a test case that would have caught this.

llvm-svn: 179547
2013-04-15 18:47:22 +00:00
Tom Stellard cb97e3acfa R600/SI: Emit config values in register value pairs.
Instead of emitting config values in a predefined order, the code
emitter will now emit a 32-bit register index followed by the 32-bit
config value.

llvm-svn: 179546
2013-04-15 17:51:35 +00:00
Tom Stellard 3a7beafb32 R600/SI: Emit configuration value in the .AMDGPU.config ELF section
llvm-svn: 179545
2013-04-15 17:51:30 +00:00
Tom Stellard 9991659fab R600: Emit ELF formatted code rather than raw ISA.
llvm-svn: 179544
2013-04-15 17:51:21 +00:00
Sean Callanan 87223541ce Removed a duplicate copy of the contents of
Materializer.h that somehow crept in, maybe
during a patch operation.

llvm-svn: 179543
2013-04-15 17:44:44 +00:00
Jim Grosbach 0f38c1e3a7 Fix a typo in comment.
llvm-svn: 179542
2013-04-15 17:40:48 +00:00
Jim Grosbach 2783ca4fb7 Simplify the MCInst operator iterator declaration.
llvm-svn: 179541
2013-04-15 17:40:45 +00:00
John Criswell 02fc72d47a Grammar and punctuation fixes.
No content changes.

llvm-svn: 179540
2013-04-15 17:38:06 +00:00
Sean Callanan b024d87822 Audited the existing Materializer code to ensure
that it works in the absence of a process.  Codepaths
in the Materializer now use the best execution context
scope available to them.

llvm-svn: 179539
2013-04-15 17:12:47 +00:00
Rafael Espindola 05976798dc Remove XFAIL now that the test is standalone.
llvm-svn: 179538
2013-04-15 17:06:15 +00:00
Argyrios Kyrtzidis 7134bb4531 [PCH/test] Make test/PCH/cxx-typeid.cpp self-contained by including the relevant standard library declarations
instead of depending on a system header inclusion.

llvm-svn: 179537
2013-04-15 16:52:57 +00:00
Rafael Espindola 732dc415fb Try to fix the mingw builds.
llvm-svn: 179536
2013-04-15 16:46:43 +00:00
Arnold Schwaighofer 0b06796ee8 Fix bit size of v64i8 and v32i16 vector types.
Patch by Cameron McInally <cameron.mcinally@nyu.edu>.

llvm-svn: 179535
2013-04-15 16:11:25 +00:00
Rafael Espindola 2fa9f53c62 Remove getters now that we can specialize structs on the host endianness.
llvm-svn: 179534
2013-04-15 16:08:02 +00:00
Tim Northover 943e9293b3 Avoid outputting temporary test file into source tree.
llvm-svn: 179532
2013-04-15 15:49:13 +00:00
Alexander Kornienko c3c8affc06 Fix unused variable warning with assertions disabled.
llvm-svn: 179531
2013-04-15 15:47:34 +00:00
Rafael Espindola 16b0cc39bf Remove unused function.
llvm-svn: 179530
2013-04-15 15:13:10 +00:00
Rafael Espindola 3f532c5c38 Use llvm::sys::IsBigEndianHost.
llvm-svn: 179529
2013-04-15 15:10:35 +00:00
Edwin Vane 83a38b5c15 Adding support for -include/-exclude to cpp11-migrate
This commit adds initial support for the -include/-exclude options which are
both currently marked as hidden. This support is the first step toward
supporting transformations in headers included from source files.

Added unittests to test include/exclude support.

Author: Jack Yang <jack.yang@intel.com>
llvm-svn: 179528
2013-04-15 14:50:35 +00:00
Rafael Espindola 41cb64f4fa Make the host endianness check an integer constant expression.
I will remove the isBigEndianHost function once I update clang.

The ifdef logic is designed to
* not use configure/cmake to avoid breaking -arch i686 -arch ppc.
* default to little endian
* be as small as possible

It looks like sys/endian.h is the preferred header on most modern BSD systems,
but it is better to change this in a followup patch as machine/endian.h is
available on FreeBSD, OpenBSD, NetBSD and OS X.

llvm-svn: 179527
2013-04-15 14:44:24 +00:00
Alexander Kornienko cb45bc1861 Unified token breaking logic for strings and block comments.
Summary:
Both strings and block comments are broken into lines in
breakProtrudingToken. Logic specific for strings or block comments is abstracted
in implementations of the BreakToken interface. Among other goodness, this
change fixes placement of backslashes after a block comment inside a
preprocessor directive (see removed FIXMEs in unit tests).

The code is far from being polished, and some parts of it will be changed for
line comments support.

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits

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

llvm-svn: 179526
2013-04-15 14:28:00 +00:00
Timur Iskhodzhanov 088b603989 Add a missing space
llvm-svn: 179525
2013-04-15 14:16:31 +00:00
Evgeniy Stepanov b0d786798c [msan] Fix sigaction test.
Restore SIGPROF handler to the original state after the test.

llvm-svn: 179524
2013-04-15 13:35:05 +00:00
Rafael Espindola 5bddd6a92a Remove hasExternalLinkageUncached.
It was being used correctly, but it is a very dangerous API to have around.
Instead, move the logic from the filtering to when we are deciding if we should
link two decls.

llvm-svn: 179523
2013-04-15 12:49:13 +00:00
Evgeniy Stepanov 7332acac4c [msan] Really disable replacement new and delete.
llvm-svn: 179522
2013-04-15 12:41:52 +00:00
Rafael Espindola 29cda59a9d Fix the storage class of method instantiations.
We keep the "as written" storage class, but that is a fuzzy concept for
instantiations. With this patch instantiations of methods of class templates
now get a storage class that is based on the semantics of isStatic(). With this
can simplify isStatic() itself.

llvm-svn: 179521
2013-04-15 12:38:20 +00:00
Andy Gibbs b23ea72e48 Replace uses of the deprecated std::auto_ptr with OwningPtr.
This is a rework of the broken parts in r179373 which were subsequently reverted in r179374 due to incompatibility with C++98 compilers.  This version should be ok under C++98.

llvm-svn: 179520
2013-04-15 12:06:32 +00:00
Tim Northover 737889ded7 Remove reference to MSVC only building X86 backend.
This is no longer true.

llvm-svn: 179519
2013-04-15 11:55:27 +00:00
Tim Northover 865f4bcb5d Enable all targets by default on Visual Studio.
llvm-svn: 179518
2013-04-15 11:53:05 +00:00
Richard Smith 5990db62f6 Local thread_local variables are implicitly 'static'. (This doesn't apply to _Thread_local nor __thread.)
llvm-svn: 179517
2013-04-15 08:33:22 +00:00
Richard Smith 774672e943 Properly check for a constant initializer for a thread-local variable.
llvm-svn: 179516
2013-04-15 08:07:34 +00:00
Richard Smith a8f52c8d88 Add triple to another test.
llvm-svn: 179515
2013-04-15 08:02:05 +00:00
Richard Smith 643a2869b3 Add triples to these tests since they're now using TLS, which isn't available on all targets.
llvm-svn: 179514
2013-04-15 08:00:15 +00:00
Eric Christopher 13637e900e Revert "Recommit r179497 after fixing uninitialized variable." until
I can fix the testcases here:

http://lab.llvm.org:8011/builders/clang-native-arm-cortex-a9/builds/6952

This reverts commit r179512 due to testcases specifying triples
that they didn't actually mean and causing failures on other platforms.

llvm-svn: 179513
2013-04-15 07:31:37 +00:00
Eric Christopher fc2beaa136 Recommit r179497 after fixing uninitialized variable.
llvm-svn: 179512
2013-04-15 07:07:21 +00:00
Nadav Rotem a440a356e0 Document our desire to enable the loop vectorizer on -Os in future releases.
llvm-svn: 179511
2013-04-15 05:56:55 +00:00
Nadav Rotem 57da1fdd55 Docs: merge the description of the BB and SLP vectorizers and document the -fslp-vectorize-aggressive flag.
llvm-svn: 179510
2013-04-15 05:53:23 +00:00
Nadav Rotem d4dcc003df Add an option -vectorize-slp-aggressive for running the BB vectorizer. Make -fslp-vectorize run the slp-vectorizer.
llvm-svn: 179508
2013-04-15 05:39:58 +00:00
Nadav Rotem 6a0dd6b78c Add a new flag -vectorize-slp-aggressive to enable Hals BB vectorizer.
llvm-svn: 179507
2013-04-15 05:38:41 +00:00
Nadav Rotem 0a2604daab Rename the slp-vectorizer clang/llvm flags. No functionality change.
llvm-svn: 179506
2013-04-15 04:57:18 +00:00
Nadav Rotem a1e5e44eb3 Rename the slp-vectorizer clang/llvm flags. No functionality change.
llvm-svn: 179505
2013-04-15 04:54:42 +00:00
Nadav Rotem 5d393c416f SLPVectorizer: Add support for vectorizing trees that start at compare instructions.
llvm-svn: 179504
2013-04-15 04:25:27 +00:00