Justin Holewinski [Fri, 26 Jul 2013 13:28:29 +0000 (13:28 +0000)]
Add a target legalize hook for SplitVectorOperand (again)
CustomLowerNode was not being called during SplitVectorOperand,
meaning custom legalization could not be used by targets.
This also adds a test case for NVPTX that depends on this custom
legalization.
Differential Revision: http://llvm-reviews.chandlerc.com/D1195
Attempt to fix the buildbots by making the X86 test I just added platform independent
llvm-svn: 187202
Rafael Espindola [Fri, 26 Jul 2013 13:18:16 +0000 (13:18 +0000)]
Revert "Add a target legalize hook for SplitVectorOperand"
This reverts commit 187198. It broke the bots.
The soft float test probably needs a -triple because of name differences.
On the hard float test I am getting a "roundss $1, %xmm0, %xmm0", instead of
"vroundss $1, %xmm0, %xmm0, %xmm0".
llvm-svn: 187201
Aaron Watry [Fri, 26 Jul 2013 13:02:02 +0000 (13:02 +0000)]
Add missing integer min/max definitions
Found in CL 1.1 spec section 6.11.3
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 187200
Pavel Labath [Fri, 26 Jul 2013 12:50:30 +0000 (12:50 +0000)]
Fix tests on targets that don't support thread_local
This also reverts r187197.
llvm-svn: 187199
Justin Holewinski [Fri, 26 Jul 2013 12:46:39 +0000 (12:46 +0000)]
Add a target legalize hook for SplitVectorOperand
CustomLowerNode was not being called during SplitVectorOperand,
meaning custom legalization could not be used by targets.
This also adds a test case for NVPTX that depends on this custom
legalization.
Differential Revision: http://llvm-reviews.chandlerc.com/D1195
llvm-svn: 187198
Rafael Espindola [Fri, 26 Jul 2013 12:40:55 +0000 (12:40 +0000)]
Add a triple. Should fix the windows bots.
llvm-svn: 187197
Pavel Labath [Fri, 26 Jul 2013 11:50:42 +0000 (11:50 +0000)]
[analyzer] Fix FP warnings when binding a temporary to a local static variable
Summary:
When binding a temporary object to a static local variable, the analyzer would
complain about a dangling reference even though the temporary's lifetime should
be extended past the end of the function. This commit tries to detect these
cases and construct them in a global memory region instead of a local one.
Reviewers: jordan_rose
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1133
llvm-svn: 187196
Richard Osborne [Fri, 26 Jul 2013 10:19:02 +0000 (10:19 +0000)]
test commit
llvm-svn: 187195
NAKAMURA Takumi [Fri, 26 Jul 2013 10:13:27 +0000 (10:13 +0000)]
Rework r187192, to tweak expressions to be tolerant of DOSish paths. XFAILs can be removed.
llvm-svn: 187194
Richard Osborne [Fri, 26 Jul 2013 09:50:55 +0000 (09:50 +0000)]
[XCore] Add TODO regarding byval structs
llvm-svn: 187193
NAKAMURA Takumi [Fri, 26 Jul 2013 08:28:35 +0000 (08:28 +0000)]
clang/test/Driver/linux-header-search.cpp: Add XFAILs, for now. I'll fix them later.
llvm-svn: 187192
Chandler Carruth [Fri, 26 Jul 2013 08:20:39 +0000 (08:20 +0000)]
Re-implement the analysis of uses in mem2reg to be significantly more
robust. It now uses an InstVisitor and worklist to actually walk the
uses of the Alloca transitively and detect the pattern which we can
directly promote: loads & stores of the whole alloca and instructions we
can completely ignore.
Also, with this new implementation teach both the predicate for testing
whether we can promote and the promotion engine itself to use the same
code so we no longer have strange divergence between the two code paths.
I've added some silly test cases to demonstrate that we can handle
slightly more degenerate code patterns now. See the below for why this
is even interesting.
Performance impact: roughly 1% regression in the performance of SROA or
ScalarRepl on a large C++-ish test case where most of the allocas are
basically ready for promotion. The reason is because of silly redundant
work that I've left FIXMEs for and which I'll address in the next
commit. I wanted to separate this commit as it changes the behavior.
Once the redundant work in removing the dead uses of the alloca is
fixed, this code appears to be faster than the old version. =]
So why is this useful? Because the previous requirement for promotion
required a *specific* visit pattern of the uses of the alloca to verify:
we *had* to look for no more than 1 intervening use. The end goal is to
have SROA automatically detect when an alloca is already promotable and
directly hand it to the mem2reg machinery rather than trying to
partition and rewrite it. This is a 25% or more performance improvement
for SROA, and a significant chunk of the delta between it and
ScalarRepl. To get there, we need to make mem2reg actually capable of
promoting allocas which *look* promotable to SROA without have SROA do
tons of work to massage the code into just the right form.
This is actually the tip of the iceberg. There are tremendous potential
savings we can realize here by de-duplicating work between mem2reg and
SROA.
llvm-svn: 187191
Craig Topper [Fri, 26 Jul 2013 06:16:11 +0000 (06:16 +0000)]
Remove trailing whitespace.
llvm-svn: 187190
Craig Topper [Fri, 26 Jul 2013 05:59:26 +0000 (05:59 +0000)]
Remove trailing whitespace.
llvm-svn: 187189
Craig Topper [Fri, 26 Jul 2013 05:39:33 +0000 (05:39 +0000)]
Add test cases for the various instruction alias and Intel syntax fixes that have gone in lately.
llvm-svn: 187188
Craig Topper [Fri, 26 Jul 2013 05:37:46 +0000 (05:37 +0000)]
Fix more Intel syntax issues with FP instruction aliases. Test cases coming in a subsequent patch.
llvm-svn: 187187
Tobias Grosser [Fri, 26 Jul 2013 04:16:55 +0000 (04:16 +0000)]
Make .bc en/decoding of AttrKind stable
The bitcode representation attribute kinds are encoded into / decoded from
should be independent of the current set of LLVM attributes and their position
in the AttrKind enum. This patch explicitly encodes attributes to fixed bitcode
values.
With this patch applied, LLVM does not silently misread attributes written by
LLVM 3.3. We also enhance the decoding slightly such that an error message is
printed if an unknown AttrKind encoding was dected.
Bonus: Dropping bitcode attributes from AttrKind is now easy, as old AttrKinds
do not need to be kept to support the Bitcode reader.
llvm-svn: 187186
Jason Molenda [Fri, 26 Jul 2013 02:08:48 +0000 (02:08 +0000)]
Add an SBFrame::FindRegister() method to make it a little
easier to retrieve a register value.
llvm-svn: 187184
Eli Friedman [Fri, 26 Jul 2013 02:04:44 +0000 (02:04 +0000)]
Fix test for Release builds.
Attempt 2. Sorry about the noise.
llvm-svn: 187183
Craig Topper [Fri, 26 Jul 2013 02:02:47 +0000 (02:02 +0000)]
Take advantage of the register enums being in order to remove a couple static tables.
llvm-svn: 187182
Bill Schmidt [Fri, 26 Jul 2013 01:36:11 +0000 (01:36 +0000)]
[PowerPC] Support powerpc64le as a syntax-checking target.
This patch provides basic support for powerpc64le as an LLVM target.
However, use of this target will not actually generate little-endian
code. Instead, use of the target will cause the correct little-endian
built-in defines to be generated, so that code that tests for
__LITTLE_ENDIAN__, for example, will be correctly parsed for
syntax-only testing. Code generation will otherwise be the same as
powerpc64 (big-endian), for now.
The patch leaves open the possibility of creating a little-endian
PowerPC64 back end, but there is no immediate intent to create such a
thing.
The new test case variant ensures that correct built-in defines for
little-endian code are generated.
llvm-svn: 187180
Bill Schmidt [Fri, 26 Jul 2013 01:35:43 +0000 (01:35 +0000)]
[PowerPC] Support powerpc64le as a syntax-checking target.
This patch provides basic support for powerpc64le as an LLVM target.
However, use of this target will not actually generate little-endian
code. Instead, use of the target will cause the correct little-endian
built-in defines to be generated, so that code that tests for
__LITTLE_ENDIAN__, for example, will be correctly parsed for
syntax-only testing. Code generation will otherwise be the same as
powerpc64 (big-endian), for now.
The patch leaves open the possibility of creating a little-endian
PowerPC64 back end, but there is no immediate intent to create such a
thing.
The LLVM portions of this patch simply add ppc64le coverage everywhere
that ppc64 coverage currently exists. There is nothing of any import
worth testing until such time as little-endian code generation is
implemented. In the corresponding Clang patch, there is a new test
case variant to ensure that correct built-in defines for little-endian
code are generated.
llvm-svn: 187179
Eli Friedman [Fri, 26 Jul 2013 01:21:11 +0000 (01:21 +0000)]
Fix test for Release builds.
llvm-svn: 187178
Rui Ueyama [Fri, 26 Jul 2013 01:18:27 +0000 (01:18 +0000)]
[PECOFF] Create an atom for a symbol whose storage type is IMAGE_SYM_CLASS_LABEL.
llvm-svn: 187177
Eli Friedman [Fri, 26 Jul 2013 00:53:47 +0000 (00:53 +0000)]
Tighten type-checking for vector attributes.
Based on patch by Yunzhong Gao.
llvm-svn: 187176
Eli Friedman [Fri, 26 Jul 2013 00:53:40 +0000 (00:53 +0000)]
Fix gcc search for cross-compiler on Ubuntu 13.04.
Just more craziness to find crtbegin.o etc.
Patch by Stephen Kelly.
llvm-svn: 187175
Eli Friedman [Fri, 26 Jul 2013 00:53:29 +0000 (00:53 +0000)]
Fix GNU ObjC ABI for a message returning a struct.
This allows the ObjFW runtime to correctly implement message forwarding
for messages which return a struct.
Patch by Jonathan Schleifer.
llvm-svn: 187174
Jim Ingham [Fri, 26 Jul 2013 00:27:57 +0000 (00:27 +0000)]
Refine the fix in r187094 to only distrust the StackID comparision when we are starting from an address with no symbols.
If we don't do that "nexti" will stop too soon when stepping past a tail call jump.
rdar://problem/
14516227
llvm-svn: 187173
Eli Friedman [Fri, 26 Jul 2013 00:06:45 +0000 (00:06 +0000)]
Partially revert r186903.
It turns out that Plum Hall depends on us not emitting an error on
integer literals which fit into long long, but fit into
unsigned long long. So C99 conformance requires not conforming to C99. :)
llvm-svn: 187172
Eli Friedman [Fri, 26 Jul 2013 00:06:39 +0000 (00:06 +0000)]
Move friend warning into CXX11 warning group.
Also, fix the wording to reflect this.
llvm-svn: 187171
Reid Kleckner [Thu, 25 Jul 2013 23:20:21 +0000 (23:20 +0000)]
Use env in a pecoff test so it passes with the lit shell test runner
llvm-svn: 187170
Sean Callanan [Thu, 25 Jul 2013 23:12:53 +0000 (23:12 +0000)]
Fixed several problems with watchpoint expressions.
- First, the watchpoint size was being cast to the
wrong type. This is primarily cosmetic, but
annoying.
- Second, the options for the watchpoint command
were not being initialized correctly, which led
to the watchpoint size sometimes having absurdly
large values. This caused watchpoints to fail to
be set in some cases.
<rdar://problem/
12658775>
llvm-svn: 187169
Hans Wennborg [Thu, 25 Jul 2013 23:09:00 +0000 (23:09 +0000)]
Options.td: fold the NoForward flag into DriverOption
They seemed to have the same implications, and this makes for one
less flag to worry about.
Differential Revision: http://llvm-reviews.chandlerc.com/D1219
llvm-svn: 187168
Richard Smith [Thu, 25 Jul 2013 23:08:39 +0000 (23:08 +0000)]
When we perform dependent name lookup during template instantiation, it's not
sufficient to only consider names visible at the point of instantiation,
because that may not include names that were visible when the template was
defined. More generally, if the instantiation backtrace goes through a module
M, then every declaration visible within M should be available to the
instantiation. Any of those declarations might be part of the interface that M
intended to export to a template that it instantiates.
The fix here has two parts:
1) If we find a non-visible declaration during name lookup during template
instantiation, check whether the declaration was visible from the defining
module of all entities on the active template instantiation stack. The defining
module is not the owning module in all cases: we look at the module in which a
template was defined, not the module in which it was first instantiated.
2) Perform pending instantiations at the end of a module, not at the end of the
translation unit. This is general goodness, since it significantly cuts down
the amount of redundant work that is performed in every TU importing a module,
and also implicitly adds the module containing the point of instantiation to
the set of modules checked for declarations in a lookup within a template
instantiation.
There's a known issue here with template instantiations performed while
building a module, if additional imports are added later on. I'll fix that
in a subsequent commit.
llvm-svn: 187167
Bill Wendling [Thu, 25 Jul 2013 23:06:39 +0000 (23:06 +0000)]
Add a bool->StringRef c'tor to StringRef.
llvm-svn: 187166
Reid Kleckner [Thu, 25 Jul 2013 23:05:13 +0000 (23:05 +0000)]
Add yaml2obj to check-lld deps, since the PECOFF tests need it
llvm-svn: 187165
Hans Wennborg [Thu, 25 Jul 2013 22:58:31 +0000 (22:58 +0000)]
Phabricator.rst: tiny fix
llvm-svn: 187164
Hans Wennborg [Thu, 25 Jul 2013 22:55:46 +0000 (22:55 +0000)]
Options.td: finish comment about CompileOnly_Group
llvm-svn: 187163
Rui Ueyama [Thu, 25 Jul 2013 22:46:49 +0000 (22:46 +0000)]
[PECOFF][Driver] Add /nologo command line option.
llvm-svn: 187162
Rui Ueyama [Thu, 25 Jul 2013 22:33:08 +0000 (22:33 +0000)]
[PECOFF][Driver] Split WinLinkDriver::parse for readability.
llvm-svn: 187161
Jordan Rose [Thu, 25 Jul 2013 22:32:35 +0000 (22:32 +0000)]
[analyzer] Remove dead optimization for MaterializeTemporaryExpr.
Previously, we tried to avoid creating new temporary object regions if
the value to be materialized itself came from a temporary object region.
However, once we became more strict about lvalues vs. rvalues (months
ago), this optimization became dead code, because the input to this
function will always be an rvalue (i.e. a symbolic value or compound
value rather than a region, at least for structs).
This would be a nice optimization to keep, but removing it makes it
simpler to reason about temporary regions.
llvm-svn: 187160
Aaron Ballman [Thu, 25 Jul 2013 22:09:31 +0000 (22:09 +0000)]
Using a different loop induction variable than the enclosing scope. No functional changes intended.
llvm-svn: 187159
Roman Divacky [Thu, 25 Jul 2013 21:36:47 +0000 (21:36 +0000)]
PPC32 va_list is an actual structure so va_copy needs to copy the whole
structure not just a pointer. This implements that and thus fixes va_copy
on PPC32. Fixes #15286. Both bug and patch by Florian Zeitz!
llvm-svn: 187158
Manman Ren [Thu, 25 Jul 2013 21:19:31 +0000 (21:19 +0000)]
Debug Info: update comments and add a FIXME.
llvm-svn: 187157
David Blaikie [Thu, 25 Jul 2013 21:19:01 +0000 (21:19 +0000)]
Don't forward all assembler arguments untouched to -cc1as
Use the same filtering for assembly arguments to -cc1as as we do for
-cc1, this allows a consistent (& more useful) diagnostic experience for
users (rather than getting an error from -cc1as (which a user shouldn't
really be thinking about) about --foo, they get an error from clang
about --foo in -Wa,)
I'm sort of surprised by the separation of -cc1as & the separate
argument handling, etc, but at least this removes a little bit of the
duplication.
llvm-svn: 187156
Ed Maste [Thu, 25 Jul 2013 21:02:34 +0000 (21:02 +0000)]
tests: Build test code on FreeBSD the same way as on Linux
llvm-svn: 187155
Rafael Espindola [Thu, 25 Jul 2013 20:25:31 +0000 (20:25 +0000)]
Remove dead code from the makefile build system.
Back in r140220 we removed the autoconf code that would set LLVMCC_OPTION
since it was only used by the test-suite. This patch now removes code
that would only be used if LLVMCC_OPTION was set.
llvm-svn: 187154
Edwin Vane [Thu, 25 Jul 2013 20:20:20 +0000 (20:20 +0000)]
cpp11-migrate: Tweak lit tests to avoid false negatives
Recent failures on a freebsd buildbot indicated a weakness in the
Reformatting.cpp lit test. Tweaking the test to avoid false negatives and
hopefully make the buildbot happy.
llvm-svn: 187153
Rafael Espindola [Thu, 25 Jul 2013 19:40:15 +0000 (19:40 +0000)]
remove empty directories.
llvm-svn: 187152
Rafael Espindola [Thu, 25 Jul 2013 19:36:13 +0000 (19:36 +0000)]
Fix the lldb build after the removal of mblaze.
llvm-svn: 187151
Manman Ren [Thu, 25 Jul 2013 19:33:30 +0000 (19:33 +0000)]
Debug Info: improve the verifier to check field types.
Make sure the context field of DIType is MDNode.
Fix testing cases to make them pass the verifier.
llvm-svn: 187150
Ed Maste [Thu, 25 Jul 2013 19:10:32 +0000 (19:10 +0000)]
Set thread names on FreeBSD
Also move the logic to shorten thread names from linux/Host.cpp to a new
SetShortThreadName as both FreeBSD and Linux need the functionality.
llvm-svn: 187149
Ed Maste [Thu, 25 Jul 2013 19:05:00 +0000 (19:05 +0000)]
Correct typo in comments
llvm-svn: 187148
Ed Maste [Thu, 25 Jul 2013 19:02:57 +0000 (19:02 +0000)]
Remove unused code
- ReadLocker constructors that take a lock
- Unconditional Lock::ReadLock and ReadLocker::Lock
(all consumers use TryLock)
- Make Unlock protected, as it has no external consumers
llvm-svn: 187147
Rafael Espindola [Thu, 25 Jul 2013 18:58:58 +0000 (18:58 +0000)]
Remove empty directories
llvm-svn: 187146
Rafael Espindola [Thu, 25 Jul 2013 18:55:05 +0000 (18:55 +0000)]
Remove the mblaze backend from llvm.
Approval in here http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/064169.html
llvm-svn: 187145
Rafael Espindola [Thu, 25 Jul 2013 18:42:13 +0000 (18:42 +0000)]
Remove the mblaze backend from clang.
Approval in here http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/064169.html
llvm-svn: 187143
Ed Maste [Thu, 25 Jul 2013 18:36:09 +0000 (18:36 +0000)]
tests: Mark expected FreeBSD failures due to pr16699
FreeBSD's Host class doesn't yet return a list of running processes,
so 'platform process list' fails and attach by process name does not
work.
llvm-svn: 187142
Andrew Trick [Thu, 25 Jul 2013 18:35:22 +0000 (18:35 +0000)]
RegAllocGreedy comment.
llvm-svn: 187141
Andrew Trick [Thu, 25 Jul 2013 18:35:19 +0000 (18:35 +0000)]
Evict local live ranges if they can be reassigned.
The previous change to local live range allocation also suppressed
eviction of local ranges. In rare cases, this could result in more
expensive register choices. This commit actually revives a feature
that I added long ago: check if live ranges can be reassigned before
eviction. But now it only happens in rare cases of evicting a local
live range because another local live range wants a cheaper register.
The benefit is improved code size for some benchmarks on x86 and armv7.
I measured no significant compile time increase and performance
changes are noise.
llvm-svn: 187140
Andrew Trick [Thu, 25 Jul 2013 18:35:14 +0000 (18:35 +0000)]
Allocate local registers in order for optimal coloring.
Also avoid locals evicting locals just because they want a cheaper register.
Problem: MI Sched knows exactly how many registers we have and assumes
they can be colored. In cases where we have large blocks, usually from
unrolled loops, greedy coloring fails. This is a source of
"regressions" from the MI Scheduler on x86. I noticed this issue on
x86 where we have long chains of two-address defs in the same live
range. It's easy to see this in matrix multiplication benchmarks like
IRSmk and even the unit test misched-matmul.ll.
A fundamental difference between the LLVM register allocator and
conventional graph coloring is that in our model a live range can't
discover its neighbors, it can only verify its neighbors. That's why
we initially went for greedy coloring and added eviction to deal with
the hard cases. However, for singly defined and two-address live
ranges, we can optimally color without visiting neighbors simply by
processing the live ranges in instruction order.
Other beneficial side effects:
It is much easier to understand and debug regalloc for large blocks
when the live ranges are allocated in order. Yes, global allocation is
still very confusing, but it's nice to be able to comprehend what
happened locally.
Heuristics could be added to bias register assignment based on
instruction locality (think late register pairing, banks...).
Intuituvely this will make some test cases that are on the threshold
of register pressure more stable.
llvm-svn: 187139
Bill Wendling [Thu, 25 Jul 2013 18:34:24 +0000 (18:34 +0000)]
Add a way to add a kind-value string pair to an attribute.
llvm-svn: 187138
Greg Clayton [Thu, 25 Jul 2013 18:29:25 +0000 (18:29 +0000)]
Add explicit braces to quiet the "avoid dangling else" warning from clang.
llvm-svn: 187137
Adrian Prantl [Thu, 25 Jul 2013 17:52:30 +0000 (17:52 +0000)]
typo.
llvm-svn: 187135
Ed Maste [Thu, 25 Jul 2013 17:23:10 +0000 (17:23 +0000)]
tests: Mark expected FreeBSD failures due to pr16706
Watchpoints are not yet working on FreeBSD
llvm-svn: 187134
Jordan Rose [Thu, 25 Jul 2013 17:22:05 +0000 (17:22 +0000)]
[analyzer] Add regression test for the crash in PR16664.
This goes with r186925, which reverted Pavel's commit in r186498.
Also, add a correctness test for the future.
llvm-svn: 187133
Jordan Rose [Thu, 25 Jul 2013 17:22:02 +0000 (17:22 +0000)]
[analyzer] Weaken assertion to account for pointer-to-integer casts.
PR16690
llvm-svn: 187132
Ed Maste [Thu, 25 Jul 2013 17:17:15 +0000 (17:17 +0000)]
tests: Mark expected FreeBSD failures due to pr16696
Live debugging for threaded inferiors is not yet implemented on FreeBSD
llvm-svn: 187131
Rafael Espindola [Thu, 25 Jul 2013 17:16:05 +0000 (17:16 +0000)]
Current batch of -disable-debug-info-verifier.
llvm-svn: 187130
Ed Maste [Thu, 25 Jul 2013 16:53:38 +0000 (16:53 +0000)]
Skip dead-strip test also on FreeBSD
-dead_strip isn't supported by FreeBSD's ld.
llvm-svn: 187129
Tim Northover [Thu, 25 Jul 2013 16:23:55 +0000 (16:23 +0000)]
AArch64: add llc-based tests for previous commit.
Better to have tests run even on non-AArch64 platforms.
llvm-svn: 187128
Ed Maste [Thu, 25 Jul 2013 16:08:48 +0000 (16:08 +0000)]
Annote expected failures on FreeBSD due to pr14540
PR title updated to indicate that FreeBSD is also affected: Backtrace
command does not display c++ member function names on Linux or FreeBSD
llvm-svn: 187127
Tim Northover [Thu, 25 Jul 2013 16:03:54 +0000 (16:03 +0000)]
AArch64: fix even more JIT failures
The last patch corrected some issues, but constant-pool entries had actual
codegen bugs in the large memory model (which MCJIT uses).
llvm-svn: 187126
Ashok Thirumurthi [Thu, 25 Jul 2013 15:13:50 +0000 (15:13 +0000)]
Fixes LLDB address ranges with gcc 4.8
- Modifies the DWARF parser for DWARF 4 specification of hi_pc as an offset-from-low-pc.
llvm-svn: 187125
Rafael Espindola [Thu, 25 Jul 2013 15:00:17 +0000 (15:00 +0000)]
Don't end a file name with a dot. It looks odd.
llvm-svn: 187124
Rafael Espindola [Thu, 25 Jul 2013 14:52:56 +0000 (14:52 +0000)]
Move not past env.
This only makes a difference with broken versions of env (like the one in
gnutools32) that always return 0.
llvm-svn: 187123
Rafael Espindola [Thu, 25 Jul 2013 13:45:29 +0000 (13:45 +0000)]
Don't pass %s twice to clang -cc1.
The reason this clang invocation was failing is that it had two %s. We would
close stdout after the first one and report a fatal error when trying to
print the second.
llvm-svn: 187122
Ed Maste [Thu, 25 Jul 2013 13:24:34 +0000 (13:24 +0000)]
Fix test execution on FreeBSD versions other than 9.x
The tests use a plugin based on the name from sys.platform.
Unfortunately that string includes the major version number in
Python 2.7, so the tests would look for builder_freebsd9.py,
builder_freebsd10.py, etc.
The issue doesn't affect Linux as Python returns 'linux2' also
on Linux 3.x -- see http://bugs.python.org/issue12326 for details.
It seems later versions of Python will drop the major version
number, so adopt this convention now for FreeBSD.
llvm-svn: 187121
Tim Northover [Thu, 25 Jul 2013 12:42:52 +0000 (12:42 +0000)]
AArch64: don't mask off shift bits when processing JIT relocations.
This should actually make the MCJIT tests pass again on AArch64. I don't know
how I missed their failure before.
llvm-svn: 187120
Justin Holewinski [Thu, 25 Jul 2013 12:32:00 +0000 (12:32 +0000)]
Fix a bug in TableGen where the intrinsic function name recognizer could mis-identify names if one was a prefix substring of the other
For two intrinsics 'llvm.nvvm.texsurf.handle' and 'llvm.nvvm.texsurf.handle.internal',
TableGen was emitting matching code like:
if (Name.startswith("llvm.nvvm.texsurf.handle")) ...
if (Name.startswith("llvm.nvvm.texsurf.handle.internal")) ...
We can never match "llvm.nvvm.texsurf.handle.internal" here because it will
always be erroneously matched by the first condition.
The fix is to sort the intrinsic names and emit them in reverse order.
llvm-svn: 187119
Daniel Jasper [Thu, 25 Jul 2013 11:31:57 +0000 (11:31 +0000)]
clang-format: Fix switch/case interaction with macros.
Before:
#define OPERATION_CASE(name) \
case OP_name: \
return operations::Operation##name
switch (OpCode) {
CASE(Add);
CASE(Subtract);
default:
return operations::Unknown;
}
After:
#define OPERATION_CASE(name) \
case OP_name: \
return operations::Operation##name;
switch (OpCode) {
CASE(Add);
CASE(Subtract);
default:
return operations::Unknown;
}
llvm-svn: 187118
Richard Sandiford [Thu, 25 Jul 2013 10:53:02 +0000 (10:53 +0000)]
Fix a comment cut-&-pasto.
llvm-svn: 187117
Richard Sandiford [Thu, 25 Jul 2013 09:34:38 +0000 (09:34 +0000)]
[SystemZ] Rework compare and branch support
Before the patch we took advantage of the fact that the compare and
branch are glued together in the selection DAG and fused them together
(where possible) while emitting them. This seemed to work well in practice.
However, fusing the compare so early makes it harder to remove redundant
compares in cases where CC already has a suitable value. This patch
therefore uses the peephole analyzeCompare/optimizeCompareInstr pair of
functions instead.
No behavioral change intended, but it paves the way for a later patch.
llvm-svn: 187116
Daniel Jasper [Thu, 25 Jul 2013 09:32:14 +0000 (09:32 +0000)]
Use memoization for has()-matcher.
In TUs with large classes, a matcher like
methodDecl(ofClass(recordDecl(has(varDecl()))))
(finding all member functions of classes with static variables)
becomes unbearably slow otherwise.
llvm-svn: 187115
Hongbin Zheng [Thu, 25 Jul 2013 09:12:07 +0000 (09:12 +0000)]
BlockGenerator: Split getNewValue.
Split the old getNewValue into two parts:
1. The function "lookupAvailableValue" that return the new version of
the instruction which is already available.
2. The function calls "lookupAvailableValue", and tries to generate
the new version if it is not available yet.
llvm-svn: 187114
Richard Sandiford [Thu, 25 Jul 2013 09:11:15 +0000 (09:11 +0000)]
[SystemZ] Add LOCR and LOCGR
llvm-svn: 187113
Richard Sandiford [Thu, 25 Jul 2013 09:04:52 +0000 (09:04 +0000)]
[SystemZ] Add LOC and LOCG
As with the stores, these instructions can trap when the condition is false,
so they are only used for things like (cond ? x : *ptr).
llvm-svn: 187112
Richard Sandiford [Thu, 25 Jul 2013 08:57:02 +0000 (08:57 +0000)]
[SystemZ] Add STOC and STOCG
These instructions are allowed to trap even if the condition is false,
so for now they are only used for "*ptr = (cond ? x : *ptr)"-style
constructs.
llvm-svn: 187111
Andrew Trick [Thu, 25 Jul 2013 07:26:35 +0000 (07:26 +0000)]
MI Sched: Register pressure heuristics.
Consider which set is being increased or decreased before comparing.
llvm-svn: 187110
Andrew Trick [Thu, 25 Jul 2013 07:26:32 +0000 (07:26 +0000)]
MI Sched: track register pressure by importance of the set, not weight of the units.
llvm-svn: 187109
Andrew Trick [Thu, 25 Jul 2013 07:26:29 +0000 (07:26 +0000)]
RegPressure: Order the "pressure sets" by number of regunits per set.
This lets heuristics easily pick the most important set to follow.
llvm-svn: 187108
Andrew Trick [Thu, 25 Jul 2013 07:26:26 +0000 (07:26 +0000)]
Dump LIS before regalloc. MI sched changes them.
llvm-svn: 187107
Manman Ren [Thu, 25 Jul 2013 06:43:01 +0000 (06:43 +0000)]
Debug Info: improve the verifier to check field types.
Make sure the context and type fields are MDNodes. We will generate
verification errors if those fields are non-empty strings.
Fix testing cases to make them pass the verifier.
llvm-svn: 187106
Manuel Klimek [Thu, 25 Jul 2013 06:05:50 +0000 (06:05 +0000)]
Fix incorrect documentation generation for type matchers.
llvm-svn: 187104
Rafael Espindola [Thu, 25 Jul 2013 03:23:25 +0000 (03:23 +0000)]
Respect llvm.used in Internalize.
The language reference says that:
"If a symbol appears in the @llvm.used list, then the compiler,
assembler, and linker are required to treat the symbol as if there is
a reference to the symbol that it cannot see"
Since even the linker cannot see the reference, we must assume that
the reference can be using the symbol table. For example, a user can add
__attribute__((used)) to a debug helper function like dump and use it from
a debugger.
llvm-svn: 187103
Tobias Grosser [Thu, 25 Jul 2013 03:02:29 +0000 (03:02 +0000)]
ScopDetect: Only track detection failures if actually needed.
String operations resulted by raw_string_ostream in the INVALID macro can lead
to significant compile-time overhead when compiling large size source code.
This is because raw_string_ostream relies on TypeFinder class, whose
compile-time cost increases as the size of the module increases. This patch
targets to ensure that it only track detection failures if actually needed.
In this way, we can avoid expensive string operations in normal execution.
With this patch file, the relative compile-time cost of Polly-detect pass does
not increase even when compiling very large size source code.
Contributed-by: Star Tan <tanmx_star@yeah.net>
llvm-svn: 187102
Tobias Grosser [Thu, 25 Jul 2013 03:02:26 +0000 (03:02 +0000)]
Convert line endings to unix style
llvm-svn: 187101
Rui Ueyama [Thu, 25 Jul 2013 02:57:39 +0000 (02:57 +0000)]
[PECOFF][Driver] Allow multiple /include options.
llvm-svn: 187100
Nick Lewycky [Thu, 25 Jul 2013 02:55:14 +0000 (02:55 +0000)]
Check that TD isn't NULL before dereferencing it down this path.
llvm-svn: 187099
Rafael Espindola [Thu, 25 Jul 2013 02:50:08 +0000 (02:50 +0000)]
Make these methods const correct.
Thanks to Nick Lewycky for noticing it.
llvm-svn: 187098