Commit Graph

94017 Commits

Author SHA1 Message Date
Craig Topper
f67c7d7e8c Make some arrays 'static const'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186311 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-15 07:22:00 +00:00
Craig Topper
3259d61895 Add include to hopefully fix windows build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186310 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-15 07:15:05 +00:00
Craig Topper
3698dc4d4e Add const qualifier to some static arrays.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186309 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-15 07:02:45 +00:00
Craig Topper
da129a2eb3 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
2013-07-15 06:54:12 +00:00
Craig Topper
787e71df69 Make some arrays 'static const'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186307 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-15 06:39:13 +00:00
Craig Topper
793fd8d0d6 Revert part of 186302 to fix buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186303 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-15 04:37:54 +00:00
Craig Topper
b9df53a40b 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
2013-07-15 04:27:47 +00:00
NAKAMURA Takumi
d8fdb628ea 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
2013-07-15 03:04:13 +00:00
Eric Christopher
4d138ba043 Clarify comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186297 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-14 22:23:54 +00:00
Eric Christopher
6c5ae22c6a 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
2013-07-14 22:02:31 +00:00
Eric Christopher
010dbfdf93 Collapse temporary variable into call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186295 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-14 21:46:51 +00:00
Anton Korobeynikov
c7c4a7867c 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
2013-07-14 18:19:44 +00:00
Stephen Lin
eeea96d4c0 Correct inaccurate statement in FileCheck docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186290 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-14 18:12:25 +00:00
Anton Korobeynikov
a77f816c4c 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
2013-07-14 15:11:00 +00:00
Chandler Carruth
3c0e8fbd4e 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
2013-07-14 10:46:51 +00:00
Stephen Lin
8b2b8a1835 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
2013-07-14 06:24:09 +00:00
Nadav Rotem
6611eaa32f 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
2013-07-14 06:15:46 +00:00
Tobias Grosser
83d63f8a4d Fix build by replacing '>>' with '> >'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186276 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-14 06:12:01 +00:00
Craig Topper
a0ec3f9b7b 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
2013-07-14 04:42:23 +00:00
Andrew Trick
6f71dd765a 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
2013-07-14 03:10:08 +00:00
Andrew Trick
409443b1c6 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
2013-07-14 02:50:07 +00:00
Stephen Lin
181a289256 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
2013-07-14 02:10:57 +00:00
Stephen Lin
15bfd6d3ad 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
2013-07-14 01:50:49 +00:00
Stephen Lin
39f4e8d9cc 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
2013-07-14 01:42:54 +00:00
Stephen Lin
82e539d037 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
2013-07-14 01:38:19 +00:00
Stephen Lin
60808c76b4 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
2013-07-13 22:08:55 +00:00
Stephen Lin
0dfc166487 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
2013-07-13 22:00:58 +00:00
Stephen Lin
b4dc0233c9 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
2013-07-13 20:38:47 +00:00
Arnold Schwaighofer
ae4e1a94e3 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
2013-07-13 19:09:29 +00:00
Joerg Sonnenberger
0a14e71232 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
2013-07-13 17:59:55 +00:00
Benjamin Kramer
61a0bac2be 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
2013-07-13 17:30:25 +00:00
Benjamin Kramer
b666fd553d 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
2013-07-13 15:21:39 +00:00
Rafael Espindola
e39cad4b04 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
2013-07-13 12:36:30 +00:00
Craig Topper
36dbbf06fb Remove unneeded forward declarations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186244 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-13 08:28:45 +00:00
Craig Topper
6c64fba633 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
2013-07-13 07:43:40 +00:00
Andrew Trick
18382fff41 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
2013-07-13 06:40:33 +00:00
Andrew Trick
9a26e1320b 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
2013-07-13 06:20:06 +00:00
Rafael Espindola
718af78920 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
2013-07-13 05:07:22 +00:00
Rafael Espindola
ee795f35f7 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
2013-07-13 04:24:33 +00:00
Rafael Espindola
c951651894 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
2013-07-13 04:14:13 +00:00
Nick Lewycky
75681bb302 Add a microoptimization for urem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186235 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-13 01:16:47 +00:00
Chandler Carruth
12c74dc2c2 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
2013-07-13 01:00:17 +00:00
Chandler Carruth
1dedabdfad 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
2013-07-13 00:42:56 +00:00
Akira Hatanaka
2bd429a987 [mips] Remove trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186230 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-12 23:47:38 +00:00
Nick Lewycky
8a23270ce6 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
2013-07-12 23:42:57 +00:00
Akira Hatanaka
434c0bd2a5 [mips] Implement MipsTargetMachine::getInstrItineraryData().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186227 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-12 23:33:22 +00:00
JF Bastien
1b6f5a29ab 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
2013-07-12 23:33:03 +00:00
Michael Gottesman
bee07bddea 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
2013-07-12 23:09:43 +00:00
Joey Gouly
ebe1147722 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
2013-07-12 23:08:06 +00:00
Akira Hatanaka
ae24f7d3c6 [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
2013-07-12 22:43:20 +00:00