Reed Kotler [Sun, 8 Dec 2013 16:51:52 +0000 (16:51 +0000)]
Cleaning up of prologue/epilogue code for Mips16. First step
here is to make save/restore into variable number of argument instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196726
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Sun, 8 Dec 2013 15:56:50 +0000 (15:56 +0000)]
ARM: fix folding of stack-adjustment (yet again).
When trying to eliminate an "sub sp, sp, #N" instruction by folding
it into an existing push/pop using dummy registers, we need to account
for the fact that this might affect precisely how "fp" gets set in the
prologue.
We were attempting this, but assuming that *whenever* we performed a
fold it would make a difference. This is false, for example, in:
push {r4, r7, lr}
add fp, sp, #4
vpush {d8}
sub sp, sp, #8
we can fold the "sub" into the "vpush", forming "vpush {d7, d8}".
However, in that case the "add fp" instruction mustn't change, which
we were getting wrong before.
Should fix PR18160.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196725
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Sun, 8 Dec 2013 12:16:20 +0000 (12:16 +0000)]
Fixed CRLF
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196719
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Sun, 8 Dec 2013 11:35:09 +0000 (11:35 +0000)]
Ensure bitcode encoding of visibility styles stays stable. Patch by Boaz Ouriel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196718
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sun, 8 Dec 2013 01:28:17 +0000 (01:28 +0000)]
Fix comments for PassDebuggingString
No functionality change. Changing comments to match code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196713
91177308-0d34-0410-b5e6-
96231b3b80d8
Mark Seaborn [Sun, 8 Dec 2013 00:51:21 +0000 (00:51 +0000)]
Fix inlining to not lose the "cleanup" clause from landingpads
This fixes PR17872. This bug can lead to C++ destructors not being
called when they should be, when an exception is thrown.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196711
91177308-0d34-0410-b5e6-
96231b3b80d8
Mark Seaborn [Sun, 8 Dec 2013 00:50:58 +0000 (00:50 +0000)]
Fix inlining to not produce duplicate landingpad clauses
Before this change, inlining one "invoke" into an outer "invoke" call
site can lead to the outer landingpad's catch/filter clauses being
copied multiple times into the resulting landingpad. This happens:
* when the inlined function contains multiple "resume" instructions,
because forwardResume() copies the clauses but is called multiple
times;
* when the inlined function contains a "resume" and a "call", because
HandleCallsInBlockInlinedThroughInvoke() copies the clauses but is
redundant with forwardResume().
Fix this by deduplicating the code.
This problem doesn't lead to any incorrect execution; it's only
untidy.
This change will make fixing PR17872 a little easier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196710
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Sat, 7 Dec 2013 21:46:08 +0000 (21:46 +0000)]
force vector width via cpu on vectorizer metadata enable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196669
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Sat, 7 Dec 2013 21:20:17 +0000 (21:20 +0000)]
Don't #include heavy Dominators.h file in LoopInfo.h. This change reduces
overall time of LLVM compilation by ~1%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196667
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 7 Dec 2013 19:34:20 +0000 (19:34 +0000)]
Remove the notion of primitive types.
They were out of place since the introduction of arbitrary precision integer
types.
This also synchronizes the documentation to Types.h, so it refers to first class
types and single value types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196661
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 7 Dec 2013 11:21:42 +0000 (11:21 +0000)]
Whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196654
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 7 Dec 2013 06:17:10 +0000 (06:17 +0000)]
Remove empty MCJIT/load-object-a.ll since r196641.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196645
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 7 Dec 2013 05:59:44 +0000 (05:59 +0000)]
Factor out the SchedRemainder/SchedBoundary from GenericScheduler strategy.
These helper classes take care of the book-keeping the drives the
GenericScheduler heuristics. It is likely that developers writing
target-specific schedulers that work similarly to GenericScheduler
will want to use these helpers too. The immediate goal is to develop a
GenericPostScheduler that can run in place of the old PostRAScheduler,
but will use the new machine model.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196643
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sat, 7 Dec 2013 04:25:19 +0000 (04:25 +0000)]
Revert r196639 while I investigate a bot failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196641
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sat, 7 Dec 2013 03:30:59 +0000 (03:30 +0000)]
Correct think-o in foldPatchpoint. Thanks to Andy Trick for pointing it out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196640
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sat, 7 Dec 2013 03:05:51 +0000 (03:05 +0000)]
Add support for archives and object file caching under MCJIT.
Patch by Andy Kaylor, with minor edits to resolve merge conflicts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196639
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 7 Dec 2013 02:58:45 +0000 (02:58 +0000)]
Fix assert with copy from global through addrspacecast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196638
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 7 Dec 2013 02:58:41 +0000 (02:58 +0000)]
Add getBitCastOrAddrSpaceCast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196637
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 7 Dec 2013 02:48:29 +0000 (02:48 +0000)]
[mips] Fix test case.
Indent the command lines to indicate they continue from previous lines. Also,
fix incorrect uses of CHECK-DAG and CHECK-NOT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196636
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 7 Dec 2013 02:27:52 +0000 (02:27 +0000)]
Remove unused value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196635
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Sat, 7 Dec 2013 01:49:19 +0000 (01:49 +0000)]
Add a RequireStructuredCFG Field to TargetMachine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196634
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Sat, 7 Dec 2013 01:49:10 +0000 (01:49 +0000)]
R600: Remove orphaned declarations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196633
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Sat, 7 Dec 2013 01:28:11 +0000 (01:28 +0000)]
llvm-cov: Added test.h header to tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196632
91177308-0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Sat, 7 Dec 2013 00:13:34 +0000 (00:13 +0000)]
Fix the segfault reported in PR 11990.
The sefault occurs due to an infinite loop when the verifier tries to
determine the size of a type of the form "%rt = type { %rt }" while
checking an alloca of the type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196626
91177308-0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Fri, 6 Dec 2013 23:09:24 +0000 (23:09 +0000)]
Fix a narrowing warning due to a type mismatch (size_t vs uint64).
lib/Transforms/Instrumentation/AddressSanitizer.cpp:1405:36: error: non-constant-expression cannot be narrowed from type 'uint64_t' (aka 'unsigned long long') to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
getAllocaSizeInBytes(AI),
^~~~~~~~~~~~~~~~~~~~~~~~
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196623
91177308-0d34-0410-b5e6-
96231b3b80d8
David Peixotto [Fri, 6 Dec 2013 23:05:33 +0000 (23:05 +0000)]
Cache AllowAtInIdentifier as class variable in AsmLexer
This commit caches the value of the AllowAtInIdentifier variable as
a class variable in AsmLexer. We do this to avoid repeated MAI
queries and string comparisons each time we lex an identifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196622
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 6 Dec 2013 22:56:19 +0000 (22:56 +0000)]
Support: Fix handling of args that begin with @ but aren't files
Command line arguments that begin with @ but aren't a path to an
existing file currently cause later @file arguments to be ignored.
Correctly skip over these arguments instead of trying to read a
non-existent file 20 times and giving up.
Since the problem manifests in the clang driver, the test is in that
repository.
Fixes rdar://problem/
15590906
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196620
91177308-0d34-0410-b5e6-
96231b3b80d8
Ana Pazos [Fri, 6 Dec 2013 22:48:17 +0000 (22:48 +0000)]
Added support for mcpu krait
- krait processor currently modeled with the same features as A9.
- Krait processor additionally has VFP4 (fused multiply add/sub)
and hardware division features enabled.
- krait has currently the same Schedule model as A9
- krait cpu flag is not recognized by the GNU assembler yet,
it is replaced with march=armv7-a to avoid a lower march
from being used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196619
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 6 Dec 2013 22:33:05 +0000 (22:33 +0000)]
DebugInfo: Move unit begin/end labels into the unit
This removes another case of spooky action at a distance (building the
same label names in multiple places creating an implicit dependency
between those places) and helps pave the way for type units.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196617
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 6 Dec 2013 22:14:48 +0000 (22:14 +0000)]
DebugInfo: Include the section and start-of-section label in the unit
This is a precursor to moving type units into the correct (debug_types)
section with comdat groups and full type unit headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196615
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 6 Dec 2013 21:48:36 +0000 (21:48 +0000)]
Don't use isNullValue to evaluate ConstantExpr
ConstantExpr can evaluate to false even when isNullValue gives false.
Fixes PR18143.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196611
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Fri, 6 Dec 2013 21:33:50 +0000 (21:33 +0000)]
llvm-cov: Regenerated gcov files with r195513 changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196609
91177308-0d34-0410-b5e6-
96231b3b80d8
David Peixotto [Fri, 6 Dec 2013 20:35:58 +0000 (20:35 +0000)]
Integrated assembler incorrectly lexes ARM-style comments
The integrated assembler fails to properly lex arm comments when
they are adjacent to an identifier in the input stream. The reason
is that the arm comment symbol '@' is also used as symbol variant in
other assembly languages so when lexing an identifier it allows the
'@' symbol as part of the identifier.
Example:
$ cat comment.s
foo:
add r0, r0@got to parse this as a comment
$ llvm-mc -triple armv7 comment.s
comment.s:4:18: error: unexpected token in argument list
add r0, r0@got to parse this as a comment
^
This should be parsed as correctly as `add r0, r0`.
This commit modifes the assembly lexer to not include the '@' symbol
in identifiers when lexing for targets that use '@' for comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196607
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 6 Dec 2013 20:12:19 +0000 (20:12 +0000)]
micro optimization: isSizedDerivedType is only called with arrays, vectors and structs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196604
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 6 Dec 2013 19:38:49 +0000 (19:38 +0000)]
DwarfDebug: Walk skeletons during fission pubtypes/pubnames emission
This more accurately represents the actual walk - pubnames/pubtypes are
emitted into the .o, not the .dwo, and reference the skeletons not the
full units.
Use the newly established ID->index invariant to lookup the underlying
full unit to retrieve its public names and types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196601
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 6 Dec 2013 19:38:46 +0000 (19:38 +0000)]
DebugInfo: Ensure unit IDs (for non-skeletal units) match thein index in the list
This simplifies reasoning about the code and enables simple navigation
from a skeleton to its full unit. (currently there are no type unit
skeletons, so the skeleton list doesn't have the same ID == index
property)
Eventually we should get rid of this ID and just store the labels we
need as the IDs are allowing this code to create difficult to
manage/understand associations (loops over non-skeletal units are
implicitly referencing their skeletal units during pub* emission, for
example). It may be necessary to have some kind of skeleton->full unit
association and a more direct pointer or similar device would be
preferable than an index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196600
91177308-0d34-0410-b5e6-
96231b3b80d8
Weiming Zhao [Fri, 6 Dec 2013 17:56:48 +0000 (17:56 +0000)]
Bug 18149: [AArch32] VSel instructions has no ARMCC field
The current peephole optimizing for compare inst assumes an instr that
uses CPSR has an MO for ARM Cond code.However, for VSEL instructions
(vseqeq, vselgt, vselgt, vselvs), there is no such operand nor do
they support the modification of Cond Code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196588
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 6 Dec 2013 17:19:20 +0000 (17:19 +0000)]
comment grammar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196585
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Fri, 6 Dec 2013 13:35:35 +0000 (13:35 +0000)]
Update AVX512 vector blend intrinsic names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196581
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Fri, 6 Dec 2013 09:59:12 +0000 (09:59 +0000)]
[SystemZ] Use LOAD AND TEST for comparisons with -0
...since it os equivalent to comparison with +0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196580
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Fri, 6 Dec 2013 09:56:50 +0000 (09:56 +0000)]
[SystemZ] Extend the use of C(L)GFR
instcombine prefers to put extended operands first, so this patch
handles that case for C(L)GFR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196579
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Fri, 6 Dec 2013 09:53:09 +0000 (09:53 +0000)]
[SystemZ] Optimize selects between 0 and -1
Since z has no setcc instruction as such, the choice of setBooleanContents
is a bit arbitrary. Currently it's set to ZeroOrOneBooleanContent,
so we produced a branch-free form when selecting between 0 and 1,
but not when selecting between 0 and -1. This patch handles the latter
case too.
At some point I'd like to measure whether it's better to use conditional
moves for constant selects on z196, but that's future work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196578
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 6 Dec 2013 09:26:09 +0000 (09:26 +0000)]
[asan] fix ndebug build with strict warnings (-Wunused-variable)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196574
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 6 Dec 2013 09:00:17 +0000 (09:00 +0000)]
[asan] rewrite asan's stack frame layout
Summary:
Rewrite asan's stack frame layout.
First, most of the stack layout logic is moved into a separte file
to make it more testable and (potentially) useful for other projects.
Second, make the frames more compact by using adaptive redzones
(smaller for small objects, larger for large objects).
Third, try to minimized gaps due to large alignments (this is hypothetical since
today we don't see many stack vars aligned by more than 32).
The frames indeed become more compact, but I'll still need to run more benchmarks
before committing, but I am sking for review now to get early feedback.
This change will be accompanied by a trivial change in compiler-rt tests
to match the new frame sizes.
Reviewers: samsonov, dvyukov
Reviewed By: samsonov
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2324
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196568
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Fri, 6 Dec 2013 08:58:22 +0000 (08:58 +0000)]
Fix bug introduced in r196517.
Not only does it trigger -Wparentheses, I think the assert actually
relies on incorrect operator precedence.
Also, the grammar as questionable, but I might not know enough about the
problem at hand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196567
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 6 Dec 2013 02:45:24 +0000 (02:45 +0000)]
Fix an index array check.
Patch by Marius Wachtler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196561
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 6 Dec 2013 02:33:38 +0000 (02:33 +0000)]
Fix a pair of array index checks.
Patch by Marius Wachtler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196560
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Fri, 6 Dec 2013 01:06:04 +0000 (01:06 +0000)]
Object/COFF: Add export table entry structs.
Differential Revision: http://llvm-reviews.chandlerc.com/D2335
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196556
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Fri, 6 Dec 2013 00:28:54 +0000 (00:28 +0000)]
[Stackmap] Update stackmap unit test to use AnyRegCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196552
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Fri, 6 Dec 2013 00:13:50 +0000 (00:13 +0000)]
Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196551
91177308-0d34-0410-b5e6-
96231b3b80d8
Yi Jiang [Thu, 5 Dec 2013 22:42:50 +0000 (22:42 +0000)]
Apply transformation on OS X 10.9+ and iOS 7.0+: pow(10, x) ―> __exp10(x)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196544
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Thu, 5 Dec 2013 22:02:33 +0000 (22:02 +0000)]
llvm-cov: Further improved error messages.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196542
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Thu, 5 Dec 2013 22:02:29 +0000 (22:02 +0000)]
llvm-cov: Conformed headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196541
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Thu, 5 Dec 2013 21:45:39 +0000 (21:45 +0000)]
Move test to X86 dir
Test is platform independent, but I don't want to force vector-width, or
that could spoil the pragma test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196539
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Thu, 5 Dec 2013 21:20:02 +0000 (21:20 +0000)]
Add #pragma vectorize enable/disable to LLVM
The intended behaviour is to force vectorization on the presence
of the flag (either turn on or off), and to continue the behaviour
as expected in its absence. Tests were added to make sure the all
cases are covered in opt. No tests were added in other tools with
the assumption that they should use the PassManagerBuilder in the
same way.
This patch also removes the outdated -late-vectorize flag, which was
on by default and not helping much.
The pragma metadata is being attached to the same place as other loop
metadata, but nothing forbids one from attaching it to a function
(to enable #pragma optimize) or basic blocks (to hint the basic-block
vectorizers), etc. The logic should be the same all around.
Patches to Clang to produce the metadata will be produced after the
initial implementation is agreed upon and committed. Patches to other
vectorizers (such as SLP and BB) will be added once we're happy with
the pass manager changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196537
91177308-0d34-0410-b5e6-
96231b3b80d8
Aditya Nandakumar [Thu, 5 Dec 2013 21:18:40 +0000 (21:18 +0000)]
Check hint registers for interference only once before evictions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196536
91177308-0d34-0410-b5e6-
96231b3b80d8
Ana Pazos [Thu, 5 Dec 2013 21:07:49 +0000 (21:07 +0000)]
Implemented vget/vset_lane_f16 intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196533
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Thu, 5 Dec 2013 20:45:36 +0000 (20:45 +0000)]
llvm-cov: Changed extension from .llcov to .gcov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196530
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 5 Dec 2013 20:02:18 +0000 (20:02 +0000)]
Revert part of GCC warning fix to fix debug build.
The typedef is used inside the DEBUG(), and apparently can't be moved
inside of it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196528
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 5 Dec 2013 19:37:36 +0000 (19:37 +0000)]
Fix minor GCC warnings.
Unused typedefs and unused variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196526
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 5 Dec 2013 18:42:12 +0000 (18:42 +0000)]
Change std::deque => std::vector. No functionality change.
There is no reason to use std::deque here over std::vector. Thus given the
performance differences inbetween the two it makes sense to change deque to
vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196524
91177308-0d34-0410-b5e6-
96231b3b80d8
Yunzhong Gao [Thu, 5 Dec 2013 18:37:54 +0000 (18:37 +0000)]
Document that dllexported symbols are preserved by optimization passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196523
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 5 Dec 2013 18:28:01 +0000 (18:28 +0000)]
Fix non-deterministic behavior.
We use CSEBlocks to initialize a worklist:
SmallVector<BasicBlock *, 8> CSEWorkList(CSEBlocks.begin(), CSEBlocks.end());
so it must have a deterministic order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196520
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 5 Dec 2013 18:06:10 +0000 (18:06 +0000)]
Rename DwarfUnits to DwarfFile to help avoid some naming confusion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196519
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 5 Dec 2013 17:56:02 +0000 (17:56 +0000)]
MI-Sched: Model "reserved" processor resources.
This allows a target to use MI-Sched as an in-order scheduler that
will model strict resource conflicts without defining a processor
itinerary. Instead, the target can now use the new per-operand machine
model and define in-order resources with BufferSize=0. For example,
this would allow restricting the type of operations that can be formed
into a dispatch group. (Normally NumMicroOps is sufficient to enforce
dispatch groups).
If the intent is to model latency in in-order pipeline, as opposed to
resource conflicts, then a resource with BufferSize=1 should be
defined instead.
This feature is only casually tested as there are no in-tree targets
using it yet. However, Hal will be experimenting with POWER7.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196517
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 5 Dec 2013 17:55:58 +0000 (17:55 +0000)]
MI-Sched: handle latency of in-order operations with the new machine model.
The per-operand machine model allows the target to define "unbuffered"
processor resources. This change is a quick, cheap way to model stalls
caused by the latency of operations that use such resources. This only
applies when the processor's micro-op buffer size is non-zero
(Out-of-Order). We can't precisely model in-order stalls during
out-of-order execution, but this is an easy and effective
heuristic. It benefits cortex-a9 scheduling when using the new
machine model, which is not yet on by default.
MI-Sched for armv7 was evaluated on Swift (and only not enabled because
of a performance bug related to predication). However, we never
evaluated Cortex-A9 performance on MI-Sched in its current form. This
change adds MI-Sched functionality to reach performance goals on
A9. The only remaining change is to allow MI-Sched to run as a PostRA
pass.
I evaluated performance using a set of options to estimate the performance impact once MI sched is default on armv7:
-mcpu=cortex-a9 -disable-post-ra -misched-bench -scheditins=false
For a simple saxpy loop I see a 1.7x speedup. Here are the llvm-testsuite results:
(min run time over 2 runs, filtering tiny changes)
Speedups:
| Benchmarks/BenchmarkGame/recursive | 52.39% |
| Benchmarks/VersaBench/beamformer | 20.80% |
| Benchmarks/Misc/pi | 19.97% |
| Benchmarks/Misc/mandel-2 | 19.95% |
| SPEC/CFP2000/188.ammp | 18.72% |
| Benchmarks/McCat/08-main/main | 18.58% |
| Benchmarks/Misc-C++/Large/sphereflake | 18.46% |
| Benchmarks/Olden/power | 17.11% |
| Benchmarks/Misc-C++/mandel-text | 16.47% |
| Benchmarks/Misc/oourafft | 15.94% |
| Benchmarks/Misc/flops-7 | 14.99% |
| Benchmarks/FreeBench/distray | 14.26% |
| SPEC/CFP2006/470.lbm | 14.00% |
| mediabench/mpeg2/mpeg2dec/mpeg2decode | 12.28% |
| Benchmarks/SmallPT/smallpt | 10.36% |
| Benchmarks/Misc-C++/Large/ray | 8.97% |
| Benchmarks/Misc/fp-convert | 8.75% |
| Benchmarks/Olden/perimeter | 7.10% |
| Benchmarks/Bullet/bullet | 7.03% |
| Benchmarks/Misc/mandel | 6.75% |
| Benchmarks/Olden/voronoi | 6.26% |
| Benchmarks/Misc/flops-8 | 5.77% |
| Benchmarks/Misc/matmul_f64_4x4 | 5.19% |
| Benchmarks/MiBench/security-rijndael | 5.15% |
| Benchmarks/Misc/flops-6 | 5.10% |
| Benchmarks/Olden/tsp | 4.46% |
| Benchmarks/MiBench/consumer-lame | 4.28% |
| Benchmarks/Misc/flops-5 | 4.27% |
| Benchmarks/mafft/pairlocalalign | 4.19% |
| Benchmarks/Misc/himenobmtxpa | 4.07% |
| Benchmarks/Misc/lowercase | 4.06% |
| SPEC/CFP2006/433.milc | 3.99% |
| Benchmarks/tramp3d-v4 | 3.79% |
| Benchmarks/FreeBench/pifft | 3.66% |
| Benchmarks/Ptrdist/ks | 3.21% |
| Benchmarks/Adobe-C++/loop_unroll | 3.12% |
| SPEC/CINT2000/175.vpr | 3.12% |
| Benchmarks/nbench | 2.98% |
| SPEC/CFP2000/183.equake | 2.91% |
| Benchmarks/Misc/perlin | 2.85% |
| Benchmarks/Misc/flops-1 | 2.82% |
| Benchmarks/Misc-C++-EH/spirit | 2.80% |
| Benchmarks/Misc/flops-2 | 2.77% |
| Benchmarks/NPB-serial/is | 2.42% |
| Benchmarks/ASC_Sequoia/CrystalMk | 2.33% |
| Benchmarks/BenchmarkGame/n-body | 2.28% |
| Benchmarks/SciMark2-C/scimark2 | 2.27% |
| Benchmarks/Olden/bh | 2.03% |
| skidmarks10/skidmarks | 1.81% |
| Benchmarks/Misc/flops | 1.72% |
Slowdowns:
| Benchmarks/llubenchmark/llu | -14.14% |
| Benchmarks/Polybench/stencils/seidel-2d | -5.67% |
| Benchmarks/Adobe-C++/functionobjects | -5.25% |
| Benchmarks/Misc-C++/oopack_v1p8 | -5.00% |
| Benchmarks/Shootout/hash | -2.35% |
| Benchmarks/Prolangs-C++/ocean | -2.01% |
| Benchmarks/Polybench/medley/floyd-warshall | -1.98% |
| Polybench/linear-algebra/kernels/3mm | -1.95% |
| Benchmarks/McCat/09-vor/vor | -1.68% |
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196516
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 5 Dec 2013 17:55:53 +0000 (17:55 +0000)]
Machine model comments. Explain a ProcessorUnit's BufferSize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196515
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 5 Dec 2013 17:55:49 +0000 (17:55 +0000)]
Fix the A9 machine model. VTRN writes two registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196514
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 5 Dec 2013 17:55:47 +0000 (17:55 +0000)]
comment typo and reformat
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196513
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 5 Dec 2013 16:21:17 +0000 (16:21 +0000)]
Add a default constructor to get deterministic behavior.
Should fix the msan and valgrind bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196509
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Thu, 5 Dec 2013 15:14:40 +0000 (15:14 +0000)]
SLPVectorizer: An in-tree vectorized entry cannot also be a scalar external use
We were creating external uses for scalar values in MustGather entries that also
had a ScalarToTreeEntry (they also are present in a vectorized tuple). This
meant we would keep a value 'alive' as a scalar and vectorized causing havoc.
This is not necessary because when we create a MustGather vector we explicitly
create external uses entries for the insertelement instructions of the
MustGather vector elements.
Fixes PR18129.
radar://
15582184
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196508
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 5 Dec 2013 15:03:02 +0000 (15:03 +0000)]
[tsan] fix PR18146: sometimes a variable written into vptr could have an integer type (after other optimizations)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196507
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Thu, 5 Dec 2013 12:58:00 +0000 (12:58 +0000)]
[NVPTX] Fix off-by-one error when creating the VT list for an SDNode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196503
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Thu, 5 Dec 2013 12:52:32 +0000 (12:52 +0000)]
Add forgotten header guards
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196500
91177308-0d34-0410-b5e6-
96231b3b80d8
Matheus Almeida [Thu, 5 Dec 2013 12:07:05 +0000 (12:07 +0000)]
[mips] Small code generation improvement for conditional operator (select)
in case the operands are constants and its difference is |1|.
It should be possible in those cases to rematerialize the result using
MIPS's slt and similar instructions.
The small update to some of the tests in cmov.ll, sel1c.ll and sel2c.ll was needed
otherwise the optimization implemented in this patch would have been triggered
(difference between the operands was 1) and that would have changed the semantic
of the tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196498
91177308-0d34-0410-b5e6-
96231b3b80d8
Matheus Almeida [Thu, 5 Dec 2013 11:56:56 +0000 (11:56 +0000)]
[mips] Add some comments related to the optimization performed in performSELECTCombine.
The structure of the code was slightly modified so that the next patch is easier to read/review.
No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196496
91177308-0d34-0410-b5e6-
96231b3b80d8
Matheus Almeida [Thu, 5 Dec 2013 11:06:22 +0000 (11:06 +0000)]
[mips][msa] Fix issue with immediate fields of LD/ST instructions
not being correctly encoded/decoded.
In more detail, immediate fields of LD/ST instructions should be
divided/multiplied by the size of the data format before encoding and
after decoding, respectively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196494
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 5 Dec 2013 11:02:02 +0000 (11:02 +0000)]
ARM: fix yet another stack-folding bug
We were trying to fold the stack adjustment into the wrong instruction in the
situation where the entire basic-block was epilogue code. Really, it can only
ever be valid to do the folding precisely where the "add sp, ..." would be
placed so there's no need for a separate iterator to track that.
Should fix PR18136.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196493
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 5 Dec 2013 07:43:55 +0000 (07:43 +0000)]
DwarfDebug/DwarfUnit: Push abbreviation structures down into DwarfUnits to reduce duplication
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196479
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 5 Dec 2013 06:05:43 +0000 (06:05 +0000)]
Use isIntrinsic() instead of checking for "llvm."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196473
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 5 Dec 2013 05:53:12 +0000 (05:53 +0000)]
Remove the isImplicitlyPrivate argument of getNameWithPrefix.
getSymbolWithGlobalValueBase use is to create a name of a new symbol based
on the name of an existing GV. Assert that and then remove the last call
to pass true to isImplicitlyPrivate.
This gives the mangler API a 1:1 mapping from GV to names, which is what we
need to drop the mangler dependency on the target (and use an extended
datalayout instead).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196472
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Thu, 5 Dec 2013 05:44:44 +0000 (05:44 +0000)]
Correct word hyphenations
This patch tries to avoid unrelated changes other than fixing a few
hyphen-related ambiguities and contractions in nearby lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196471
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 5 Dec 2013 05:19:12 +0000 (05:19 +0000)]
Hide the stub created for MO_ExternalSymbol too.
given
declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1)
declare void @foo()
define void @bar() {
call void @foo()
call void @llvm.memset.p0i8.i32(i8* null, i8 0, i32 188, i32 1, i1 false)
ret void
}
We used to produce
L_foo$stub:
.indirect_symbol _foo
.ascii "\364\364\364\364\364"
_memset$stub:
.indirect_symbol _memset
.ascii "\364\364\364\364\364"
We not produce a private stub for memset too.
Stubs are not needed with recent linkers, but we still produce them for darwin8.
Thanks to David Fang for confirming that gcc used to do this too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196468
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 5 Dec 2013 05:15:35 +0000 (05:15 +0000)]
R600/SI: Add comments for number of used registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196467
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 5 Dec 2013 04:14:33 +0000 (04:14 +0000)]
Try harder to get a consistent floating point results.
This just extends the existing hack. It should be enough to get a reproducible bootstrap
on 32 bits.
I will open a bug to track getting a real fix for this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196462
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 5 Dec 2013 02:21:44 +0000 (02:21 +0000)]
Move llvm/test/MC/ELF/thumb-st_other.s to test/MC/ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196457
91177308-0d34-0410-b5e6-
96231b3b80d8
Jiangning Liu [Thu, 5 Dec 2013 02:12:01 +0000 (02:12 +0000)]
For AArch64, add missing register cost calculation for big value types like v4i64 and v8i64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196456
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Thu, 5 Dec 2013 01:20:36 +0000 (01:20 +0000)]
Add FileCheck statements for r196435.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196449
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 5 Dec 2013 01:03:23 +0000 (01:03 +0000)]
Compiler.h: Disable initializer list usage with clang-cl
Most people are using MSVC 2012, which lacks the <initializer_list>
header. MSVC 2013 shipped with that header, but it has not yet been
tested. If clang works with the 2013 header, then we can enable this by
checking the value of _MSC_VER.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196448
91177308-0d34-0410-b5e6-
96231b3b80d8
Will Dietz [Thu, 5 Dec 2013 01:01:58 +0000 (01:01 +0000)]
Export symbols in tools that support loading plugins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196447
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 5 Dec 2013 01:01:41 +0000 (01:01 +0000)]
DwarfDebug: Avoid unnecessary abbreviation lookup when emitting DIEs
DIEs already contain references directly to their DIEAbbrev, use that
instead of looking it up based on index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196446
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 5 Dec 2013 01:01:37 +0000 (01:01 +0000)]
DwarfDebug: Remove trivial function wrapper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196445
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 5 Dec 2013 01:00:12 +0000 (01:00 +0000)]
Make these two tests resilient in the face of compile unit size
changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196444
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 5 Dec 2013 00:36:21 +0000 (00:36 +0000)]
80-column.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196442
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 5 Dec 2013 00:36:17 +0000 (00:36 +0000)]
Remove special handling for DW_AT_ranges support by constructing the
values with the correct behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196441
91177308-0d34-0410-b5e6-
96231b3b80d8
Logan Chien [Thu, 5 Dec 2013 00:34:11 +0000 (00:34 +0000)]
[mc] Fix ELF st_other flag.
ELF_Other_Weakref and ELF_Other_ThumbFunc seems to be LLVM
internal ELF symbol flags. These should not be emitted to
object file.
This commit defines ELF_STO_Shift for the target-defined
flags for st_other, and increase the value of
ELF_Other_Shift to 16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196440
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Thu, 5 Dec 2013 00:32:09 +0000 (00:32 +0000)]
Use present fast-math flags when applicable in CreateBinOp
We were previously not adding fast-math flags through CreateBinOp()
when it happened to be making a floating point binary operator. This
patch updates it to do so similarly to directly calling CreateF*().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196438
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 5 Dec 2013 00:13:15 +0000 (00:13 +0000)]
Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196437
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Thu, 5 Dec 2013 00:11:25 +0000 (00:11 +0000)]
Add AVX512 patterns for v16i32 broadcast and v2i64 zero extend load.
Patch by Aleksey Bader.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196435
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 4 Dec 2013 23:55:09 +0000 (23:55 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196434
91177308-0d34-0410-b5e6-
96231b3b80d8