Michael Kruse [Thu, 10 Sep 2015 12:46:52 +0000 (12:46 +0000)]
Merge TempScopInfo.{cpp|h} into ScopInfo.{cpp|h}
This prepares for a series of patches that merges TempScopInfo into ScopInfo to
reduce Polly's code complexity. Only ScopInfo.{cpp|h} will be left thereafter.
Moving the code of TempScopInfo in one commit makes the mains diffs simpler to
understand.
In detail, merging the following classes is planned:
TempScopInfo into ScopInfo
TempScop into Scop
IRAccess into MemoryAccess
Only moving code, no functional changes intended.
Differential Version: http://reviews.llvm.org/D12693
llvm-svn: 247274
Alexey Bataev [Thu, 10 Sep 2015 12:06:58 +0000 (12:06 +0000)]
[OPENMP] Generate threadprivates as TLS variables by default.
If target supports TLS all threadprivates are generated as TLS. If target does not support TLS, use runtime calls for proper codegen of threadprivate variables.
llvm-svn: 247273
Benjamin Kramer [Thu, 10 Sep 2015 11:59:55 +0000 (11:59 +0000)]
[FileCheck] Use range-based for loops. NFC.
llvm-svn: 247272
Jakub Kuderski [Thu, 10 Sep 2015 11:31:20 +0000 (11:31 +0000)]
There is a trunc(lshr (zext A), Cst) optimization in InstCombineCasts that
removes cast by performing the lshr on smaller types. However, currently there
is no trunc(lshr (sext A), Cst) variant.
This patch add such optimization by transforming trunc(lshr (sext A), Cst)
to ashr A, Cst.
Differential Revision: http://reviews.llvm.org/D12520
llvm-svn: 247271
Alexey Bataev [Thu, 10 Sep 2015 11:31:04 +0000 (11:31 +0000)]
[OPENMP] Fix test incompatibility with Windows.
llvm-svn: 247270
Chandler Carruth [Thu, 10 Sep 2015 11:17:49 +0000 (11:17 +0000)]
[ADT] Rewrite the StringRef::find implementation to be simpler, clearer,
and tremendously less reliant on the optimizer to fix things.
The code is always necessarily looking for the entire length of the
string when doing the equality tests in this find implementation, but it
previously was needlessly re-checking the size each time among other
annoyances.
By writing this so simply an ddirectly in terms of memcmp, it also is
about 8x faster in a debug build, which in turn makes FileCheck about 2x
faster in 'ninja check-llvm'. This saves about 8% of the time for
FileCheck-heavy parts of the test suite like the x86 backend tests.
llvm-svn: 247269
Alexey Bataev [Thu, 10 Sep 2015 11:09:46 +0000 (11:09 +0000)]
[OPENMP] Fix test incompatibility with Windows codegen.
llvm-svn: 247268
Tamas Berghammer [Thu, 10 Sep 2015 11:08:41 +0000 (11:08 +0000)]
Fix crash in lldb-server caused by an API change in LLVM
llvm-svn: 247267
Alexander Kornienko [Thu, 10 Sep 2015 10:58:38 +0000 (10:58 +0000)]
[clang-tidy] Renamed tests files to be closer to the check names.
llvm-svn: 247266
Silviu Baranga [Thu, 10 Sep 2015 10:34:34 +0000 (10:34 +0000)]
[DAGCombine] Truncate BUILD_VECTOR operators if necessary when constant folding vectors
Summary:
The BUILD_VECTOR node will truncate its operators to match the
type. We need to take this into account when constant folding -
we need to perform a truncation before constant folding the elements.
This is because the upper bits can change the result, depending on
the operation type (for example this is the case for min/max).
This change also adds a regression test.
Reviewers: jmolloy
Subscribers: jmolloy, llvm-commits
Differential Revision: http://reviews.llvm.org/D12697
llvm-svn: 247265
James Molloy [Thu, 10 Sep 2015 10:22:20 +0000 (10:22 +0000)]
Enable GlobalsAA by default
This can give significant improvements to alias analysis in some situations, and improves its testing coverage in all situations.
llvm-svn: 247264
James Molloy [Thu, 10 Sep 2015 10:22:12 +0000 (10:22 +0000)]
Add GlobalsAA as preserved to a bunch of transforms
GlobalsAA must by definition be preserved in function passes, but the passmanager doesn't know that. Make each pass explicitly preserve GlobalsAA.
llvm-svn: 247263
Ewan Crawford [Thu, 10 Sep 2015 10:08:48 +0000 (10:08 +0000)]
New RenderScript command to break on all kernels
Patch adds a command to RenderScript plugin allowing users to automatically set breakpoints on every RS kernel.
Command syntax is 'language renderscript kernel breakpoint all <enable/disable>.'
Enable sets breakpoints on all currently loaded kernels, and any kernels which will be loaded in future.
Disable results in breakpoints no longer being set on loaded kernels, but doesn't affect existing breakpoints.
Current command 'language renderscript kernel breakpoint' is changed to 'language renderscript kernel breakpoint set'
Reviewed by: clayborg, jingham
Subscribers: lldb-commits, ADodds, domipheus
Differential Revision: http://reviews.llvm.org/D12728
llvm-svn: 247262
Alexander Kornienko [Thu, 10 Sep 2015 10:07:11 +0000 (10:07 +0000)]
[clang-tidy] Add inconsistent declaration parameter name check
This is first of series of patches, porting code from my project colobot-lint,
as I mentioned recently in cfe-dev mailing list.
This patch adds a new check in readability module:
readability-inconsistent-declaration-parameter-name. I also added appropriate
testcases and documentation.
I chose readability module, as it seems it is the best place for it.
I think I followed the rules of LLVM coding guideline, but I may have missed
something, as I usually use other code formatting style.
http://reviews.llvm.org/D12462
Patch by Piotr Dziwinski!
llvm-svn: 247261
Alexey Bataev [Thu, 10 Sep 2015 09:48:30 +0000 (09:48 +0000)]
[OPENMP] Propagate alignment from original variables to the private copies.
Currently private copies of captured variables have default alignment. Patch makes private variables to have same alignment as original variables.
llvm-svn: 247260
Chandler Carruth [Thu, 10 Sep 2015 09:46:47 +0000 (09:46 +0000)]
[ADT] Force inline several super boring and unusually hot methods on
SmallVector to further help debug builds not waste their time calling
one line functions.
To give you an idea of why this is worthwhile, this change alone gets
another >10% reduction in the runtime of TripleTest.Normalization! It's
now under 9 seconds for me. Sadly, this is the end of the easy wins for
that test. Anything further will require some different architecture of
the test itself. Still, I'm pretty happy. 'check-llvm' now is under 35s
for me.
llvm-svn: 247259
Alexander Kornienko [Thu, 10 Sep 2015 09:42:01 +0000 (09:42 +0000)]
Add a deprecation notice to the clang-modernize documentation.
Summary:
Add a deprecation notice to the clang-modernize documentation. Remove
the reference to the external JIRA tracker.
Reviewers: revane, klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D12732
llvm-svn: 247258
Chandler Carruth [Thu, 10 Sep 2015 09:25:59 +0000 (09:25 +0000)]
[ADT] Micro-optimize and force inlining for string switches.
These are now quite heavily used in unit tests and the host tools,
making it worth having them be reasonably fast even in an unoptimized
build. This change reduces the total runtime of TripleTest.Normalization
by yet another 10% to 15%. It is now under 10 seconds on my machine, and
the total check-llvm time has dropped from 38s to around 36s.
I experimented with a number of different options, and the code pattern
here consistently seemed to lower the cleanest, likely due to the
significantly simple CFG and far fewer redundant tests of 'Result'.
llvm-svn: 247257
Ilia K [Thu, 10 Sep 2015 09:24:43 +0000 (09:24 +0000)]
Fix an AttributeError in dotest.py if --executable points to a wrong place
This patch fixes the following case:
```
$ ./dotest.py --executable=~/p/llvm/build_ninja/bin/lldb tools/lldb-mi/
'~/p/llvm/build_ninja/bin/lldb' is not a path to a valid executable
Traceback (most recent call last):
File "./dotest.py", line 1306, in <module>
setupSysPath()
File "./dotest.py", line 1004, in setupSysPath
if not lldbtest_config.lldbExec:
AttributeError: 'module' object has no attribute 'lldbExec'
```
And with this fix:
```
$ ./dotest.py --executable=~/p/llvm/build_ninja/bin/lldb tools/lldb-mi/
'~/p/llvm/build_ninja/bin/lldb' is not a path to a valid executable
The 'lldb' executable cannot be located. Some of the tests may not be run as a result.
```
llvm-svn: 247256
Alexey Bataev [Thu, 10 Sep 2015 09:06:59 +0000 (09:06 +0000)]
[OPENMP] Fix test incompatibility with 32-bit platforms
llvm-svn: 247255
James Molloy [Thu, 10 Sep 2015 08:42:28 +0000 (08:42 +0000)]
[ARM] Do not use vtrn for vectorshuffle if the order is reversed
The tests in isVTRNMask and isVTRN_v_undef_Mask should also check that the elements of the upper and lower half of the vectorshuffle occur in the correct order when both halves are used. Without this test the code assumes that it is correct to use vector transpose (vtrn) for the masks <1, 1, 0, 0> and <1, 3, 0, 2>, among others, but the transpose actually incorrectly generates shuffles for <0, 0, 1, 1> and <0, 2, 1, 3> in this case.
Patch by Jeroen Ketema!
llvm-svn: 247254
Chandler Carruth [Thu, 10 Sep 2015 08:29:35 +0000 (08:29 +0000)]
[ADT] Apply a large hammer to StringRef functions: attribute always_inline.
The logic of this follows something Howard does in libc++ and something
I discussed with Chris eons ago -- for a lot of functions, there is
really no benefit to preserving "debug information" by leaving the
out-of-line even in debug builds. This is especially true as we now do
a very good job of preserving most debug information even in the face of
inlining. There are a bunch of methods in StringRef that we are paying
a completely unacceptable amount for with every debug build of every
LLVM developer.
Some day, we should fix Clang/LLVM so that developers can reasonable
use a default of something other than '-O0' and not waste their lives
waiting on *completely* unoptimized code to execute. We should have
a default that doesn't impede debugging while providing at least
plausable performance.
But today is not that day.
So today, I'm applying always_inline to the functions that are really
hurting the critical path for stuff like 'check_llvm'. I'm being very
cautious here, but there are a few other APIs that we really should do
this for as a matter of pragmatism. Hopefully we can rip this out some
day.
With this change, TripleTest.Normalization runtime decreases by over
10%, and the total 'check-llvm' time on my 48-core box goes from 38s to
just under 37s.
llvm-svn: 247253
Chandler Carruth [Thu, 10 Sep 2015 08:29:30 +0000 (08:29 +0000)]
[Support] Fix the always_inline attribute macro to not include the
'inline' specifier. That specifier may or may not be valid for a given
function, or it may be required for correct linkage even when the
compiler doesn't support the always_inline attribute.
llvm-svn: 247252
Alexey Bataev [Thu, 10 Sep 2015 08:12:02 +0000 (08:12 +0000)]
[OPENMP] Outlined function for parallel and other regions with list of captured variables.
Currently all variables used in OpenMP regions are captured into a record and passed to outlined functions in this record. It may result in some poor performance because of too complex analysis later in optimization passes. Patch makes to emit outlined functions for parallel-based regions with a list of captured variables. It reduces code for 2*n GEPs, stores and loads at least.
Codegen for task-based regions remains unchanged because runtime requires that all captured variables are passed in captured record.
llvm-svn: 247251
Chandler Carruth [Thu, 10 Sep 2015 07:51:43 +0000 (07:51 +0000)]
[ADT] Micro-optimize the Triple constructor by doing a single split and
re-using the resulting components rather than repeatedly splitting and
re-splitting to compute each component as part of the initializer list.
This is more work on PR23676. Sadly, it doesn't help much. It removes
the constructor from my profile, but doesn't make a sufficient dent in
the total time. But it should play together nicely with subsequent
changes.
llvm-svn: 247250
Chandler Carruth [Thu, 10 Sep 2015 07:51:37 +0000 (07:51 +0000)]
[ADT] Fix a confusing interface spec and some annoying peculiarities
with the StringRef::split method when used with a MaxSplit argument
other than '-1' (which nobody really does today, but which should
actually work).
The spec claimed both to split up to MaxSplit times, but also to append
<= MaxSplit strings to the vector. One of these doesn't make sense.
Given the name "MaxSplit", let's go with it being a max over how many
*splits* occur, which means the max on how many strings get appended is
MaxSplit+1. I'm not actually sure the implementation correctly provided
this logic either, as it used a really opaque loop structure.
The implementation was also playing weird games with nullptr in the data
field to try to rely on a totally opaque hidden property of the split
method that returns a pair. Nasty IMO.
Replace all of this with what is (IMO) simpler code that doesn't use the
pair returning split method, and instead just finds each separator and
appends directly. I think this is a lot easier to read, and it most
definitely matches the spec. Added some tests that exercise the corner
cases around StringRef() and StringRef("") that all now pass.
I'll start using this in code in the next commit.
llvm-svn: 247249
David Majnemer [Thu, 10 Sep 2015 07:20:05 +0000 (07:20 +0000)]
[MS ABI] Select a pointer to member representation more often
Given a reference to a pointer to member whose class's inheritance model
is unspecified, make sure we come up with an inheritance model in
plausible places. One place we were missing involved LValue to RValue
conversion, another involved unary type traits.
llvm-svn: 247248
NAKAMURA Takumi [Thu, 10 Sep 2015 07:16:42 +0000 (07:16 +0000)]
GlobalsAAResult(&&): Move every members.
Or, one of MSVC builders failed with unexpected behavior.
llvm-svn: 247247
Elena Demikhovsky [Thu, 10 Sep 2015 06:33:13 +0000 (06:33 +0000)]
Added isUndef() interface for SDNode
Differential Revision: http://reviews.llvm.org/D12720
llvm-svn: 247246
Chandler Carruth [Thu, 10 Sep 2015 06:12:31 +0000 (06:12 +0000)]
[ADT] Switch a bunch of places in LLVM that were doing single-character
splits to actually use the single character split routine which does
less work, and in a debug build is *substantially* faster.
llvm-svn: 247245
Chandler Carruth [Thu, 10 Sep 2015 06:07:03 +0000 (06:07 +0000)]
[ADT] Add a single-character version of the small vector split routine
on StringRef. Finding and splitting on a single character is
substantially faster than doing it on even a single character StringRef
-- we immediately get to a *very* tuned memchr call this way.
Even nicer, we get to this even in a debug build, shaving 18% off the
runtime of TripleTest.Normalization, helping PR23676 some more.
llvm-svn: 247244
Chandler Carruth [Thu, 10 Sep 2015 05:47:43 +0000 (05:47 +0000)]
Add a way to skip the Go bindings tests even when Go is configured in
CMake.
The Go bindings tests in an unoptimized build take over 30 seconds for
me, making it the slowest test in 'check-llvm' by a factor of two.
I've only rigged this up fully to the CMake build. If someone is
interested in rigging it up to the autoconf build, they're welcome to do
so.
llvm-svn: 247243
Sanjoy Das [Thu, 10 Sep 2015 05:27:38 +0000 (05:27 +0000)]
[ScalarEvolution] Fix PR24757.
Summary:
PR24757 was caused by some incorect math in
`ScalarEvolution::HowFarToZero` -- the smallest unsigned solution for X
in
2^N * A = 2^N * X
is not necessarily A.
Reviewers: atrick, majnemer, meheff
Subscribers: llvm-commits, sanjoy
Differential Revision: http://reviews.llvm.org/D12721
llvm-svn: 247242
Chandler Carruth [Thu, 10 Sep 2015 04:22:36 +0000 (04:22 +0000)]
[LPM] Simplify this code and fix a compile error for compilers that
don't correctly implement the scoping rules of C++11 range based for
loops. This kind of aliasing isn't a good idea anyways (and wasn't
really intended).
llvm-svn: 247241
Chandler Carruth [Thu, 10 Sep 2015 02:31:42 +0000 (02:31 +0000)]
[LPM] Use a map from analysis ID to immutable passes in the legacy pass
manager to avoid a slow linear scan of every immutable pass and on every
attempt to find an analysis pass.
This speeds up 'check-llvm' on an unoptimized build for me by 15%, YMMV.
It should also help (a tiny bit) other folks that are really
bottlenecked on repeated runs of tiny pass pipelines across small IR
files.
llvm-svn: 247240
Peter Collingbourne [Thu, 10 Sep 2015 02:18:02 +0000 (02:18 +0000)]
CFI: Add diagnostic handler and tests for indirect call checker.
Differential Revision: http://reviews.llvm.org/D11858
llvm-svn: 247239
Peter Collingbourne [Thu, 10 Sep 2015 02:17:40 +0000 (02:17 +0000)]
CFI: Introduce -fsanitize=cfi-icall flag.
This flag causes the compiler to emit bit set entries for functions as well
as runtime bitset checks at indirect call sites. Depends on the new function
bitset mechanism.
Differential Revision: http://reviews.llvm.org/D11857
llvm-svn: 247238
Kit Barton [Thu, 10 Sep 2015 01:55:44 +0000 (01:55 +0000)]
Enable the shrink wrapping optimization for PPC64.
The changes in this patch are as follows:
1. Modify the emitPrologue and emitEpilogue methods to work properly when the prologue and epilogue blocks are not the first/last blocks in the function
2. Fix a bug in PPCEarlyReturn optimization caused by an empty entry block in the function
3. Override the runShrinkWrap PredicateFtor (defined in TargetMachine) to check whether shrink wrapping should run:
Shrink wrapping will run on PPC64 (Little Endian and Big Endian) unless -enable-shrink-wrap=false is specified on command line
A new test case, ppc-shrink-wrapping.ll was created based on the existing shrink wrapping tests for x86, arm, and arm64.
Phabricator review: http://reviews.llvm.org/D11817
llvm-svn: 247237
Ahmed Bougacha [Thu, 10 Sep 2015 01:54:43 +0000 (01:54 +0000)]
[AArch64] Match FI+offset in STNP addressing mode.
First, we need to teach isFrameOffsetLegal about STNP.
It already knew about the STP/LDP variants, but those were probably
never exercised, because it's only the load/store optimizer that
generates STP/LDP, and the only user of the method is frame lowering,
which runs earlier.
The STP/LDP cases were wrong: they didn't take into account the fact
that they return two results, not one, so the immediate offset will be
the 4th operand, not the 3rd.
Follow-up to r247234.
llvm-svn: 247236
Davide Italiano [Thu, 10 Sep 2015 01:50:00 +0000 (01:50 +0000)]
[MC] Convert all the remaining tests from macho-dump to llvm-readobj.
This sort-of deprecates macho-dump. It may take still a little while
to garbage collect it, but at least there's no real usage of it in
the tree anymore. New tests should always rely on llvm-readobj or
llvm-objdump.
llvm-svn: 247235
Ahmed Bougacha [Thu, 10 Sep 2015 01:48:29 +0000 (01:48 +0000)]
[AArch64] Match base+offset in STNP addressing mode.
Followup to r247231.
llvm-svn: 247234
Mehdi Amini [Thu, 10 Sep 2015 01:46:39 +0000 (01:46 +0000)]
EmitRecord* API change: accepts ArrayRef instead of a SmallVector (NFC)
This reapply a variant commit r247179 after post-commit review from
D.Blaikie.
Hopefully I got it right this time: lifetime of initializer list ends
as with any expression, which make invalid the pattern:
ArrayRef<int> Arr = { 1, 2, 3, 4};
Just like StringRef, ArrayRef shouldn't be used to initialize local
variable but only as function argument.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 247233
Mehdi Amini [Thu, 10 Sep 2015 01:45:55 +0000 (01:45 +0000)]
Makes EmitRecord() accepting ArrayRef and raw array (NFC)
After r247186, a vector is no longer needed as the push_front for
the code is removed.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 247232
Ahmed Bougacha [Thu, 10 Sep 2015 01:42:28 +0000 (01:42 +0000)]
[AArch64] Support selecting STNP.
We could go through the load/store optimizer and match STNP where
we would have matched a nontemporal-annotated STP, but that's not
reliable enough, as an opportunistic optimization.
Insetad, we can guarantee emitting STNP, by matching them at ISel.
Since there are no single-input nontemporal stores, we have to
resort to some high-bits-extracting trickery to generate an STNP
from a plain store.
Also, we need to support another, LDP/STP-specific addressing mode,
base + signed scaled 7-bit immediate offset.
For now, only match the base. Let's make it smart separately.
Part of PR24086.
llvm-svn: 247231
Matt Arsenault [Thu, 10 Sep 2015 01:23:28 +0000 (01:23 +0000)]
AMDGPU/SI: Fix more cases of losing exec operands
llvm-svn: 247230
Matt Arsenault [Thu, 10 Sep 2015 01:06:06 +0000 (01:06 +0000)]
AMDGPU/SI: Fix creating v_mov_b32s without exec uses
This will be caught by existing tests with a
verifier check to be added in a future commit.
llvm-svn: 247229
John McCall [Thu, 10 Sep 2015 00:57:46 +0000 (00:57 +0000)]
Don't crash when emitting a block under returns_nonnull.
rdar://
22071955
llvm-svn: 247228
Greg Clayton [Thu, 10 Sep 2015 00:57:34 +0000 (00:57 +0000)]
Removed debug prints that I accidentally left in.
llvm-svn: 247227
Hans Wennborg [Thu, 10 Sep 2015 00:57:26 +0000 (00:57 +0000)]
Revert r247216: "Fix Clang-tidy misc-use-override warnings, other minor fixes"
This caused build breakges, e.g.
http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/24926
llvm-svn: 247226
Ahmed Bougacha [Thu, 10 Sep 2015 00:53:15 +0000 (00:53 +0000)]
[CodeGen] Make x86 nontemporal store patfrags generic. NFC.
To be used by other targets.
llvm-svn: 247225
Greg Clayton [Thu, 10 Sep 2015 00:48:44 +0000 (00:48 +0000)]
On MacOSX, revamp the way we link against the llvm/clang .a files by making a text file that contains all .a filenames and use that when linking in Xcode.
llvm-svn: 247224
Philip Reames [Thu, 10 Sep 2015 00:44:10 +0000 (00:44 +0000)]
[RewriteStatepointsForGC] Minor refactor to use shared implementation [NFC]
llvm-svn: 247223
Hans Wennborg [Thu, 10 Sep 2015 00:37:18 +0000 (00:37 +0000)]
Revert r247218: "Fix Clang-tidy misc-use-override warnings, other minor fixes"
Seems it broke the Polly build.
From http://lab.llvm.org:8011/builders/perf-x86_64-penryn-O3-polly-fast/builds/11687/steps/compile/logs/stdio:
In file included from /home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/lib/TableGen/Record.cpp:14:0:
/home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/include/llvm/TableGen/Record.h:369:3: error: looser throw specifier for 'virtual llvm::TypedInit::~TypedInit()'
/home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/include/llvm/TableGen/Record.h:270:11: error: overriding 'virtual llvm::Init::~Init() noexcept (true)'
llvm-svn: 247222
Philip Reames [Thu, 10 Sep 2015 00:32:56 +0000 (00:32 +0000)]
[RewriteStatepointsForGC] Strengthen a confusingly weak assertion [NFC]
The assertion was weaker than it should be and gave the impression we're growing the number of base defining values being considered during the fixed point interation. That's not true. The tighter form of the assert is useful documentation.
llvm-svn: 247221
Philip Reames [Thu, 10 Sep 2015 00:27:50 +0000 (00:27 +0000)]
[RewriteStatepointsForGC] One last bit of naming [NFCI]
llvm-svn: 247220
Reid Kleckner [Thu, 10 Sep 2015 00:25:23 +0000 (00:25 +0000)]
[WinEH] Add codegen support for cleanuppad and cleanupret
All of the complexity is in cleanupret, and it mostly follows the same
codepaths as catchret, except it doesn't take a return value in RAX.
This small example now compiles and executes successfully on win32:
extern "C" int printf(const char *, ...) noexcept;
struct Dtor {
~Dtor() { printf("~Dtor\n"); }
};
void has_cleanup() {
Dtor o;
throw 42;
}
int main() {
try {
has_cleanup();
} catch (int) {
printf("caught it\n");
}
}
Don't try to put the cleanup in the same function as the catch, or Bad
Things will happen.
llvm-svn: 247219
Hans Wennborg [Thu, 10 Sep 2015 00:24:40 +0000 (00:24 +0000)]
Fix Clang-tidy misc-use-override warnings, other minor fixes
Patch by Eugene Zelenko!
Differential Revision: http://reviews.llvm.org/D12741
llvm-svn: 247218
Philip Reames [Thu, 10 Sep 2015 00:22:49 +0000 (00:22 +0000)]
[RewriteStatepointsForGC] Further style/naming fixup [NFCI]
llvm-svn: 247217
Hans Wennborg [Thu, 10 Sep 2015 00:12:56 +0000 (00:12 +0000)]
Fix Clang-tidy misc-use-override warnings, other minor fixes
Patch by Eugene Zelenko!
Differential Revision: http://reviews.llvm.org/D12740
llvm-svn: 247216
Mehdi Amini [Thu, 10 Sep 2015 00:05:09 +0000 (00:05 +0000)]
Bitcode Writer: EmitRecordWith* takes an ArrayRef instead of a SmallVector (NFC)
This reapply commit r247178 after post-commit review from D.Blaikie
in a way that makes it compatible with the existing API.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 247215
Mehdi Amini [Thu, 10 Sep 2015 00:05:04 +0000 (00:05 +0000)]
Add makeArrayRef() overload for ArrayRef input (no-op/identity) NFC
The purpose is to allow templated wrapper to work with either
ArrayRef or any convertible operation:
template<typename Container>
void wrapper(const Container &Arr) {
impl(makeArrayRef(Arr));
}
with Container being a std::vector, a SmallVector, or an ArrayRef.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 247214
Philip Reames [Thu, 10 Sep 2015 00:01:53 +0000 (00:01 +0000)]
[RewriteStatepointsForGC] More naming cleanup [NFCI]
llvm-svn: 247213
Philip Reames [Wed, 9 Sep 2015 23:57:18 +0000 (23:57 +0000)]
[RewriteStatepointsForGC] Code cleanup [NFC]
Factor out common code related to naming values, fix a small style issue. More to follow in separate changes.
llvm-svn: 247211
Philip Reames [Wed, 9 Sep 2015 23:40:12 +0000 (23:40 +0000)]
[RewriteStatepointsForGC] Extend base pointer inference to handle insertelement
This change is simply enhancing the existing inference algorithm to handle insertelement instructions by conservatively inserting a new instruction to propagate the vector of associated base pointers. In the process, I'm ripping out the peephole optimizations which mostly helped cover the fact this hadn't been done.
Note that most of the newly inserted nodes will be nearly immediately removed by the post insertion optimization pass introduced in 246718. Arguably, we should be trying harder to avoid the malloc traffic here, but I'd rather get the code correct, then worry about compile time.
Unlike previous extensions of the algorithm to handle more case, I discovered the existing code was causing miscompiles in some cases. In particular, we had an implicit assumption that the peephole covered *all* insert element instructions, so if we had a value directly based on a insert element the peephole didn't cover, we proceeded as if it were a base anyways. Not good. I believe we had the same issue with shufflevector which is why I adjusted the predicate for them as well.
Differential Revision: http://reviews.llvm.org/D12583
llvm-svn: 247210
John McCall [Wed, 9 Sep 2015 23:37:17 +0000 (23:37 +0000)]
ARC: Fix the precise-lifetime suppression of returns_inner_pointer
receiver extension for message sends via property syntax.
rdar://
22172983
llvm-svn: 247209
Philip Reames [Wed, 9 Sep 2015 23:26:08 +0000 (23:26 +0000)]
[RewriteStatepointsForGC] Make base pointer inference deterministic
Previously, the base pointer algorithm wasn't deterministic. The core fixed point was (of course), but we were inserting new nodes and optimizing them in an order which was unspecified and variable. We'd somewhat hacked around this for testing by sorting by value name, but that doesn't solve the general determinism problem.
Instead, we can use the order of traversal over the def/use graph to give us a single consistent ordering. Today, this is a DFS order, but the exact order doesn't mater provided it's deterministic for a given input.
(Q: It is safe to rely on a deterministic order of operands right?)
Note that this only fixes the determinism within a single inference step. The inference step is currently invoked many times in a non-deterministic order. That's a future change in the sequence. :)
Differential Revision: http://reviews.llvm.org/D12640
llvm-svn: 247208
John McCall [Wed, 9 Sep 2015 23:04:17 +0000 (23:04 +0000)]
Fix access control for lookups using the Microsoft __super extension.
rdar://
22464808
llvm-svn: 247207
Stephane Sezer [Wed, 9 Sep 2015 22:58:23 +0000 (22:58 +0000)]
Fix a small comment typo in Windows Process code.
llvm-svn: 247206
Rafael Espindola [Wed, 9 Sep 2015 22:53:55 +0000 (22:53 +0000)]
Change the load addr into something that works on linux x86_64.
With this simple static programs run again.
llvm-svn: 247205
NAKAMURA Takumi [Wed, 9 Sep 2015 22:51:31 +0000 (22:51 +0000)]
thread_local is not implemented for targeting cygwin yet.
llvm-svn: 247204
Sanjay Patel [Wed, 9 Sep 2015 22:39:06 +0000 (22:39 +0000)]
convert builtin_unpredictable on a switch into metadata for LLVM
llvm-svn: 247203
Greg Clayton [Wed, 9 Sep 2015 22:35:25 +0000 (22:35 +0000)]
Fix the build-llvm.pl to not create one monster .a file from all of the llvm and clang .a files. We now just make a file list which we pass to the linker.
llvm-svn: 247202
Peter Collingbourne [Wed, 9 Sep 2015 22:30:32 +0000 (22:30 +0000)]
LowerBitSets: Fix non-determinism bug.
Visit disjoint sets in a deterministic order based on the maximum BitSetNM
index, otherwise the order in which we visit them will depend on pointer
comparisons. This was being exposed by MSan.
llvm-svn: 247201
Enrico Granata [Wed, 9 Sep 2015 22:30:24 +0000 (22:30 +0000)]
Introduce the notion of an escape helper. Different languages have different notion of what to print in a string and how to escape non-printable things. The escape helper is where this notion is provided to LLDB
This is NFC, other than a code re-org
llvm-svn: 247200
Piotr Padlewski [Wed, 9 Sep 2015 22:20:28 +0000 (22:20 +0000)]
Generating assumption loads of vptr after ctor call (fixed)
Generating call assume(icmp %vtable, %global_vtable) after constructor
call for devirtualization purposes.
For more info go to:
http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html
Edit:
Fixed version because of PR24479.
After this patch got reverted because of ScalarEvolution bug (D12719)
Merged after John McCall big patch (Added Address).
http://reviews.llvm.org/D11859
llvm-svn: 247199
Chandler Carruth [Wed, 9 Sep 2015 22:13:56 +0000 (22:13 +0000)]
[PM] Update Polly for the new AA infrastructure landed in r247167.
llvm-svn: 247198
Greg Clayton [Wed, 9 Sep 2015 22:13:36 +0000 (22:13 +0000)]
Remove unused function.
llvm-svn: 247197
Greg Clayton [Wed, 9 Sep 2015 22:13:01 +0000 (22:13 +0000)]
Now that CompilerType uses a "TypeSystem *" and a "void *" instead of a "clang::ASTContext *" and a "void *", we need to know if anyone is trying to create a CompilerType from a clang::ASTContext that has no backing ClangASTContext.
This assert will fire if this is the case and we will need to fix the offending code.
llvm-svn: 247196
Enrico Granata [Wed, 9 Sep 2015 22:00:18 +0000 (22:00 +0000)]
Remove Target::GetBasicType()
I was experimenting with it briefly, and then settled on Target::GetTypeSystem + TypeSystem::GetBasicType, so this API is not necessary to have
Thanks to Ryan Brown for bringing it to my attention
llvm-svn: 247195
Nathan Wilson [Wed, 9 Sep 2015 21:48:31 +0000 (21:48 +0000)]
[Concepts] Add diagnostic; invalid specifier on function or variable concept declaration
Summary: Diagnose variable and function concept declarations when an invalid specifier appears
Reviewers: rsmith, aaron.ballman, faisalv, fraggamuffin, hubert.reinterpretcast
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D12435
llvm-svn: 247194
Greg Clayton [Wed, 9 Sep 2015 21:34:32 +0000 (21:34 +0000)]
Remove a call to deleted function.
llvm-svn: 247193
Reid Kleckner [Wed, 9 Sep 2015 21:10:03 +0000 (21:10 +0000)]
[SEH] Emit 32-bit SEH tables for the new EH IR
The 32-bit tables don't actually contain PC range data, so emitting them
is incredibly simple.
The 64-bit tables, on the other hand, use the same table for state
numbering as well as label ranges. This makes things more difficult, so
it will be implemented later.
llvm-svn: 247192
Ed Maste [Wed, 9 Sep 2015 21:00:10 +0000 (21:00 +0000)]
For now skip ThreadSpecificBreakTestCase on FreeBSD
It often hangs or times out, and obscures issues with other tests.
Just skip it for now (until the FreeBSD test suite is producing
consistent results) so that we can get a buildbot back.
Previous investigation (for failures) in llvm.org/pr18522
llvm-svn: 247190
Enrico Granata [Wed, 9 Sep 2015 20:59:49 +0000 (20:59 +0000)]
Preparatory work for letting language plugins help the StringPrinter with formatting special characters
llvm-svn: 247189
David Majnemer [Wed, 9 Sep 2015 20:57:59 +0000 (20:57 +0000)]
[MS ABI] Don't crash on references to pointers to members in args
We know that a reference can always be dereferenced. However, we don't
always know the number of bytes if the reference's pointee type is
incomplete. This case was correctly handled but we didn't consider the
case where the type is complete but we cannot calculate its size for ABI
specific reasons. In this specific case, a member pointer's size is
available only under certain conditions.
This fixes PR24703.
llvm-svn: 247188
Dan Gohman [Wed, 9 Sep 2015 20:54:31 +0000 (20:54 +0000)]
[WebAssembly] Update target datalayout strings.
llvm-svn: 247187
Teresa Johnson [Wed, 9 Sep 2015 20:53:31 +0000 (20:53 +0000)]
Change EmitRecordWithAbbrevImpl to take Optional record code. NFC.
This change enables EmitRecord to pass the supplied record Code to
EmitRecordWithAbbrevImpl, rather than insert it into the Vals array.
It is an enabler for changing EmitRecord to take an ArrayRef<uintty> instead
of a SmallVectorImpl<uintty>&
Patch suggested by Duncan P. N. Exon Smith, modified by myself a bit to get
correct assertion checking.
llvm-svn: 247186
Michael J. Spencer [Wed, 9 Sep 2015 20:48:09 +0000 (20:48 +0000)]
[elf2] Assign output sections to PHDRs.
This is a minimal implementation to produce legal output. Future patches will combine multiple compatible PT_LOADs.
llvm-svn: 247185
Piotr Padlewski [Wed, 9 Sep 2015 20:47:30 +0000 (20:47 +0000)]
ScalarEvolution assume hanging bugfix
http://reviews.llvm.org/D12719
llvm-svn: 247184
Mehdi Amini [Wed, 9 Sep 2015 20:35:37 +0000 (20:35 +0000)]
Revert "EmitRecordWith* API change: takes an ArrayRef instead of a SmallVector (NFC)"
This reverts commit r247179.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 247183
Mehdi Amini [Wed, 9 Sep 2015 20:35:15 +0000 (20:35 +0000)]
Revert "Bitcode Writer: EmitRecordWith* takes an ArrayRef instead of a SmallVector (NFC)"
This reverts commit r247178.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 247182
Rafael Espindola [Wed, 9 Sep 2015 20:26:23 +0000 (20:26 +0000)]
Add the DT_NEEDED entries to the dynamic table.
llvm-svn: 247181
David Majnemer [Wed, 9 Sep 2015 20:20:08 +0000 (20:20 +0000)]
Revert trunc(lshr (sext A), Cst) to ashr A, Cst
This reverts commit r246997, it introduced a regression (PR24763).
llvm-svn: 247180
Mehdi Amini [Wed, 9 Sep 2015 20:08:51 +0000 (20:08 +0000)]
EmitRecordWith* API change: takes an ArrayRef instead of a SmallVector (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 247179
Mehdi Amini [Wed, 9 Sep 2015 20:08:39 +0000 (20:08 +0000)]
Bitcode Writer: EmitRecordWith* takes an ArrayRef instead of a SmallVector (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 247178
Renato Golin [Wed, 9 Sep 2015 19:44:40 +0000 (19:44 +0000)]
Revert "AVX512: Implemented encoding and intrinsics for vextracti64x4 ,vextracti64x2, vextracti32x8, vextracti32x4, vextractf64x4, vextractf64x2, vextractf32x8, vextractf32x4 Added tests for intrinsics and encoding."
This reverts commit r247149, as it was breaking numerous buildbots of varied architectures.
llvm-svn: 247177
Argyrios Kyrtzidis [Wed, 9 Sep 2015 18:54:16 +0000 (18:54 +0000)]
[libclang] Add missing clang_CompileCommand_* functions in libclang.exports.
llvm-svn: 247176
Greg Clayton [Wed, 9 Sep 2015 18:41:50 +0000 (18:41 +0000)]
Make sure to flush the stream to make sure the string is up to date when we query its size.
llvm-svn: 247175
Sanjay Patel [Wed, 9 Sep 2015 18:38:30 +0000 (18:38 +0000)]
allow unpredictable metadata on switch statements
llvm-svn: 247174
Zachary Turner [Wed, 9 Sep 2015 18:25:13 +0000 (18:25 +0000)]
Don't allow duplicate names for tests.
We had 2 tests named TestCPPBreakpoints.py. If one of those tests
failed, both of them would be reported as failures and contribute
to the failure count. There may be other examples of duplicate
test names, and we should fix those as we find them.
llvm-svn: 247173