oota-llvm.git
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

12 years agoAdd support for the 'X' inline asm operand modifier.
Eric Christopher [Thu, 10 May 2012 21:48:22 +0000 (21:48 +0000)]
Add support for the 'X' inline asm operand modifier.

Patch by Jack Carter.

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

12 years agomisched: Print machineinstrs with -debug-only=misched
Andrew Trick [Thu, 10 May 2012 21:06:21 +0000 (21:06 +0000)]
misched: Print machineinstrs with -debug-only=misched

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

12 years agomisched: tracing register pressure heuristics.
Andrew Trick [Thu, 10 May 2012 21:06:19 +0000 (21:06 +0000)]
misched: tracing register pressure heuristics.

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

12 years agomisched: Add register pressure backoff to ConvergingScheduler.
Andrew Trick [Thu, 10 May 2012 21:06:16 +0000 (21:06 +0000)]
misched: Add register pressure backoff to ConvergingScheduler.

Prioritize the instruction that comes closest to keeping pressure
under the target's limit. Then prioritize instructions that avoid
increasing the max pressure in the scheduled region. The max pressure
heuristic is a tad aggressive. Later I'll fix it to consider the
unscheduled pressure as well.

WIP: This is mostly functional but untested and not likely to do much good yet.

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

12 years agomisched: Release only unscheduled nodes into ReadyQ.
Andrew Trick [Thu, 10 May 2012 21:06:14 +0000 (21:06 +0000)]
misched: Release only unscheduled nodes into ReadyQ.

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

12 years agomisched: Added ReadyQ container wrapper for Top and Bottom Queues.
Andrew Trick [Thu, 10 May 2012 21:06:12 +0000 (21:06 +0000)]
misched: Added ReadyQ container wrapper for Top and Bottom Queues.

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

12 years agomisched: Introducing Top and Bottom register pressure trackers during scheduling.
Andrew Trick [Thu, 10 May 2012 21:06:10 +0000 (21:06 +0000)]
misched: Introducing Top and Bottom register pressure trackers during scheduling.

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

12 years agoHexagon V5 Support - V5 td file.
Sirish Pande [Thu, 10 May 2012 20:24:28 +0000 (20:24 +0000)]
Hexagon V5 Support - V5 td file.

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

12 years agoHexagon V5 FP Support.
Sirish Pande [Thu, 10 May 2012 20:20:25 +0000 (20:20 +0000)]
Hexagon V5 FP Support.

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

12 years agoRegPressure: API for speculatively checking instruction pressure.
Andrew Trick [Thu, 10 May 2012 19:11:52 +0000 (19:11 +0000)]
RegPressure: API for speculatively checking instruction pressure.

Added getMaxExcessUpward/DownwardPressure. They somewhat abuse the
tracker by speculatively handling an instruction out of order. But it
is convenient for now. In the future, we will cache each instruction's
pressure contribution to make this efficient.

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

12 years agoRegPressure: fix array index iteration style.
Andrew Trick [Thu, 10 May 2012 19:11:49 +0000 (19:11 +0000)]
RegPressure: fix array index iteration style.

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

12 years agoTeach DeadStoreElimination to eliminate exit-block stores with phi addresses.
Dan Gohman [Thu, 10 May 2012 18:57:38 +0000 (18:57 +0000)]
Teach DeadStoreElimination to eliminate exit-block stores with phi addresses.

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

12 years agoRevert: 156550 "ARM: peephole optimization to remove cmp instruction"
Manman Ren [Thu, 10 May 2012 18:49:43 +0000 (18:49 +0000)]
Revert: 156550 "ARM: peephole optimization to remove cmp instruction"

This commit broke an external linux bot and gave a compile-time warning.

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

12 years agoPrecompute lists of explicit sub-registers and indices.
Jakob Stoklund Olesen [Thu, 10 May 2012 17:46:18 +0000 (17:46 +0000)]
Precompute lists of explicit sub-registers and indices.

The .td files specify a tree of sub-registers. Store that tree as
ExplicitSubRegs lists in CodeGenRegister instead of extracting it from
the Record when needed.

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

12 years agoRewrite ScalarEvolution::hasOperand to use an explicit worklist instead
Dan Gohman [Thu, 10 May 2012 17:21:30 +0000 (17:21 +0000)]
Rewrite ScalarEvolution::hasOperand to use an explicit worklist instead
of recursion, to avoid excessive stack usage on deep expressions.

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

12 years agoteach DSE and isInstructionTriviallyDead() about calloc
Nuno Lopes [Thu, 10 May 2012 17:14:00 +0000 (17:14 +0000)]
teach DSE and isInstructionTriviallyDead() about calloc

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

12 years agoformatting change: strip debug info from test
Joel Jones [Thu, 10 May 2012 16:55:31 +0000 (16:55 +0000)]
formatting change: strip debug info from test

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

12 years agoARM: peephole optimization to remove cmp instruction
Manman Ren [Thu, 10 May 2012 16:48:21 +0000 (16:48 +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@156550 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix a problem with incomplete equality testing of PHINodes in
Joel Jones [Thu, 10 May 2012 15:59:41 +0000 (15:59 +0000)]
Fix a problem with incomplete equality testing of PHINodes in
Instruction::IsIdenticalToWhenDefined.

This manifested itself when inlining two calls to the same function.  The
inlined function had a switch statement that returned one of a set of
global variables.  Without this modification, the two phi instructions that
chose values from the branches of the switch instruction inlined from the
callee were considered equivalent and jump-threading replaced a load for the
first switch value with a phi selecting from the second switch, thereby
producing incorrect code.

This patch has been tested with "make check-all", "lnt runteste nt", and
llvm self-hosted, and on the original program that had this problem,
wireshark.

<rdar://problem/11025519>

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

12 years agoFix merge-typo and cleanup
Nadav Rotem [Thu, 10 May 2012 12:50:02 +0000 (12:50 +0000)]
Fix merge-typo and cleanup

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

12 years agoAVX2: Add an additional broadcast idiom.
Nadav Rotem [Thu, 10 May 2012 12:39:13 +0000 (12:39 +0000)]
AVX2: Add an additional broadcast idiom.

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

12 years agoGenerate AVX/AVX2 shuffles even when there is a memory op somewhere else in the program.
Nadav Rotem [Thu, 10 May 2012 12:22:05 +0000 (12:22 +0000)]
Generate AVX/AVX2 shuffles even when there is a memory op somewhere else in the program.
Starting r155461 we are able to select patterns for vbroadcast even when the load op is used by other users.

Fix PR11900.

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

12 years agoFix TableGen's RegPressureSet weight normalization to handle subreg DAGS.
Andrew Trick [Thu, 10 May 2012 00:32:15 +0000 (00:32 +0000)]
Fix TableGen's RegPressureSet weight normalization to handle subreg DAGS.

I initially assumed that the subreg graph was a tree. That may not be true.

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

12 years agoExecutionEngine: Check for NULL ErrorStr before using it.
Jim Grosbach [Thu, 10 May 2012 00:31:50 +0000 (00:31 +0000)]
ExecutionEngine: Check for NULL ErrorStr before using it.

Patch by Yury Mikhaylov <yury.mikhaylov@gmail.com>.

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

12 years agoFix warning text.
Jakob Stoklund Olesen [Wed, 9 May 2012 23:43:30 +0000 (23:43 +0000)]
Fix warning text.

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

12 years agoFix the objc_storeStrong recognizer to stop before walking off the
Dan Gohman [Wed, 9 May 2012 23:08:33 +0000 (23:08 +0000)]
Fix the objc_storeStrong recognizer to stop before walking off the
end of a basic block if there's no store.

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

12 years agoCompute a backwards SubReg -> SubRegIndex map for each register.
Jakob Stoklund Olesen [Wed, 9 May 2012 22:15:00 +0000 (22:15 +0000)]
Compute a backwards SubReg -> SubRegIndex map for each register.

This mapping is for internal use by TableGen. It will not be exposed in
the generated files.

Unfortunately, the mapping is not completely well-defined. The X86 xmm
registers appear with multiple sub-register indices in the ymm
registers. This is because of the odd idempotent sub_sd and sub_ss
sub-register indices. I hope to be able to eliminate them entirely, so
we can require the sub-registers to form a tree.

For now, just place the canonical sub_xmm index in the mapping, and
ignore the idempotents.

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

12 years agoRename getSubRegs() to computeSubRegs().
Jakob Stoklund Olesen [Wed, 9 May 2012 22:09:17 +0000 (22:09 +0000)]
Rename getSubRegs() to computeSubRegs().

That's what it does.

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

12 years agoobjectsize:
Nuno Lopes [Wed, 9 May 2012 21:30:57 +0000 (21:30 +0000)]
objectsize:
refactor code a bit to enable future changes to support run-time information
add support to compute allocation sizes at run-time if penalty > 1 (e.g., malloc(x), calloc(x, y), and VLAs)

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

12 years agoAdd unittests for Triple::getMacOSXVersion and Triple::getiOSVersion.
Chad Rosier [Wed, 9 May 2012 19:31:41 +0000 (19:31 +0000)]
Add unittests for Triple::getMacOSXVersion and Triple::getiOSVersion.

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

12 years agoAdded a regress test for the bug #9964 before close it.
Danil Malyshev [Wed, 9 May 2012 19:07:04 +0000 (19:07 +0000)]
Added a regress test for the bug #9964 before close it.
This bug was fixed by Jim Grosbach in #138879, thanks Jim!

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

12 years agoMark .opd @progbits, thus avoiding a warning from asm.
Roman Divacky [Wed, 9 May 2012 18:24:23 +0000 (18:24 +0000)]
Mark .opd @progbits, thus avoiding a warning from asm.

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

12 years agoSet the default iOS version to 3.0.
Chad Rosier [Wed, 9 May 2012 18:23:00 +0000 (18:23 +0000)]
Set the default iOS version to 3.0.

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

12 years agoUse the cpuid 64 bit flag to pick the default CPU name for an unknown model.
Bob Wilson [Wed, 9 May 2012 17:47:03 +0000 (17:47 +0000)]
Use the cpuid 64 bit flag to pick the default CPU name for an unknown model.

For the Family 6 switch in sys::getHostCPUName, an unrecognized model was
reported as "i686".  That's a really bad default since it means that new
CPUs will be treated as if they can only use 32-bit code.  This just looks
at the cpuid extended feature flag for 64 bit support, and if that is set,
it uses a default x86-64 cpu.  Similar logic is already used for the Family
15 code.  <rdar://problem/11314502>

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

12 years agoDon't return true on a function with a void return type.
Chad Rosier [Wed, 9 May 2012 17:38:47 +0000 (17:38 +0000)]
Don't return true on a function with a void return type.

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

12 years agoAdd Triple::getiOSVersion.
Chad Rosier [Wed, 9 May 2012 17:23:48 +0000 (17:23 +0000)]
Add Triple::getiOSVersion.

This new function provides a way to get the iOS version number from ios triples.
Part of rdar://11409204

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

12 years agoIntroduce llvm-c function LLVMPrintModuleToFile.
Hans Wennborg [Wed, 9 May 2012 16:54:17 +0000 (16:54 +0000)]
Introduce llvm-c function LLVMPrintModuleToFile.

This lets you save the textual representation of the LLVM IR to a file.
Before this patch it could only be printed to STDERR from llvm-c.

Patch by Carlo Kok!

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

12 years agochange the objectsize intrinsic signature: add a 3rd parameter to denote the maximum...
Nuno Lopes [Wed, 9 May 2012 15:52:43 +0000 (15:52 +0000)]
change the objectsize intrinsic signature: add a 3rd parameter to denote the maximum runtime performance penalty that the user is willing to accept.
This commit only adds the parameter. Code taking advantage of it will follow.

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

12 years agoMake it possible to switch off solution folders. VS Express does not support
Manuel Klimek [Wed, 9 May 2012 15:10:54 +0000 (15:10 +0000)]
Make it possible to switch off solution folders. VS Express does not support
them, and requires the user to click away one error message per folder on
project load.

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

12 years agoFixed a typo
Filipe Cabecinhas [Wed, 9 May 2012 14:43:50 +0000 (14:43 +0000)]
Fixed a typo

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

12 years agoSupply a C interface to the "LinkModules" method.
Bill Wendling [Wed, 9 May 2012 08:55:40 +0000 (08:55 +0000)]
Supply a C interface to the "LinkModules" method.
Patch by Andrew Wilkins!

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

12 years agoRemove unused variable to get rid of warning.
Craig Topper [Wed, 9 May 2012 07:08:58 +0000 (07:08 +0000)]
Remove unused variable to get rid of warning.

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

12 years agoAdd another peephole pattern for conditional moves.
Akira Hatanaka [Wed, 9 May 2012 02:29:29 +0000 (02:29 +0000)]
Add another peephole pattern for conditional moves.

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

12 years agoUse ptr_rc_tailcall instead of GR32_TC.
Jakob Stoklund Olesen [Wed, 9 May 2012 01:50:09 +0000 (01:50 +0000)]
Use ptr_rc_tailcall instead of GR32_TC.

The getPointerRegClass() hook will return GR32_TC, or whatever is
appropriate for the current function.

Patch by Yiannis Tsiouris!

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

12 years agoMake register FP allocatable if the compiled function does not have dynamic
Akira Hatanaka [Wed, 9 May 2012 01:38:13 +0000 (01:38 +0000)]
Make register FP allocatable if the compiled function does not have dynamic
allocas.

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

12 years agoExpand 64-bit shifts if target ABI is O32.
Akira Hatanaka [Wed, 9 May 2012 00:55:21 +0000 (00:55 +0000)]
Expand 64-bit shifts if target ABI is O32.

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

12 years agoRemove unused variable to silence compiler warning.
Richard Trieu [Wed, 9 May 2012 00:30:21 +0000 (00:30 +0000)]
Remove unused variable to silence compiler warning.

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

12 years agoDo not install llvm-config-host for cross-builds of clang. rdar://11317847
Bob Wilson [Wed, 9 May 2012 00:07:02 +0000 (00:07 +0000)]
Do not install llvm-config-host for cross-builds of clang. rdar://11317847

My previous change to install llvm-config-host for cross-builds resulted
in that file being installed even when the normal llvm-config was not
installed, e.g., when building the install-clang target.  Daniel suggested
this alternative, which solves the immediate problem and also avoids the gunk
in the top-level makefile.

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