Commit Graph

84145 Commits

Author SHA1 Message Date
Craig Topper
4feb647283 Implement proper handling for pcmpistri/pcmpestri intrinsics. Requires custom handling in DAGISelToDAG due to limitations in TableGen's implicit def handling. Fixes PR11305.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161318 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-06 06:22:36 +00:00
Craig Topper
d230d20b73 Update test to check for r161305
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161307 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-05 09:06:28 +00:00
Craig Topper
cc915951eb Remove custom inserter for MWAIT. It doesn't do anything that couldn't be represented in a pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161306 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-05 00:36:57 +00:00
Craig Topper
638aa687d4 Use a COPY node instead of an explicit MOVA opcode in the custom insterter for pcmpestrm/pcmpistrm. Allows the register allocator to handle it better and prevent wasted identity moves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161305 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-05 00:17:48 +00:00
Hal Finkel
8cc3474f72 Add readcyclecounter lowering on PPC64.
On PPC64, this can be done with a simple TableGen pattern.
To enable this, I've added the (otherwise missing) readcyclecounter
SDNode definition to TargetSelectionDAG.td.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161302 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-04 14:10:46 +00:00
Anton Korobeynikov
ad62e92279 Skip impdef regs during eabi save/restore list emission to workaround PR11902
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161301 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-04 13:25:58 +00:00
Anton Korobeynikov
161474d198 Recognize vst1.64 / vld1.64 with 3 and 4 regs as load from / store to stack stuff
(this corresponds by spilling/reloading regs in DTriple / DQuad reg classes).
No testcase, found by inspection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161300 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-04 13:22:14 +00:00
Anton Korobeynikov
b58d7d0312 Add stack spill / reload instructions for DTriple and DQuad register classes, which
were missed for no reason. This fixes PR13377


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161299 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-04 13:16:12 +00:00
Bill Wendling
087642f863 Remove extraneous ';'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161298 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-04 10:31:40 +00:00
Benjamin Kramer
36108ceabd Update cmake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161297 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-04 09:52:39 +00:00
Benjamin Kramer
189f231a4b Postpone the deletion of the old name in StructType::setName to allow using a slice of the old name.
Fixes PR13522. Add a rudimentary unit test to exercise the behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161296 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-04 09:47:02 +00:00
NAKAMURA Takumi
a6273f1a4a [CMake] add_lit_target: Remove comments about add_dependencies. It is not a bug in cmake that add_custom_target(DEPENDS) would not accept targets but file-level dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161295 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-04 02:14:44 +00:00
NAKAMURA Takumi
17d2853a4b llc: Try to suppress failures since r161262 .
FIXME: Fix several tests on i686-win32 due to lacking of many libraries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161292 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-04 01:29:37 +00:00
Jakob Stoklund Olesen
cf1823dc25 Delete a dead variable.
TwoAddressInstructionPass doesn't remat any more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161285 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-04 00:04:03 +00:00
Jakob Stoklund Olesen
ae52faddeb TwoAddressInstructionPass refactoring: Extract another method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161284 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 23:57:58 +00:00
Bob Wilson
53624a2df5 Refactor and check "onlyReadsMemory" before optimizing builtins.
This patch is mostly just refactoring a bunch of copy-and-pasted code, but
it also adds a check that the call instructions are readnone or readonly.
That check was already present for sin, cos, sqrt, log2, and exp2 calls, but
it was missing for the rest of the builtins being handled in this code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161282 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 23:29:17 +00:00
Jakob Stoklund Olesen
6ac8066ae4 TwoAddressInstructionPass refactoring: Extract a method.
No functional change intended, except replacing a DenseMap with a
SmallDenseMap which should behave identically.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161281 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 23:25:45 +00:00
Jakob Stoklund Olesen
5bfdedf6ab Begin adding support for updating LiveIntervals in TwoAddressInstructionPass.
This is far from complete, and only changes behavior when the
-early-live-intervals flag is passed to llc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161273 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 22:58:34 +00:00
Akira Hatanaka
24e79e55da 1. Redo mips16 instructions to avoid multiple opcodes for same instruction.
Change these to patterns.
2. Add another 16 instructions.

Patch by Reed Kotler.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161272 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 22:57:02 +00:00
Jakob Stoklund Olesen
dcc4436cdd Add an experimental -early-live-intervals option.
This option runs LiveIntervals before TwoAddressInstructionPass which
will eventually learn to exploit and update the analysis.

Eventually, LiveIntervals will run before PHIElimination, and we can get
rid of LiveVariables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161270 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 22:12:54 +00:00
Jakob Stoklund Olesen
e744ac49f4 Delete merged physreg copies in joinReservedPhysReg().
Previously, the identity copy would survive through register allocation
before it was removed by the rewriter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161269 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 22:12:51 +00:00
Bob Wilson
982dc84762 Try to reduce the compile time impact of r161232.
The previous change caused fast isel to not attempt handling any calls to
builtin functions.  That included things like "printf" and caused some
noticable regressions in compile time.  I wanted to avoid having fast isel
keep a separate list of functions that had to be kept in sync with what the
code in SelectionDAGBuilder.cpp was handling.  I've resolved that here by
moving the list into TargetLibraryInfo.  This is somewhat redundant in
SelectionDAGBuilder but it will ensure that we keep things consistent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161263 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 21:26:24 +00:00
Bob Wilson
772af92cb1 Fix memcmp code-gen to honor -fno-builtin.
I noticed that SelectionDAGBuilder::visitCall was missing a check for memcmp
in TargetLibraryInfo, so that it would use custom code for memcmp calls even
with -fno-builtin.  I also had to add a new -disable-simplify-libcalls option
to llc so that I could write a test for this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161262 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 21:26:18 +00:00
Jakob Stoklund Olesen
b2beac2b96 Completely eliminate VNInfo flags.
The 'unused' state of a value number can be represented as an invalid
def SlotIndex. This also exposed code that shouldn't have been looking
at unused value VNInfos.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161258 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 20:59:32 +00:00
Jakob Stoklund Olesen
1599a64277 Fix a couple of loops that were processing unused value numbers.
Unused VNInfos should be left alone. Their def SlotIndex doesn't point
to anything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161257 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 20:59:29 +00:00
Matt Beaumont-Gay
a5b51f5694 Silence unused variable warning in -asserts build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161256 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 20:54:11 +00:00
Jakob Stoklund Olesen
bf60aa9db5 Eliminate the VNInfo::hasPHIKill() flag.
The only real user of the flag was removeCopyByCommutingDef(), and it
has been switched to LiveIntervals::hasPHIKill().

All the code changed by this patch was only concerned with computing and
propagating the flag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161255 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 20:19:44 +00:00
Jakob Stoklund Olesen
0ab7103e06 Make the hasPHIKills flag a computed property.
The VNInfo::HAS_PHI_KILL is only half supported. We precompute it in
LiveIntervalAnalysis, but it isn't properly updated by live range
splitting and functions like shrinkToUses().

It is only used in one place: RegisterCoalescer::removeCopyByCommutingDef().

This patch changes that function to use a new LiveIntervals::hasPHIKill()
function that computes the flag for a given value number.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161254 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 20:10:24 +00:00
Eric Christopher
09a887345f Add a configure flag for enabling -Werror on the command line
while building as requested by Lang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161253 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 19:58:20 +00:00
Eric Christopher
46e6bcf3ac Add support for detecting libxml for Dmitri's work. He'll
commit code in clang that uses this shortly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161252 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 19:47:19 +00:00
Eric Christopher
8212002386 Add a configure option to pass -std=c++11 on the command line.
rdar://11366674

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161251 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 19:47:14 +00:00
Jakob Stoklund Olesen
07dc609c37 Remove a dead prototype.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161250 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 18:34:32 +00:00
Eric Christopher
42dffa50c5 Revert previous patch here, we should instead configure in specific
packages for particular uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161246 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 17:45:31 +00:00
Jakob Stoklund Olesen
3cd9f572ed Delete dead function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161242 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 15:21:21 +00:00
Jakob Stoklund Olesen
bc8d827b2b Don't delete dead code in TwoAddressInstructionPass.
This functionality was added before we started running
DeadMachineInstructionElim on all targets. It serves no purpose now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161241 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 15:11:57 +00:00
Gabor Greif
4ecaedc771 allow 'make CPPFLAGS=<something>' work again
this makes this hack a bit more bearable
for poor souls who need to pass custom
preprocessor flags to the build process

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161240 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 13:31:24 +00:00
Eric Christopher
cbd84f7d83 Add a BUILD_FLAGS variable so that autoconf checks have a place
to store additional flag options since too many things can
and do override CPPFLAGS. Also, this is exported, unlike CPPFLAGS
so it can be actually used elsewhere. This should enable us
to remove the AC_SUBSTs in the intel checks, but I have no way
of testing it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161233 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 05:18:00 +00:00
Bob Wilson
d49edb7ab0 Fall back to selection DAG isel for calls to builtin functions.
Fast isel doesn't currently have support for translating builtin function
calls to target instructions.  For embedded environments where the library
functions are not available, this is a matter of correctness and not
just optimization.  Most of this patch is just arranging to make the
TargetLibraryInfo available in fast isel.  <rdar://problem/12008746>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161232 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 04:06:28 +00:00
Bob Wilson
d1e672e023 Add new getLibFunc method to TargetLibraryInfo.
This just provides a way to look up a LibFunc::Func enum value for a
function name.  Alphabetize the enums and function names so we can use a
binary search.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161231 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 04:06:22 +00:00
Jush Lu
2946549a28 [arm-fast-isel] Add support for shl, lshr, and ashr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161230 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 02:37:48 +00:00
NAKAMURA Takumi
8b52c855b3 [CMake] Add yaml2obj to check-llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161229 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 00:45:32 +00:00
Bill Wendling
573e973267 Move the "findUsedStructTypes" functionality outside of the Module class.
The "findUsedStructTypes" method is very expensive to run. It needs to be
optimized so that LTO can run faster. Splitting this method out of the Module
class will help this occur. For instance, it can keep a list of seen objects so
that it doesn't process them over and over again.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161228 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 00:30:35 +00:00
Eric Christopher
e94ac8871a Add support for the ARM GHC calling convention, this patch was in 3.0,
but somehow managed to be dropped later.

Patch by Karel Gardas.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161226 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 00:05:53 +00:00
Richard Trieu
7b07d69958 Remove redundant '== true' after a comparison.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161223 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-02 23:22:39 +00:00
Jim Grosbach
55499db9a0 ARM: Tidy up. Remove unused template parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161222 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-02 22:08:27 +00:00
Jim Grosbach
9249ef3b99 ARM: More InstAlias refactors to use #NAME#.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161220 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-02 21:59:52 +00:00
Matt Beaumont-Gay
923123c370 Move test yaml files under Inputs until they are converted to be the actual
test files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161219 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-02 21:52:49 +00:00
Jim Grosbach
5c6c128b81 ARM: Refactor instaliases using TableGen support for #NAME#.
Now that TableGen supports references to NAME w/o it being explicitly
referenced in the definition's own name, use that to simplify
assembly InstAlias definitions in multiclasses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161218 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-02 21:50:41 +00:00
Manman Ren
127eea87d6 X86 Peephole: fold loads to the source register operand if possible.
Add more comments and use early returns to reduce nesting in isLoadFoldable.
Also disable folding for V_SET0 to avoid introducing a const pool entry and
a const pool load.

rdar://10554090 and rdar://11873276


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161207 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-02 19:37:32 +00:00
Michael J. Spencer
1de266be13 [yaml2obj] Fix build. Apparently I've gotten too familiar with C++11.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161206 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-02 19:36:30 +00:00