oota-llvm.git
15 years agoProvide hooks for spilling / restoring stuff
Anton Korobeynikov [Thu, 16 Jul 2009 14:01:27 +0000 (14:01 +0000)]
Provide hooks for spilling / restoring stuff

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

15 years agoRevert thinko
Anton Korobeynikov [Thu, 16 Jul 2009 14:01:10 +0000 (14:01 +0000)]
Revert thinko

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

15 years agoTemporary workaround problem with signed 32-bit imm's
Anton Korobeynikov [Thu, 16 Jul 2009 14:00:42 +0000 (14:00 +0000)]
Temporary workaround problem with signed 32-bit imm's

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

15 years agoImplement InsertBranch() hook
Anton Korobeynikov [Thu, 16 Jul 2009 14:00:10 +0000 (14:00 +0000)]
Implement InsertBranch() hook

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

15 years agoPipehole pattern for i32 imm's
Anton Korobeynikov [Thu, 16 Jul 2009 13:59:49 +0000 (13:59 +0000)]
Pipehole pattern for i32 imm's

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

15 years agoBunch of sext_inreg patterns
Anton Korobeynikov [Thu, 16 Jul 2009 13:59:18 +0000 (13:59 +0000)]
Bunch of sext_inreg patterns

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

15 years agoProvide normal 32 bit load and store
Anton Korobeynikov [Thu, 16 Jul 2009 13:58:43 +0000 (13:58 +0000)]
Provide normal 32 bit load and store

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

15 years agoProper lower 'small' results
Anton Korobeynikov [Thu, 16 Jul 2009 13:58:24 +0000 (13:58 +0000)]
Proper lower 'small' results

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

15 years agoCompletel forgot about unconditional branches
Anton Korobeynikov [Thu, 16 Jul 2009 13:57:52 +0000 (13:57 +0000)]
Completel forgot about unconditional branches

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

15 years agoLower addresses of globals
Anton Korobeynikov [Thu, 16 Jul 2009 13:57:27 +0000 (13:57 +0000)]
Lower addresses of globals

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

15 years agoTest (incomplete) for easy muls
Anton Korobeynikov [Thu, 16 Jul 2009 13:57:03 +0000 (13:57 +0000)]
Test (incomplete) for easy muls

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

15 years agoProvide "wide" muls and divs/rems
Anton Korobeynikov [Thu, 16 Jul 2009 13:56:42 +0000 (13:56 +0000)]
Provide "wide" muls and divs/rems

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

15 years agoFix thinko
Anton Korobeynikov [Thu, 16 Jul 2009 13:56:11 +0000 (13:56 +0000)]
Fix thinko

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

15 years agoFix epic bug with invalid regclass for R0D
Anton Korobeynikov [Thu, 16 Jul 2009 13:55:51 +0000 (13:55 +0000)]
Fix epic bug with invalid regclass for R0D

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

15 years agoLet RegisterInfo decide whether it can emit cross-class copy or not
Anton Korobeynikov [Thu, 16 Jul 2009 13:55:26 +0000 (13:55 +0000)]
Let RegisterInfo decide whether it can emit cross-class copy or not

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

15 years agoMore register pairs (now 32 bit ones)
Anton Korobeynikov [Thu, 16 Jul 2009 13:55:04 +0000 (13:55 +0000)]
More register pairs (now 32 bit ones)

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

15 years agoAdd even-odd register pairs
Anton Korobeynikov [Thu, 16 Jul 2009 13:54:45 +0000 (13:54 +0000)]
Add even-odd register pairs

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

15 years agoUnbreak due to mainline api change
Anton Korobeynikov [Thu, 16 Jul 2009 13:54:20 +0000 (13:54 +0000)]
Unbreak due to mainline api change

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

15 years agoPreliminary mul lowering
Anton Korobeynikov [Thu, 16 Jul 2009 13:53:55 +0000 (13:53 +0000)]
Preliminary mul lowering

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

15 years agoMore extloads
Anton Korobeynikov [Thu, 16 Jul 2009 13:53:35 +0000 (13:53 +0000)]
More extloads

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

15 years agoTests for cmp / br_cc / select_cc
Anton Korobeynikov [Thu, 16 Jul 2009 13:53:15 +0000 (13:53 +0000)]
Tests for cmp / br_cc / select_cc

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

15 years agoSELECT_CC lowering
Anton Korobeynikov [Thu, 16 Jul 2009 13:52:51 +0000 (13:52 +0000)]
SELECT_CC lowering

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

15 years agoConditional branches and comparisons
Anton Korobeynikov [Thu, 16 Jul 2009 13:52:31 +0000 (13:52 +0000)]
Conditional branches and comparisons

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

15 years agoEmit correct offset for PseudoSourceValue
Anton Korobeynikov [Thu, 16 Jul 2009 13:52:10 +0000 (13:52 +0000)]
Emit correct offset for PseudoSourceValue

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

15 years agoProvide proper stack offsets for outgoing arguments
Anton Korobeynikov [Thu, 16 Jul 2009 13:51:53 +0000 (13:51 +0000)]
Provide proper stack offsets for outgoing arguments

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

15 years agoChange register allocation order to reduce amount of callee-saved regs to be spilled.
Anton Korobeynikov [Thu, 16 Jul 2009 13:51:34 +0000 (13:51 +0000)]
Change register allocation order to reduce amount of callee-saved regs to be spilled.

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

15 years agoEmit callee-saved regs spills / restores
Anton Korobeynikov [Thu, 16 Jul 2009 13:51:12 +0000 (13:51 +0000)]
Emit callee-saved regs spills / restores

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

15 years agoScan for presence of calls and determine max callframe size early. To allow ProcessFu...
Anton Korobeynikov [Thu, 16 Jul 2009 13:50:40 +0000 (13:50 +0000)]
Scan for presence of calls and determine max callframe size early. To allow ProcessFunctionBeforeCalleeSaveScan() use this information

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

15 years agoSome preliminary call lowering
Anton Korobeynikov [Thu, 16 Jul 2009 13:50:21 +0000 (13:50 +0000)]
Some preliminary call lowering

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

15 years agoPrologue / epilogue emission
Anton Korobeynikov [Thu, 16 Jul 2009 13:49:49 +0000 (13:49 +0000)]
Prologue / epilogue emission

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

15 years agoAdd simple frame index elimination
Anton Korobeynikov [Thu, 16 Jul 2009 13:49:25 +0000 (13:49 +0000)]
Add simple frame index elimination

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

15 years agoProvide proper test :)
Anton Korobeynikov [Thu, 16 Jul 2009 13:48:59 +0000 (13:48 +0000)]
Provide proper test :)

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

15 years agoSwap the order of imm and idx field for rri addrmode in order to make handling of...
Anton Korobeynikov [Thu, 16 Jul 2009 13:48:42 +0000 (13:48 +0000)]
Swap the order of imm and idx field for rri addrmode in order to make handling of rri and ri addrmodes common

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

15 years agoDo not truncate sign bits for negative imms
Anton Korobeynikov [Thu, 16 Jul 2009 13:48:23 +0000 (13:48 +0000)]
Do not truncate sign bits for negative imms

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

15 years agoAdd address computation stuff
Anton Korobeynikov [Thu, 16 Jul 2009 13:47:59 +0000 (13:47 +0000)]
Add address computation stuff

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

15 years agoCleanup
Anton Korobeynikov [Thu, 16 Jul 2009 13:47:36 +0000 (13:47 +0000)]
Cleanup

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

15 years agoAdd mem-imm stores
Anton Korobeynikov [Thu, 16 Jul 2009 13:47:14 +0000 (13:47 +0000)]
Add mem-imm stores

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

15 years ago[PATCH 023/155] Typo
Anton Korobeynikov [Thu, 16 Jul 2009 13:45:22 +0000 (13:45 +0000)]
[PATCH 023/155] Typo

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

15 years agoAdd stores and truncstores
Anton Korobeynikov [Thu, 16 Jul 2009 13:45:00 +0000 (13:45 +0000)]
Add stores and truncstores

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

15 years agoAdd patterns for various extloads
Anton Korobeynikov [Thu, 16 Jul 2009 13:44:30 +0000 (13:44 +0000)]
Add patterns for various extloads

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

15 years agoDo some heroic rri address matching (shamelessly stolen from x86 backend). Not tested...
Anton Korobeynikov [Thu, 16 Jul 2009 13:44:00 +0000 (13:44 +0000)]
Do some heroic rri address matching (shamelessly stolen from x86 backend). Not tested though.

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

15 years agoChange register allocation order, so R0 will be allocated the last among scratch...
Anton Korobeynikov [Thu, 16 Jul 2009 13:43:40 +0000 (13:43 +0000)]
Change register allocation order, so R0 will be allocated the last among scratch. This will make address-calculation code much more happy.

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

15 years agoAdd shifts and reg-imm address matching
Anton Korobeynikov [Thu, 16 Jul 2009 13:43:18 +0000 (13:43 +0000)]
Add shifts and reg-imm address matching

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

15 years agoAdd bunch of 32-bit patterns... Uffff :)
Anton Korobeynikov [Thu, 16 Jul 2009 13:42:31 +0000 (13:42 +0000)]
Add bunch of 32-bit patterns... Uffff :)

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

15 years agoPropagate return result extension type
Anton Korobeynikov [Thu, 16 Jul 2009 13:35:48 +0000 (13:35 +0000)]
Propagate return result extension type

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

15 years agoAdd tests for fixes I committed earlier to the C++ FE.
Rafael Espindola [Thu, 16 Jul 2009 13:35:42 +0000 (13:35 +0000)]
Add tests for fixes I committed earlier to the C++ FE.

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

15 years agoAdd 32 bit subregs
Anton Korobeynikov [Thu, 16 Jul 2009 13:35:30 +0000 (13:35 +0000)]
Add 32 bit subregs

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

15 years agoAdd another bunch of reg-imm patterns for add/or/and/xor
Anton Korobeynikov [Thu, 16 Jul 2009 13:35:08 +0000 (13:35 +0000)]
Add another bunch of reg-imm patterns for add/or/and/xor

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

15 years agoAdd bunch of reg-imm movs
Anton Korobeynikov [Thu, 16 Jul 2009 13:34:50 +0000 (13:34 +0000)]
Add bunch of reg-imm movs

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

15 years agoProper match halfword-imm operands for mov and add
Anton Korobeynikov [Thu, 16 Jul 2009 13:34:24 +0000 (13:34 +0000)]
Proper match halfword-imm operands for mov and add

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

15 years agoProvide masked reg-imm 'or' and 'and'
Anton Korobeynikov [Thu, 16 Jul 2009 13:33:57 +0000 (13:33 +0000)]
Provide masked reg-imm 'or' and 'and'

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

15 years agoFix test running lines
Anton Korobeynikov [Thu, 16 Jul 2009 13:33:21 +0000 (13:33 +0000)]
Fix test running lines

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

15 years agoAdd reg-reg and pattern
Anton Korobeynikov [Thu, 16 Jul 2009 13:32:49 +0000 (13:32 +0000)]
Add reg-reg and pattern

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

15 years agoAdd sub reg-reg pattern
Anton Korobeynikov [Thu, 16 Jul 2009 13:32:16 +0000 (13:32 +0000)]
Add sub reg-reg pattern

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

15 years agoAdd xor reg-reg pattern
Anton Korobeynikov [Thu, 16 Jul 2009 13:31:28 +0000 (13:31 +0000)]
Add xor reg-reg pattern

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

15 years agoAdd or reg-reg pattern.
Anton Korobeynikov [Thu, 16 Jul 2009 13:30:53 +0000 (13:30 +0000)]
Add or reg-reg pattern.

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

15 years agoAdd add reg-reg and reg-imm patterns
Anton Korobeynikov [Thu, 16 Jul 2009 13:30:15 +0000 (13:30 +0000)]
Add add reg-reg and reg-imm patterns

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

15 years agoAdd simple reg-reg and reg-imm moves
Anton Korobeynikov [Thu, 16 Jul 2009 13:29:38 +0000 (13:29 +0000)]
Add simple reg-reg and reg-imm moves

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

15 years agoMinimal lowering for formal_arguments / ret
Anton Korobeynikov [Thu, 16 Jul 2009 13:28:59 +0000 (13:28 +0000)]
Minimal lowering for formal_arguments / ret

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

15 years agoAdd testsuite dir for systemz stuff
Anton Korobeynikov [Thu, 16 Jul 2009 13:28:22 +0000 (13:28 +0000)]
Add testsuite dir for systemz stuff

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

15 years agoLet's start another backend :)
Anton Korobeynikov [Thu, 16 Jul 2009 13:27:25 +0000 (13:27 +0000)]
Let's start another backend :)

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

15 years agoCombine an unaligned store of unaligned load into a memmove.
Richard Osborne [Thu, 16 Jul 2009 12:50:48 +0000 (12:50 +0000)]
Combine an unaligned store of unaligned load into a memmove.

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

15 years agoLower the threshold at which memcpy / memmove / memset stop being expanded
Richard Osborne [Thu, 16 Jul 2009 12:41:34 +0000 (12:41 +0000)]
Lower the threshold at which memcpy / memmove / memset stop being expanded
inline in the XCore.

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

15 years agoFix typo in last commit on expansion of unaligned loads.
Richard Osborne [Thu, 16 Jul 2009 10:48:47 +0000 (10:48 +0000)]
Fix typo in last commit on expansion of unaligned loads.

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

15 years agoExpand unaligned 32 bit loads from an address which is a constant
Richard Osborne [Thu, 16 Jul 2009 10:42:35 +0000 (10:42 +0000)]
Expand unaligned 32 bit loads from an address which is a constant
offset from a 32 bit aligned base as follows:

  ldw low, base[offset >> 2]
  ldw high, base[(offset >> 2) + 1]
  shr low_shifted, low, (offset & 0x3) * 8
  shl high_shifted, high, 32 - (offset & 0x3) * 8
  or result, low_shifted, high_shifted

Expand 32 bit loads / stores with 16 bit alignment into two 16 bit
loads / stores.

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

15 years agoCustom lower unaligned 32 bit stores and loads into libcalls. This is
Richard Osborne [Thu, 16 Jul 2009 10:21:18 +0000 (10:21 +0000)]
Custom lower unaligned 32 bit stores and loads into libcalls. This is
a big code size win since before they were expanding to upto 16
instructions.

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

15 years agoLet callers decide the sub-register index on the def operand of rematerialized instru...
Evan Cheng [Thu, 16 Jul 2009 09:20:10 +0000 (09:20 +0000)]
Let callers decide the sub-register index on the def operand of rematerialized instructions.
Avoid remat'ing instructions whose def have sub-register indices for now. It's just really really hard to get all the cases right.

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

15 years agouse SUBREG_TO_REG instead of INSERT_SUBREG, this way the code
Chris Lattner [Thu, 16 Jul 2009 06:31:37 +0000 (06:31 +0000)]
use SUBREG_TO_REG instead of INSERT_SUBREG, this way the code
generator can know the top bits are zero, not undefined.
Thanks to Dan for pointing this out.

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

15 years agoFix coding style issues pointed by Bill.
Bruno Cardoso Lopes [Thu, 16 Jul 2009 06:26:41 +0000 (06:26 +0000)]
Fix coding style issues pointed by Bill.

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

15 years agoadd a knob to turn off PrettyStackTrace globally. Patch by Zoltan
Chris Lattner [Thu, 16 Jul 2009 06:17:45 +0000 (06:17 +0000)]
add a knob to turn off PrettyStackTrace globally.  Patch by Zoltan
Varga!

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

15 years agoimplement .include in the lexer/parser instead of passing it into the streamer.
Chris Lattner [Thu, 16 Jul 2009 06:14:39 +0000 (06:14 +0000)]
implement .include in the lexer/parser instead of passing it into the streamer.

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

15 years agofix some casts that I improperly refactored, patch by Artur Pietrek!
Chris Lattner [Thu, 16 Jul 2009 04:34:33 +0000 (04:34 +0000)]
fix some casts that I improperly refactored, patch by Artur Pietrek!

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

15 years agoRemove unused header.
Daniel Dunbar [Thu, 16 Jul 2009 04:01:35 +0000 (04:01 +0000)]
Remove unused header.

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

15 years agoKill off last uses of TargetMachineRegistry class.
Daniel Dunbar [Thu, 16 Jul 2009 02:41:19 +0000 (02:41 +0000)]
Kill off last uses of TargetMachineRegistry class.

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

15 years agoFix gcc 4.0 build failure, can't rely on access inside nested friended class.
Daniel Dunbar [Thu, 16 Jul 2009 02:38:28 +0000 (02:38 +0000)]
Fix gcc 4.0 build failure, can't rely on access inside nested friended class.

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

15 years agoSwitch llc and createJIT to use simpler command line parsing for -march.
Daniel Dunbar [Thu, 16 Jul 2009 02:23:53 +0000 (02:23 +0000)]
Switch llc and createJIT to use simpler command line parsing for -march.

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

15 years agoAdd registered target list to --version output.
Daniel Dunbar [Thu, 16 Jul 2009 02:06:09 +0000 (02:06 +0000)]
Add registered target list to --version output.

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

15 years agoMake sure targets are initialized before we do anything, even command line
Daniel Dunbar [Thu, 16 Jul 2009 02:04:54 +0000 (02:04 +0000)]
Make sure targets are initialized before we do anything, even command line
processing.

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

15 years agoKill off <TARGET>MachineModule variables, and <TARGETASMPRINTER>ForceLink
Daniel Dunbar [Thu, 16 Jul 2009 01:55:13 +0000 (01:55 +0000)]
Kill off <TARGET>MachineModule variables, and <TARGETASMPRINTER>ForceLink
variables.
 - Module initialization functions supplanted the need for these.

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

15 years agoformatted_raw_ostream both is-a raw_ostream and has-a raw_ostream. This
Dan Gohman [Thu, 16 Jul 2009 01:32:46 +0000 (01:32 +0000)]
formatted_raw_ostream both is-a raw_ostream and has-a raw_ostream. This
means that two separate raw_ostreams are doing buffering before data is
sent to the underlying stream. Besides the inefficiency of redundant
buffering, the second level of buffering doesn't recieve flush()
requests.

Fix this by having formatted_raw_ostream set the underlying raw_ostream
to be unbuffered. This eliminates inefficiency due to redundant buffering,
and it makes the flush() disconnect harmless.

This fixes PR4559.

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

15 years agofix section switching to ensure that stubs are emitted to the right
Chris Lattner [Thu, 16 Jul 2009 01:23:26 +0000 (01:23 +0000)]
fix section switching to ensure that stubs are emitted to the right
section on ppc.

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

15 years agoAdd explicit comment that clients can call target initialization functions
Daniel Dunbar [Thu, 16 Jul 2009 01:13:00 +0000 (01:13 +0000)]
Add explicit comment that clients can call target initialization functions
multiple times.

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

15 years agoSkip special LLVM prefix '1' while emitting linknage name.
Devang Patel [Thu, 16 Jul 2009 01:01:22 +0000 (01:01 +0000)]
Skip special LLVM prefix '1' while emitting linknage name.
This prefix is used by LLVM to inform the asm printer to not emit usual global symbol prefix before the symbol name.

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

15 years agoRegerate CMake library dependencies.
Daniel Dunbar [Thu, 16 Jul 2009 00:43:36 +0000 (00:43 +0000)]
Regerate CMake library dependencies.
 - Added a sed script to do this in the comments.

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

15 years agoKill off cmake magic to force linking.
Daniel Dunbar [Thu, 16 Jul 2009 00:35:05 +0000 (00:35 +0000)]
Kill off cmake magic to force linking.
 - This isn't needed anymore, we require clients to call the appropriate
   initialization routines using TargetSelect.h.

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

15 years agoUpdate llvm{do,grep} to also search cmake / .cmake files
Daniel Dunbar [Thu, 16 Jul 2009 00:06:36 +0000 (00:06 +0000)]
Update llvm{do,grep} to also search cmake / .cmake files

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

15 years agoNow that we have contexts on types, convert some more internals to use contexts.
Owen Anderson [Thu, 16 Jul 2009 00:03:07 +0000 (00:03 +0000)]
Now that we have contexts on types, convert some more internals to use contexts.

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

15 years agoWe don't need to use llvm_report_error, this interface can deal with errors
Daniel Dunbar [Wed, 15 Jul 2009 23:54:01 +0000 (23:54 +0000)]
We don't need to use llvm_report_error, this interface can deal with errors
(although we don't get a very good error message).

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

15 years agoRevert yesterday's change by removing the LLVMContext parameter to AllocaInst and...
Owen Anderson [Wed, 15 Jul 2009 23:53:25 +0000 (23:53 +0000)]
Revert yesterday's change by removing the LLVMContext parameter to AllocaInst and MallocInst.

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

15 years agoAdd missing includes.
Daniel Dunbar [Wed, 15 Jul 2009 23:48:37 +0000 (23:48 +0000)]
Add missing includes.

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

15 years agoVerify that there is no kill flag on tied operands on two-address instructions.
Jakob Stoklund Olesen [Wed, 15 Jul 2009 23:37:26 +0000 (23:37 +0000)]
Verify that there is no kill flag on tied operands on two-address instructions.
This extra check is not trigged when runnning "make check" on top-of-tree.

Change error message to better match llvm_unreachable() grammar.

Don't call llvm_unreachable() when writing error messages to a file, but keep going.

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

15 years agoLift addAssemblyEmitter into LLVMTargetMachine.
Daniel Dunbar [Wed, 15 Jul 2009 23:34:19 +0000 (23:34 +0000)]
Lift addAssemblyEmitter into LLVMTargetMachine.
 - No functionality change.

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

15 years agoFix this comment to mention outs() rather than cout.
Dan Gohman [Wed, 15 Jul 2009 23:33:14 +0000 (23:33 +0000)]
Fix this comment to mention outs() rather than cout.

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

15 years agoChange raw_ostream so that it doesn't call llvm_report_error
Dan Gohman [Wed, 15 Jul 2009 23:25:33 +0000 (23:25 +0000)]
Change raw_ostream so that it doesn't call llvm_report_error
immediately on every output error. Instead, add a flag to
raw_ostream, and set the flag whenever an error is detected.

The flag can be queried and cleared from the public API. This
gives applications more flexibility to handling errors in
application-specific ways.

If the flag is not cleared when the raw_ostream is destructed,
llvm_report_error is called from the destructor. This ensures
that errors are not implicitly silenced, and provides
convenient default behavior for tools like llc and opt.
Clients wishing to avoid llvm_report_error calls from
raw_ostream should check for errors and clear the error flag.

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

15 years agoRegister AsmPrinter for XCore, MSP430, and PIC16 targets.
Daniel Dunbar [Wed, 15 Jul 2009 23:17:20 +0000 (23:17 +0000)]
Register AsmPrinter for XCore, MSP430, and PIC16 targets.
 - Switch to standard addAssemblyEmitter logic.

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

15 years agoAdd an LLVMContext to Type, hardwired to the global context until Type uniquing is...
Owen Anderson [Wed, 15 Jul 2009 22:50:23 +0000 (22:50 +0000)]
Add an LLVMContext to Type, hardwired to the global context until Type uniquing is moved on the contexts themselves.

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

15 years agoSwitch invars away from using isTrapping when it really shouldn't be
Eli Friedman [Wed, 15 Jul 2009 22:48:29 +0000 (22:48 +0000)]
Switch invars away from using isTrapping when it really shouldn't be
using it.

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

15 years agoClean up some comments.
Bob Wilson [Wed, 15 Jul 2009 22:43:51 +0000 (22:43 +0000)]
Clean up some comments.

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

15 years agoLift DumpAsm / -print-emitted-asm functionality into LLVMTargetMachine.
Daniel Dunbar [Wed, 15 Jul 2009 22:33:19 +0000 (22:33 +0000)]
Lift DumpAsm / -print-emitted-asm functionality into LLVMTargetMachine.
 - No intended functionality change.

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

15 years agoFix bug in RegScavenger::scavengeRegister().
Jakob Stoklund Olesen [Wed, 15 Jul 2009 22:32:11 +0000 (22:32 +0000)]
Fix bug in RegScavenger::scavengeRegister().

Reserved registers are not candidates for scavenging, and they were removed
from the candidate list like this:

CreateRegClassMask(RC, Candidates);
Candidates ^= ReservedRegs;

However, when there are reserved registers outside RC, this causes invalid
bits to be set in Candidates.

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