Richard Sandiford [Fri, 19 Jul 2013 16:12:08 +0000 (16:12 +0000)]
[SystemZ] Use SLLK, SRLK and SRAK for codegen
This patch uses the instructions added in r186680 for codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186681
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Fri, 19 Jul 2013 16:09:03 +0000 (16:09 +0000)]
[SystemZ] Start adding z196 and zEC12 support
This first step just adds definitions for SLLK, SRLK and SRAK.
The next patch will actually make use of them during codegen.
insn-bad.s tests that some form of error is reported when using these
instructions on z10. More work is needed to get the "instruction requires:
distinct-ops" that we'd ideally like, so I've stubbed that part out for now.
I'll come back and make it mandatory once the necessary changes are in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186680
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 19 Jul 2013 15:02:03 +0000 (15:02 +0000)]
Split openFileForWrite into windows and unix versions.
It is similar to 186511, but for creating files for writing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186679
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 19 Jul 2013 14:41:25 +0000 (14:41 +0000)]
Add a unit test for checking that we respect the F_Binary flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186676
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 19 Jul 2013 10:57:36 +0000 (10:57 +0000)]
Cleanup the stats counters for the new implementation. These actually
count the right things and have the right names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186667
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 19 Jul 2013 10:57:32 +0000 (10:57 +0000)]
Fix another assert failure very similar to PR16651's test case. This
test case came from Benjamin and found the parallel bug in the vector
promotion code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186666
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 19 Jul 2013 10:23:15 +0000 (10:23 +0000)]
ARM: delete two tests now integrated into the larger files
Somehow forgot to git rm these two files. I believe I left the remaining
invalid* tests intentionally, though whether my reasons were sound is a
different matter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186663
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 19 Jul 2013 10:19:56 +0000 (10:19 +0000)]
ARM: remove invalid invalid tests
The tests were checking for barriers which the ARM ARM says they must execute
as a full system DMB/DSB, rather than that they're UNDEFINED and LLVM does in
fact represent them.
The tests happened to be passing because they were using a non-versioned ARM
triple which didn't have *any* DMB/DSB instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186662
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 19 Jul 2013 10:05:04 +0000 (10:05 +0000)]
Improve llvm-mc disassembler mode and refactor ARM tests to use it
This allows "llvm-mc -disassemble" to accept two new features:
+ Using comma as a byte separator
+ Grouping bytes with '[' and ']' pairs.
The behaviour outside a [...] group is unchanged. But within the group once
llvm-mc encounters a true error, it stops rather than trying to resynchronise
the stream at the next byte. This is more useful for disassembly tests, where
we have an almost-instruction in mind and don't care what the misaligned
interpretation would be. Particularly if it means llvm-mc won't actually see
the next intended almost-instruction.
As a side effect, this means llvm-mc can disassemble its own -show-encoding
output if copy-pasted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186661
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 19 Jul 2013 09:13:58 +0000 (09:13 +0000)]
Try to move to a more reasonable set of naming conventions given the new
implementation of the SROA algorithm. We were using the term 'partition'
in many places that no longer ever represented an actual partition, but
rather just an arbitrary slice of an alloca.
No functionality change intended here. Mostly just renaming of types,
functions, variables, and rewording of comments. Several comments were
rewritten to make a lot more sense in the new structure of things.
The stats are still weird and not reflective of how this really works.
I'll fix those up in a separate patch as it is a touch more semantic of
a change...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186659
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 19 Jul 2013 08:55:18 +0000 (08:55 +0000)]
Fix uninitialized memory read found by MemorySanitizer: always set output parameter of ConvergingScheduler::SchedBoundary::getOtherResourceCount
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186658
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 19 Jul 2013 07:21:28 +0000 (07:21 +0000)]
A long overdue cleanup in SROA to use 'DL' instead of 'TD' for the
DataLayout variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186656
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 19 Jul 2013 07:12:23 +0000 (07:12 +0000)]
Fix PR16651, an assert introduced in my recent re-work of the innards of
SROA.
The crux of the issue is that now we track uses of a partition of the
alloca in two places: the iterators over the partitioning uses and the
previously collected split uses vector. We weren't accounting for the
fact that the split uses might invalidate integer widening in ways other
than due to their width (in this case due to being volatile).
Further reduced testcase added to the tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186655
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 19 Jul 2013 04:56:51 +0000 (04:56 +0000)]
Try to appease the bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186653
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 19 Jul 2013 01:26:08 +0000 (01:26 +0000)]
llvm/test/MC/AsmParser/secure_log_unique.s: Use env(1) here. Then r186611 can be reverted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186643
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 19 Jul 2013 01:19:52 +0000 (01:19 +0000)]
[mips] Delete MFC1_FT_CCR, MTC1_FT_CCR and MOVCCRToCCR.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186642
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Jul 2013 00:51:47 +0000 (00:51 +0000)]
Remove DIBuilder cache of variable TheCU and change the few
uses that wanted it. Also change the interface for createCompileUnit
to compensate. Fix comments that refer to TheCU as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186637
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Fri, 19 Jul 2013 00:51:17 +0000 (00:51 +0000)]
Clarify comment for extension().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186636
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 19 Jul 2013 00:31:31 +0000 (00:31 +0000)]
MI Sched: test case fix for previous checkin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186635
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 19 Jul 2013 00:31:03 +0000 (00:31 +0000)]
Debug Info: enable verifying by default and disable testing cases that fail.
1> Use DebugInfoFinder to find debug info MDNodes.
2> Add disable-debug-info-verifier to disable verifying debug info.
3> Disable verifying for testing cases that fail (will update the testing cases
later on).
4> MDNodes generated by clang can have empty filename for TAG_inheritance and
TAG_friend, so DIType::Verify is modified accordingly.
Note that DebugInfoFinder does not list all debug info MDNode.
For example, clang can generate:
metadata !{i32 786468}, which will fail to verify.
This MDNode is used by debug info but not included in DebugInfoFinder.
This MDNode is generated as a temporary node in DIBuilder::createFunction
Value *TElts[] = { GetTagConstant(VMContext, DW_TAG_base_type) };
MDNode::getTemporary(VMContext, TElts)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186634
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 19 Jul 2013 00:20:07 +0000 (00:20 +0000)]
MI Sched: Update the way resources are tracked so the current heuristics make more sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186632
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Thu, 18 Jul 2013 23:26:58 +0000 (23:26 +0000)]
Fix FileCheck CHECK-LABEL documentation wording slightly; also mention that it allows error recovery.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186628
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Thu, 18 Jul 2013 23:15:50 +0000 (23:15 +0000)]
Revert "COFFDumper: Dump data directory entries."
Because it broke s390x and ppc64-linux buildbots. This reverts commit r186623.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186627
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Thu, 18 Jul 2013 22:47:09 +0000 (22:47 +0000)]
Update to more CodeGen tests to use CHECK-LABEL for labels corresponding to function definitions for more informative error messages. No functionality change.
All changes were made by the following bash script:
find test/CodeGen -name "*.ll" | \
while read NAME; do
echo "$NAME"
grep -q "^; *RUN: *llc.*debug" $NAME && continue
grep -q "^; *RUN:.*llvm-objdump" $NAME && continue
grep -q "^; *RUN: *opt.*" $NAME && continue
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_-]*\)\([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
done
This script catches a superset of the cases caught by the script associated with commit r186280. It initially found some false positives due to unusual constructs in a minority of tests; all such cases were disambiguated first in commit r186621.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186624
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Thu, 18 Jul 2013 22:44:20 +0000 (22:44 +0000)]
COFFDumper: Dump data directory entries.
Summary:
Dump optional data directory entries in the PE/COFF header, so that
we can test the output of LLD linker. This patch updates the test binary
file, but the source of the binary is the same. I just re-linked the file.
I don't know how the previous file was linked, but the previous file did
not have any data directory entries for some reason.
Reviewers: rafael
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1148
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186623
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 18 Jul 2013 22:32:32 +0000 (22:32 +0000)]
Clean up some of this code a tiny bit, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186622
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Thu, 18 Jul 2013 22:29:15 +0000 (22:29 +0000)]
Disambiguate function names in some CodeGen tests. (Some tests were using function names that also were names of instructions and/or doing other unusual things that were making the test not amenable to otherwise scriptable pattern matching.) No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186621
91177308-0d34-0410-b5e6-
96231b3b80d8
Tilmann Scheller [Thu, 18 Jul 2013 22:19:59 +0000 (22:19 +0000)]
ARM: Make sure the instruction alias for PLI uses the right subtarget features.
PLI requires both the Thumb2 and the ARMv7 feature.
Related to <rdar://problem/
14403733>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186620
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 18 Jul 2013 21:43:53 +0000 (21:43 +0000)]
R600/SI: Fix crash with VSELECT
https://bugs.freedesktop.org/show_bug.cgi?id=66175
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186616
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 18 Jul 2013 21:43:48 +0000 (21:43 +0000)]
R600/SI: Add support for v2f32 loads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186615
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 18 Jul 2013 21:43:42 +0000 (21:43 +0000)]
R600/SI: Add support for v2f32 stores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186614
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 18 Jul 2013 21:43:35 +0000 (21:43 +0000)]
R600: Expand VSELECT for all types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186613
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 18 Jul 2013 21:34:13 +0000 (21:34 +0000)]
test/MC/AsmParser/secure_log_unique.s requires shell
This should fix the chapuni bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186611
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 18 Jul 2013 21:00:12 +0000 (21:00 +0000)]
Fix -Wdocumentation warning
s/Tokenize/Tokenizer/ to make the comment correspond to the
parameter name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186608
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 18 Jul 2013 20:34:26 +0000 (20:34 +0000)]
Add a test for .secure_log_unique.
It also doubles a test that F_Append works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186606
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 18 Jul 2013 19:13:06 +0000 (19:13 +0000)]
Revert "Remove DIBuilder cache of variable TheCU and change the few"
This reverts commit r186599 as I didn't want to commit this yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186601
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 18 Jul 2013 19:11:41 +0000 (19:11 +0000)]
Equal means ==, not !=. Thanks to Benjamin for catching.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186600
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 18 Jul 2013 19:11:29 +0000 (19:11 +0000)]
Remove DIBuilder cache of variable TheCU and change the few
uses that wanted it. Also change the interface for createCompileUnit
to compensate. Fix comments that refer to TheCU as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186599
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 18 Jul 2013 18:42:52 +0000 (18:42 +0000)]
Small improvement to the use of GetFileType:
* assert that the return value is one of the documented values on msdn.
* on FILE_TYPE_UNKNOWN, check GetLastError.
Unfortunately I can't think of a way to get a FILE_TYPE_UNKNOWN on a test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186595
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Thu, 18 Jul 2013 18:35:22 +0000 (18:35 +0000)]
Update to CodeGen tests to use CHECK-LABEL for labels corresponding to function definitions for more informative error messages. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186594
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 18 Jul 2013 18:34:21 +0000 (18:34 +0000)]
Handle constants without going through SCEV.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186593
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 18 Jul 2013 18:20:45 +0000 (18:20 +0000)]
SLPVectorizer: Speedup isConsecutive by manually checking GEPs with multiple indices.
This brings the compile time of the SLP-Vectorizer to about 2.5% of OPT for my testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186592
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 18 Jul 2013 17:00:54 +0000 (17:00 +0000)]
Windows/Path.inc: Introduce file_type::character_file and file_type::fifo_file in sys::fs::getStatus(HANDLE).
It fixes llvm/test/Other/close-stderr.ll on msys.
FIXME: Provide unittests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186588
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 18 Jul 2013 16:52:05 +0000 (16:52 +0000)]
[Support] Beef up and expose the response file parsing in llvm::cl
The plan is to use it for clang and lld.
Major behavior changes:
- We can now parse UTF-16 files that have a byte order mark.
- PR16209: Don't drop backslashes on the floor if they don't escape
anything.
The actual parsing loop was based on code from Clang's driver.cpp,
although it's been rewritten to track its state with control flow rather
than state variables.
Reviewers: hans
Differential Revision: http://llvm-reviews.chandlerc.com/D1170
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186587
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 18 Jul 2013 15:38:50 +0000 (15:38 +0000)]
llvm/test/Other/close-stderr.ll: Mark this as XFAIL on msys, since r186560.
sys::fs::status() doesn't work on pipes. Investigating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186586
91177308-0d34-0410-b5e6-
96231b3b80d8
Joey Gouly [Thu, 18 Jul 2013 13:17:26 +0000 (13:17 +0000)]
Forgot 'svn add' again, sorry!
Tests for r186574.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186580
91177308-0d34-0410-b5e6-
96231b3b80d8
Joey Gouly [Thu, 18 Jul 2013 12:00:25 +0000 (12:00 +0000)]
Change 'n' to 'N' to keep consistent with other instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186576
91177308-0d34-0410-b5e6-
96231b3b80d8
Joey Gouly [Thu, 18 Jul 2013 11:53:22 +0000 (11:53 +0000)]
[ARMv8] Add NEON instructions VCVT{A, N, P, M}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186574
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Thu, 18 Jul 2013 10:40:35 +0000 (10:40 +0000)]
[SystemZ] Use RNSBG
This should be the last of the R.SBG patches for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186573
91177308-0d34-0410-b5e6-
96231b3b80d8
Joey Gouly [Thu, 18 Jul 2013 10:20:25 +0000 (10:20 +0000)]
Add Thumb tests for the ARMv8 FP instructions that I recently added.
Also, fix the namespace for two instructions that I missed previously.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186572
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Thu, 18 Jul 2013 10:14:55 +0000 (10:14 +0000)]
[SystemZ] Generalize RxSBG SRA case
The original code only folded SRA into ROTATE ... SELECTED BITS
if there was no outer shift. This patch splits out that check
and generalises it slightly. The extra cases aren't really that
interesting, but this is paving the way for RNSBG support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186571
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Thu, 18 Jul 2013 10:06:15 +0000 (10:06 +0000)]
[SystemZ] Use RXSBG
Extend the previous R.SBG patches to handle XORs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186570
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Thu, 18 Jul 2013 09:45:08 +0000 (09:45 +0000)]
[SystemZ] Rename and formatting fixes
In hindsight, using "RISBG" for something that can be any type of
R.SBG instruction was a bit confusing, so this renames it to RxSBG.
That might not be the best choice either, since there is an instruction
called RXSBG, but hopefully the lower-case letter stands out enough.
While there I fixed a couple of GNUisms that had crept in --
sorry about that!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186569
91177308-0d34-0410-b5e6-
96231b3b80d8
Joey Gouly [Thu, 18 Jul 2013 09:34:35 +0000 (09:34 +0000)]
Remove the extra leading 0 from VMAXNMND.
The N3VDIntnp pattern takes bits<5> and I gave it 6 bits.
Thanks to Jiangning Liu for spotting it!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186568
91177308-0d34-0410-b5e6-
96231b3b80d8
Vladimir Medic [Thu, 18 Jul 2013 09:28:35 +0000 (09:28 +0000)]
This patch extends mips register parsing methods to allow indexed register parsing. The corresponding test cases are added to the patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186567
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 18 Jul 2013 07:16:44 +0000 (07:16 +0000)]
Fix copy and paste bug from r186491 to make v2f64 use MOVAPD/MOVUPD as it should.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186566
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 18 Jul 2013 07:15:00 +0000 (07:15 +0000)]
Reapply r186316 with a fix for one bug where the code could walk off the
end of a vector. This was found with ASan. I've had one other report of
a crasher, but thus far been unable to reproduce the crash. It may well
be fixed with this version, and if not I'd like to get more information
from the build bots about what is happening.
See r186316 for the full commit log for the new implementation of the
SROA algorithm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186565
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 18 Jul 2013 04:33:20 +0000 (04:33 +0000)]
SLPVectorizer: Speedup isConsecutive (that checks if two addresses are consecutive in memory) by checking for additional patterns that don't need to go through SCEV.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186563
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 18 Jul 2013 04:28:21 +0000 (04:28 +0000)]
PPC: Support dynamic allocas with large alignment
Support for dynamic stack alignments in the PPC backend has been unfinished, in
part because it depends on dynamic stack realignment (which I only just
recently implemented fully). Now we can also support dynamic allocas with
higher than the default target stack alignment (16 bytes).
In order to round-up the requested size to the maximum requested alignment, we
need an additional register to hold the rounded-up size. We're already using one
scavenged register to hold the previous stack-pointer value (which needs to be
stored with the signal-safe stdux update), and so when we have dynamic allocas
and a large alignment, we allocate two emergency spill slots for the scavenger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186562
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 18 Jul 2013 03:29:51 +0000 (03:29 +0000)]
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186561
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 18 Jul 2013 03:04:20 +0000 (03:04 +0000)]
Convert two uses if fstat with sys::fs::status.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186560
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 18 Jul 2013 02:42:40 +0000 (02:42 +0000)]
Fix a regression I introduced back in r178147.
We don't want cast and dyn_cast to work on temporaries. They don't extend
lifetime like a direct bind to a reference would, so they can introduce
hard to find bugs.
I added tests to make sure we don't regress this. Thanks to Eli Friedman for
noticing this and for his suggestions on how to test it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186559
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 18 Jul 2013 02:34:51 +0000 (02:34 +0000)]
Give 'hasPath' a longer but clearer name 'isPotentiallyReachable'. Also expand
the comment. No functionality change. This change broken out of
http://llvm-reviews.chandlerc.com/D996 .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186558
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 18 Jul 2013 00:27:46 +0000 (00:27 +0000)]
Get rid of the Dis/EnableDebugLocations() API.
I'm moving this functionality into clang instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186549
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 18 Jul 2013 00:23:50 +0000 (00:23 +0000)]
Update comment slightly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186548
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 17 Jul 2013 23:50:51 +0000 (23:50 +0000)]
PPC: Add base-pointer support to builtin setjmp/longjmp
First, this changes the base-pointer implementation to remove an unnecessary
complication (and one that is incompatible with how builtin SjLj is
implemented): instead of using r31 as the base pointer when it is not needed as
a frame pointer, now the base pointer will always be r30 when needed.
Second, we introduce another pseudo register, BP, which is used just like the FP
pseudo register to refer to the base register before we know for certain what
register it will be.
Third, we now save BP into the jmp_buf, and restore r30 from that slot in
longjmp. If the function that called setjmp did not use a base pointer, then
r30 will be overwritten by the setjmp-calling-function's restore code. FP
restoration (which is restored into r31) works the same way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186545
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 17 Jul 2013 23:25:22 +0000 (23:25 +0000)]
Add comparison operators for DIDescriptors to fix c++98 fallout
of operator bool change.
Also convert a variable in DebugIR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186544
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 17 Jul 2013 22:53:05 +0000 (22:53 +0000)]
Add an explicit operator bool conversion to DIDescriptor to make
it clear what we want to do. Unfortunately the conversion to
pointer operator fires now instead and chasing down all of the
conversions and making them explicit and handled is a large task
so add a FIXME with it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186543
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 17 Jul 2013 22:41:16 +0000 (22:41 +0000)]
Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186541
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 17 Jul 2013 22:17:29 +0000 (22:17 +0000)]
Handle '.' correctly in hex float literal parsing.
There were a couple of different loops that were not handling
'.' correctly in APFloat::convertFromHexadecimalString; these mistakes
could lead to assertion failures and incorrect rounding for overlong
hex float literals.
Fixes PR16643.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186539
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Wed, 17 Jul 2013 22:13:44 +0000 (22:13 +0000)]
Add some uncovered attribute tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186538
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Wed, 17 Jul 2013 20:06:03 +0000 (20:06 +0000)]
Restore r181216, which was partially reverted in r182499.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186533
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 17 Jul 2013 19:58:28 +0000 (19:58 +0000)]
Fix a funny typo. Thanks to Aaron Ballman for noticing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186532
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 17 Jul 2013 19:52:25 +0000 (19:52 +0000)]
Add a micro optimization to catch cases where the PtrA equals PtrB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186531
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 17 Jul 2013 19:44:07 +0000 (19:44 +0000)]
Add FILE_SHARE_WRITE to openFileForRead.
This should fix the windows bots. It looks like the failing tests are of the
form
prog1 > file
prog2 file
and prog2 fails trying to read the file. The best fix would probably be to close
stdout/stderr in prog1, but it was not the intention of 186511 to change this,
so just restore the old behavior for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186530
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 17 Jul 2013 19:43:13 +0000 (19:43 +0000)]
Silencing an MSVC warning about signed vs unsigned comparison mismatches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186529
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 17 Jul 2013 19:09:27 +0000 (19:09 +0000)]
[mips] Use "foreach" loop to make register definitions more concise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186528
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Wed, 17 Jul 2013 18:53:29 +0000 (18:53 +0000)]
Add -*- C++ -*- to InstrEmitter.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186527
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 17 Jul 2013 16:26:38 +0000 (16:26 +0000)]
OptParser.td: typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186517
91177308-0d34-0410-b5e6-
96231b3b80d8
Vladimir Medic [Wed, 17 Jul 2013 15:00:42 +0000 (15:00 +0000)]
This patch checks for valid mnemonics at the beginning of parseInstruction method, thus giving the user the right error message for non-existing instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186512
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 17 Jul 2013 14:58:25 +0000 (14:58 +0000)]
Split openFileForRead into Windows and Unix versions.
This has some advantages:
* Lets us use native, utf16 windows functions.
* Easy to produce good errors on windows about trying to use a
directory when we want a file.
* Simplifies the unix version a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186511
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 17 Jul 2013 14:32:41 +0000 (14:32 +0000)]
Fix comparisons of alloca alignment in inliner merging
Duncan pointed out a mistake in my fix in r186425 when only one of the allocas
being compared had the target-default alignment. This is essentially his
suggested solution. Thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186510
91177308-0d34-0410-b5e6-
96231b3b80d8
Vladimir Medic [Wed, 17 Jul 2013 14:05:19 +0000 (14:05 +0000)]
Implement eret and deret(return from exception) instructions for Mips. Test examples are given.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186507
91177308-0d34-0410-b5e6-
96231b3b80d8
Joey Gouly [Wed, 17 Jul 2013 14:03:49 +0000 (14:03 +0000)]
Add the tests that I forgot to 'svn add' with my previous commit (r186504).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186506
91177308-0d34-0410-b5e6-
96231b3b80d8
Joey Gouly [Wed, 17 Jul 2013 13:59:38 +0000 (13:59 +0000)]
[ARMv8] Add support for the NEON instructions vmaxnm/vminnm.
This adds a new class for non-predicable NEON instructions and a
new DecoderNamespace for v8 NEON instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186504
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 17 Jul 2013 12:31:50 +0000 (12:31 +0000)]
llvm-ar: doExtract(): Write extracted files with F_Binary. It should fix llvm/test/Object/extract.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186503
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 17 Jul 2013 11:01:05 +0000 (11:01 +0000)]
Ensure sys::getProcessTriple always uses a normalized triple. Patch by
Thomas B. Jablin, from PR16636.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186501
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Wed, 17 Jul 2013 10:58:37 +0000 (10:58 +0000)]
[XCore] Ensure implicit operands aren't lost on the return instruction.
Patch by Robert Lytton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186500
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 17 Jul 2013 09:34:51 +0000 (09:34 +0000)]
Tweak the cmake interaction between CMAKE_BUILD_TYPE and LLVM_ENABLE_ASSERTIONS.
The issue is that CMAKE_BUILD_TYPE=RelWithDebInfo LLVM_ENABLE_ASSERTIONS=ON was
not building with assertions enabled. (I was unable to find what in the LLVM
source tree was adding -DNDEBUG to the build line in this case, so decided that
it must be cmake itself that was adding it - this may depend on the cmake
version). The fix treats any mode that is not Debug as being the same as
Release for this purpose (previously it was being assumed that cmake would only
add -DNDEBUG for Release and not for RelWithDebInfo or MinSizeRel). If other
versions of cmake don't add -DNDEBUG for RelWithDebInfo then that's OK: with
this change you just get a useless but harmless -UNDEBUG or -DNDEBUG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186499
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 17 Jul 2013 06:58:23 +0000 (06:58 +0000)]
Teach x86 fast-isel to use AVX opcodes for vector stores when AVX is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186496
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 17 Jul 2013 06:53:51 +0000 (06:53 +0000)]
LLVMSymbolize.cpp: Fix build. Triple::ArchType is not a namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186494
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 17 Jul 2013 06:45:36 +0000 (06:45 +0000)]
llvm-symbolizer: be more careful with colons in file names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186493
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 17 Jul 2013 05:57:45 +0000 (05:57 +0000)]
Make x86 fast-isel correctly choose between aligned and unaligned operations for vector stores. Fixes PR16640.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186491
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Wed, 17 Jul 2013 05:46:46 +0000 (05:46 +0000)]
Fix ARMFastISel::ARMEmitIntExt shift emission
My patch 'r183551 - ARM FastISel integer sext/zext improvements' was incorrect when emitting ARM register-immediate ASR, LSL, LSR instructions: they are pseudo-instructions in ARMInstrInfo.td and I should have used MOVsi instead.
This is not an issue when code is generated through a .s file, but is an issue when generated straight to a .o (-filetype=obj).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186489
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 17 Jul 2013 05:35:44 +0000 (05:35 +0000)]
PPC: Add CTR-register clobber to builtin setjmp
Because the builtin longjmp implementation uses a CTR-based indirect jump, when
the control flow arrives at the builtin setjmp call, the CTR register has
necessarily been clobbered. Correspondingly, this adds CTR to the list of
implicit definitions of the builtin setjmp pseudo instruction.
We don't need to add CTR to the implicit definitions of builtin longjmp
because, even though it does clobber the CTR register, the control flow cannot
return to inside the loop unless there is also a builtin setjmp call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186488
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 17 Jul 2013 04:20:49 +0000 (04:20 +0000)]
Add simpler version of is_directory. It will be used in clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186486
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 17 Jul 2013 03:54:53 +0000 (03:54 +0000)]
Mark a method 'const' and another 'static'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186485
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 17 Jul 2013 03:43:10 +0000 (03:43 +0000)]
Make a few more static string pointers constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186484
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 17 Jul 2013 03:33:41 +0000 (03:33 +0000)]
Don't fallback to copy + delete in rename.
Rename's documentation says "Files are renamed as if by POSIX rename()". and it
is used for atomically updating output files from a temporary. Having rename
fallback to a non atomic copy has the potential to hide bugs, like using
a temporary file in /tmp instead of a unique name next to the final destination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186483
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 17 Jul 2013 03:11:32 +0000 (03:11 +0000)]
Make constant string pointer into an array to remove a pointer lookup for every access.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186482
91177308-0d34-0410-b5e6-
96231b3b80d8