oota-llvm.git
11 years agoDon't keep the log files around. Just pipe to a log file instead.
Bill Wendling [Mon, 7 Mar 2011 07:37:37 +0000 (07:37 +0000)]
Don't keep the log files around. Just pipe to a log file instead.

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

11 years agoFix tagging name.
Bill Wendling [Mon, 7 Mar 2011 07:37:12 +0000 (07:37 +0000)]
Fix tagging name.

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

11 years agoTry fixing mingw build.
Argyrios Kyrtzidis [Mon, 7 Mar 2011 05:35:01 +0000 (05:35 +0000)]
Try fixing mingw build.

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

11 years agoPrepend LD.Flags before LDFLAGS to avoid overriding necessary paths.
Eric Christopher [Mon, 7 Mar 2011 04:25:12 +0000 (04:25 +0000)]
Prepend LD.Flags before LDFLAGS to avoid overriding necessary paths.

Patch by Jack Howarth.

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

11 years agoTweak this test. We can analyze what happens and show that we still do the
Nick Lewycky [Mon, 7 Mar 2011 02:10:18 +0000 (02:10 +0000)]
Tweak this test. We can analyze what happens and show that we still do the
right thing, instead of merely being unable to analyze and the transform
doesn't occur.

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

11 years agoAdd more analysis of the sign bit of an srem instruction. If the LHS is negative
Nick Lewycky [Mon, 7 Mar 2011 01:50:10 +0000 (01:50 +0000)]
Add more analysis of the sign bit of an srem instruction. If the LHS is negative
then the result could go either way. If it's provably positive then so is the
srem. Fixes PR9343 #7!

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

11 years agoDo a compiler check that we use one of the types from PointerUnion[N], instead of...
Argyrios Kyrtzidis [Mon, 7 Mar 2011 01:30:20 +0000 (01:30 +0000)]
Do a compiler check that we use one of the types from PointerUnion[N], instead of a runtime check.

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

11 years agoWindows/PathV2.inc: Eliminate redundant condition. DWORD is unsigned.
NAKAMURA Takumi [Mon, 7 Mar 2011 00:12:53 +0000 (00:12 +0000)]
Windows/PathV2.inc: Eliminate redundant condition. DWORD is unsigned.

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

11 years agoDon't internalize available_externally functions. We already did the right
Rafael Espindola [Sun, 6 Mar 2011 23:41:34 +0000 (23:41 +0000)]
Don't internalize available_externally functions. We already did the right
thing for variables.

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

11 years agoremove another jeff link
Chris Lattner [Sun, 6 Mar 2011 23:00:33 +0000 (23:00 +0000)]
remove another jeff link

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

11 years agoTypo.
Eric Christopher [Sun, 6 Mar 2011 21:13:45 +0000 (21:13 +0000)]
Typo.

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

11 years agoConstantInt has some getters which return ConstantInt's or ConstantVector's of
Nick Lewycky [Sun, 6 Mar 2011 03:36:19 +0000 (03:36 +0000)]
ConstantInt has some getters which return ConstantInt's or ConstantVector's of
the value splatted into every element. Extend this to getTrue and getFalse which
by providing new overloads that take Types that are either i1 or <N x i1>. Use
it in InstCombine to add vector support to some code, fixing PR8469!

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

11 years agolib/CodeGen/AsmPrinter/CMakeLists.txt: Fix CMake build, following up to r127099.
NAKAMURA Takumi [Sun, 6 Mar 2011 00:13:15 +0000 (00:13 +0000)]
lib/CodeGen/AsmPrinter/CMakeLists.txt: Fix CMake build, following up to r127099.

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

11 years agoDisable a couple of experimental heuristics to get the best results from the current...
Andrew Trick [Sun, 6 Mar 2011 00:03:32 +0000 (00:03 +0000)]
Disable a couple of experimental heuristics to get the best results from the current implementation of -pre-RA-sched=list-ilp.

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

11 years agoAvoid zero-sized allocations when copying a fresh DenseMap.
Benjamin Kramer [Sat, 5 Mar 2011 22:00:28 +0000 (22:00 +0000)]
Avoid zero-sized allocations when copying a fresh DenseMap.

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

11 years agoRevert r127073: "Introduce $(ECHOPATH) to print DOSish path string on MSYS bash for...
Jakob Stoklund Olesen [Sat, 5 Mar 2011 18:55:06 +0000 (18:55 +0000)]
Revert r127073: "Introduce $(ECHOPATH) to print DOSish path string on MSYS bash for alternative of $(ECHO)."

It broke the llvm-gcc-native-mingw32 buildbot, and we need all of them to be green for the 2.9 branch.

Takumi, please reapply after we branch, preferably with a fix ;-)

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

11 years agoARM assembler stuff is crazy: for .setfp positive values of offset corresponds to...
Anton Korobeynikov [Sat, 5 Mar 2011 18:44:00 +0000 (18:44 +0000)]
ARM assembler stuff is crazy: for .setfp positive values of offset corresponds to "add" instruction, not to "sub" as in .pad case

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

11 years agoIn Thumb1 mode the constant might be materialized via the load from constpool. Emit...
Anton Korobeynikov [Sat, 5 Mar 2011 18:43:55 +0000 (18:43 +0000)]
In Thumb1 mode the constant might be materialized via the load from constpool. Emit unwinding information in case when this load from constpool is used to change the stack pointer in the prologue.

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

11 years agoImplement frame unwinding information emission for Thumb1. Not finished yet because...
Anton Korobeynikov [Sat, 5 Mar 2011 18:43:50 +0000 (18:43 +0000)]
Implement frame unwinding information emission for Thumb1. Not finished yet because there is no way given the constpool index to examine the actual entry: the reason is clones inserted by constant island pass, which are not tracked at all! The only connection is done during asmprinting time via magic label names which is really gross and needs to be eventually fixed.

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

11 years agoAdd unwind information emission for thumb stuff
Anton Korobeynikov [Sat, 5 Mar 2011 18:43:43 +0000 (18:43 +0000)]
Add unwind information emission for thumb stuff

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

11 years agoHandle MI flags inside Thumb2SizeReduction pass.
Anton Korobeynikov [Sat, 5 Mar 2011 18:43:38 +0000 (18:43 +0000)]
Handle MI flags inside Thumb2SizeReduction pass.

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

11 years agoPreliminary support for ARM frame save directives emission via MI flags.
Anton Korobeynikov [Sat, 5 Mar 2011 18:43:32 +0000 (18:43 +0000)]
Preliminary support for ARM frame save directives emission via MI flags.
This is just very first approximation how the stuff should be done
(e.g. ARM-only for now). More to follow.

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

11 years agoProvide hooks to set MI flags in MachineInstrBuilder
Anton Korobeynikov [Sat, 5 Mar 2011 18:43:20 +0000 (18:43 +0000)]
Provide hooks to set MI flags in MachineInstrBuilder

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

11 years agoSome first rudimentary support for ARM EHABI: print exception table in "text mode".
Anton Korobeynikov [Sat, 5 Mar 2011 18:43:15 +0000 (18:43 +0000)]
Some first rudimentary support for ARM EHABI: print exception table in "text mode".

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

11 years agoAdd FrameSetup MI flags
Anton Korobeynikov [Sat, 5 Mar 2011 18:43:04 +0000 (18:43 +0000)]
Add FrameSetup MI flags

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

11 years agoShorten AsmPrinterFlags filed to accomodate for future Flags field
Anton Korobeynikov [Sat, 5 Mar 2011 18:42:54 +0000 (18:42 +0000)]
Shorten AsmPrinterFlags filed to accomodate for future Flags field

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

11 years agoWork around a coalescer bug.
Jakob Stoklund Olesen [Sat, 5 Mar 2011 18:33:49 +0000 (18:33 +0000)]
Work around a coalescer bug.

The coalescer can in very rare cases leave too large live intervals around after
rematerializing cheap-as-a-move instructions.

Linear scan doesn't really care, but live range splitting gets very confused
when a live range is killed by a ghost instruction.

I will fix this properly in the coalescer after 2.9 branches.

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

11 years agoRemove unused conditional negate operations.
Bob Wilson [Sat, 5 Mar 2011 16:54:31 +0000 (16:54 +0000)]
Remove unused conditional negate operations.

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

11 years agoInstCombine: We know the number of items initially added to the worklist map, reserve...
Benjamin Kramer [Sat, 5 Mar 2011 16:43:46 +0000 (16:43 +0000)]
InstCombine: We know the number of items initially added to the worklist map, reserve space early to avoid rehashing.

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

11 years agoLazily allocate DenseMaps.
Benjamin Kramer [Sat, 5 Mar 2011 16:43:41 +0000 (16:43 +0000)]
Lazily allocate DenseMaps.

This makes lookup slightly more expensive but it's worth it, unused
DenseMaps are common in LLVM code apparently.

1% speedup on clang -O3 bzip2.c
4% speedup on clang -O3 oggenc.c (Release build of clang on i386/linux)

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

11 years agoptx: add basic intrinsic support
Che-Liang Chiou [Sat, 5 Mar 2011 14:17:37 +0000 (14:17 +0000)]
ptx: add basic intrinsic support

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

11 years agoBe explicit with abs(). Visual Studio workaround.
Andrew Trick [Sat, 5 Mar 2011 10:29:25 +0000 (10:29 +0000)]
Be explicit with abs(). Visual Studio workaround.

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

11 years agoutils/lit/lit/TestRunner.py: bash is available with MSYS on Python/W32. Then we can...
NAKAMURA Takumi [Sat, 5 Mar 2011 09:46:53 +0000 (09:46 +0000)]
utils/lit/lit/TestRunner.py: bash is available with MSYS on Python/W32. Then we can execute "bash tests".

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

11 years agoIntroduce $(ECHOPATH) to print DOSish path string on MSYS bash for alternative of...
NAKAMURA Takumi [Sat, 5 Mar 2011 09:46:45 +0000 (09:46 +0000)]
Introduce $(ECHOPATH) to print DOSish path string on MSYS bash for alternative of $(ECHO).

On mingw and python/w32, lit would not be expected to understand MSYS-style path.

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

11 years agoOn Windows hosts, Python scripts in test/Scripts did not accept binary files from...
NAKAMURA Takumi [Sat, 5 Mar 2011 09:46:36 +0000 (09:46 +0000)]
On Windows hosts, Python scripts in test/Scripts did not accept binary files from stdin. The environment variable "PYTHONUNBUFFERED" makes stdin as binary. Thanks to Danil Malyshev!

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

11 years agoFix for -sched-high-latency-cycles in sched=list-ilp mode.
Andrew Trick [Sat, 5 Mar 2011 09:18:16 +0000 (09:18 +0000)]
Fix for -sched-high-latency-cycles in sched=list-ilp mode.

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

11 years agoMissing "virtual" keyword. Jakob's review.
Andrew Trick [Sat, 5 Mar 2011 08:39:45 +0000 (08:39 +0000)]
Missing "virtual" keyword. Jakob's review.

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

11 years agoFix PR9398 - 10% of llc compile time is spent in Value::getNumUses. This reduces
Cameron Zwarich [Sat, 5 Mar 2011 08:12:26 +0000 (08:12 +0000)]
Fix PR9398 - 10% of llc compile time is spent in Value::getNumUses. This reduces
the percentage of time spent in CodeGenPrepare when llcing 403.gcc from 12.6% to
1.8% of total llc time.

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

11 years agoMissing comment.
Andrew Trick [Sat, 5 Mar 2011 08:04:11 +0000 (08:04 +0000)]
Missing comment.

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

11 years agoIncreased the register pressure limit on x86_64 from 8 to 12
Andrew Trick [Sat, 5 Mar 2011 08:00:22 +0000 (08:00 +0000)]
Increased the register pressure limit on x86_64 from 8 to 12
regs. This is the only change in this checkin that may affects the
default scheduler. With better register tracking and heuristics, it
doesn't make sense to artificially lower the register limit so much.

Added -sched-high-latency-cycles and X86InstrInfo::isHighLatencyDef to
give the scheduler a way to account for div and sqrt on targets that
don't have an itinerary. It is currently defaults to 10 (the actual
number doesn't matter much), but only takes effect on non-default
schedulers: list-hybrid and list-ilp.

Added several heuristics that can be individually disabled for the
non-default sched=list-ilp mode. This helps us determine how much
better we can do on a given benchmark than the default
scheduler. Certain compute intensive loops run much faster in this
mode with the right set of heuristics, and it doesn't seem to have
much negative impact elsewhere. Not all of the heuristics are needed,
but we still need to experiment to decide which should be disabled by
default for sched=list-ilp.

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

11 years agoremove jeff's name (by his request)
Chris Lattner [Sat, 5 Mar 2011 07:23:02 +0000 (07:23 +0000)]
remove jeff's name (by his request)

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

11 years agowhitespace
Andrew Trick [Sat, 5 Mar 2011 06:31:54 +0000 (06:31 +0000)]
whitespace

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

11 years agoThread comparisons over udiv/sdiv/ashr/lshr exact and lshr nuw/nsw whenever
Nick Lewycky [Sat, 5 Mar 2011 05:19:11 +0000 (05:19 +0000)]
Thread comparisons over udiv/sdiv/ashr/lshr exact and lshr nuw/nsw whenever
possible. This goes into instcombine and instsimplify because instsimplify
doesn't need to check hasOneUse since it returns (almost exclusively) constants.

This fixes PR9343 #4 #5 and #8!

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

11 years agoTry once again to optimize "icmp (srem X, Y), Y" by turning the comparison into
Nick Lewycky [Sat, 5 Mar 2011 04:28:48 +0000 (04:28 +0000)]
Try once again to optimize "icmp (srem X, Y), Y" by turning the comparison into
true/false or "icmp slt/sge Y, 0".

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

11 years agoRework the global split cost calculation.
Jakob Stoklund Olesen [Sat, 5 Mar 2011 03:28:51 +0000 (03:28 +0000)]
Rework the global split cost calculation.

The global cost is the sum of block frequencies for spill code that must be
inserted because preferences weren't met.

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

11 years agotest/CodeGen/X86/vec_cast.ll: [PR8311] Add explicit -mtriple=x86_64-linux and -mtripl...
NAKAMURA Takumi [Sat, 5 Mar 2011 02:38:02 +0000 (02:38 +0000)]
test/CodeGen/X86/vec_cast.ll: [PR8311] Add explicit -mtriple=x86_64-linux and -mtriple=x86_64-win32. Thanks to Nadav, it might be fixed in r126424.

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

11 years agotest commit
Jin-Gu Kang [Sat, 5 Mar 2011 02:36:09 +0000 (02:36 +0000)]
test commit

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

11 years agoCompute the constraints for global live range splitting from an interference pattern.
Jakob Stoklund Olesen [Sat, 5 Mar 2011 01:10:31 +0000 (01:10 +0000)]
Compute the constraints for global live range splitting from an interference pattern.

This simplifies the code and makes it faster too.

The interference patterns are saved for each candidate register. It will be
reused for actually executing the split. Work in progress.

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

11 years agoTeach the register scavenger to take subregs into account when finding a free register.
Jim Grosbach [Sat, 5 Mar 2011 00:20:19 +0000 (00:20 +0000)]
Teach the register scavenger to take subregs into account when finding a free register.

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

11 years agoSupport unregistering exception frames of functions when they are removed.
Eric Christopher [Fri, 4 Mar 2011 23:37:39 +0000 (23:37 +0000)]
Support unregistering exception frames of functions when they are removed.

Patch by Johannes Schaub!

Fixes PR8548

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

11 years agoFix the case where the number of jobs is less than the
David Greene [Fri, 4 Mar 2011 23:02:52 +0000 (23:02 +0000)]
Fix the case where the number of jobs is less than the
number of threads.  In that case make the number of threads
equal to the number of jobs and launch one jobs on each
thread.  This makes things work like make -j.

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

11 years agoImprove readability with some whitespace!
Eric Christopher [Fri, 4 Mar 2011 22:47:12 +0000 (22:47 +0000)]
Improve readability with some whitespace!

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

11 years agoExtract a method. No functional change.
Jakob Stoklund Olesen [Fri, 4 Mar 2011 22:11:11 +0000 (22:11 +0000)]
Extract a method. No functional change.

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

11 years agoInitialize variable.
Bill Wendling [Fri, 4 Mar 2011 21:38:47 +0000 (21:38 +0000)]
Initialize variable.

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

11 years agoGo back to comparing spill weights when deciding if interference can be evicted.
Jakob Stoklund Olesen [Fri, 4 Mar 2011 21:32:50 +0000 (21:32 +0000)]
Go back to comparing spill weights when deciding if interference can be evicted.

It gives better results. Sometimes, a live range can be large and still have
high spill weight. Such a range should not be spilled.

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

11 years agoImprove div/rem node handling on mips. Patch by Akira Hatanaka
Bruno Cardoso Lopes [Fri, 4 Mar 2011 21:03:24 +0000 (21:03 +0000)]
Improve div/rem node handling on mips. Patch by Akira Hatanaka

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

11 years agoAdd testcase for r127032
Bruno Cardoso Lopes [Fri, 4 Mar 2011 20:48:39 +0000 (20:48 +0000)]
Add testcase for r127032

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

11 years agoExpands register/immediate pairs when the immediate is too large to fit in 16-bit...
Bruno Cardoso Lopes [Fri, 4 Mar 2011 20:48:08 +0000 (20:48 +0000)]
Expands register/immediate pairs when the immediate is too large to fit in 16-bit field. Patch by Akira Hatanaka

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

11 years agoWhen decling to reuse existing expressions that involve casts, ignore
Dan Gohman [Fri, 4 Mar 2011 20:46:46 +0000 (20:46 +0000)]
When decling to reuse existing expressions that involve casts, ignore
bitcasts, which are really no-ops here. This fixes slowdowns on
MultiSource/Applications/aha and others.

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

11 years agoRewrite and simplify o32 vaarg passing, no functional changes. Patch by Sasa Stankovic
Bruno Cardoso Lopes [Fri, 4 Mar 2011 20:27:44 +0000 (20:27 +0000)]
Rewrite and simplify o32 vaarg passing, no functional changes. Patch by Sasa Stankovic

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

11 years agoBe nice to Xcore and the XMOS assembler and avoid quoting section names
Joerg Sonnenberger [Fri, 4 Mar 2011 20:03:14 +0000 (20:03 +0000)]
Be nice to Xcore and the XMOS assembler and avoid quoting section names
that contain only letters, digits and the characters "_" and ".".

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

11 years agoLowers block address. Currently asserts when relocation model is not PIC. Patch by...
Bruno Cardoso Lopes [Fri, 4 Mar 2011 20:01:52 +0000 (20:01 +0000)]
Lowers block address. Currently asserts when relocation model is not PIC. Patch by Akira Hatanaka

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

11 years agoraw_ostream: while it is generally desirable to do larger writes, it can lead to
Benjamin Kramer [Fri, 4 Mar 2011 19:49:30 +0000 (19:49 +0000)]
raw_ostream: while it is generally desirable to do larger writes, it can lead to
inefficient file system buffering if the writes are not a multiple of the desired
buffer size. Avoid this by limiting the large write to a multiple of the buffer
size and copying the remainder into the buffer.

Thanks to Dan for pointing this out.

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

11 years agoRenumber slot indexes locally when possible.
Jakob Stoklund Olesen [Fri, 4 Mar 2011 19:43:38 +0000 (19:43 +0000)]
Renumber slot indexes locally when possible.

Initially, slot indexes are quad-spaced. There is room for inserting up to 3
new instructions between the original instructions.

When we run out of indexes between two instructions, renumber locally using
double-spaced indexes. The original quad-spacing means that we catch up quickly,
and we only have to renumber a handful of instructions to get a monotonic
sequence. This is much faster than renumbering the whole function as we did
before.

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

11 years agoXFAIL for all. These tests are darwin specific anyway.
Devang Patel [Fri, 4 Mar 2011 19:38:10 +0000 (19:38 +0000)]
XFAIL for all. These tests are darwin specific anyway.

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

11 years agoRevert broken srem logic from r126991.
Nick Lewycky [Fri, 4 Mar 2011 19:26:08 +0000 (19:26 +0000)]
Revert broken srem logic from r126991.

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

11 years agoFix an old copy-n-paste
Bruno Cardoso Lopes [Fri, 4 Mar 2011 19:20:24 +0000 (19:20 +0000)]
Fix an old copy-n-paste

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

11 years agoDisable ARMGlobalMerge on darwin. The debugger is not yet able to extract individual...
Devang Patel [Fri, 4 Mar 2011 19:11:05 +0000 (19:11 +0000)]
Disable ARMGlobalMerge on darwin. The debugger is not yet able to extract individual variable's info from merged global.

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

11 years agoExpands FCOS and FSIN nodes when type is f64.
Bruno Cardoso Lopes [Fri, 4 Mar 2011 18:54:14 +0000 (18:54 +0000)]
Expands FCOS and FSIN nodes when type is f64.

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

11 years agoNumber SlotIndexes uniformly without looking at the number of defs on each instruction.
Jakob Stoklund Olesen [Fri, 4 Mar 2011 18:51:09 +0000 (18:51 +0000)]
Number SlotIndexes uniformly without looking at the number of defs on each instruction.

You can't really predict how many indexes will be needed from the number of
defs, so let's keep it simple.

Also remove an extra empty index that was inserted after each basic block. It
was intended for live-out ranges, but it was never used that way.

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

11 years agoSymbolize the default instruction distance.
Jakob Stoklund Olesen [Fri, 4 Mar 2011 18:36:51 +0000 (18:36 +0000)]
Symbolize the default instruction distance.

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

11 years agoraw_ostream: If writing a string that is larger than the buffer, write it directly...
Benjamin Kramer [Fri, 4 Mar 2011 18:18:16 +0000 (18:18 +0000)]
raw_ostream: If writing a string that is larger than the buffer, write it directly instead of doing many buffer-sized writes.

This caps the number of write(2) calls per string to a maximum of 2.

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

11 years agoDeferred SlotIndex renumbering was a good idea but never used.
Jakob Stoklund Olesen [Fri, 4 Mar 2011 18:08:32 +0000 (18:08 +0000)]
Deferred SlotIndex renumbering was a good idea but never used.

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

11 years agoAdd SlotIndex statistics.
Jakob Stoklund Olesen [Fri, 4 Mar 2011 18:08:29 +0000 (18:08 +0000)]
Add SlotIndex statistics.

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

11 years agoTweak debug output. No functional changes.
Jakob Stoklund Olesen [Fri, 4 Mar 2011 18:08:26 +0000 (18:08 +0000)]
Tweak debug output. No functional changes.

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

11 years agoFixes addc pattern when immediate cannot be represented with 16-bit. Patch by Akira...
Bruno Cardoso Lopes [Fri, 4 Mar 2011 17:59:18 +0000 (17:59 +0000)]
Fixes addc pattern when immediate cannot be represented with 16-bit. Patch by Akira Hatanaka

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

11 years agoRemove (hopefully) all trailing whitespaces from the mips backend. Patch by Hatanaka...
Bruno Cardoso Lopes [Fri, 4 Mar 2011 17:51:39 +0000 (17:51 +0000)]
Remove (hopefully) all trailing whitespaces from the mips backend. Patch by Hatanaka, Akira

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

11 years agoRevert commit 126684 "Use the correct shift amount type". It is only the correct
Duncan Sands [Fri, 4 Mar 2011 14:28:59 +0000 (14:28 +0000)]
Revert commit 126684 "Use the correct shift amount type".  It is only the correct
type after type legalization has completed.  Before then it may simply not be big
enough to hold the shift amount, particularly on x86 which uses a very small type
for shifts (this issue broke stuff in the past which is why LegalizeTypes carefully
uses a large type for shift amounts).

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

11 years agoAllow vector shifts (shl,lshr,ashr) on SPU.
Kalle Raiskila [Fri, 4 Mar 2011 13:19:18 +0000 (13:19 +0000)]
Allow vector shifts (shl,lshr,ashr) on SPU.
There was a previous implementation with patterns that would
have matched e.g.
shl <v4i32> <i32>,
but this is not valid LLVM IR so they never were selected.

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

11 years agoAllow load from constant on SPU.
Kalle Raiskila [Fri, 4 Mar 2011 12:00:11 +0000 (12:00 +0000)]
Allow load from constant on SPU.
A 'load <4 x i32>* null' crashes llc before this fix.

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

11 years agoFold "icmp pred (srem X, Y), Y" like we do for urem. Handle signed comparisons
Nick Lewycky [Fri, 4 Mar 2011 10:06:52 +0000 (10:06 +0000)]
Fold "icmp pred (srem X, Y), Y" like we do for urem. Handle signed comparisons
in the urem case, though not the other way around. This is enough to get #3 from
PR9343!

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

11 years agoTeach instruction simplify to use constant ranges to solve problems of the form
Nick Lewycky [Fri, 4 Mar 2011 07:00:57 +0000 (07:00 +0000)]
Teach instruction simplify to use constant ranges to solve problems of the form
"icmp pred %X, CI" and a number of examples where "%X = binop %Y, CI2".

Some of these cases (div and rem) used to make it through opt -O2, but the
others are probably now making code elsewhere redundant (probably instcombine).

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

11 years agoFollowup to r126970: add 64-bit encoding tests for str with reg operand.
Eli Friedman [Fri, 4 Mar 2011 04:06:47 +0000 (04:06 +0000)]
Followup to r126970: add 64-bit encoding tests for str with reg operand.

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

11 years agoDenseMap<uintptr_t,...> doesn't allow all values as keys.
Jakob Stoklund Olesen [Fri, 4 Mar 2011 02:48:56 +0000 (02:48 +0000)]
DenseMap<uintptr_t,...> doesn't allow all values as keys.

Avoid colliding with the sentinels, hopefully unbreaking
llvm-gcc-x86_64-linux-selfhost.

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

11 years agoMinor pre-RA-sched fixes and cleanup.
Andrew Trick [Fri, 4 Mar 2011 02:03:45 +0000 (02:03 +0000)]
Minor pre-RA-sched fixes and cleanup.
Fix the PendingQueue, then disable it because it's not required for
the current schedulers' heuristics.
Fix the logic for the unused list-ilp scheduler.

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

11 years agoAdd ArrayRef variant.
Devang Patel [Fri, 4 Mar 2011 01:20:33 +0000 (01:20 +0000)]
Add ArrayRef variant.

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

11 years agoPrecompute block frequencies, pow() isn't free.
Jakob Stoklund Olesen [Fri, 4 Mar 2011 00:58:40 +0000 (00:58 +0000)]
Precompute block frequencies, pow() isn't free.

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

11 years agoUse an IndexedMap instead of a DenseMap for the live-out cache.
Jakob Stoklund Olesen [Fri, 4 Mar 2011 00:15:36 +0000 (00:15 +0000)]
Use an IndexedMap instead of a DenseMap for the live-out cache.

This speeds up updateSSA() so it only accounts for 5% of the live range
splitting time.

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

11 years agoPR9377: Handle x86 str with register operand in a way consistent with gas.
Eli Friedman [Fri, 4 Mar 2011 00:10:17 +0000 (00:10 +0000)]
PR9377: Handle x86 str with register operand in a way consistent with gas.

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

11 years agoThere are times when the landing pad won't have a call to 'eh.selector' in
Bill Wendling [Thu, 3 Mar 2011 23:14:05 +0000 (23:14 +0000)]
There are times when the landing pad won't have a call to 'eh.selector' in
it. It's been assumed up til now that it would be in its immediate
successor. However, this isn't necessarily the case. It could be in one of its
successor's successors.

Modify the code to more thoroughly check for an 'eh.selector' call in
successors. It only looks at a successor if we get there as a result of an
unconditional branch.

Testcase ObjC/exceptions-4.m in r126968.

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

11 years agoPR8053: Fix encoding of S bit in some ARM instructions.
Bob Wilson [Thu, 3 Mar 2011 23:07:15 +0000 (23:07 +0000)]
PR8053: Fix encoding of S bit in some ARM instructions.
Patch by Zonr Chang!

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

11 years agoRevert r123908; the code in question is completely untested and wrong.
Eli Friedman [Thu, 3 Mar 2011 22:33:23 +0000 (22:33 +0000)]
Revert r123908; the code in question is completely untested and wrong.

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

11 years agoBug#9033: For the ELF assembler output, always quote the section name.
Joerg Sonnenberger [Thu, 3 Mar 2011 22:31:08 +0000 (22:31 +0000)]
Bug#9033: For the ELF assembler output, always quote the section name.

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

11 years agoFix typo.
Devang Patel [Thu, 3 Mar 2011 21:49:41 +0000 (21:49 +0000)]
Fix typo.

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

11 years agoFix thinko in previous check-in.
Devang Patel [Thu, 3 Mar 2011 20:08:10 +0000 (20:08 +0000)]
Fix thinko in previous check-in.
Add comment.

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

11 years agollvm::Function argument count is not a good indicator of how many arugments does...
Devang Patel [Thu, 3 Mar 2011 20:02:02 +0000 (20:02 +0000)]
llvm::Function argument count is not a good indicator of how many arugments does the function have at source level. If we need more space, just resize vector conservatively. This vector is only used once per function.

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

11 years agoAllow a target to choose whether to prefer the scavenger emergency spill slot
Jim Grosbach [Thu, 3 Mar 2011 20:01:52 +0000 (20:01 +0000)]
Allow a target to choose whether to prefer the scavenger emergency spill slot
be next to the frame pointer or the stack pointer.

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

11 years agoSplit MCEELFStreamer and ELFObjectWriter into .h and .cpp files, so that other compon...
Jan Sjödin [Thu, 3 Mar 2011 14:52:12 +0000 (14:52 +0000)]
Split MCEELFStreamer and ELFObjectWriter into .h and .cpp files, so that other components can use them.

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

11 years agoFix typo in comment.
Richard Osborne [Thu, 3 Mar 2011 14:21:22 +0000 (14:21 +0000)]
Fix typo in comment.

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

11 years agoOptimize fprintf -> iprintf if there are no floating point arguments
Richard Osborne [Thu, 3 Mar 2011 14:20:22 +0000 (14:20 +0000)]
Optimize fprintf -> iprintf if there are no floating point arguments
and siprintf is available on the target.

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