oota-llvm.git
12 years ago[Support/YAMLParser] Use rtrim on plain scalars.
Michael J. Spencer [Mon, 14 May 2012 22:43:34 +0000 (22:43 +0000)]
[Support/YAMLParser] Use rtrim on plain scalars.

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

12 years ago[Support/COFF] Make the order of members in symbol match the standard.
Michael J. Spencer [Mon, 14 May 2012 22:43:21 +0000 (22:43 +0000)]
[Support/COFF] Make the order of members in symbol match the standard.

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

12 years agoFix use of uninitialized variable.
David Blaikie [Mon, 14 May 2012 21:48:19 +0000 (21:48 +0000)]
Fix use of uninitialized variable.

Found by GCC's maybe-uninitialized.

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

12 years agoDon't access MO reference after invalidating operand list.
Jakob Stoklund Olesen [Mon, 14 May 2012 21:30:58 +0000 (21:30 +0000)]
Don't access MO reference after invalidating operand list.

This should unbreak llvm-x86_64-linux.

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

12 years agoFix PR12821.
Jakob Stoklund Olesen [Mon, 14 May 2012 21:10:25 +0000 (21:10 +0000)]
Fix PR12821.

RAFast must add an <imp-def> operand when it is rewriting a sub-register
def that isn't a read-modify-write.

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

12 years agoMove the capture analysis from MemoryDependencyAnalysis to a more general place
Chad Rosier [Mon, 14 May 2012 20:35:04 +0000 (20:35 +0000)]
Move the capture analysis from MemoryDependencyAnalysis to a more general place
so that it can be reused in MemCpyOptimizer.  This analysis is needed to remove
an unnecessary memcpy when returning a struct into a local variable.
rdar://11341081
PR12686

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

12 years agoRevert 156634 upon request until code improvement changes are made.
Brendon Cahoon [Mon, 14 May 2012 19:35:42 +0000 (19:35 +0000)]
Revert 156634 upon request until code improvement changes are made.

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

12 years agoRename @llvm.debugger to @llvm.debugtrap.
Dan Gohman [Mon, 14 May 2012 18:58:10 +0000 (18:58 +0000)]
Rename @llvm.debugger to @llvm.debugtrap.

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

12 years agoRelease notes for MIPS backend.
Akira Hatanaka [Mon, 14 May 2012 18:40:07 +0000 (18:40 +0000)]
Release notes for MIPS backend.

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

12 years agoRemove a stale forward declaration.
Andrew Trick [Mon, 14 May 2012 18:03:19 +0000 (18:03 +0000)]
Remove a stale forward declaration.

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

12 years agoRemove the expensive BitVector::operator~().
Jakob Stoklund Olesen [Mon, 14 May 2012 15:46:27 +0000 (15:46 +0000)]
Remove the expensive BitVector::operator~().

Returning a temporary BitVector is very expensive. If you must, create
the temporary explicitly: Use BitVector(A).flip() instead of ~A.

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

12 years agoRemove BitVector binops.
Jakob Stoklund Olesen [Mon, 14 May 2012 15:37:25 +0000 (15:37 +0000)]
Remove BitVector binops.

These operators were crazy slow, calling malloc to return a temporary
result. At the same time, they look very innocent when used in code.

If you need temporary BitVectors to compute your thing, create them
explicitly, and use the inplace logical operators. This makes the high
cost explicit in the code.

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

12 years agoConsider ad hoc aliasing when building RegUnits.
Jakob Stoklund Olesen [Mon, 14 May 2012 15:20:39 +0000 (15:20 +0000)]
Consider ad hoc aliasing when building RegUnits.

Register units can be used to compute if two registers overlap:

  A overlaps B iff units(A) intersects units(B).

With this change, the above holds true even on targets that use ad hoc
aliasing (currently only ARM). This means that register units can be
used to implement regsOverlap() more efficiently, and the register
allocator can use the concept to model interference.

When there is no ad hoc aliasing, the register units correspond to the
maximal cliques in the register overlap graph. This is optimal, no other
register unit assignment can have fewer units.

With ad hoc aliasing, weird things are possible, and we don't try too
hard to compute the maximal cliques. The current approach is always
correct, and it works very well (probably optimally) as long as the ad
hoc aliasing doesn't have cliques larger than pairs. It seems unlikely
that any target would need more.

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

12 years agoRecord the ad hoc aliasing graph in CodeGenRegister.
Jakob Stoklund Olesen [Mon, 14 May 2012 15:12:37 +0000 (15:12 +0000)]
Record the ad hoc aliasing graph in CodeGenRegister.

The ad hoc aliasing specified in the 'Aliases' list in .td files is
currently only used by computeOverlaps(). It will soon be needed to
build accurate register units as well, so build the undirected graph in
CodeGenRegister::buildObjectGraph() instead.

Aliasing is a symmetric relationship with only one direction specified
in the .td files. Make sure both directions are represented in
getExplicitAliases().

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

12 years agoCompute topological signatures of registers.
Jakob Stoklund Olesen [Mon, 14 May 2012 15:10:07 +0000 (15:10 +0000)]
Compute topological signatures of registers.

TableGen creates new register classes and sub-register indices based on
the sub-register structure present in the register bank. So far, it has
been doing that on a per-register basis, but that is not very efficient.

This patch teaches TableGen to compute topological signatures for
registers, and use that to reduce the amount of redundant computation.
Registers get the same TopoSig if they have identical sub-register
structure.

TopoSigs are not currently exposed outside TableGen.

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

12 years agoAdd BitVector::anyCommon().
Jakob Stoklund Olesen [Mon, 14 May 2012 15:01:19 +0000 (15:01 +0000)]
Add BitVector::anyCommon().

The existing operation (A & B).any() is very slow.

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

12 years agoSwitchInst cosmetics: renamed "Hash" method to "hash"
Stepan Dyatkovskiy [Mon, 14 May 2012 08:26:31 +0000 (08:26 +0000)]
SwitchInst cosmetics: renamed "Hash" method to "hash"

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

12 years agoFormatting changes. Remove the '...' placeholders.
Bill Wendling [Mon, 14 May 2012 08:11:53 +0000 (08:11 +0000)]
Formatting changes. Remove the '...' placeholders.

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

12 years agoUse ArrayRef instead of an explicit vector type.
Bill Wendling [Mon, 14 May 2012 07:53:40 +0000 (07:53 +0000)]
Use ArrayRef instead of an explicit vector type.

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

12 years agoAdd blurb about Julia.
Bill Wendling [Mon, 14 May 2012 06:23:51 +0000 (06:23 +0000)]
Add blurb about Julia.

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

12 years agoReleaseNotes: Add info on PTX back-end
Justin Holewinski [Sun, 13 May 2012 17:32:35 +0000 (17:32 +0000)]
ReleaseNotes: Add info on PTX back-end

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

12 years agoHexagon: Initialize TBB to 0.
Benjamin Kramer [Sun, 13 May 2012 15:13:22 +0000 (15:13 +0000)]
Hexagon: Initialize TBB to 0.

Found by valgrind.

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

12 years agoFix Xcode case (Upper X, lower c)
Jean-Daniel Dupas [Sun, 13 May 2012 14:36:15 +0000 (14:36 +0000)]
Fix Xcode case (Upper X, lower c)

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

12 years agoReleaseNotes: Add a note about zero_undef on llvm.cttz/ctlz. Extend x86 section....
Benjamin Kramer [Sun, 13 May 2012 13:10:35 +0000 (13:10 +0000)]
ReleaseNotes: Add a note about zero_undef on llvm.cttz/ctlz. Extend x86 section. Add a bullet for dwarf access tables.

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

12 years agoReleaseNotes: Add a blurb about llvm-mc -g and move inliner changes into the optimize...
Benjamin Kramer [Sun, 13 May 2012 12:01:16 +0000 (12:01 +0000)]
ReleaseNotes: Add a blurb about llvm-mc -g and move inliner changes into the optimizer sections. Verbosify some bullets.

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

12 years agoReleaseNotes: Document that LLVM was rewritten in python.
Benjamin Kramer [Sun, 13 May 2012 11:46:05 +0000 (11:46 +0000)]
ReleaseNotes: Document that LLVM was rewritten in python.

                            ^~~~
                            llvm-build

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

12 years agoReleaseNotes: Add bullets for removed targets. Extend the note about llvm-ld removal.
Benjamin Kramer [Sun, 13 May 2012 11:28:46 +0000 (11:28 +0000)]
ReleaseNotes: Add bullets for removed targets. Extend the note about llvm-ld removal.

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

12 years agoOutline some clang 3.1 highlights off the top of my head.
Benjamin Kramer [Sun, 13 May 2012 10:40:08 +0000 (10:40 +0000)]
Outline some clang 3.1 highlights off the top of my head.

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

12 years agoAdd a link for every project.
Benjamin Kramer [Sun, 13 May 2012 10:21:51 +0000 (10:21 +0000)]
Add a link for every project.

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

12 years agoAdd blurb for LLVM D Compiler.
Bill Wendling [Sun, 13 May 2012 10:00:58 +0000 (10:00 +0000)]
Add blurb for LLVM D Compiler.

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

12 years agoAdd blurbs for pocl and TCE.
Bill Wendling [Sun, 13 May 2012 09:59:27 +0000 (09:59 +0000)]
Add blurbs for pocl and TCE.

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

12 years agoAdd OSL blurb.
Bill Wendling [Sun, 13 May 2012 09:55:24 +0000 (09:55 +0000)]
Add OSL blurb.

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

12 years agoAdd FAUST blurb.
Bill Wendling [Sun, 13 May 2012 09:52:48 +0000 (09:52 +0000)]
Add FAUST blurb.

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

12 years agoFix the tool documentation
Nadav Rotem [Sun, 13 May 2012 05:52:56 +0000 (05:52 +0000)]
Fix the tool documentation

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

12 years agoDocument Python bindings in release notes
Gregory Szorc [Sat, 12 May 2012 21:12:22 +0000 (21:12 +0000)]
Document Python bindings in release notes

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

12 years agoFix spacing after if.
Benjamin Kramer [Sat, 12 May 2012 16:52:21 +0000 (16:52 +0000)]
Fix spacing after if.

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

12 years agoAdd support for the .rept directive. Patch by Vladmir Sorokin. I added support
Rafael Espindola [Sat, 12 May 2012 16:31:10 +0000 (16:31 +0000)]
Add support for the .rept directive. Patch by Vladmir Sorokin. I added support
for nesting.

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

12 years agoELF: Add support for the asm .version directive.
Benjamin Kramer [Sat, 12 May 2012 14:30:47 +0000 (14:30 +0000)]
ELF: Add support for the asm .version directive.

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

12 years agoAsmParser: Add support for the .purgem directive.
Benjamin Kramer [Sat, 12 May 2012 11:21:46 +0000 (11:21 +0000)]
AsmParser: Add support for the .purgem directive.

Based on a patch by Team PaX.

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

12 years agoAsmParser: Give a nice error message for .code16gcc, which is currently unsupported.
Benjamin Kramer [Sat, 12 May 2012 11:19:04 +0000 (11:19 +0000)]
AsmParser: Give a nice error message for .code16gcc, which is currently unsupported.

Patch by Team PaX!

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

12 years agoAsmParser: ignore the .extern directive.
Benjamin Kramer [Sat, 12 May 2012 11:18:59 +0000 (11:18 +0000)]
AsmParser: ignore the .extern directive.

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

12 years agoAsmParser: Add support for .ifc and .ifnc directives.
Benjamin Kramer [Sat, 12 May 2012 11:18:51 +0000 (11:18 +0000)]
AsmParser: Add support for .ifc and .ifnc directives.

Based on a patch from PaX Team.

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

12 years agoAsmParser: Add support for .ifb and .ifnb directives.
Benjamin Kramer [Sat, 12 May 2012 11:18:42 +0000 (11:18 +0000)]
AsmParser: Add support for .ifb and .ifnb directives.

Based on a patch from PaX Team.

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

12 years agoRecommited r156374 with critical fixes in BitcodeReader/Writer:
Stepan Dyatkovskiy [Sat, 12 May 2012 10:48:17 +0000 (10:48 +0000)]
Recommited r156374 with critical fixes in BitcodeReader/Writer:
Ordinary patch for PR1255.
Added new case-ranges orientated methods for adding/removing cases in SwitchInst. After this patch cases will internally representated as ConstantArray-s instead of ConstantInt, externally cases wrapped within the ConstantRangesSet object.
Old methods of SwitchInst are also works well, but marked as deprecated. So on this stage we have no side effects except that I added support for case ranges in BitcodeReader/Writer, of course test for Bitcode is also added. Old "switch" format is also supported.

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

12 years agoTeach Function::hasAddressTaken that BlockAddress doesn't really take
Jay Foad [Sat, 12 May 2012 08:30:16 +0000 (08:30 +0000)]
Teach Function::hasAddressTaken that BlockAddress doesn't really take
the address of a function.

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

12 years agoMake sure new value jump is enabled for Hexagon V5 as well.
Sirish Pande [Sat, 12 May 2012 05:54:15 +0000 (05:54 +0000)]
Make sure new value jump is enabled for Hexagon V5 as well.

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

12 years agoSupport for Hexagon feature, New Value Jump.
Sirish Pande [Sat, 12 May 2012 05:10:30 +0000 (05:10 +0000)]
Support for Hexagon feature, New Value Jump.

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

12 years agoFix test cases.
Akira Hatanaka [Sat, 12 May 2012 03:25:16 +0000 (03:25 +0000)]
Fix test cases.

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

12 years agoRemove MipsEmitGPRestore.cpp.
Akira Hatanaka [Sat, 12 May 2012 03:24:03 +0000 (03:24 +0000)]
Remove MipsEmitGPRestore.cpp.

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

12 years agoDelete all functions that are no longer needed in MipsFunctionInfo, including
Akira Hatanaka [Sat, 12 May 2012 03:22:13 +0000 (03:22 +0000)]
Delete all functions that are no longer needed in MipsFunctionInfo, including
the ones that get or set the frame index for the $gp save slot.

Remove the piece of code in MipsFunctionInfo::getGlobalBaseReg() which returns
GP. This function should always return a virtual register.

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

12 years agoStop reserving register $gp. Do not call isGPFI to check whether a frame object
Akira Hatanaka [Sat, 12 May 2012 03:21:18 +0000 (03:21 +0000)]
Stop reserving register $gp. Do not call isGPFI to check whether a frame object
is the $gp save slot.

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

12 years agoDo not add the pass which restores $gp after every function call.
Akira Hatanaka [Sat, 12 May 2012 03:19:51 +0000 (03:19 +0000)]
Do not add the pass which restores $gp after every function call.

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

12 years agoMake the following changes in MipsISelLowering.cpp:
Akira Hatanaka [Sat, 12 May 2012 03:19:04 +0000 (03:19 +0000)]
Make the following changes in MipsISelLowering.cpp:

- Stop creating stack frame objects needed for saving $gp.
- Insert a node that copies the global pointer register to register $gp
  before the call node. This will ensure $gp is valid at the entry of the
  called function.

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

12 years agoMake the following changes in MipsFrameLowering.cpp:
Akira Hatanaka [Sat, 12 May 2012 03:18:00 +0000 (03:18 +0000)]
Make the following changes in MipsFrameLowering.cpp:

- Stop emitting instructions needed to initialize the global pointer register.
- Stop emitting .cprestore directive.
- Do not take into account the $gp save slot when computing stack size.

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

12 years agoSpeed up computeComposites() by using the new SubReg -> SubIdx map.
Jakob Stoklund Olesen [Sat, 12 May 2012 02:02:26 +0000 (02:02 +0000)]
Speed up computeComposites() by using the new SubReg -> SubIdx map.

TableGen doesn't need to search through the SubRegs map to find an
inverse entry.

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

12 years agoMake the following changes in MipsAsmPrinter.cpp:
Akira Hatanaka [Sat, 12 May 2012 00:48:43 +0000 (00:48 +0000)]
Make the following changes in MipsAsmPrinter.cpp:

- Remove code which lowers pseudo SETGP01.
- Fix LowerSETGP01. The first two of the three instructions that are emitted to
  initialize the global pointer register now use register $2.
- Stop emitting .cpload directive.

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

12 years agoHoist simpler checks above llvm::PointerMayBeCaptured. No functional change intended.
Chad Rosier [Sat, 12 May 2012 00:43:40 +0000 (00:43 +0000)]
Hoist simpler checks above llvm::PointerMayBeCaptured. No functional change intended.

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

12 years agoDon't look for empty live ranges in the unions.
Jakob Stoklund Olesen [Sat, 12 May 2012 00:33:28 +0000 (00:33 +0000)]
Don't look for empty live ranges in the unions.

Empty live ranges represent undef and still get allocated, but they
won't appear in LiveIntervalUnions.

Patch by Patrik Hägglund!

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

12 years agoInsert instructions to the entry basic block which initializes the global
Akira Hatanaka [Sat, 12 May 2012 00:17:17 +0000 (00:17 +0000)]
Insert instructions to the entry basic block which initializes the global
pointer register.

This is the first of the series of patches which clean up the way global pointer
register is used. The patches will make the following improvements:

- Make $gp an allocatable temporary register rather than reserving it.
- Use a virtual register as the global pointer register and let the register
  allocator decide which register to assign to it or whether spill/reloads are
  needed.
- Make sure $gp is valid at the entry of a called function, which is necessary
  for functions using lazy binding.
- Remove the need for emitting .cprestore and .cpload directives.

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

12 years agoAdd doxygen comments.
Michael J. Spencer [Fri, 11 May 2012 23:34:39 +0000 (23:34 +0000)]
Add doxygen comments.

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

12 years agoDo not replace operands of pseudo instructions with register $zero.
Akira Hatanaka [Fri, 11 May 2012 23:22:18 +0000 (23:22 +0000)]
Do not replace operands of pseudo instructions with register $zero.

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

12 years agoRevert 156658.
Chad Rosier [Fri, 11 May 2012 23:21:01 +0000 (23:21 +0000)]
Revert 156658.

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

12 years ago[fast-isel] Fast-isel doesn't use the expect intrinsic.
Chad Rosier [Fri, 11 May 2012 23:10:58 +0000 (23:10 +0000)]
[fast-isel] Fast-isel doesn't use the expect intrinsic.

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

12 years agoUse regular expression to match register names.
Akira Hatanaka [Fri, 11 May 2012 23:00:40 +0000 (23:00 +0000)]
Use regular expression to match register names.

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

12 years agoMake the URL a link instead.
Bill Wendling [Fri, 11 May 2012 22:38:33 +0000 (22:38 +0000)]
Make the URL a link instead.

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

12 years ago[Support/StringRef] Add find_last_not_of and {r,l,}trim.
Michael J. Spencer [Fri, 11 May 2012 22:08:50 +0000 (22:08 +0000)]
[Support/StringRef] Add find_last_not_of and {r,l,}trim.

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

12 years agoRemove extraneous ; and the resulting warning.
Bill Wendling [Fri, 11 May 2012 21:56:04 +0000 (21:56 +0000)]
Remove extraneous ; and the resulting warning.

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

12 years agoAdd mention of Glasgow Haskell Compiler.
Bill Wendling [Fri, 11 May 2012 21:42:37 +0000 (21:42 +0000)]
Add mention of Glasgow Haskell Compiler.

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

12 years ago[fast-isel] Add support for selecting @llvm.trap().
Chad Rosier [Fri, 11 May 2012 21:33:49 +0000 (21:33 +0000)]
[fast-isel] Add support for selecting @llvm.trap().

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

12 years agoUpdated instruction table due to addded intrinsics.
Brendon Cahoon [Fri, 11 May 2012 21:10:16 +0000 (21:10 +0000)]
Updated instruction table due to addded intrinsics.

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

12 years agoRemove warnings from HexagonVLIWPacketizer.
Sirish Pande [Fri, 11 May 2012 20:00:34 +0000 (20:00 +0000)]
Remove warnings from HexagonVLIWPacketizer.

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

12 years agoSome release notes for dragonegg.
Duncan Sands [Fri, 11 May 2012 19:59:43 +0000 (19:59 +0000)]
Some release notes for dragonegg.

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

12 years agoHexagon constant extender support.
Brendon Cahoon [Fri, 11 May 2012 19:56:59 +0000 (19:56 +0000)]
Hexagon constant extender support.

Patch by Jyotsna Verma.

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

12 years agoTypo.
Chad Rosier [Fri, 11 May 2012 19:43:29 +0000 (19:43 +0000)]
Typo.

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

12 years ago[fast-isel] Remove -disable-arm-fast-isel option. -fast-isel=0 suffices. Minor cleanup.
Chad Rosier [Fri, 11 May 2012 19:40:25 +0000 (19:40 +0000)]
[fast-isel] Remove -disable-arm-fast-isel option. -fast-isel=0 suffices.  Minor cleanup.

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

12 years agoHexagon V5 intrinsics support.
Sirish Pande [Fri, 11 May 2012 19:39:13 +0000 (19:39 +0000)]
Hexagon V5 intrinsics support.

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

12 years agoDefer computation of SuperRegs.
Jakob Stoklund Olesen [Fri, 11 May 2012 19:01:01 +0000 (19:01 +0000)]
Defer computation of SuperRegs.

Don't compute the SuperRegs list until the sub-register graph is
completely finished. This guarantees that the list of super-registers is
properly topologically ordered, and has no duplicates.

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

12 years ago[fast-isel] Cleaner fix for when we're unable to handle a non-double multi-reg
Chad Rosier [Fri, 11 May 2012 18:51:55 +0000 (18:51 +0000)]
[fast-isel] Cleaner fix for when we're unable to handle a non-double multi-reg
retval.  Hoists check before emitting the call to avoid unnecessary work.
rdar://11430407
PR12796

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

12 years agoobjectsize: add a few more tests and fix a bug
Nuno Lopes [Fri, 11 May 2012 18:25:29 +0000 (18:25 +0000)]
objectsize: add a few more tests and fix a bug

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

12 years ago[fast-isel] Rather then assert (or segfault in a non-asserts build), fall back
Chad Rosier [Fri, 11 May 2012 17:41:06 +0000 (17:41 +0000)]
[fast-isel] Rather then assert (or segfault in a non-asserts build), fall back
to selection DAG isel if we're unable to handle a non-double multi-reg retval.
rdar://11430407
PR12796

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

12 years agoThe return type is an unsigned, not a bool.
Chad Rosier [Fri, 11 May 2012 16:41:38 +0000 (16:41 +0000)]
The return type is an unsigned, not a bool.

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

12 years agoAdd space before an open parenthesis in control flow statements.
Manman Ren [Fri, 11 May 2012 15:36:46 +0000 (15:36 +0000)]
Add space before an open parenthesis in control flow statements.

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

12 years agoAdded X86 Atom latencies to X86InstrMMX.td.
Preston Gurd [Fri, 11 May 2012 14:27:12 +0000 (14:27 +0000)]
Added X86 Atom latencies to X86InstrMMX.td.

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

12 years agoPR1255: ConstantRangesSet and CRSBuilder classes moved from include/llvm to include...
Stepan Dyatkovskiy [Fri, 11 May 2012 10:34:23 +0000 (10:34 +0000)]
PR1255: ConstantRangesSet and CRSBuilder classes moved from include/llvm to include/llvm/Support.

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

12 years agoFix test/CodeGen/X86/tls-pie.ll.
Hans Wennborg [Fri, 11 May 2012 10:19:54 +0000 (10:19 +0000)]
Fix test/CodeGen/X86/tls-pie.ll.

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

12 years agoImplement initial-exec TLS model for 32-bit PIC x86
Hans Wennborg [Fri, 11 May 2012 10:11:01 +0000 (10:11 +0000)]
Implement initial-exec TLS model for 32-bit PIC x86

This fixes a TODO from 2007 :) Previously, LLVM would emit the wrong
code here (see the update to test/CodeGen/X86/tls-pie.ll).

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

12 years agoAdded the missing bit definition for the 4th bit of the STR (post reg) instruction...
Silviu Baranga [Fri, 11 May 2012 09:28:27 +0000 (09:28 +0000)]
Added the missing bit definition for the 4th bit of the STR (post reg) instruction. It is now set to 0. The patch also sets the unpredictable mask for SEL and SXTB-type instructions.

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

12 years agoFixed the LLVM ARM v7 assembler and instruction printer for 8-bit immediate offset...
Silviu Baranga [Fri, 11 May 2012 09:10:54 +0000 (09:10 +0000)]
Fixed the LLVM ARM v7 assembler and instruction printer for 8-bit immediate offset addressing. The assembler and instruction printer were not properly handeling the #-0 immediate.

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

12 years agoFix a use after free when the streamer is destroyed. Fixes pr12622.
Rafael Espindola [Fri, 11 May 2012 03:42:13 +0000 (03:42 +0000)]
Fix a use after free when the streamer is destroyed. Fixes pr12622.

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

12 years agoFix a misleading comment.
Akira Hatanaka [Fri, 11 May 2012 01:45:15 +0000 (01:45 +0000)]
Fix a misleading comment.

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

12 years agoTidy up. Trailing whitespace.
Jim Grosbach [Fri, 11 May 2012 01:41:30 +0000 (01:41 +0000)]
Tidy up. Trailing whitespace.

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

12 years agoTidy up. Trailing whitespace.
Jim Grosbach [Fri, 11 May 2012 01:39:13 +0000 (01:39 +0000)]
Tidy up. Trailing whitespace.

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

12 years agoFix a minor logic mistake transforming compares in instcombine. PR12514.
Eli Friedman [Fri, 11 May 2012 01:32:59 +0000 (01:32 +0000)]
Fix a minor logic mistake transforming compares in instcombine.  PR12514.

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

12 years agoARM: peephole optimization to remove cmp instruction
Manman Ren [Fri, 11 May 2012 01:30:47 +0000 (01:30 +0000)]
ARM: peephole optimization to remove cmp instruction

This patch will optimize the following cases:
  sub r1, r3 | sub r1, imm
  cmp r3, r1 or cmp r1, r3 | cmp r1, imm
  bge L1

TO
  subs r1, r3
  bge  L1 or ble L1

If the branch instruction can use flag from "sub", then we can replace
"sub" with "subs" and eliminate the "cmp" instruction.

rdar: 10734411

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

12 years agoDefine a new intrinsic, @llvm.debugger. It will be similar to __builtin_trap(),
Dan Gohman [Fri, 11 May 2012 00:19:32 +0000 (00:19 +0000)]
Define a new intrinsic, @llvm.debugger. It will be similar to __builtin_trap(),
but it generates int3 on x86 instead of ud2.

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

12 years agoAllow unique_file to take a mode for file permissions, but default
Eric Christopher [Fri, 11 May 2012 00:07:44 +0000 (00:07 +0000)]
Allow unique_file to take a mode for file permissions, but default
to user only read/write.

Part of rdar://11325849

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

12 years agoFix intendation.
Chad Rosier [Thu, 10 May 2012 23:38:07 +0000 (23:38 +0000)]
Fix intendation.

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

12 years agoCompute secondary sub-registers.
Jakob Stoklund Olesen [Thu, 10 May 2012 23:27:10 +0000 (23:27 +0000)]
Compute secondary sub-registers.

The sub-registers explicitly listed in SubRegs in the .td files form a
tree. In a complicated register bank, it is possible to have
sub-register relationships across sub-trees. For example, the ARM NEON
double vector Q0_Q1 is a tree:

  Q0_Q1 = [Q0, Q1],  Q0 = [D0, D1], Q1 = [D2, D3]

But we also define the DPair register D1_D2 = [D1, D2] which is fully
contained in Q0_Q1.

This patch teaches TableGen to find such sub-register relationships, and
assign sub-register indices to them. In the example, TableGen will
create a dsub_1_dsub_2 sub-register index, and add D1_D2 as a
sub-register of Q0_Q1.

This will eventually enable the coalescer to handle copies of skewed
sub-registers.

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

12 years agoobjectsize: add support for GEPs with non-constant indexes
Nuno Lopes [Thu, 10 May 2012 23:17:35 +0000 (23:17 +0000)]
objectsize: add support for GEPs with non-constant indexes
add an additional parameter to InstCombiner::EmitGEPOffset() to force it to *not* emit operations with NUW flag

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

12 years agoAdded X86 Atom latencies for instructions in X86InstrInfo.td.
Preston Gurd [Thu, 10 May 2012 21:58:35 +0000 (21:58 +0000)]
Added X86 Atom latencies for instructions in X86InstrInfo.td.

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