Reid Kleckner [Mon, 15 Jul 2013 19:41:21 +0000 (19:41 +0000)]
[mc-coff] Resolve aliases when emitting COFF relocations
This is consistent with the ELF object writer.
Add some COFF tests that relocate against an alias.
Reviewers: espindola
Differential Revision: http://llvm-reviews.chandlerc.com/D1079
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186341
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 15 Jul 2013 19:00:09 +0000 (19:00 +0000)]
R600/SI: Add support for 64-bit loads
https://bugs.freedesktop.org/show_bug.cgi?id=65873
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186339
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Mon, 15 Jul 2013 18:57:05 +0000 (18:57 +0000)]
Remove invalid assert in DAGTypeLegalizer::RemapValue
There is a comment at the top of DAGTypeLegalizer::PerformExpensiveChecks
which, in part, says:
// Note that these invariants may not hold momentarily when processing a node:
// the node being processed may be put in a map before being marked Processed.
Unfortunately, this assert would be valid only if the above-mentioned invariant
held unconditionally. This was causing llc to assert when, in fact,
everything was fine.
Thanks to Richard Sandiford for investigating this issue!
Fixes PR16562.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186338
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Mon, 15 Jul 2013 17:55:02 +0000 (17:55 +0000)]
Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186333
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 15 Jul 2013 17:36:21 +0000 (17:36 +0000)]
Revert r186316 while I track down an ASan failure and an assert from
a bot.
This reverts the commit which introduced a new implementation of the
fancy SROA pass designed to reduce its overhead. I'll skip the huge
commit log here, refer to r186316 if you're looking for how this all
works and why it works that way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186332
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Mon, 15 Jul 2013 16:53:32 +0000 (16:53 +0000)]
Teaching llvm-tblgen to not emit a switch statement when there are no case statements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186330
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 15 Jul 2013 16:40:52 +0000 (16:40 +0000)]
Revert "[Option] Store arg strings in a set backed by a BumpPtrAllocator"
This broke clang's crash-report.c test, and I haven't been able to
figure it out yet.
This reverts commit r186319.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186329
91177308-0d34-0410-b5e6-
96231b3b80d8
Job Noorman [Mon, 15 Jul 2013 14:25:26 +0000 (14:25 +0000)]
Test commit to see if write access works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186321
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 15 Jul 2013 13:46:24 +0000 (13:46 +0000)]
[Option] Store arg strings in a set backed by a BumpPtrAllocator
No functionality change.
This is preparing to move response file parsing into lib/Option so it
can be shared between clang and lld. This change isn't just a
micro-optimization. Clang's driver uses a std::set<std::string> to
unique arguments while parsing response files, so this matches that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186319
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 15 Jul 2013 12:18:30 +0000 (12:18 +0000)]
XFAIL this on freebsd to bring the bot back.
Joerg Sonnenberger tells me one can open a directory in freebsd. I will try
to centralize our calls to open so that we can handle O_BINARY in one place,
and will then handle this there too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186317
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 15 Jul 2013 10:30:19 +0000 (10:30 +0000)]
Reimplement SROA yet again. Same fundamental principle, but a totally
different core implementation strategy.
Previously, SROA would build a relatively elaborate partitioning of an
alloca, associate uses with each partition, and then rewrite the uses of
each partition in an attempt to break apart the alloca into chunks that
could be promoted. This was very wasteful in terms of memory and compile
time because regardless of how complex the alloca or how much we're able
to do in breaking it up, all of the datastructure work to analyze the
partitioning was done up front.
The new implementation attempts to form partitions of the alloca lazily
and on the fly, rewriting the uses that make up that partition as it
goes. This has a few significant effects:
1) Much simpler data structures are used throughout.
2) No more double walk of the recursive use graph of the alloca, only
walk it once.
3) No more complex algorithms for associating a particular use with
a particular partition.
4) PHI and Select speculation is simplified and happens lazily.
5) More precise information is available about a specific use of the
alloca, removing the need for some side datastructures.
Ultimately, I think this is a much better implementation. It removes
about 300 lines of code, but arguably removes more like 500 considering
that some code grew in the process of being factored apart and cleaned
up for this all to work.
I've re-used as much of the old implementation as possible, which
includes the lion's share of code in the form of the rewriting logic.
The interesting new logic centers around how the uses of a partition are
sorted, and split into actual partitions.
Each instruction using a pointer derived from the alloca gets
a 'Partition' entry. This name is totally wrong, but I'll do a rename in
a follow-up commit as there is already enough churn here. The entry
describes the offset range accessed and the nature of the access. Once
we have all of these entries we sort them in a very specific way:
increasing order of begin offset, followed by whether they are
splittable uses (memcpy, etc), followed by the end offset or whatever.
Sorting by splittability is important as it simplifies the collection of
uses into a partition.
Once we have these uses sorted, we walk from the beginning to the end
building up a range of uses that form a partition of the alloca.
Overlapping unsplittable uses are merged into a single partition while
splittable uses are broken apart and carried from one partition to the
next. A partition is also introduced to bridge splittable uses between
the unsplittable regions when necessary.
I've looked at the performance PRs fairly closely. PR15471 no longer
will even load (the module is invalid). Not sure what is up there.
PR15412 improves by between 5% and 10%, however it is nearly impossible
to know what is holding it up as SROA (the entire pass) takes less time
than reading the IR for that test case. The analysis takes the same time
as running mem2reg on the final allocas. I suspect (without much
evidence) that the new implementation will scale much better however,
and it is just the small nature of the test cases that makes the changes
small and noisy. Either way, it is still simpler and cleaner I think.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186316
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 15 Jul 2013 08:43:35 +0000 (08:43 +0000)]
DebugInfo: Factor out parsing compile unit DIEs to a separate function. Improve code style and comments.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186315
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 15 Jul 2013 08:02:13 +0000 (08:02 +0000)]
Add 'const' qualifier to some arrays.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186312
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 15 Jul 2013 07:22:00 +0000 (07:22 +0000)]
Make some arrays 'static const'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186311
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 15 Jul 2013 07:15:05 +0000 (07:15 +0000)]
Add include to hopefully fix windows build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186310
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 15 Jul 2013 07:02:45 +0000 (07:02 +0000)]
Add const qualifier to some static arrays.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186309
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 15 Jul 2013 06:54:12 +0000 (06:54 +0000)]
Add 'static' keyword to some const arrays for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186308
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 15 Jul 2013 06:39:13 +0000 (06:39 +0000)]
Make some arrays 'static const'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186307
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 15 Jul 2013 04:37:54 +0000 (04:37 +0000)]
Revert part of 186302 to fix buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186303
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 15 Jul 2013 04:27:47 +0000 (04:27 +0000)]
Use llvm::array_lengthof to replace sizeof(array)/sizeof(array[0]).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186301
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 15 Jul 2013 03:04:13 +0000 (03:04 +0000)]
Mark llvm/test/Object/extract.ll as XFAIL:mingw32, for now.
FIXME: Investigate Win32's TimeValue stuff!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186298
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sun, 14 Jul 2013 22:23:54 +0000 (22:23 +0000)]
Clarify comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186297
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sun, 14 Jul 2013 22:02:31 +0000 (22:02 +0000)]
Add DW_AT_GNU_odr_signature to the set of dwarf attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186296
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sun, 14 Jul 2013 21:46:51 +0000 (21:46 +0000)]
Collapse temporary variable into call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186295
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sun, 14 Jul 2013 18:19:44 +0000 (18:19 +0000)]
Use conventional syntax for branches.
Patch by Job!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186291
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Sun, 14 Jul 2013 18:12:25 +0000 (18:12 +0000)]
Correct inaccurate statement in FileCheck docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186290
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sun, 14 Jul 2013 15:11:00 +0000 (15:11 +0000)]
Properly lower jump tables on MSP430. Patch by Job Noorman!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186283
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 14 Jul 2013 10:46:51 +0000 (10:46 +0000)]
The archive update test has a subtle race condition in it: if the test
is executed within the same second as the inputs for the test are
checked out from the source tree, it will fail to update due to being
below the resolution of the 'mtime' test used.
Now, this may seem improbably to you... ok, maybe *really* improbable,
but consider a system which does distributed execution of tests by
shipping their inputs to another machine and runs them. That might cause
the mtime to be quite recent during the test run. ;]
Instead, create two files directly in the test (allowing all platforms
to see the problem) and add either a use of the 'touch' command that
forces one mtime to some time quite a bit in the past, or it sleeps for
just over a second to be outside of the precision window.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186282
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Sun, 14 Jul 2013 06:24:09 +0000 (06:24 +0000)]
Mass update to CodeGen tests to use CHECK-LABEL for labels corresponding to function definitions for more informative error messages. No functionality change and all updated tests passed locally.
This update was done with the following bash script:
find test/CodeGen -name "*.ll" | \
while read NAME; do
echo "$NAME"
if ! grep -q "^; *RUN: *llc.*debug" $NAME; then
TEMP=`mktemp -t temp`
cp $NAME $TEMP
sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \
while read FUNC; do
sed -i '' "s/;\(.*\)\([A-Za-z0-9_-]*\):\( *\)$FUNC: *\$/;\1\2-LABEL:\3$FUNC:/g" $TEMP
done
sed -i '' "s/;\(.*\)-LABEL-LABEL:/;\1-LABEL:/" $TEMP
sed -i '' "s/;\(.*\)-NEXT-LABEL:/;\1-NEXT:/" $TEMP
sed -i '' "s/;\(.*\)-NOT-LABEL:/;\1-NOT:/" $TEMP
sed -i '' "s/;\(.*\)-DAG-LABEL:/;\1-DAG:/" $TEMP
mv $TEMP $NAME
fi
done
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186280
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 14 Jul 2013 06:15:46 +0000 (06:15 +0000)]
SLPVectorizer: change the order in which we search for vectorization candidates. Do stores first and PHIs second.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186277
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Sun, 14 Jul 2013 06:12:01 +0000 (06:12 +0000)]
Fix build by replacing '>>' with '> >'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186276
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 14 Jul 2013 04:42:23 +0000 (04:42 +0000)]
Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186274
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sun, 14 Jul 2013 03:10:08 +0000 (03:10 +0000)]
Remove a bunch of old SCEVExpander FIXME's for preserving NoWrap.
The great thing about the SCEVAddRec No-Wrap flag (unlike nsw/nuw) is
that is can be preserved while normalizing (reassociating and
factoring).
The bad thing is that is can't be tranfered back to IR, which is one
of the reasons I don't like the concept of SCEVExpander.
Sorry, I can't think of a direct way to test this, which is why these
were FIXMEs for so long. I just think it's a good time to finally
clean it up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186273
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sun, 14 Jul 2013 02:50:07 +0000 (02:50 +0000)]
Teach indvars to generate nsw/nuw flags when widening an induction variable.
Fixes PR16600.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186272
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Sun, 14 Jul 2013 02:10:57 +0000 (02:10 +0000)]
Fixup to r186268 and r186269: don't append -LABEL to CHECK-NOT. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186271
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Sun, 14 Jul 2013 01:50:49 +0000 (01:50 +0000)]
Catch more CHECK that can be converted to CHECK-LABEL in Transforms for easier debugging. No functionality change.
This conversion was done with the following bash script:
find test/Transforms -name "*.ll" | \
while read NAME; do
echo "$NAME"
if ! grep -q "^; *RUN: *llc" $NAME; then
TEMP=`mktemp -t temp`
cp $NAME $TEMP
sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \
while read FUNC; do
sed -i '' "s/;\(.*\)\([A-Za-z0-9_]*\):\( *\)define\([^@]*\)@$FUNC\([( ]*\)\$/;\1\2-LABEL:\3define\4@$FUNC(/g" $TEMP
done
mv $TEMP $NAME
fi
done
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186269
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Sun, 14 Jul 2013 01:42:54 +0000 (01:42 +0000)]
Update Transforms tests to use CHECK-LABEL for easier debugging. No functionality change.
This update was done with the following bash script:
find test/Transforms -name "*.ll" | \
while read NAME; do
echo "$NAME"
if ! grep -q "^; *RUN: *llc" $NAME; then
TEMP=`mktemp -t temp`
cp $NAME $TEMP
sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \
while read FUNC; do
sed -i '' "s/;\(.*\)\([A-Za-z0-9_]*\):\( *\)@$FUNC\([( ]*\)\$/;\1\2-LABEL:\3@$FUNC(/g" $TEMP
done
mv $TEMP $NAME
fi
done
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186268
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Sun, 14 Jul 2013 01:38:19 +0000 (01:38 +0000)]
Modify two Transforms tests to explicitly check for full function names in some cases, rather than just a common prefix. No functionality change.
(This is to avoid confusing a scripted mass update of these tests to use CHECK-LABEL)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186267
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Sat, 13 Jul 2013 22:08:55 +0000 (22:08 +0000)]
Convert Windows to Unix line endings, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186264
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Sat, 13 Jul 2013 22:00:58 +0000 (22:00 +0000)]
Add newlines at end of test files, no functionality change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186263
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Sat, 13 Jul 2013 20:38:47 +0000 (20:38 +0000)]
Convert CodeGen/*/*.ll tests to use the new CHECK-LABEL for easier debugging. No functionality change and all tests pass after conversion.
This was done with the following sed invocation to catch label lines demarking function boundaries:
sed -i '' "s/^;\( *\)\([A-Z0-9_]*\):\( *\)test\([A-Za-z0-9_-]*\):\( *\)$/;\1\2-LABEL:\3test\4:\5/g" test/CodeGen/*/*.ll
which was written conservatively to avoid false positives rather than false negatives. I scanned through all the changes and everything looks correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186258
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Sat, 13 Jul 2013 19:09:29 +0000 (19:09 +0000)]
LoopVectorizer: Disallow reductions whose header phi is used outside the loop
If an outside loop user of the reduction value uses the header phi node we
cannot just reduce the vectorized phi value in the vector code epilog because
we would loose VF-1 reductions.
lp:
p = phi (0, lv)
lv = lv + 1
...
brcond , lp, outside
outside:
usr = add 0, p
(Say the loop iterates two times, the value of p coming out of the loop is one).
We cannot just transform this to:
vlp:
p = phi (<0,0>, lv)
lv = lv + <1,1>
..
brcond , lp, outside
outside:
p_reduced = p[0] + [1];
usr = add 0, p_reduced
(Because the original loop iterated two times the vectorized loop would iterate
one time, but p_reduced ends up being zero instead of one).
We would have to execute VF-1 iterations in the scalar remainder loop in such
cases. For now, just disable vectorization.
PR16522
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186256
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Sat, 13 Jul 2013 17:59:55 +0000 (17:59 +0000)]
Reduce large list of macros to the primary platform macros. Distingiush
between ELF (Linux, FreeBSD, NetBSD) and OSX as platform for the
assembler dialect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186252
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 13 Jul 2013 17:30:25 +0000 (17:30 +0000)]
Convert a couple of grep tests to FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186250
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 13 Jul 2013 15:21:39 +0000 (15:21 +0000)]
Only verify the length in archive test, we can't make assumptions on the spacing.
And .* did just match about anything anyways.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186246
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 13 Jul 2013 12:36:30 +0000 (12:36 +0000)]
Attempt at fixing a mingw bot.
It is failing with
YAMLTest.cpp:38: instantiated from here
YAMLTraits.h:226: error: 'llvm::yaml::MappingTraits<<unnamed>::BinaryHolder>::mapping' is not a valid template argument for type 'void (*)(llvm::yaml::IO&, <unnamed>::BinaryHolder&)' because function 'static void llvm::yaml::MappingTraits<<unnamed>::BinaryHolder>::mapping(llvm::yaml::IO&, <unnamed>::BinaryHolder&)' has not external linkage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186245
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 13 Jul 2013 08:28:45 +0000 (08:28 +0000)]
Remove unneeded forward declarations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186244
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 13 Jul 2013 07:43:40 +0000 (07:43 +0000)]
Pass SmallVector by const reference instead of by value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186243
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 13 Jul 2013 06:40:33 +0000 (06:40 +0000)]
Make the new vectorizer test immune to TTI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186242
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 13 Jul 2013 06:20:06 +0000 (06:20 +0000)]
LoopVectorize fix: LoopInfo must be valid when invoking utils like SCEVExpander.
In general, one should always complete CFG modifications first, update
CFG-based analyses, like Dominatores and LoopInfo, then generate
instruction sequences.
LoopVectorizer was creating a new loop, calling SCEVExpander to
generate checks, then updating LoopInfo. I just changed the order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186241
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 13 Jul 2013 05:07:22 +0000 (05:07 +0000)]
Try to open the file before use data from stat.
Looks like on mingw we get bogus last modification times on directories.
Should fix the mingw bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186240
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 13 Jul 2013 04:24:33 +0000 (04:24 +0000)]
Remove unused file. Thanks to Sean Silva for noticing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186239
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 13 Jul 2013 04:14:13 +0000 (04:14 +0000)]
Add r186216 back, but make the test tolerant of different uids and gids.
original message:
Fix a off by one error about which members need to use the string table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186238
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 13 Jul 2013 01:16:47 +0000 (01:16 +0000)]
Add a microoptimization for urem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186235
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 13 Jul 2013 01:00:17 +0000 (01:00 +0000)]
Revert commit r186217 -- this is breaking bots:
http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RAincremental/builds/4328
Original commit log:
Use the function attributes to pass along the stack protector buffer
size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186234
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 13 Jul 2013 00:42:56 +0000 (00:42 +0000)]
Revert commit r186216 -- it's breaking bots:
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/6897/steps/check-all/logs/LLVM%3A%3Aarchive-format.test
Original commit log:
Fix a off by one error about which members need to use the string
table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186232
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 12 Jul 2013 23:47:38 +0000 (23:47 +0000)]
[mips] Remove trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186230
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 12 Jul 2013 23:42:57 +0000 (23:42 +0000)]
Fix logic error optimizing "icmp pred (urem X, Y), Y" where pred is signed.
Fixes PR16605.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186229
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 12 Jul 2013 23:33:22 +0000 (23:33 +0000)]
[mips] Implement MipsTargetMachine::getInstrItineraryData().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186227
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Fri, 12 Jul 2013 23:33:03 +0000 (23:33 +0000)]
Fix ARM paired GPR COPY lowering
ARM paired GPR COPY was being lowered to two MOVr without CC. This
patch puts the CC back.
My test is a reduction of the case where I encountered the issue,
64-bit atomics use paired GPRs.
The issue only occurs with selectionDAG, FastISel doesn't encounter it
so I didn't bother calling it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186226
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Fri, 12 Jul 2013 23:09:43 +0000 (23:09 +0000)]
Fixed 80+ violation and added C++ to header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186225
91177308-0d34-0410-b5e6-
96231b3b80d8
Joey Gouly [Fri, 12 Jul 2013 23:08:06 +0000 (23:08 +0000)]
Fix a crash in EvaluateInDifferentElementOrder where it would generate an
undef vector of the wrong type.
LGTM'd by Nick Lewycky on IRC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186224
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 12 Jul 2013 22:43:20 +0000 (22:43 +0000)]
[mips] Add instruction itinerary classes for mult, seb and slt instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186222
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 12 Jul 2013 22:25:20 +0000 (22:25 +0000)]
Use the function attributes to pass along the stack protector buffer size.
Now that we have robust function attributes, don't use a command line option to
specify the stack protecto buffer size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186217
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 12 Jul 2013 22:22:34 +0000 (22:22 +0000)]
Fix a off by one error about which members need to use the string table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186216
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 12 Jul 2013 22:08:48 +0000 (22:08 +0000)]
LFTR improvement to avoid truncation.
This is a reimplemntation of the patch originally in r186107.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186215
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 12 Jul 2013 22:08:44 +0000 (22:08 +0000)]
Cleanup LFTR logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186214
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 12 Jul 2013 22:08:41 +0000 (22:08 +0000)]
Cleanup: rename a variable to make the logic easier to follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186213
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 12 Jul 2013 22:08:24 +0000 (22:08 +0000)]
Remove extraneous braces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186212
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 12 Jul 2013 21:54:43 +0000 (21:54 +0000)]
R600: Reapply testcase from r186178, the big endian issue should be fixed by r186196.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186209
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 12 Jul 2013 21:17:17 +0000 (21:17 +0000)]
Change archive-update.test to create a new file on the fly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186206
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 12 Jul 2013 20:54:34 +0000 (20:54 +0000)]
Remove empty directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186203
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 12 Jul 2013 20:53:23 +0000 (20:53 +0000)]
Rename directory to avoid problems on windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186202
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 12 Jul 2013 20:45:01 +0000 (20:45 +0000)]
fix autoconf build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186200
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 12 Jul 2013 20:28:02 +0000 (20:28 +0000)]
Fix the build with c++03.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186198
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 12 Jul 2013 20:21:39 +0000 (20:21 +0000)]
Change llvm-ar to use lib/Object.
This fixes two bugs is lib/Object that the use in llvm-ar found:
* In OS X created archives, the name can be padded with nulls. Strip them.
* In the constructor, remember the first non special member and use that in
begin_children. This makes sure we skip all special members, not just the
first one.
The change to llvm-ar itself consist of
* Using lib/Object for reading archives instead of ArchiveReader.cpp.
* Writing the modified archive directly, instead of creating an in memory
representation.
The old Archive library was way more general than what is needed, as can
be seen by the diffstat of this patch.
Having llvm-ar using lib/Object now opens the way for creating regular symbol
tables for both native objects and bitcode files so that we can use those
archives for LTO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186197
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 12 Jul 2013 20:18:05 +0000 (20:18 +0000)]
R600: Remove unsafe type punning. No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186196
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 12 Jul 2013 19:34:24 +0000 (19:34 +0000)]
Add a test for llvm-ar's u option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186192
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 12 Jul 2013 19:29:54 +0000 (19:29 +0000)]
R600: Remove the fpconst64.ll test which was failing on non-x86 buildbots
I'm guessing the failure had something to do with the double precision
floating point constant used in the test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186191
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Fri, 12 Jul 2013 19:16:07 +0000 (19:16 +0000)]
X86 cost model: Add cost for vectorized gather/scather
radar://
14351991
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186189
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Fri, 12 Jul 2013 19:16:04 +0000 (19:16 +0000)]
ARM cost model: Add cost for gather/scather
Fixes a 35% degradation compared to unvectorized code in
MiBench/automotive-susan and an equally serious regression on a private
image processing benchmark.
radar://
14351991
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186188
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Fri, 12 Jul 2013 19:16:02 +0000 (19:16 +0000)]
TargetTransformInfo: address calculation parameter for gather/scather
Address calculation for gather/scather in vectorized code can incur a
significant cost making vectorization unbeneficial. Add infrastructure to add
cost.
Tests and cost model for targets will be in follow-up commits.
radar://
14351991
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186187
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 12 Jul 2013 19:13:16 +0000 (19:13 +0000)]
Relax the test a bit more to handle different UIDs and GIDs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186186
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 12 Jul 2013 18:54:28 +0000 (18:54 +0000)]
Relax test a bit to handle umask differences.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186184
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 12 Jul 2013 18:51:25 +0000 (18:51 +0000)]
Add a test for the 'o' option in llvm-ar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186183
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 12 Jul 2013 18:15:26 +0000 (18:15 +0000)]
R600/SI: Add support for f64 kernel arguments
Patch by: Niels Ole Salscheider
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186182
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 12 Jul 2013 18:15:19 +0000 (18:15 +0000)]
R600/SI: Implement select and compares for SI
Patch by: Niels Ole Salscheider
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186181
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 12 Jul 2013 18:15:13 +0000 (18:15 +0000)]
R600/SI: Add fsqrt pattern for SI
Patch by: Niels Ole Salscheider
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186180
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 12 Jul 2013 18:15:08 +0000 (18:15 +0000)]
R600/SI: Add double precision fsub pattern for SI
Patch by: Niels Ole Salscheider
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186179
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 12 Jul 2013 18:15:02 +0000 (18:15 +0000)]
R600/SI: SI support for 64bit ConstantFP
Patch by: Niels Ole Salscheider
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186178
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 12 Jul 2013 18:14:56 +0000 (18:14 +0000)]
R600/SI: Add initial double precision support for SI
Patch by: Niels Ole Salscheider
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186177
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 12 Jul 2013 18:14:40 +0000 (18:14 +0000)]
R600: Add ISA documents to the CompilerWriterInfo page
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186176
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Fri, 12 Jul 2013 18:11:14 +0000 (18:11 +0000)]
Fixed comment in header of Block Frequency Impl and added text for C++ mode.
This is a generic block implementation that works on more than machine blocks.
The C++ mode addition is a bonus due to the extra space provided.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186175
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 12 Jul 2013 18:06:44 +0000 (18:06 +0000)]
X86: Shrink certain forms of movsx.
In particular:
movsbw %al, %ax --> cbtw
movswl %ax, %eax --> cwtl
movslq %eax, %rax --> cltq
According to Intel's manual those have the same performance characteristics but
come with a smaller encoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186174
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 12 Jul 2013 16:29:27 +0000 (16:29 +0000)]
Add static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186170
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Fri, 12 Jul 2013 15:31:36 +0000 (15:31 +0000)]
X86: fold SSE2/AVX2 logical shift by immediate amount into zero vector when possible
Patch by Andrea Di Biagio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186165
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Fri, 12 Jul 2013 14:54:12 +0000 (14:54 +0000)]
Start using CHECK-LABEL in some tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186163
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Fri, 12 Jul 2013 14:51:05 +0000 (14:51 +0000)]
Add new directive called CHECK-LABEL to FileCheck.
CHECK-LABEL is meant to be used in place on CHECK on lines containing identifiers or other unique labels (they need not actually be labels in the source or output language, though.) This is used to break up the input stream into separate blocks delineated by CHECK-LABEL lines, each of which is checked independently. This greatly improves the accuracy of errors and fix-it hints in many cases, and allows for FileCheck to recover from errors in one block by continuing to subsequent blocks.
Some tests will be converted to use this new directive in forthcoming patches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186162
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 12 Jul 2013 13:32:28 +0000 (13:32 +0000)]
Don't reject an empty archive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186159
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 12 Jul 2013 12:05:13 +0000 (12:05 +0000)]
Mark MDNode::getOperand as readonly.
We can't inline it but we can still CSE calls to it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186156
91177308-0d34-0410-b5e6-
96231b3b80d8