oota-llvm.git
15 years agoConvert to FileCheck
Jim Grosbach [Mon, 16 Nov 2009 23:19:29 +0000 (23:19 +0000)]
Convert to FileCheck

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88991 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInitialize the new AsmPrinterFlags field to 0, fixing uses of
Dan Gohman [Mon, 16 Nov 2009 22:49:38 +0000 (22:49 +0000)]
Initialize the new AsmPrinterFlags field to 0, fixing uses of
uninitialized memory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88985 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake X86-64 in the Large model always emit 64-bit calls.
Jeffrey Yasskin [Mon, 16 Nov 2009 22:41:33 +0000 (22:41 +0000)]
Make X86-64 in the Large model always emit 64-bit calls.
The large code model is documented at
http://www.x86-64.org/documentation/abi.pdf and says that calls should
assume their target doesn't live within the 32-bit pc-relative offset
that fits in the call instruction.

To do this, we turn off the global-address->target-global-address
conversion in X86TargetLowering::LowerCall(). The first attempt at
this broke the lazy JIT because it can separate the movabs(imm->reg)
from the actual call instruction. The lazy JIT receives the address of
the movabs as a relocation and needs to record the return address from
the call; and then when that call happens, it needs to patch the
movabs with the newly-compiled target. We could thread the call
instruction into the relocation and record the movabs<->call mapping
explicitly, but that seems to require at least as much new
complication in the code generator as this change.

To fix this, we make lazy functions _always_ go through a call
stub. You'd think we'd only have to force lazy calls through a stub on
difficult platforms, but that turns out to break indirect calls
through a function pointer. The right fix for that is to distinguish
between calls and address-of operations on uncompiled functions, but
that's complex enough to leave for someone else to do.

Another attempt at this defined a new CALL64i pseudo-instruction,
which expanded to a 2-instruction sequence in the assembly output and
was special-cased in the X86CodeEmitter's emitInstruction()
function. That broke indirect calls in the same way as above.

This patch also removes a hack forcing Darwin to the small code model.
Without far-call-stubs, the small code model requires things of the
JITMemoryManager that the DefaultJITMemoryManager can't provide.

Thanks to echristo for lots of testing!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88984 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't build examples by default, use BUILD_EXAMPLES=1 to build them. The only utility...
Daniel Dunbar [Mon, 16 Nov 2009 22:38:00 +0000 (22:38 +0000)]
Don't build examples by default, use BUILD_EXAMPLES=1 to build them. The only utility of this is testing that we keep the examples up to date, I will just make the buildbots run with this flag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88979 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd "Unoptimized" build (NO_DEBUG_SYMBOLS=1 ENABLE_OPTIMIZED=1), for reducing
Daniel Dunbar [Mon, 16 Nov 2009 22:37:52 +0000 (22:37 +0000)]
Add "Unoptimized" build (NO_DEBUG_SYMBOLS=1 ENABLE_OPTIMIZED=1), for reducing
disk space, and increasing battery lifetime. :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88978 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix unused variables warnings.
Eric Christopher [Mon, 16 Nov 2009 22:34:32 +0000 (22:34 +0000)]
Fix unused variables warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88977 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago- Check memoperand alignment instead of checking stack alignment. Most load / store...
Evan Cheng [Mon, 16 Nov 2009 21:56:03 +0000 (21:56 +0000)]
- Check memoperand alignment instead of checking stack alignment. Most load / store folding instructions are not referencing spill stack slots.
- Mark MOVUPSrm re-materializable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88974 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert r88939.
Devang Patel [Mon, 16 Nov 2009 21:53:40 +0000 (21:53 +0000)]
Revert r88939.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88973 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix an expensive-checks error.
David Greene [Mon, 16 Nov 2009 21:52:23 +0000 (21:52 +0000)]
Fix an expensive-checks error.

The Mask and LHSMask may not be of the same size, so don't do the
transformation if they're different.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88972 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake the pass class name more explicit.
Jim Grosbach [Mon, 16 Nov 2009 21:13:22 +0000 (21:13 +0000)]
Make the pass class name more explicit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88964 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomake pass name a bit more clear
Jim Grosbach [Mon, 16 Nov 2009 21:03:58 +0000 (21:03 +0000)]
make pass name a bit more clear

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88961 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert 88957. This file uses CodeGenOpt, which is defined in TargetMachine.h.
Dan Gohman [Mon, 16 Nov 2009 20:45:50 +0000 (20:45 +0000)]
Revert 88957. This file uses CodeGenOpt, which is defined in TargetMachine.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88959 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove an unnecessary #include.
Dan Gohman [Mon, 16 Nov 2009 20:41:12 +0000 (20:41 +0000)]
Remove an unnecessary #include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88957 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSink a #include <map> to where it's actually needed.
Dan Gohman [Mon, 16 Nov 2009 20:40:47 +0000 (20:40 +0000)]
Sink a #include <map> to where it's actually needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88956 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake PseudoSourceValue's classof recognize
Dan Gohman [Mon, 16 Nov 2009 20:40:06 +0000 (20:40 +0000)]
Make PseudoSourceValue's classof recognize
FixedStackPseudoSourceValueVal, to respect this isa relationship.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88954 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a typo in a comment.
Dan Gohman [Mon, 16 Nov 2009 20:35:59 +0000 (20:35 +0000)]
Fix a typo in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88953 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoConvert to FileCheck
Jim Grosbach [Mon, 16 Nov 2009 20:04:15 +0000 (20:04 +0000)]
Convert to FileCheck

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88947 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded a testcase for PR5495.
Lang Hames [Mon, 16 Nov 2009 20:03:13 +0000 (20:03 +0000)]
Added a testcase for PR5495.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88946 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd configure options for specifying where to look for libstdc++.
Rafael Espindola [Mon, 16 Nov 2009 19:46:55 +0000 (19:46 +0000)]
Add configure options for specifying where to look for libstdc++.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88943 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoConvert to FileCheck
Jim Grosbach [Mon, 16 Nov 2009 19:46:46 +0000 (19:46 +0000)]
Convert to FileCheck

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88942 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a comment.
Bob Wilson [Mon, 16 Nov 2009 19:33:27 +0000 (19:33 +0000)]
Fix a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88940 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd VISIBILITY_HIDDEN marker.
Devang Patel [Mon, 16 Nov 2009 19:20:48 +0000 (19:20 +0000)]
Add VISIBILITY_HIDDEN marker.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88939 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify thumb2 jump table adjustments. Remove unnecessary calculation and
Jim Grosbach [Mon, 16 Nov 2009 18:58:52 +0000 (18:58 +0000)]
Simplify thumb2 jump table adjustments. Remove unnecessary calculation and
usage of block sizes and offsets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88935 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoclarify comment
Jim Grosbach [Mon, 16 Nov 2009 18:55:47 +0000 (18:55 +0000)]
clarify comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88933 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix some comments.
Bob Wilson [Mon, 16 Nov 2009 18:54:08 +0000 (18:54 +0000)]
Fix some comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88932 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhitespace: be consistent with pointer syntax.
Bob Wilson [Mon, 16 Nov 2009 18:08:46 +0000 (18:08 +0000)]
Whitespace: be consistent with pointer syntax.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88929 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoClean up whitespace.
Bob Wilson [Mon, 16 Nov 2009 17:56:13 +0000 (17:56 +0000)]
Clean up whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88927 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agotbb opt off by default
Jim Grosbach [Mon, 16 Nov 2009 17:24:45 +0000 (17:24 +0000)]
tbb opt off by default

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88921 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoback off for a bit. tracking down weirdness
Jim Grosbach [Mon, 16 Nov 2009 17:17:48 +0000 (17:17 +0000)]
back off for a bit. tracking down weirdness

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88919 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAnalyze has to be before checking the condition, obviously. Properly construct an...
Jim Grosbach [Mon, 16 Nov 2009 17:10:56 +0000 (17:10 +0000)]
Analyze has to be before checking the condition, obviously. Properly construct an iterator for prior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88917 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake ERROR_IF_USED macro work with GCC <= 4.2, Apple GCCs
Douglas Gregor [Mon, 16 Nov 2009 16:56:48 +0000 (16:56 +0000)]
Make ERROR_IF_USED macro work with GCC <= 4.2, Apple GCCs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88916 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake sure that if anyone passes a name by accident for the isSigned
Duncan Sands [Mon, 16 Nov 2009 15:28:17 +0000 (15:28 +0000)]
Make sure that if anyone passes a name by accident for the isSigned
parameter of CreateIntCast then they get an error from the compiler
(or from the linker with a non-gcc compiler).  Another possibility
is to flip the order of the DestTy and isSigned parameters, since you
should then get a compiler warning if you try to use a char* for a
Type*.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88913 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSupport spill comments.
David Greene [Mon, 16 Nov 2009 15:12:23 +0000 (15:12 +0000)]
Support spill comments.

Have the asm printer emit a comment if an instruction is a spill or
reload and have the spiller mark copies it introdues so the asm printer
can also annotate those.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88911 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBuildIntCast takes an additional parameter, isSigned.
Duncan Sands [Mon, 16 Nov 2009 13:15:28 +0000 (13:15 +0000)]
BuildIntCast takes an additional parameter, isSigned.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88910 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCreateIntCast takes an "isSigned" parameter. Pass "true" for it, rather than
Duncan Sands [Mon, 16 Nov 2009 12:32:28 +0000 (12:32 +0000)]
CreateIntCast takes an "isSigned" parameter.  Pass "true" for it, rather than
a name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88908 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSpecial case FixedStackPseudoSourceValueVal as well. Do we really need to differentia...
Evan Cheng [Mon, 16 Nov 2009 07:10:36 +0000 (07:10 +0000)]
Special case FixedStackPseudoSourceValueVal as well. Do we really need to differentiate PseudoSourceValueVal from FixedStackPseudoSourceValueVal at this level?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88902 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCheck if subreg index is zero.
Evan Cheng [Mon, 16 Nov 2009 06:31:49 +0000 (06:31 +0000)]
Check if subreg index is zero.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88899 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFor some targets, a copy can use a register multiple times, e.g. ppc.
Evan Cheng [Mon, 16 Nov 2009 05:52:06 +0000 (05:52 +0000)]
For some targets, a copy can use a register multiple times, e.g. ppc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88895 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoxfail for now. It has been failing.
Evan Cheng [Mon, 16 Nov 2009 05:44:04 +0000 (05:44 +0000)]
xfail for now. It has been failing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88892 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDisable ldc1/sdc1 instructions for mips1 targets.
Bruno Cardoso Lopes [Mon, 16 Nov 2009 04:35:29 +0000 (04:35 +0000)]
Disable ldc1/sdc1 instructions for mips1 targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88887 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago- Fix a small bug while handling target constant pools (one param was missing).
Bruno Cardoso Lopes [Mon, 16 Nov 2009 04:33:42 +0000 (04:33 +0000)]
- Fix a small bug while handling target constant pools (one param was missing).
- Add a smarter constant pool loading, instead of:

lui $2, %hi($CPI1_0)
addiu $2, $2, %lo($CPI1_0)
lwc1 $f0, 0($2)

Generate:

lui $2, %hi($CPI1_0)
lwc1 $f0, %lo($CPI1_0)($2)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88886 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agotypo spotted by duncan.
Chris Lattner [Mon, 16 Nov 2009 03:51:42 +0000 (03:51 +0000)]
typo spotted by duncan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88884 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFixes the bug exposed by Anton's test case in PR 5495:
Lang Hames [Mon, 16 Nov 2009 02:07:31 +0000 (02:07 +0000)]
Fixes the bug exposed by Anton's test case in PR 5495:
Make sure when ProcessImplicitDefs removes a copy which kills its source reg that it
removes the copy from said reg's Kills list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88881 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix for the original bug in PR5495 - Look at uses as well as defs when determining...
Lang Hames [Mon, 16 Nov 2009 02:00:09 +0000 (02:00 +0000)]
Fix for the original bug in PR5495 - Look at uses as well as defs when determining the PHI-copy insert point.

- Patch by Andrew Canis!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88880 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDetect need for autoalignment of the stack earlier to catch spills more
Jim Grosbach [Sun, 15 Nov 2009 21:45:34 +0000 (21:45 +0000)]
Detect need for autoalignment of the stack earlier to catch spills more
conservatively. eliminateFrameIndex() machinery adjust to handle addr mode
6 (vld1/vst1) used for spills. Fix tests to expect aligned Q-reg spilling

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88874 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoset the def of the VLD1q64 properly
Jim Grosbach [Sun, 15 Nov 2009 21:05:07 +0000 (21:05 +0000)]
set the def of the VLD1q64 properly

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88873 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agodisable copying, enforce some invariants.
Chris Lattner [Sun, 15 Nov 2009 20:03:53 +0000 (20:03 +0000)]
disable copying, enforce some invariants.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88870 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoteach LVI to infer edge information from switch instructions.
Chris Lattner [Sun, 15 Nov 2009 20:02:12 +0000 (20:02 +0000)]
teach LVI to infer edge information from switch instructions.
This allows JT to eliminate a ton of infeasible edges when
handling code like the templates in PatternMatch.h

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88869 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix a logic error that would cause LVI-JT to miscompile
Chris Lattner [Sun, 15 Nov 2009 20:01:24 +0000 (20:01 +0000)]
fix a logic error that would cause LVI-JT to miscompile
some conditionals

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88868 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimplement the first stab at caching queries. This isn't correct
Chris Lattner [Sun, 15 Nov 2009 20:00:52 +0000 (20:00 +0000)]
implement the first stab at caching queries.  This isn't correct
(because the invalidation logic is missing) but LVI isn't enabled
by default anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88867 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorefactor a bunch of code forming the new LazyValueInfoCache
Chris Lattner [Sun, 15 Nov 2009 19:59:49 +0000 (19:59 +0000)]
refactor a bunch of code forming the new LazyValueInfoCache
and LVIQuery classes, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88866 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomake PRE of loads preserve the alignment of the moved load instruction.
Chris Lattner [Sun, 15 Nov 2009 19:58:31 +0000 (19:58 +0000)]
make PRE of loads preserve the alignment of the moved load instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88865 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix a bug handling 'not x' when x is undef.
Chris Lattner [Sun, 15 Nov 2009 19:57:43 +0000 (19:57 +0000)]
fix a bug handling 'not x' when x is undef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88864 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomark getIntrinsicID() 'readonly'. This allows various classof methods
Chris Lattner [Sun, 15 Nov 2009 19:56:28 +0000 (19:56 +0000)]
mark getIntrinsicID() 'readonly'.  This allows various classof methods
(like DbgDeclareInst's) to shrink substantially.  It sucks that we have
to pull Compiler.h into such a public header, but at least Compiler.h
doesn't pull anything else in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88863 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd attributes for readnone/readonly functions.
Chris Lattner [Sun, 15 Nov 2009 19:54:31 +0000 (19:54 +0000)]
add attributes for readnone/readonly functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88862 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a version of array_pod_sort that takes a custom comparator function.
Chris Lattner [Sun, 15 Nov 2009 19:52:43 +0000 (19:52 +0000)]
add a version of array_pod_sort that takes a custom comparator function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88861 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a complex missed optimization opportunity I came across while investigating
Nick Lewycky [Sun, 15 Nov 2009 17:51:23 +0000 (17:51 +0000)]
Add a complex missed optimization opportunity I came across while investigating
bug 5438.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88855 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd PSP OS Target to Triple, Credit to Bruno Cardoso Lopes.
Edward O'Callaghan [Sun, 15 Nov 2009 10:18:17 +0000 (10:18 +0000)]
Add PSP OS Target to Triple, Credit to Bruno Cardoso Lopes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88849 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agolit: Factor a new OneCommandPerFileTest out of SyntaxCheckTest.
Daniel Dunbar [Sun, 15 Nov 2009 08:10:29 +0000 (08:10 +0000)]
lit: Factor a new OneCommandPerFileTest out of SyntaxCheckTest.
 - Used for running a single fixed command on a directory of files, with the
   option of deriving a temporary input file from the test source.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88844 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert r88830 and r88831 which appear to have caused a selfhost buildbot some
Nick Lewycky [Sun, 15 Nov 2009 07:47:32 +0000 (07:47 +0000)]
Revert r88830 and r88831 which appear to have caused a selfhost buildbot some
grief. I suspect this patch merely exposed a bug else.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88841 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove duplicate implementation of excludes functionality, and support excluding
Daniel Dunbar [Sun, 15 Nov 2009 07:22:58 +0000 (07:22 +0000)]
Remove duplicate implementation of excludes functionality, and support excluding
dirnames.

Also, add support for the 'unsupported' config property.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88838 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCorrect typo.
Nick Lewycky [Sun, 15 Nov 2009 06:16:57 +0000 (06:16 +0000)]
Correct typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88831 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTeach instcombine to look for booleans in wider integers when it encounters a
Nick Lewycky [Sun, 15 Nov 2009 05:55:17 +0000 (05:55 +0000)]
Teach instcombine to look for booleans in wider integers when it encounters a
zext(icmp). It may be able to optimize that away. This fixes one of the cases
in PR5438.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88830 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded an assert to the PBQP allocator to catch infinite cost solutions which might...
Lang Hames [Sun, 15 Nov 2009 04:39:51 +0000 (04:39 +0000)]
Added an assert to the PBQP allocator to catch infinite cost solutions which might otherwise lead to miscompilations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88829 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agolit: Add --repeat=N option, for running each test N times.
Daniel Dunbar [Sun, 15 Nov 2009 01:02:09 +0000 (01:02 +0000)]
lit: Add --repeat=N option, for running each test N times.
 - Currently just useful for timing, although it could be extended as one (bad) way to deal with flaky tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88827 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove bogus corei7 and atom entries, the family was incorrect.
Daniel Dunbar [Sat, 14 Nov 2009 22:04:42 +0000 (22:04 +0000)]
Remove bogus corei7 and atom entries, the family was incorrect.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88818 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove xfail
Jim Grosbach [Sat, 14 Nov 2009 21:57:35 +0000 (21:57 +0000)]
remove xfail

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88817 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFill out X86 table, although we are missing lots of names for things. We now
Daniel Dunbar [Sat, 14 Nov 2009 21:36:19 +0000 (21:36 +0000)]
Fill out X86 table, although we are missing lots of names for things. We now
properly detect my Xeon box though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88814 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReport the detected host CPU in --version.
Daniel Dunbar [Sat, 14 Nov 2009 21:36:07 +0000 (21:36 +0000)]
Report the detected host CPU in --version.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88813 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agocleanup.
Jim Grosbach [Sat, 14 Nov 2009 21:33:37 +0000 (21:33 +0000)]
cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88812 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo not merge jump tables this early. Branch folding will do any necessary
Jim Grosbach [Sat, 14 Nov 2009 20:15:03 +0000 (20:15 +0000)]
Do not merge jump tables this early. Branch folding will do any necessary
merges, and until then, it's useful to keep the tables separate for ease
of manipulation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88806 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCleanup flow, and only update the jump table we're analyzing when replacing a destina...
Jim Grosbach [Sat, 14 Nov 2009 20:10:18 +0000 (20:10 +0000)]
Cleanup flow, and only update the jump table we're analyzing when replacing a destination MBB.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88805 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd function to replace a destination MBB in a single jump table
Jim Grosbach [Sat, 14 Nov 2009 20:09:13 +0000 (20:09 +0000)]
Add function to replace a destination MBB in a single jump table

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88804 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove dead variable found by clang++.
Benjamin Kramer [Sat, 14 Nov 2009 19:51:20 +0000 (19:51 +0000)]
Remove dead variable found by clang++.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88803 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd XCore support for arbitrary-sized aggregate returns.
Richard Osborne [Sat, 14 Nov 2009 19:33:35 +0000 (19:33 +0000)]
Add XCore support for arbitrary-sized aggregate returns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88802 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTemporary disable the error - it seems to be too conservative.
Anton Korobeynikov [Sat, 14 Nov 2009 18:01:41 +0000 (18:01 +0000)]
Temporary disable the error - it seems to be too conservative.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88800 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement DISABLE_INLINE for MSVC. This required changing the position in all
Benjamin Kramer [Sat, 14 Nov 2009 16:37:18 +0000 (16:37 +0000)]
Implement DISABLE_INLINE for MSVC. This required changing the position in all
forward declaration and patching tblgen to emit it right. Patch by Amine Khaldi!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88798 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThis test doesn't work on arm either.
Benjamin Kramer [Sat, 14 Nov 2009 15:15:39 +0000 (15:15 +0000)]
This test doesn't work on arm either.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88794 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake NORETURN working with MSVC. MSVC only accepts NORETURN in front of the
Benjamin Kramer [Sat, 14 Nov 2009 14:14:58 +0000 (14:14 +0000)]
Make NORETURN working with MSVC. MSVC only accepts NORETURN in front of the
decl so move it there. GCC accepts it both in front and after decls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88791 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd llvm::sys::getHostCPUName, for detecting the LLVM name for the host CPU.
Daniel Dunbar [Sat, 14 Nov 2009 10:09:12 +0000 (10:09 +0000)]
Add llvm::sys::getHostCPUName, for detecting the LLVM name for the host CPU.
 - This is an initial step towards -march=native support in Clang, and towards
   eliminating host dependencies in the targets. See PR5389.

 - Patch by Roman Divacky!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88768 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove LLVMContext from reassociate. It was threaded through every function but
Nick Lewycky [Sat, 14 Nov 2009 07:25:54 +0000 (07:25 +0000)]
Remove LLVMContext from reassociate. It was threaded through every function but
ultimately never used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88763 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorevert 88761 as it fails builds.
Sanjiv Gupta [Sat, 14 Nov 2009 07:22:25 +0000 (07:22 +0000)]
revert 88761 as it fails builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88762 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix debug info crashes for PIC16.
Sanjiv Gupta [Sat, 14 Nov 2009 06:19:49 +0000 (06:19 +0000)]
Fix debug info crashes for PIC16.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88761 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTeach BasicAA that a constant expression can't alias memory provably not
Nick Lewycky [Sat, 14 Nov 2009 06:15:14 +0000 (06:15 +0000)]
Teach BasicAA that a constant expression can't alias memory provably not
allocated until runtime (such as an alloca). Patch by Hans Wennborg!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88760 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded getSubRegIndex(A,B) that returns subreg index of A to B. Use it to replace...
Evan Cheng [Sat, 14 Nov 2009 03:42:17 +0000 (03:42 +0000)]
Added getSubRegIndex(A,B) that returns subreg index of A to B. Use it to replace broken code in VirtRegRewriter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88753 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago- Change TargetInstrInfo::reMaterialize to pass in TargetRegisterInfo.
Evan Cheng [Sat, 14 Nov 2009 02:55:43 +0000 (02:55 +0000)]
- Change TargetInstrInfo::reMaterialize to pass in TargetRegisterInfo.
- If destination is a physical register and it has a subreg index, use the
  sub-register instead.
This fixes PR5423.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88745 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd an option for running GVN with redundant load processing disabled.
Dan Gohman [Sat, 14 Nov 2009 02:27:51 +0000 (02:27 +0000)]
Add an option for running GVN with redundant load processing disabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88742 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd radar number.
Evan Cheng [Sat, 14 Nov 2009 02:11:32 +0000 (02:11 +0000)]
Add radar number.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88739 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR5412: Fix an inverted check and another missing sub-register check.
Evan Cheng [Sat, 14 Nov 2009 02:09:09 +0000 (02:09 +0000)]
Fix PR5412: Fix an inverted check and another missing sub-register check.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88738 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEnable the tail call optimization when the caller returns undef.
Dan Gohman [Sat, 14 Nov 2009 02:06:30 +0000 (02:06 +0000)]
Enable the tail call optimization when the caller returns undef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88737 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen expanding t2STRDi8 r, r to two stores, add kill markers correctly.
Evan Cheng [Sat, 14 Nov 2009 01:50:00 +0000 (01:50 +0000)]
When expanding t2STRDi8 r, r to two stores, add kill markers correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88734 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix bug in -split-phi-edges.
Jakob Stoklund Olesen [Sat, 14 Nov 2009 00:38:13 +0000 (00:38 +0000)]
Fix bug in -split-phi-edges.

When splitting an edge after a machine basic block with fall-through, we
forgot to insert a jump instruction. Fix this by calling updateTerminator() on
the fall-through block when relevant.

Also be more precise in PHIElimination::isLiveIn.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88728 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate MachineDominator information
Jakob Stoklund Olesen [Sat, 14 Nov 2009 00:38:06 +0000 (00:38 +0000)]
Update MachineDominator information

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88727 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded an API to the SlotIndexes pass to allow new instructions to be inserted into...
Lang Hames [Sat, 14 Nov 2009 00:02:51 +0000 (00:02 +0000)]
Added an API to the SlotIndexes pass to allow new instructions to be inserted into the numbering.

PreAllocSplitting is now using this API to insert code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88725 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR5411. Bug in UpdateKills. A reg def partially define its super-registers.
Evan Cheng [Fri, 13 Nov 2009 23:16:41 +0000 (23:16 +0000)]
Fix PR5411. Bug in UpdateKills. A reg def partially define its super-registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88719 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove extraneous commit.
Eric Christopher [Fri, 13 Nov 2009 23:08:47 +0000 (23:08 +0000)]
Remove extraneous commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88716 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPrint out something, even if it's non-parseable later when we've
Eric Christopher [Fri, 13 Nov 2009 23:00:14 +0000 (23:00 +0000)]
Print out something, even if it's non-parseable later when we've
got ghost linkage. It's better than aborting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88715 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove the FixedStackPseudoSourceValueVal enum value before InstructionVal
Dan Gohman [Fri, 13 Nov 2009 22:24:13 +0000 (22:24 +0000)]
Move the FixedStackPseudoSourceValueVal enum value before InstructionVal
so that isa<Instructon> doesn't return true for FixedStackPseudoSourceValue
values. This fixes a variety of problems, including crashes with -debug
and -print-machineinstrs. Also, add a comment to warn about this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88711 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDisable the JITTest.NoStubs test for Darwin PPC. It apparently doesn't implement
Bill Wendling [Fri, 13 Nov 2009 21:58:54 +0000 (21:58 +0000)]
Disable the JITTest.NoStubs test for Darwin PPC. It apparently doesn't implement
emitFunctionStubAtAddr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88708 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PHIElimination optimization that uses MBB->getBasicBlock.
Jakob Stoklund Olesen [Fri, 13 Nov 2009 21:56:15 +0000 (21:56 +0000)]
Fix PHIElimination optimization that uses MBB->getBasicBlock.

The BasicBlock associated with a MachineBasicBlock does not necessarily
correspond to the code in the MBB.

Don't insert a new IR BasicBlock when splitting critical edges. We are not
supposed to modify the IR during codegen, and we should be able to do just
fine with a NULL BB.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88707 91177308-0d34-0410-b5e6-96231b3b80d8