oota-llvm.git
13 years agoImplement requiredTransitive
Tobias Grosser [Thu, 20 Jan 2011 21:03:22 +0000 (21:03 +0000)]
Implement requiredTransitive

The PassManager did not implement the transitivity of requiredTransitive. This
was unnoticed since 2006.

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

13 years agoRegionPassPrinter should contain the name of the pass printed
Tobias Grosser [Thu, 20 Jan 2011 21:03:20 +0000 (21:03 +0000)]
RegionPassPrinter should contain the name of the pass printed

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

13 years agoAdd testcases for clz encoding
Bruno Cardoso Lopes [Thu, 20 Jan 2011 19:27:16 +0000 (19:27 +0000)]
Add testcases for clz encoding

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

13 years agoFix the encoding and parsing of clrex instruction
Bruno Cardoso Lopes [Thu, 20 Jan 2011 19:18:32 +0000 (19:18 +0000)]
Fix the encoding and parsing of clrex instruction

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

13 years agoMove InstAlias check of argument types to a separate loop.
Bob Wilson [Thu, 20 Jan 2011 18:38:10 +0000 (18:38 +0000)]
Move InstAlias check of argument types to a separate loop.

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

13 years agoTidy comment.
Bob Wilson [Thu, 20 Jan 2011 18:38:07 +0000 (18:38 +0000)]
Tidy comment.

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

13 years agoFix broken check for InstAlias argument used with different types.
Bob Wilson [Thu, 20 Jan 2011 18:38:05 +0000 (18:38 +0000)]
Fix broken check for InstAlias argument used with different types.

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

13 years agoPrecompute InstAlias operand mapping to result instruction operand indices.
Bob Wilson [Thu, 20 Jan 2011 18:38:02 +0000 (18:38 +0000)]
Precompute InstAlias operand mapping to result instruction operand indices.

There should be no functional change from this, but I think it's simpler this
way.

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

13 years agoChange instruction names for consistency
Bruno Cardoso Lopes [Thu, 20 Jan 2011 18:36:07 +0000 (18:36 +0000)]
Change instruction names for consistency

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

13 years agoAdd cdp/cdp2 instructions for thumb/thumb2
Bruno Cardoso Lopes [Thu, 20 Jan 2011 18:32:09 +0000 (18:32 +0000)]
Add cdp/cdp2 instructions for thumb/thumb2

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

13 years agoDisable objdump-trivial-object.test. It is broken on powerpc-darwin9.
Devang Patel [Thu, 20 Jan 2011 18:08:44 +0000 (18:08 +0000)]
Disable objdump-trivial-object.test. It is broken on powerpc-darwin9.

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

13 years ago- Use a more appropriate name for Owen's ARM Parser isMCR hack since the same operand...
Bruno Cardoso Lopes [Thu, 20 Jan 2011 18:06:58 +0000 (18:06 +0000)]
- Use a more appropriate name for Owen's ARM Parser isMCR hack since the same operands can be present
 in cdp/cdp2 instructions. Also increase the hack with cdp/cdp2 instructions.
- Fix the encoding of cdp/cdp2 instructions for ARM (no thumb and thumb2 yet) and add testcases for t
hem.

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

13 years agoSplitKit requires that all defs are in place before calling useIntv().
Jakob Stoklund Olesen [Thu, 20 Jan 2011 17:45:23 +0000 (17:45 +0000)]
SplitKit requires that all defs are in place before calling useIntv().

The value mapping gets confused about which original values have multiple new
definitions so they may need phi insertions.

This could probably be simplified by letting enterIntvBefore() take a live range
to be added following the instruction. As long as the range stays inside the
same basic block, value mapping shouldn't be a problem.

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

13 years agoAdd LiveIntervalMap::dumpCache() to print out the cache used by the ssa update algorithm.
Jakob Stoklund Olesen [Thu, 20 Jan 2011 17:45:20 +0000 (17:45 +0000)]
Add LiveIntervalMap::dumpCache() to print out the cache used by the ssa update algorithm.

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

13 years agoAdd mcr*2 and mr*c2 support to thumb2 targets
Bruno Cardoso Lopes [Thu, 20 Jan 2011 16:58:48 +0000 (16:58 +0000)]
Add mcr*2 and mr*c2 support to thumb2 targets

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

13 years agoAdd mcr* and mr*c support to thumb targets
Bruno Cardoso Lopes [Thu, 20 Jan 2011 16:35:57 +0000 (16:35 +0000)]
Add mcr* and mr*c support to thumb targets

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

13 years agoDisable this test until I can figure out why it's broken. Not xfailed because it
Michael J. Spencer [Thu, 20 Jan 2011 16:24:07 +0000 (16:24 +0000)]
Disable this test until I can figure out why it's broken. Not xfailed because it
usese 100% CPU and times out, so it's annoying to run it.

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

13 years agoAllow sign-extending of i8 and i16 to i128 on SPU.
Kalle Raiskila [Thu, 20 Jan 2011 15:49:06 +0000 (15:49 +0000)]
Allow sign-extending of i8 and i16 to i128 on SPU.

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

13 years agoAt -O123 the early-cse pass is run before instcombine has run. According to my
Duncan Sands [Thu, 20 Jan 2011 13:21:55 +0000 (13:21 +0000)]
At -O123 the early-cse pass is run before instcombine has run.  According to my
auto-simplier the transform most missed by early-cse is (zext X) != 0 -> X != 0.
This patch adds this transform and some related logic to InstructionSimplify
and removes some of the logic from instcombine (unfortunately not all because
there are several situations in which instcombine can improve things by making
new instructions, whereas instsimplify is not allowed to do this).  At -O2 this
often results in more than 15% more simplifications by early-cse, and results in
hundreds of lines of bitcode being eliminated from the testsuite.  I did see some
small negative effects in the testsuite, for example a few additional instructions
in three programs.  One program, 483.xalancbmk, got an additional 35 instructions,
which seems to be due to a function getting an additional instruction and then
being inlined all over the place.

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

13 years agoRefactor mcr* and mr*c instructions into classes with the same encoding. No functiona...
Bruno Cardoso Lopes [Thu, 20 Jan 2011 13:17:59 +0000 (13:17 +0000)]
Refactor mcr* and mr*c instructions into classes with the same encoding. No functionality change.

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

13 years agoMy editor's indent went crazy. Fix.
Eric Christopher [Thu, 20 Jan 2011 08:56:34 +0000 (08:56 +0000)]
My editor's indent went crazy. Fix.

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

13 years agoExpand invalid return values for umulo and smulo. Handle these similarly
Eric Christopher [Thu, 20 Jan 2011 08:54:28 +0000 (08:54 +0000)]
Expand invalid return values for umulo and smulo. Handle these similarly
to add/sub by doing the normal operation and then checking for overflow
afterwards. This generally relies on the DAG handling the later invalid
operations as well.

Fixes the 64-bit part of rdar://8622122 and rdar://8774702.

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

13 years agoCorrect itinerary entry for t2MOV_pic_ga_add_pc.
Evan Cheng [Thu, 20 Jan 2011 08:43:03 +0000 (08:43 +0000)]
Correct itinerary entry for t2MOV_pic_ga_add_pc.

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

13 years agoAdd test.
Evan Cheng [Thu, 20 Jan 2011 08:38:21 +0000 (08:38 +0000)]
Add test.

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

13 years agoSorry, several patches in one.
Evan Cheng [Thu, 20 Jan 2011 08:34:58 +0000 (08:34 +0000)]
Sorry, several patches in one.

TargetInstrInfo:
Change produceSameValue() to take MachineRegisterInfo as an optional argument.
When in SSA form, targets can use it to make more aggressive equality analysis.

Machine LICM:
1. Eliminate isLoadFromConstantMemory, use MI.isInvariantLoad instead.
2. Fix a bug which prevent CSE of instructions which are not re-materializable.
3. Use improved form of produceSameValue.

ARM:
1. Teach ARM produceSameValue to look pass some PIC labels.
2. Look for operands from different loads of different constant pool entries
   which have same values.
3. Re-implement PIC GA materialization using movw + movt. Combine the pair with
   a "add pc" or "ldr [pc]" to form pseudo instructions. This makes it possible
   to re-materialize the instruction, allow machine LICM to hoist the set of
   instructions out of the loop and make it possible to CSE them. It's a bit
   hacky, but it significantly improve code quality.
4. Some minor bug fixes as well.

With the fixes, using movw + movt to materialize GAs significantly outperform the
load from constantpool method. 186.crafty and 255.vortex improved > 20%, 254.gap
and 176.gcc ~10%.

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

13 years agollvm-objdump: Remove redundant includes.
Michael J. Spencer [Thu, 20 Jan 2011 07:22:13 +0000 (07:22 +0000)]
llvm-objdump: Remove redundant includes.

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

13 years agollvm-nm: Fix warning.
Michael J. Spencer [Thu, 20 Jan 2011 07:22:04 +0000 (07:22 +0000)]
llvm-nm: Fix warning.

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

13 years agoObject: Add some tests!
Michael J. Spencer [Thu, 20 Jan 2011 06:39:15 +0000 (06:39 +0000)]
Object: Add some tests!

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

13 years agoAdd llvm-objdump
Michael J. Spencer [Thu, 20 Jan 2011 06:39:06 +0000 (06:39 +0000)]
Add llvm-objdump

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

13 years agollvm-nm: Update to use the new LLVMObject library.
Michael J. Spencer [Thu, 20 Jan 2011 06:38:57 +0000 (06:38 +0000)]
llvm-nm: Update to use the new LLVMObject library.

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

13 years agoObject: Add ELF support.
Michael J. Spencer [Thu, 20 Jan 2011 06:38:47 +0000 (06:38 +0000)]
Object: Add ELF support.

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

13 years agoObject: Add COFF Support.
Michael J. Spencer [Thu, 20 Jan 2011 06:38:34 +0000 (06:38 +0000)]
Object: Add COFF Support.

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

13 years agoSelection DAG scheduler register pressure heuristic fixes.
Andrew Trick [Thu, 20 Jan 2011 06:21:59 +0000 (06:21 +0000)]
Selection DAG scheduler register pressure heuristic fixes.

Added a check for already live regs before claiming HighRegPressure.
Fixed a few cases of checking the wrong number of successors.
Added some tracing until these heuristics are better understood.

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

13 years agoCheck that a live range exists before shortening it. This fixes PR8989.
Jakob Stoklund Olesen [Thu, 20 Jan 2011 06:20:02 +0000 (06:20 +0000)]
Check that a live range exists before shortening it. This fixes PR8989.

The live range may have been deleted earlier because of rematerialization.

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

13 years agoAdd hidden -verify-coalescing to run the machine code verifier before and after
Jakob Stoklund Olesen [Thu, 20 Jan 2011 06:20:00 +0000 (06:20 +0000)]
Add hidden -verify-coalescing to run the machine code verifier before and after
register coalescing.

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

13 years agogold: MinGW fix.
Michael J. Spencer [Thu, 20 Jan 2011 05:43:16 +0000 (05:43 +0000)]
gold: MinGW fix.

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

13 years agoSparc backend: Implements a delay slot filler that attempt to fill delay slots
Venkatraman Govindaraju [Thu, 20 Jan 2011 05:08:26 +0000 (05:08 +0000)]
Sparc backend: Implements a delay slot filler that attempt to fill delay slots
with useful instructions.

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

13 years agoUpdate a comment.
Cameron Zwarich [Thu, 20 Jan 2011 03:58:43 +0000 (03:58 +0000)]
Update a comment.

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

13 years agoRemove an unnecessary #include.
Cameron Zwarich [Thu, 20 Jan 2011 03:56:35 +0000 (03:56 +0000)]
Remove an unnecessary #include.

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

13 years agoFix bug found by new clang warning.
Jakob Stoklund Olesen [Thu, 20 Jan 2011 02:43:19 +0000 (02:43 +0000)]
Fix bug found by new clang warning.

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

13 years agoUse only one API at a time.
Eric Christopher [Thu, 20 Jan 2011 01:29:23 +0000 (01:29 +0000)]
Use only one API at a time.

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

13 years agoIf we can, lower the multiply part of a umulo/smulo call to a libcall
Eric Christopher [Thu, 20 Jan 2011 00:29:24 +0000 (00:29 +0000)]
If we can, lower the multiply part of a umulo/smulo call to a libcall
with an invalid type then split the result and perform the overflow check
normally.

Fixes the 32-bit parts of rdar://8622122 and rdar://8774702.

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

13 years agoFix debug info for merged global.
Devang Patel [Thu, 20 Jan 2011 00:02:16 +0000 (00:02 +0000)]
Fix debug info for merged global.

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

13 years agoDivert Hopfield network debug output. It is very noisy.
Jakob Stoklund Olesen [Wed, 19 Jan 2011 23:14:59 +0000 (23:14 +0000)]
Divert Hopfield network debug output. It is very noisy.

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

13 years agoDon't accidentally leave small gaps in the live ranges when leaving the active
Jakob Stoklund Olesen [Wed, 19 Jan 2011 23:14:56 +0000 (23:14 +0000)]
Don't accidentally leave small gaps in the live ranges when leaving the active
interval after an instruction. The leaveIntvAfter() method only adds liveness
from the instruction's boundary index to the inserted copy.

Ideally, SplitKit should be smarter about this, perhaps by combining useIntv()
and leaveIntvAfter() into one method that guarantees continuity.

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

13 years agoMake sure to propogate the error code when we fail to parse a modifier.
Jim Grosbach [Wed, 19 Jan 2011 23:06:07 +0000 (23:06 +0000)]
Make sure to propogate the error code when we fail to parse a modifier.

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

13 years agoFix register address expression. Patch by Ken Dyck.
Devang Patel [Wed, 19 Jan 2011 23:04:47 +0000 (23:04 +0000)]
Fix register address expression. Patch by Ken Dyck.

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

13 years agoImplement RAGreedy::splitAroundRegion and remove loop splitting.
Jakob Stoklund Olesen [Wed, 19 Jan 2011 22:11:48 +0000 (22:11 +0000)]
Implement RAGreedy::splitAroundRegion and remove loop splitting.

Region splitting includes loop splitting as a subset, and it is more generic.
The splitting heuristics for variables that are live in more than one block are
now:

1. Try to create a region that covers multiple basic blocks.
2. Try to create a new live range for each block with multiple uses.
3. Spill.

Steps 2 and 3 are similar to what the standard spiller is doing.

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

13 years agoSimilarly, analyze truncate through multiply.
Nick Lewycky [Wed, 19 Jan 2011 18:56:00 +0000 (18:56 +0000)]
Similarly, analyze truncate through multiply.

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

13 years agoAdd a missed SCEV fold that is required to continue analyzing the IR produced
Nick Lewycky [Wed, 19 Jan 2011 16:59:46 +0000 (16:59 +0000)]
Add a missed SCEV fold that is required to continue analyzing the IR produced
by indvars through the scev expander.

trunc(add x, y) --> add(trunc x, y). Currently SCEV largely folds the other way
which is probably wrong, but preserved to minimize churn. Instcombine doesn't
do this fold either, demonstrating a missed optz'n opportunity on code doing
add+trunc+add.

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

13 years agoFix the encoding of mrrc and mcrr family of instructions. Also add testcases for...
Bruno Cardoso Lopes [Wed, 19 Jan 2011 16:56:52 +0000 (16:56 +0000)]
Fix the encoding of mrrc and mcrr family of instructions. Also add testcases for mcr and mrc

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

13 years agoAdd unnamed_addr when we can show that address of a global is not used.
Rafael Espindola [Wed, 19 Jan 2011 16:32:21 +0000 (16:32 +0000)]
Add unnamed_addr when we can show that address of a global is not used.

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

13 years agoFix comment for gen-clang-decl-nodes tblgen backend, from Michael Han
Douglas Gregor [Wed, 19 Jan 2011 15:57:47 +0000 (15:57 +0000)]
Fix comment for gen-clang-decl-nodes tblgen backend, from Michael Han

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

13 years agoAdd a missing SCEV simplification sext(zext x) --> zext x.
Nick Lewycky [Wed, 19 Jan 2011 15:56:12 +0000 (15:56 +0000)]
Add a missing SCEV simplification sext(zext x) --> zext x.

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

13 years agoARM/ISel: Factor out isScaledConstantInRange() helper.
Daniel Dunbar [Wed, 19 Jan 2011 15:12:16 +0000 (15:12 +0000)]
ARM/ISel: Factor out isScaledConstantInRange() helper.

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

13 years agoFor ARM subtargets with useNEONForSinglePrecisionFP, double count uses
Andrew Trick [Wed, 19 Jan 2011 02:35:27 +0000 (02:35 +0000)]
For ARM subtargets with useNEONForSinglePrecisionFP, double count uses
of the floating point types less than 64-bits. It's somewhat of a temporary
hack but forces more accurate modeling of register pressure and results
in fewer spills.

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

13 years agowhitespace
Andrew Trick [Wed, 19 Jan 2011 02:26:13 +0000 (02:26 +0000)]
whitespace

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

13 years agoDon't forget to emit the load from indirect symbol when using movw + movt to material...
Evan Cheng [Wed, 19 Jan 2011 02:16:49 +0000 (02:16 +0000)]
Don't forget to emit the load from indirect symbol when using movw + movt to materialize GA indirect symbols.

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

13 years agoWhen matching asm operands, always try to match the most restricted type first.
Owen Anderson [Tue, 18 Jan 2011 23:01:21 +0000 (23:01 +0000)]
When matching asm operands, always try to match the most restricted type first.
Unfortunately, while this is the "right" thing to do, it breaks some ARM
asm parsing tests because MemMode5 and ThumbMemModeReg are ambiguous.  This
is tricky to resolve since neither is a subset of the other.

XFAIL the test for now.  The old way was broken in other ways, just ways
we didn't happen to be testing, and our ARM asm parsing is going to require
significant revisiting at a later point anyways.

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

13 years agoCreate two new generic classes to represent the following VMRS/VMSR variations:
Bruno Cardoso Lopes [Tue, 18 Jan 2011 21:58:20 +0000 (21:58 +0000)]
Create two new generic classes to represent the following VMRS/VMSR variations:
vmrs  reg, fpexc
vmrs  reg, fpsid
vmsr  fpexc, reg
vmsr  fpsid, reg

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

13 years agoFix MRS encoding for arm and thumb.
Bruno Cardoso Lopes [Tue, 18 Jan 2011 21:31:35 +0000 (21:31 +0000)]
Fix MRS encoding for arm and thumb.

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

13 years agoFix the encoding of t2ISB by using the right class and also parse it correctly
Bruno Cardoso Lopes [Tue, 18 Jan 2011 21:17:09 +0000 (21:17 +0000)]
Fix the encoding of t2ISB by using the right class and also parse it correctly

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

13 years agoTeach BasicAA to return PartialAlias in cases where both pointers
Dan Gohman [Tue, 18 Jan 2011 21:16:06 +0000 (21:16 +0000)]
Teach BasicAA to return PartialAlias in cases where both pointers
are pointing to the same object, one pointer is accessing the entire
object, and the other is access has a non-zero size. This prevents
TBAA from kicking in and saying NoAlias in such cases.

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

13 years agoAdd RAGreedy methods for splitting live ranges around regions.
Jakob Stoklund Olesen [Tue, 18 Jan 2011 21:13:27 +0000 (21:13 +0000)]
Add RAGreedy methods for splitting live ranges around regions.

Analyze the live range's behavior entering and leaving basic blocks. Compute an
interference pattern for each allocation candidate, and use SpillPlacement to
find an optimal region where that register can be live.

This code is still not enabled.

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

13 years agoFollow the current hack set and enable the correct parsing of bkpt while in thumb...
Bruno Cardoso Lopes [Tue, 18 Jan 2011 20:55:11 +0000 (20:55 +0000)]
Follow the current hack set and enable the correct parsing of bkpt while in thumb mode.

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

13 years agofix rdar://8878965, a regression I introduced with the recent
Chris Lattner [Tue, 18 Jan 2011 20:53:04 +0000 (20:53 +0000)]
fix rdar://8878965, a regression I introduced with the recent
llvm.objectsize changes.

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

13 years agoAdd support for parsing and encoding ARM's official syntax for the BFI instruction
Bruno Cardoso Lopes [Tue, 18 Jan 2011 20:45:56 +0000 (20:45 +0000)]
Add support for parsing and encoding ARM's official syntax for the BFI instruction

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

13 years agoAdd a FIXME.
Jim Grosbach [Tue, 18 Jan 2011 19:59:19 +0000 (19:59 +0000)]
Add a FIXME.

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

13 years agoEnsure Mips::GP is properly reloaded after a function call. Patch by Sasa Stankovic
Bruno Cardoso Lopes [Tue, 18 Jan 2011 19:50:18 +0000 (19:50 +0000)]
Ensure Mips::GP is properly reloaded after a function call. Patch by Sasa Stankovic

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

13 years agoNegative zero is not legal on mips. Patch by Sasa Stankovic
Bruno Cardoso Lopes [Tue, 18 Jan 2011 19:41:41 +0000 (19:41 +0000)]
Negative zero is not legal on mips. Patch by Sasa Stankovic

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

13 years agoHandle (i32,i32) => f64 in a cleaner way. Patch by Sasa Stankovic
Bruno Cardoso Lopes [Tue, 18 Jan 2011 19:38:25 +0000 (19:38 +0000)]
Handle (i32,i32) => f64 in a cleaner way. Patch by Sasa Stankovic

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

13 years agoAdd support for mips32 madd and msub instructions. Patch by Akira Hatanaka
Bruno Cardoso Lopes [Tue, 18 Jan 2011 19:29:17 +0000 (19:29 +0000)]
Add support for mips32 madd and msub instructions. Patch by Akira Hatanaka

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

13 years agoFor completeness, generalize the (X + Y) - Y -> X transform and add X - (X + 1) ...
Duncan Sands [Tue, 18 Jan 2011 11:50:19 +0000 (11:50 +0000)]
For completeness, generalize the (X + Y) - Y -> X transform and add X - (X + 1) -> -1.
These were not recommended by my auto-simplifier since they don't fire often enough.
However they do fire from time to time, for example they remove one subtraction from
the final bitcode for 483.xalancbmk.

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

13 years agoSimplify (X<<1)-X into X. According to my auto-simplier this is the most common...
Duncan Sands [Tue, 18 Jan 2011 09:24:58 +0000 (09:24 +0000)]
Simplify (X<<1)-X into X.  According to my auto-simplier this is the most common missed
simplification in fully optimized code.  It occurs sporadically in the testsuite, and
many times in 403.gcc: the final bitcode has 131 fewer subtractions after this change.
The reason that the multiplies are not eliminated is the same reason that instcombine
did not catch this: they are used by other instructions (instcombine catches this with
a more general transform which in general is only profitable if the operands have only
one use).

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

13 years agoadd a note
Chris Lattner [Tue, 18 Jan 2011 07:47:48 +0000 (07:47 +0000)]
add a note

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

13 years agofinish a sentence.
Chris Lattner [Tue, 18 Jan 2011 06:12:10 +0000 (06:12 +0000)]
finish a sentence.

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

13 years agoSPARC backend: Modified LowerCall and LowerFormalArguments so that they use CallingCo...
Venkatraman Govindaraju [Tue, 18 Jan 2011 06:09:55 +0000 (06:09 +0000)]
SPARC backend: Modified LowerCall and LowerFormalArguments so that they use CallingConv assignments.

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

13 years agoRemove an unnecessary #include.
Cameron Zwarich [Tue, 18 Jan 2011 06:07:18 +0000 (06:07 +0000)]
Remove an unnecessary #include.

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

13 years agoMove DominanceFrontier from VMCore to Analysis.
Cameron Zwarich [Tue, 18 Jan 2011 06:06:27 +0000 (06:06 +0000)]
Move DominanceFrontier from VMCore to Analysis.

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

13 years agoMcARM: Use accessors where appropriate.
Daniel Dunbar [Tue, 18 Jan 2011 05:55:27 +0000 (05:55 +0000)]
McARM: Use accessors where appropriate.

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

13 years agoMcARM: Fill in ASMOperand::dump() for memory operands.
Daniel Dunbar [Tue, 18 Jan 2011 05:55:21 +0000 (05:55 +0000)]
McARM: Fill in ASMOperand::dump() for memory operands.

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

13 years agoMcARM: Make ARMOperand use a union where appropriate.
Daniel Dunbar [Tue, 18 Jan 2011 05:55:15 +0000 (05:55 +0000)]
McARM: Make ARMOperand use a union where appropriate.

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

13 years agoThere is no point in verifying an analysis that is never updated.
Cameron Zwarich [Tue, 18 Jan 2011 05:44:04 +0000 (05:44 +0000)]
There is no point in verifying an analysis that is never updated.

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

13 years agoMcARM: Unify ParseMemory() successfull return.
Daniel Dunbar [Tue, 18 Jan 2011 05:34:24 +0000 (05:34 +0000)]
McARM: Unify ParseMemory() successfull return.

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

13 years agoMcARM: Early exit on failure (NEFC).
Daniel Dunbar [Tue, 18 Jan 2011 05:34:17 +0000 (05:34 +0000)]
McARM: Early exit on failure (NEFC).

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

13 years agoMcARM: Always keep an offset expression, if used (instead of assuming == 0 if used...
Daniel Dunbar [Tue, 18 Jan 2011 05:34:11 +0000 (05:34 +0000)]
McARM: Always keep an offset expression, if used (instead of assuming == 0 if used but not present), and simplify logic.

Also, clean up various non-sensicalisms in isMemModeRegThumb() and isMemModeImmThumb().

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

13 years agoMcARM: Add a variety of asserts on the sanity of memory operands.
Daniel Dunbar [Tue, 18 Jan 2011 05:34:05 +0000 (05:34 +0000)]
McARM: Add a variety of asserts on the sanity of memory operands.

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

13 years agoMcARM: Use a consistent marker for not-set OffsetRegNum.
Daniel Dunbar [Tue, 18 Jan 2011 05:33:57 +0000 (05:33 +0000)]
McARM: Use a consistent marker for not-set OffsetRegNum.

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

13 years agoConvert a std::map to a DenseMap for another 1.7% speedup on -scalarrepl.
Cameron Zwarich [Tue, 18 Jan 2011 04:50:38 +0000 (04:50 +0000)]
Convert a std::map to a DenseMap for another 1.7% speedup on -scalarrepl.

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

13 years agoMake a std::vector a SmallVector<*, 32> like the other vectors in the same
Cameron Zwarich [Tue, 18 Jan 2011 04:41:32 +0000 (04:41 +0000)]
Make a std::vector a SmallVector<*, 32> like the other vectors in the same
function. This seems to be about a 1.5% speedup of -scalarrepl on test-suite
with SPEC2000 and SPEC2006.

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

13 years agoReduce indentation and remove commented out code.
Rafael Espindola [Tue, 18 Jan 2011 04:36:06 +0000 (04:36 +0000)]
Reduce indentation and remove commented out code.

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

13 years agoRemove some now-unused DominanceFrontier methods.
Cameron Zwarich [Tue, 18 Jan 2011 04:21:57 +0000 (04:21 +0000)]
Remove some now-unused DominanceFrontier methods.

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

13 years agoRemove code for updating dominance frontiers and some outdated references to
Cameron Zwarich [Tue, 18 Jan 2011 04:11:31 +0000 (04:11 +0000)]
Remove code for updating dominance frontiers and some outdated references to
dominance and post-dominance frontiers.

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

13 years agoRemove outdated references to dominance frontiers.
Cameron Zwarich [Tue, 18 Jan 2011 03:53:26 +0000 (03:53 +0000)]
Remove outdated references to dominance frontiers.

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

13 years agoMcARM: Start marking T2 address operands as such, for the benefit of the parser.
Daniel Dunbar [Tue, 18 Jan 2011 03:06:03 +0000 (03:06 +0000)]
McARM: Start marking T2 address operands as such, for the benefit of the parser.

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

13 years agoFormatting tweak.
Daniel Dunbar [Tue, 18 Jan 2011 01:59:30 +0000 (01:59 +0000)]
Formatting tweak.

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

13 years agoSupport/CommandLine: Add "Did you mean" print for mismatched operands.
Daniel Dunbar [Tue, 18 Jan 2011 01:59:24 +0000 (01:59 +0000)]
Support/CommandLine: Add "Did you mean" print for mismatched operands.

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

13 years agoThe stub routine that we're calling uses test and so clobbers
Eric Christopher [Tue, 18 Jan 2011 01:37:20 +0000 (01:37 +0000)]
The stub routine that we're calling uses test and so clobbers
the flags.

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

13 years agominor change to rafael's recent patches: if something is
Chris Lattner [Tue, 18 Jan 2011 01:23:44 +0000 (01:23 +0000)]
minor change to rafael's recent patches: if something is
constant but requires a unique address, we can still put it in a
readonly section, just not a mergable one.

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

13 years agoRemove unused variables found by gcc-4.6's -Wunused-but-set-variable.
Jeffrey Yasskin [Tue, 18 Jan 2011 00:51:23 +0000 (00:51 +0000)]
Remove unused variables found by gcc-4.6's -Wunused-but-set-variable.

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