Commit Graph

61656 Commits

Author SHA1 Message Date
Benjamin Kramer 58e6c2eded Rewrite MemoryBuffer::getSTDIN to use read(2) and a SmallVector buffer.
llvm-svn: 106856
2010-06-25 16:07:18 +00:00
Duncan Sands 2dc70bea54 Remove variables which are assigned to but for which the value
is not used.  Spotted by gcc-4.6.

llvm-svn: 106854
2010-06-25 14:48:39 +00:00
Benjamin Kramer 948dd57945 Bring back the empty vector workaround I removed in r106839. Looks like MSVC needs it.
llvm-svn: 106841
2010-06-25 12:51:01 +00:00
Benjamin Kramer ce2a92220f Tweak MemoryBuffer to allocate the class itself, the name and possibly the
buffer in the same chunk of memory.

2 less mallocs for every uninitialized MemoryBuffer and 1 less malloc for every
MemoryBuffer pointing to a memory range translate into 20% less mallocs on
clang -cc1 -Eonly Cocoa_h.m.

llvm-svn: 106839
2010-06-25 11:50:40 +00:00
Gabor Greif b890fc8023 use ArgOperand accessors
and CallInst for getting hold
of the intrinsic's arguments

simplify along the way (at least for me this is much more legible now)
Bill, Baldrick or Anton, please review\!

llvm-svn: 106838
2010-06-25 11:25:30 +00:00
Gabor Greif 7dd3afdff3 use ArgOperand API (the simple part)
llvm-svn: 106837
2010-06-25 09:44:37 +00:00
Gabor Greif eba0be7dc9 use ArgOperand API
llvm-svn: 106836
2010-06-25 09:38:13 +00:00
Gabor Greif 41b81ee2fb use ArgOperand API
llvm-svn: 106835
2010-06-25 09:36:23 +00:00
Duncan Sands cfdaac1cb0 Remove unused variables.
llvm-svn: 106834
2010-06-25 09:35:33 +00:00
Gabor Greif ed9ae7bf21 use ArgOperand API and CallSite to access arguments of CallInst
llvm-svn: 106833
2010-06-25 09:03:52 +00:00
Gabor Greif b5874dea6e use ArgOperand API and CallSite to access arguments of CallInst
llvm-svn: 106829
2010-06-25 08:48:19 +00:00
Gabor Greif e4eed709d4 use ArgOperand API
llvm-svn: 106828
2010-06-25 08:24:59 +00:00
Gabor Greif f6207e0a80 prune an include
llvm-svn: 106827
2010-06-25 08:16:50 +00:00
Gabor Greif e3ba486c9f use ArgOperand API (one more hunk I could split)
llvm-svn: 106825
2010-06-25 07:58:41 +00:00
Gabor Greif 5f3e656a1b use ArgOperand API (some hunks I could split)
llvm-svn: 106824
2010-06-25 07:57:14 +00:00
Gabor Greif 07e9284c75 use ArgOperand API; tighten type of handleFreeWithNonTrivialDependency to be able to use isFreeCall whithout a cast or new overload
llvm-svn: 106823
2010-06-25 07:40:32 +00:00
Bob Wilson 07aead2f8d Add missing ARM and Thumb data layout info for vector types.
Radar 8128745.

llvm-svn: 106820
2010-06-25 04:41:08 +00:00
Bob Wilson eadbf9732f Reduce indentation.
llvm-svn: 106819
2010-06-25 04:12:31 +00:00
Dale Johannesen e9eaaa91d8 Fix a case where an earlyclobber operand of an asm
is reused as an input.  PR 4118.  Testcase is too big,
as usual with bugs in this area, but there's one in
the PR.

llvm-svn: 106816
2010-06-25 00:49:43 +00:00
Bruno Cardoso Lopes cbdcce6478 Add some AVX convert instructions
llvm-svn: 106815
2010-06-25 00:39:30 +00:00
Jakob Stoklund Olesen 889ab7d158 Make sure all eliminated kills are removed from VNInfo lists.
This fixes PR7479 and PR7485. The test cases from those PRs are big, so not
included. However, PR7485 comes from self hosting on FreeBSD, so we will surely
hear about any regression.

llvm-svn: 106811
2010-06-24 23:57:35 +00:00
Dan Gohman 600658a4ba Don't write an output file to cwd, and put an rdar prefix on
an rdar number.

llvm-svn: 106810
2010-06-24 23:45:15 +00:00
Dan Gohman 5f0bf64c0c Add some comments.
llvm-svn: 106809
2010-06-24 23:41:59 +00:00
Bruno Cardoso Lopes 447735aa98 Refactoring of SSE convert intrinsics
llvm-svn: 106808
2010-06-24 23:37:07 +00:00
Dan Gohman 9a2f0473b2 Teach EmitLiveInCopies to omit copies for unused virtual registers,
and to clean up unused incoming physregs from the live-in list.

llvm-svn: 106805
2010-06-24 22:23:02 +00:00
Bruno Cardoso Lopes 78827d1952 Refactoring of SSE conversion instructions
llvm-svn: 106804
2010-06-24 22:22:21 +00:00
Bob Wilson 99f28dad6e Change array references to match my previous change to use the public type
names for the array fields.

llvm-svn: 106803
2010-06-24 22:21:19 +00:00
Oscar Fuentes c377941c68 DataTypes.h.cmake (MSVC): Protect some #define's and use specific
suffixes for integer types.

llvm-svn: 106797
2010-06-24 22:05:52 +00:00
Bruno Cardoso Lopes 6b6b605917 Refactor SSE cmp intrinsics and declare the same for AVX
llvm-svn: 106796
2010-06-24 22:04:40 +00:00
Bob Wilson e26d710335 Fix up some comments.
llvm-svn: 106795
2010-06-24 22:04:30 +00:00
Bob Wilson 3808684055 Use the struct tags mandated by ARM's ABI. Also use the public type names for
the array fields in these structs.

llvm-svn: 106794
2010-06-24 22:03:41 +00:00
Bill Wendling 2d3c490026 It's possible that a flag is added to the SDNode that points back to the
original SDNode. This is badness. Also, this function allows one SDNode to point
multiple flags to another SDNode. Badness as well.

llvm-svn: 106793
2010-06-24 22:00:37 +00:00
Devang Patel c657c621b7 DBG_VALUE machine instruction pointing to undefined register for a variable justify a separate scope if the variable is inlined function's argument.
Radar 8122864.

llvm-svn: 106792
2010-06-24 21:51:19 +00:00
Jakob Stoklund Olesen 2b87d44c5d Don't return a std::vector in the Spiller interface, but take a reference to a
vector instead. This avoids needless copying and allocation.

Add documentation.

llvm-svn: 106788
2010-06-24 20:54:29 +00:00
Bruno Cardoso Lopes 4398fd7b83 - Add AVX COMI{SS,SD}{rr,rm} and UCOMI{SS,SD}{rr,rm}.
- Fix a small VEX encoding issue.
- Move compare instructions to their appropriate place.

llvm-svn: 106787
2010-06-24 20:48:23 +00:00
Jakob Stoklund Olesen 9b659142a6 Remove the now unused LiveIntervals::getVNInfoSourceReg().
This method was always a bit too simplistic for the real world. It didn't really
deal with subregisters and such.

llvm-svn: 106781
2010-06-24 20:18:15 +00:00
Jakob Stoklund Olesen 487ed997d0 Teach AdjustCopiesBackFrom to also use CoalescerPair to identify compatible copies.
llvm-svn: 106780
2010-06-24 20:16:00 +00:00
Dale Johannesen 5ad5226c58 Disallow matching "i" constraint to symbol addresses when
address requires a register or secondary load to compute
(most PIC modes).  This improves "g" constraint handling.  8015842.

The test from 2007 is attempting to test the fix for PR1761,
but since -relocation-model=static doesn't work on Darwin
x86-64, it was not testing what it was supposed to be testing
and was passing erroneously.  Fixed to use Linux x86-64.

llvm-svn: 106779
2010-06-24 20:14:51 +00:00
Eric Christopher a0d44f9c62 Silence some unused variable warnings.
llvm-svn: 106778
2010-06-24 20:14:34 +00:00
Jakob Stoklund Olesen 7f894d8fdc Remove the -fast-spill option.
This code path has never really been used, and we are going to be handling
spilling through the Spiller interface in the future.

llvm-svn: 106777
2010-06-24 19:56:08 +00:00
Dan Gohman a3de0186b8 Document problems that I encountered when working on -scev-aa.
llvm-svn: 106776
2010-06-24 19:34:03 +00:00
Evan Cheng c26e2f4b70 Oops. IT block formation pass needs to be run at any optimization level.
llvm-svn: 106775
2010-06-24 19:10:14 +00:00
Bill Wendling 3f0e992af1 Loosen up the requirements in the Horrible Hack(tm) to include all selectors
which don't have a catch-all associated with them not just clean-ups. This fixes
the SingleSource/Benchmarks/Shootout-C++/except.cpp testcase that broke because
of my change r105902.

llvm-svn: 106772
2010-06-24 18:49:10 +00:00
Eli Friedman 246c41d93e Always allow Thumb-2 SXTB, SXTH, UXTB, and UXTH. Fixes PR7324.
llvm-svn: 106770
2010-06-24 18:20:04 +00:00
Jakob Stoklund Olesen 45230239e4 Replace a big gob of old coalescer logic with the new CoalescerPair class.
CoalescerPair can determine if a copy can be coalesced, and which register gets
merged away. The old logic in SimpleRegisterCoalescing had evolved into
something a bit too convoluted.

This second attempt fixes some crashes that only occurred Linux.

llvm-svn: 106769
2010-06-24 18:15:01 +00:00
Dan Gohman 4143e9deeb Add an exports file for the Hello example plugin.
llvm-svn: 106768
2010-06-24 17:36:51 +00:00
Jakob Stoklund Olesen a612d7c012 Print the LSBs of a SlotIndex symbolically using letters referring to the
[L]oad, [u]se, [d]ef, or [S]tore slots.

This makes it easier to see if two indices refer to the same instruction,
avoiding mental mod 4 calculations.

llvm-svn: 106766
2010-06-24 17:31:07 +00:00
Dan Gohman 8a84cd57ae Simplify this code; switch lowering shouldn't produce cases
which trivially fold away.

llvm-svn: 106765
2010-06-24 17:08:31 +00:00
Dan Gohman 963b1c142e A few minor micro-optimizations.
llvm-svn: 106764
2010-06-24 16:57:52 +00:00
Dan Gohman 47ddf76d89 Teach getExactSDiv to evaluate x/1 to x up front, as it's a common
enough special case, and it theoretically allows more folding because
it works even when x is unanalyzable.

llvm-svn: 106763
2010-06-24 16:51:25 +00:00