oota-llvm.git
13 years agoswitch MCSectionCOFF from a syntactic to semantic representation,
Chris Lattner [Fri, 7 May 2010 17:17:41 +0000 (17:17 +0000)]
switch MCSectionCOFF from a syntactic to semantic representation,
patch by Peter Housel!

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

13 years agoUpdate CMake build.
Ted Kremenek [Fri, 7 May 2010 17:13:20 +0000 (17:13 +0000)]
Update CMake build.

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

13 years agoCorrect some bogus target triples.
Duncan Sands [Fri, 7 May 2010 17:03:48 +0000 (17:03 +0000)]
Correct some bogus target triples.

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

13 years agoAdd some words to this output to indicate what the numbers mean.
Dan Gohman [Fri, 7 May 2010 16:39:27 +0000 (16:39 +0000)]
Add some words to this output to indicate what the numbers mean.

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

13 years agodon't pass -f to llc, it doesn't have it anymore. Patch by Kevin Fan (PR7090)
Chris Lattner [Fri, 7 May 2010 16:27:04 +0000 (16:27 +0000)]
don't pass -f to llc, it doesn't have it anymore.  Patch by Kevin Fan (PR7090)

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

13 years agoAdd a simple module-level debug info printer. It just sets up a
Dan Gohman [Fri, 7 May 2010 16:22:32 +0000 (16:22 +0000)]
Add a simple module-level debug info printer. It just sets up a
DebugInfoFinder and iterates over all the contents calling print.

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

13 years agoFix the new print functions to call print instead of dump.
Dan Gohman [Fri, 7 May 2010 16:17:22 +0000 (16:17 +0000)]
Fix the new print functions to call print instead of dump.

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

13 years agoAdd an LLVM IR version of code sinking. This uses the same simple algorithm
Dan Gohman [Fri, 7 May 2010 15:40:13 +0000 (15:40 +0000)]
Add an LLVM IR version of code sinking. This uses the same simple algorithm
as MachineSink, but it isn't constrained by MachineInstr-level details.

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

13 years agoConst-ify some stuff.
Dan Gohman [Fri, 7 May 2010 15:36:10 +0000 (15:36 +0000)]
Const-ify some stuff.

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

13 years agoConvert the DebugInfo classes dump() methods into print(raw_ostream &)
Dan Gohman [Fri, 7 May 2010 15:30:29 +0000 (15:30 +0000)]
Convert the DebugInfo classes dump() methods into print(raw_ostream &)
methods, and add dump functions implemented in terms of the print.

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

13 years agoDocument graphviz passes for the (post) dominator tree.
Tobias Grosser [Fri, 7 May 2010 09:33:18 +0000 (09:33 +0000)]
Document graphviz passes for the (post) dominator tree.

Add documentation for:
  -dot-dom
  -dot-dom-only
  -dot-postdom
  -dot-postdom-only
  -view-dom
  -view-dom-only
  -view-postdom
  -view-postdom-only

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

13 years agoUse VLD2q32 / VST2q32 to reload / spill QQ (pair of Q) registers when stack slot...
Evan Cheng [Fri, 7 May 2010 02:04:02 +0000 (02:04 +0000)]
Use VLD2q32 / VST2q32 to reload / spill QQ (pair of Q) registers when stack slot is sufficiently aligned. Use VLDMD / VSTMD otherwise.

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

13 years agoUse VSTMD / VLDMD for spills and reloads of Q registers instead of VSTMQ / VLDQ....
Evan Cheng [Fri, 7 May 2010 01:54:08 +0000 (01:54 +0000)]
Use VSTMD / VLDMD for spills and reloads of Q registers instead of VSTMQ / VLDQ. The later are aliases which ought to be eliminated but we can't because they are used for storing and loading v2f64 values.

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

13 years agoRevert r103133 and add testcase from PR7066.
Nick Lewycky [Fri, 7 May 2010 01:45:38 +0000 (01:45 +0000)]
Revert r103133 and add testcase from PR7066.

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

13 years agoWhen rematerializing, use the debug location of the original
Dan Gohman [Fri, 7 May 2010 01:28:10 +0000 (01:28 +0000)]
When rematerializing, use the debug location of the original
instruction, rather than a location near where the new instruction
is being inserted.

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

13 years agoAdjust tests affected by llvm-gcc 103229.
Dale Johannesen [Fri, 7 May 2010 01:11:31 +0000 (01:11 +0000)]
Adjust tests affected by llvm-gcc 103229.
All results here match gcc-4.2.

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

13 years agoTransfer debug location information from PHI nodes to resulting
Dan Gohman [Fri, 7 May 2010 01:10:20 +0000 (01:10 +0000)]
Transfer debug location information from PHI nodes to resulting
lowered copies.

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

13 years agoPrint debug information for SDNodes.
Dan Gohman [Fri, 7 May 2010 01:09:21 +0000 (01:09 +0000)]
Print debug information for SDNodes.

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

13 years agoDisable the new unknown-location code for now. It causes a major
Dan Gohman [Fri, 7 May 2010 01:08:53 +0000 (01:08 +0000)]
Disable the new unknown-location code for now. It causes a major
increase in the debug line info section, and it's causing
regressions in a gdb testsuite.

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

13 years agoRevert r103213. It broke several sections of live website.
mike-m [Fri, 7 May 2010 00:28:04 +0000 (00:28 +0000)]
Revert r103213. It broke several sections of live website.

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

13 years agoRemove VLD1q and VST1q for reloading and spilling Q registers. Just use VLD1q64 ...
Evan Cheng [Fri, 7 May 2010 00:24:52 +0000 (00:24 +0000)]
Remove VLD1q and VST1q for reloading and spilling Q registers. Just use VLD1q64 / VST1q64 and reference sub-registers.

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

13 years agoDisable man->postscript and man->pdf doc generation unless explicitly
mike-m [Fri, 7 May 2010 00:13:23 +0000 (00:13 +0000)]
Disable man->postscript and man->pdf doc generation unless explicitly
configured via --enable-doxygen. It seems some systems have broken pdfroff
so automatic use of it is not safe.

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

13 years agoCleanup unneeded dirs after docs overhaul.
mike-m [Thu, 6 May 2010 23:48:37 +0000 (23:48 +0000)]
Cleanup unneeded dirs after docs overhaul.

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

13 years agoOverhauled llvm/clang docs builds. Closes PR6613.
mike-m [Thu, 6 May 2010 23:45:43 +0000 (23:45 +0000)]
Overhauled llvm/clang docs builds. Closes PR6613.

NOTE: 2nd part changeset for cfe trunk to follow.

*** PRE-PATCH ISSUES ADDRESSED

- clang api docs fail build from objdir
- clang/llvm api docs collide in install PREFIX/
- clang/llvm main docs collide in install
- clang/llvm main docs have full of hard coded destination
  assumptions and make use of absolute root in static html files;
  namely CommandGuide tools hard codes a website destination
  for cross references and some html cross references assume
  website root paths

*** IMPROVEMENTS

- bumped Doxygen from 1.4.x -> 1.6.3
- splits llvm/clang docs into 'main' and 'api' (doxygen) build trees
- provide consistent, reliable doc builds for both main+api docs
- support buid vs. install vs. website intentions
- support objdir builds
- document targets with 'make help'
- correct clean and uninstall operations
- use recursive dir delete only where absolutely necessary
- added call function fn.RMRF which safeguards against botched 'rm -rf';
  if any target (or any variable is evaluated) which attempts
  to remove any dirs which match a hard-coded 'safelist', a verbose
  error will be printed and make will error-stop.

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

13 years agoMC/X86: X86AbsMemAsmOperand is subclass of X86NoSegMemAsmOperand.
Daniel Dunbar [Thu, 6 May 2010 22:39:14 +0000 (22:39 +0000)]
MC/X86: X86AbsMemAsmOperand is subclass of X86NoSegMemAsmOperand.
 - This fixes "leal 0, %eax", for example.

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

13 years agofix rdar://7947167 - llvm-mc doesn't match movsq
Chris Lattner [Thu, 6 May 2010 21:48:14 +0000 (21:48 +0000)]
fix rdar://7947167 - llvm-mc doesn't match movsq

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

13 years agoEliminated the classification of control registers into %ecr_
Sean Callanan [Thu, 6 May 2010 20:59:00 +0000 (20:59 +0000)]
Eliminated the classification of control registers into %ecr_
and %rcr_, leaving just %cr_ which is what people expect.
Updated the disassembler to support this unified register set.
Added a testcase to verify that the registers continue to be
decoded correctly.

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

13 years agoMC/X86: Error out if we see a non-constant FK_Data_1 or FK_Data_2 fixup, since
Daniel Dunbar [Thu, 6 May 2010 20:34:01 +0000 (20:34 +0000)]
MC/X86: Error out if we see a non-constant FK_Data_1 or FK_Data_2 fixup, since
we don't currently support relaxing them.

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

13 years agoAdd a DebugLoc argument to TargetInstrInfo::copyRegToReg, so that it
Dan Gohman [Thu, 6 May 2010 20:33:48 +0000 (20:33 +0000)]
Add a DebugLoc argument to TargetInstrInfo::copyRegToReg, so that it
doesn't have to guess.

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

13 years agoAdd argument TargetRegisterInfo to loadRegFromStackSlot and storeRegToStackSlot.
Evan Cheng [Thu, 6 May 2010 19:06:44 +0000 (19:06 +0000)]
Add argument TargetRegisterInfo to loadRegFromStackSlot and storeRegToStackSlot.

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

13 years agoAdd a testcase for r103135, explicitly representing unknown
Dan Gohman [Thu, 6 May 2010 17:49:17 +0000 (17:49 +0000)]
Add a testcase for r103135, explicitly representing unknown
locations in debug line info.

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

13 years ago80 col violation.
Evan Cheng [Thu, 6 May 2010 16:33:12 +0000 (16:33 +0000)]
80 col violation.

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

13 years agoFix handling of unreachable blocks in the SSAUpdater. The previous code only
Bob Wilson [Thu, 6 May 2010 16:24:11 +0000 (16:24 +0000)]
Fix handling of unreachable blocks in the SSAUpdater.  The previous code only
handled cases where a block had zero predecessors, but failed to detect other
cases like loops with no entries.  The SSAUpdater is already doing a forward
traversal through the blocks, so it is not hard to identify the blocks that
were never reached on that traversal.  This fixes the crash for ppc on the
stepanov_vector test.

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

13 years agoAdd a missing break statement to fix unintentional fall-through
Bob Wilson [Thu, 6 May 2010 16:05:26 +0000 (16:05 +0000)]
Add a missing break statement to fix unintentional fall-through
(replacing the previous patch for the same issue).

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

13 years agoFix unintentional fallthrough. Patch by Edmund Grimley-Evans <Edmund.Grimley-Evans...
Jim Grosbach [Thu, 6 May 2010 15:32:49 +0000 (15:32 +0000)]
Fix unintentional fallthrough. Patch by Edmund Grimley-Evans <Edmund.Grimley-Evans@arm.com>

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

13 years agoFix "warning: extra ';' inside a struct or union" when building llvm with clang
Shantonu Sen [Thu, 6 May 2010 14:57:47 +0000 (14:57 +0000)]
Fix "warning: extra ';' inside a struct or union" when building llvm with clang

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

13 years agoRevert r103137, fix for $ in labels. It looks like we can't actually handle this
Daniel Dunbar [Thu, 6 May 2010 14:46:38 +0000 (14:46 +0000)]
Revert r103137, fix for $ in labels. It looks like we can't actually handle this
at the token level. Consider the following horrible test case:

  a = 1
  .globl $a
  movl ($a), %eax
  movl $a, %eax
  movl $$a, %eax

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

13 years agoRe-apply 103156 and 103157. 103156 didn't break anything. 10315 exposed a coalescer...
Evan Cheng [Thu, 6 May 2010 06:36:08 +0000 (06:36 +0000)]
Re-apply 103156 and 103157. 103156 didn't break anything. 10315 exposed a coalescer bug that's fixed by 103170.

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

13 years agoFixes a coalescer bug that caused llc to crash on 2009-11-30-LiveVariablesBug.ll
Evan Cheng [Thu, 6 May 2010 06:23:31 +0000 (06:23 +0000)]
Fixes a coalescer bug that caused llc to crash on 2009-11-30-LiveVariablesBug.ll
with the fix in 103157.

%reg1039:1<def> = VMOVS %S1<kill>, pred:14, pred:%reg0
is not coalescable since none of the super-registers of S1 are in reg1039's
register class: DPR_VFP2. But it is still a legal copy instruction so it should
not assert.

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

13 years agoFix some stylistic issues with my last commit.
Sean Hunt [Thu, 6 May 2010 05:24:38 +0000 (05:24 +0000)]
Fix some stylistic issues with my last commit.

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

13 years agoRevert r103157, which broke test/CodeGen/ARM/2009-11-30-LiveVariablesBug.ll.
Dan Gohman [Thu, 6 May 2010 05:08:57 +0000 (05:08 +0000)]
Revert r103157, which broke test/CodeGen/ARM/2009-11-30-LiveVariablesBug.ll.

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

13 years agoRevert r103156 since it was breaking the build bots.
Eric Christopher [Thu, 6 May 2010 02:29:06 +0000 (02:29 +0000)]
Revert r103156 since it was breaking the build bots.

   Reverse-merging r103156 into '.':
U    lib/Target/ARM/ARMInstrNEON.td
U    lib/Target/ARM/ARMRegisterInfo.h
U    lib/Target/ARM/ARMBaseRegisterInfo.cpp
U    lib/Target/ARM/ARMBaseInstrInfo.cpp
U    lib/Target/ARM/ARMRegisterInfo.td

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

13 years agoHandle the case where open(2) or close(2) is interrupted by a signal when
Dan Gohman [Thu, 6 May 2010 02:06:20 +0000 (02:06 +0000)]
Handle the case where open(2) or close(2) is interrupted by a signal when
automatic syscall restarting is disabled.

Also, fix the build on systems which don't define EWOULDBLOCK.

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

13 years agoFix an obvious bug in isMoveInstr. It needs to return sub-register indices.
Evan Cheng [Thu, 6 May 2010 01:54:03 +0000 (01:54 +0000)]
Fix an obvious bug in isMoveInstr. It needs to return sub-register indices.

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

13 years agoAdding pseudo 256-bit registers QQ0 . . . QQ7 to represent pairs of Q registers....
Evan Cheng [Thu, 6 May 2010 01:52:03 +0000 (01:52 +0000)]
Adding pseudo 256-bit registers QQ0 . . . QQ7 to represent pairs of Q registers. These will be used to model VLD2 / VST2 instructions in order to get substantially better codegen for them.

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

13 years agoCosmetic changes.
Evan Cheng [Thu, 6 May 2010 01:34:11 +0000 (01:34 +0000)]
Cosmetic changes.

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

13 years agostoreRegToStackSlot has forgotten about QPR_8 register class.
Evan Cheng [Thu, 6 May 2010 01:32:54 +0000 (01:32 +0000)]
storeRegToStackSlot has forgotten about QPR_8 register class.

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

13 years agoHandle EWOULDBLOCK as EAGAIN. And add a comment explaining why
Dan Gohman [Thu, 6 May 2010 01:27:36 +0000 (01:27 +0000)]
Handle EWOULDBLOCK as EAGAIN. And add a comment explaining why
EAGAIN and EWOULDBLOCK are used here.

Also, handle the case where a write call is interrupted after
some data has already been written.

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

13 years agomake -filetype=obj default to emitting its output to foo.obj
Chris Lattner [Thu, 6 May 2010 00:54:20 +0000 (00:54 +0000)]
make -filetype=obj default to emitting its output to foo.obj
when on windows instead of foo.o.  Patch by Nathan Jeffords!

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

13 years agoUpdate LabelsBeforeInsn also, when creating unknown-position labels.
Dan Gohman [Thu, 6 May 2010 00:29:41 +0000 (00:29 +0000)]
Update LabelsBeforeInsn also, when creating unknown-position labels.

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

13 years agoFix PR7054 - Assertion `Symbol->isUndefined() && "Cannot define a symbol twice!"...
Chris Lattner [Thu, 6 May 2010 00:05:37 +0000 (00:05 +0000)]
Fix PR7054 - Assertion `Symbol->isUndefined() && "Cannot define a symbol twice!"' failed.

Users can write broken code that emits the same label twice with asm renaming,
detect this and emit a fatal backend error instead of aborting.

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

13 years agoIn bottom-up mode, defer the materialization of local constant values.
Dan Gohman [Thu, 6 May 2010 00:02:14 +0000 (00:02 +0000)]
In bottom-up mode, defer the materialization of local constant values.

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

13 years agoAdd an "IsBottomUp" member function to FastISel, which will be used to
Dan Gohman [Wed, 5 May 2010 23:58:35 +0000 (23:58 +0000)]
Add an "IsBottomUp" member function to FastISel, which will be used to
support a new bottom-up mode.

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

13 years agofix rdar://7946934 - in some limited cases, the assembler should
Chris Lattner [Wed, 5 May 2010 23:51:28 +0000 (23:51 +0000)]
fix rdar://7946934 - in some limited cases, the assembler should
allow $ at the start of a symbol name.

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

13 years agoCleanup of ARMv7M support. Move hardware divide and Thumb2 extract/pack
Jim Grosbach [Wed, 5 May 2010 23:44:43 +0000 (23:44 +0000)]
Cleanup of ARMv7M support. Move hardware divide and Thumb2 extract/pack
instructions to subtarget features and update tests to reflect.
PR5717.

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

13 years agoEmit debug info for MachineInstrs with unknown debug locations, instead
Dan Gohman [Wed, 5 May 2010 23:41:32 +0000 (23:41 +0000)]
Emit debug info for MachineInstrs with unknown debug locations, instead
of just letting them inherit the debug locations of adjacent instructions.

Debug info should aim to be either accurate or absent.

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

13 years agoFix some ..'s
Chris Lattner [Wed, 5 May 2010 23:29:09 +0000 (23:29 +0000)]
Fix some ..'s

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

13 years agoFix PR6520. An earlyclobber physreg must not be allocated to anything else.
Jakob Stoklund Olesen [Wed, 5 May 2010 23:07:41 +0000 (23:07 +0000)]
Fix PR6520. An earlyclobber physreg must not be allocated to anything else.

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

13 years agoTest case for pr2394 and r102979.
Stuart Hastings [Wed, 5 May 2010 22:49:33 +0000 (22:49 +0000)]
Test case for pr2394 and r102979.

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

13 years agoFixed a sign-extension bug in the X86 disassembler
Sean Callanan [Wed, 5 May 2010 22:47:27 +0000 (22:47 +0000)]
Fixed a sign-extension bug in the X86 disassembler
that was causing PC-relative branch targets to be
evaluated incorrectly.  Also added support for
checking operand values to the llvm-mc tester.

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

13 years agoUse getValue() for PHINodes when direct NodeMap access does not work.
Devang Patel [Wed, 5 May 2010 22:29:00 +0000 (22:29 +0000)]
Use getValue() for PHINodes when direct NodeMap access does not work.

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

13 years agoSelect an ARM-hosted cross build with a separate makefile target instead of
Bob Wilson [Wed, 5 May 2010 22:22:40 +0000 (22:22 +0000)]
Select an ARM-hosted cross build with a separate makefile target instead of
a magic project name.

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

13 years agoDo not pre-allocate references of D registers pairs if they are extracted from the...
Evan Cheng [Wed, 5 May 2010 22:15:40 +0000 (22:15 +0000)]
Do not pre-allocate references of D registers pairs if they are extracted from the same Q register and are in the right order.

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

13 years agofix copy/paste oops.
Jim Grosbach [Wed, 5 May 2010 21:07:46 +0000 (21:07 +0000)]
fix copy/paste oops.

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

13 years agoNo-ops emitted for scheduling don't correspond with anything in the
Dan Gohman [Wed, 5 May 2010 20:58:01 +0000 (20:58 +0000)]
No-ops emitted for scheduling don't correspond with anything in the
user's source, so don't arbitrarily assign them a debug location.

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

13 years agoAdd tests for ARMV7M divide instruction use
Jim Grosbach [Wed, 5 May 2010 20:47:15 +0000 (20:47 +0000)]
Add tests for ARMV7M divide instruction use

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

13 years agoAdd initial support for ARMv7M subtarget and cortex-m3 cpu. Patch by
Jim Grosbach [Wed, 5 May 2010 20:44:35 +0000 (20:44 +0000)]
Add initial support for ARMv7M subtarget and cortex-m3 cpu. Patch by
Jordy <snhjordy@gmail.com>.

Followup patches will add some tests and adjust to use Subtarget features
for the instructions.

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

13 years agoUse the right version of "append" to combine two SmallVectors.
Bob Wilson [Wed, 5 May 2010 20:44:15 +0000 (20:44 +0000)]
Use the right version of "append" to combine two SmallVectors.
This fixes the compile-time regressions seen in last night's tests.

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

13 years agoremove unneeded underscores.
Jim Grosbach [Wed, 5 May 2010 19:55:58 +0000 (19:55 +0000)]
remove unneeded underscores.

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

13 years agoConvert to filecheck
Jim Grosbach [Wed, 5 May 2010 19:41:11 +0000 (19:41 +0000)]
Convert to filecheck

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

13 years agoMC/Mach-O: Mark absolute variable's appropriately, and add Mach-O support for
Daniel Dunbar [Wed, 5 May 2010 19:01:05 +0000 (19:01 +0000)]
MC/Mach-O: Mark absolute variable's appropriately, and add Mach-O support for
writing them.
 - <rdar://problem/7885351> integrated assembler broken for i386 objc code

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

13 years agoMC: Reject attempts to define a variable symbol.
Daniel Dunbar [Wed, 5 May 2010 19:01:00 +0000 (19:01 +0000)]
MC: Reject attempts to define a variable symbol.

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

13 years agoMC: Make setVariableValue check the redefinition condition a bit more strongly.
Daniel Dunbar [Wed, 5 May 2010 19:00:56 +0000 (19:00 +0000)]
MC: Make setVariableValue check the redefinition condition a bit more strongly.

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

13 years agoMove REG_SEQUENCE removal to 2addr pass.
Evan Cheng [Wed, 5 May 2010 18:45:40 +0000 (18:45 +0000)]
Move REG_SEQUENCE removal to 2addr pass.

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

13 years agoImplement rdar://7415680 - Twine integer support lacks greatness
Chris Lattner [Wed, 5 May 2010 18:40:33 +0000 (18:40 +0000)]
Implement rdar://7415680 - Twine integer support lacks greatness

Microoptimize Twine's with unsigned and int to not pin their value to
the stack.  This saves stack space in common cases and allows mem2reg
in the caller.  A simple example is:

void foo(const Twine &);
void bar(int x) {
  foo("xyz: " + Twine(x));
}

Before:

__Z3bari:
subq $40, %rsp
movl %edi, 36(%rsp)
leaq L_.str3(%rip), %rax
leaq 36(%rsp), %rcx
leaq 8(%rsp), %rdi
movq %rax, 8(%rsp)
movq %rcx, 16(%rsp)
movb $3, 24(%rsp)
movb $7, 25(%rsp)
callq __Z3fooRKN4llvm5TwineE
addq $40, %rsp
ret

After:

__Z3bari:
subq $24, %rsp
leaq L_.str3(%rip), %rax
movq %rax, (%rsp)
movslq %edi, %rax
movq %rax, 8(%rsp)
movb $3, 16(%rsp)
movb $7, 17(%rsp)
leaq (%rsp), %rdi
callq __Z3fooRKN4llvm5TwineE
addq $24, %rsp
ret

It saves 16 bytes of stack and one instruction in this case.

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

13 years agoRearrange the suppressions files to be by-architecture instead of by-problem.
Jeffrey Yasskin [Wed, 5 May 2010 18:39:16 +0000 (18:39 +0000)]
Rearrange the suppressions files to be by-architecture instead of by-problem.
ddunbar says the gcc-4.3.3 suppressions are obsolete.

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

13 years agoModel CONCAT_VECTORS of two 64-bit values as a REG_SEQUENCE.
Evan Cheng [Wed, 5 May 2010 18:28:36 +0000 (18:28 +0000)]
Model CONCAT_VECTORS of two 64-bit values as a REG_SEQUENCE.

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

13 years agoTrim include.
Evan Cheng [Wed, 5 May 2010 18:27:57 +0000 (18:27 +0000)]
Trim include.

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

13 years agoTeach liveintervalanalysis about virtual registers which are defined by reg_sequence...
Evan Cheng [Wed, 5 May 2010 18:27:40 +0000 (18:27 +0000)]
Teach liveintervalanalysis about virtual registers which are defined by reg_sequence instructions that are formed by registers defined by distinct instructions. e.g.
80      %reg1041:6<def> = VSHRNv4i16 %reg1034<kill>, 12, pred:14, pred:%reg0
. . .
120     %reg1041:5<def> = VSHRNv4i16 %reg1039<kill>, 12, pred:14, pred:%reg0

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

13 years agoAdd a suppressions file for an intermittent "leak" under RegisterPass.
Jeffrey Yasskin [Wed, 5 May 2010 18:15:26 +0000 (18:15 +0000)]
Add a suppressions file for an intermittent "leak" under RegisterPass.

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

13 years agoMC: Rename MCSymbol::{g,s}etValue -> MCSymbol::{g,s}etVariableValue.
Daniel Dunbar [Wed, 5 May 2010 17:41:00 +0000 (17:41 +0000)]
MC: Rename MCSymbol::{g,s}etValue -> MCSymbol::{g,s}etVariableValue.

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

13 years agoMC/Mach-O/x86_64: Relocations in debug sections should use local relocations
Daniel Dunbar [Wed, 5 May 2010 17:22:39 +0000 (17:22 +0000)]
MC/Mach-O/x86_64: Relocations in debug sections should use local relocations
when possible.
 - <rdar://problem/7934873>

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

13 years agolit: Allow test_format to be None.
Daniel Dunbar [Wed, 5 May 2010 17:22:35 +0000 (17:22 +0000)]
lit: Allow test_format to be None.

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

13 years agoTry again if write(2) reports an recoverable error.
Benjamin Kramer [Wed, 5 May 2010 15:17:47 +0000 (15:17 +0000)]
Try again if write(2) reports an recoverable error.

This should fix mysteriously crashing boost regression tests when stderr is
managed by bjam (PR7043).

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

13 years agoAdd newline to end of file to avoid warning
Shantonu Sen [Wed, 5 May 2010 13:56:46 +0000 (13:56 +0000)]
Add newline to end of file to avoid warning
when building llvm with clang

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

13 years agoRevert 102941, we're going to do this via attr and can just
Eric Christopher [Wed, 5 May 2010 07:35:59 +0000 (07:35 +0000)]
Revert 102941, we're going to do this via attr and can just
hack the code to turn it off when debugging.

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

13 years agoInclude the right header for toupper
Sean Hunt [Wed, 5 May 2010 04:31:44 +0000 (04:31 +0000)]
Include the right header for toupper

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

13 years agoAdd an emitter to handle the list of clang statement nodes.
Sean Hunt [Wed, 5 May 2010 04:13:08 +0000 (04:13 +0000)]
Add an emitter to handle the list of clang statement nodes.

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

13 years agoCombine the implementations of the core part of the SSAUpdater and
Bob Wilson [Tue, 4 May 2010 23:18:19 +0000 (23:18 +0000)]
Combine the implementations of the core part of the SSAUpdater and
MachineSSAUpdater to avoid duplicating all the code.

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

13 years agoUpdate comment.
Eric Christopher [Tue, 4 May 2010 22:13:03 +0000 (22:13 +0000)]
Update comment.

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

13 years agoadd the ability to associate 'category' names with clang diagnostics
Chris Lattner [Tue, 4 May 2010 20:44:23 +0000 (20:44 +0000)]
add the ability to associate 'category' names with clang diagnostics
and diagnostic groups.  This allows the compiler to group
diagnostics together (e.g. "Logic Warning",
"Format String Warning", etc) like the static analyzer does.
This is not exposed through anything in the compiler yet.

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

13 years agoWith -neon-reg-sequence, models forming a Q register from a pair of consecutive D...
Evan Cheng [Tue, 4 May 2010 20:39:49 +0000 (20:39 +0000)]
With -neon-reg-sequence, models forming a Q register from a pair of consecutive D registers as a REG_SEQUENCE.

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

13 years agoDo not pre-allocate for registers which form a REG_SEQUENCE.
Evan Cheng [Tue, 4 May 2010 20:38:12 +0000 (20:38 +0000)]
Do not pre-allocate for registers which form a REG_SEQUENCE.

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

13 years agoTeach PHI elimination to remove REG_SEQUENCE instructions and update references of...
Evan Cheng [Tue, 4 May 2010 20:26:52 +0000 (20:26 +0000)]
Teach PHI elimination to remove REG_SEQUENCE instructions and update references of the source operands with references of the destination with subreg indices. e.g.
%reg1029<def>, %reg1030<def> = VLD1q16 %reg1024<kill>, ...
%reg1031<def> = REG_SEQUENCE %reg1029<kill>, 5, %reg1030<kill>, 6
=>
%reg1031:5<def>, %reg1031:6<def> = VLD1q16 %reg1024<kill>, ...

PHI elimination now does more than phi elimination. It is really a de-SSA pass.

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

13 years agoUse llvm.foo as the intrinsic, rather than llvm.dbg.value. Since the
Duncan Sands [Tue, 4 May 2010 20:09:25 +0000 (20:09 +0000)]
Use llvm.foo as the intrinsic, rather than llvm.dbg.value.  Since the
values passed to llvm.dbg.value were not valid for the intrinsic, it
might have caused trouble one day if the verifier ever started checking
for valid debug info.

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

13 years agoDefer adding critical edges to the "toSplit" list until after checking for
Bob Wilson [Tue, 4 May 2010 20:03:21 +0000 (20:03 +0000)]
Defer adding critical edges to the "toSplit" list until after checking for
indirect branches in all the predecessors.  This avoids unnecessarily
splitting edges in cases where load PRE is not possible anyway.
Thanks to Jakub Staszak for pointing this out.

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

14 years agoone more thing.
Chris Lattner [Tue, 4 May 2010 18:16:00 +0000 (18:16 +0000)]
one more thing.

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

14 years agoupdate instructions for llvm-gcc4, the brave new world! PR7037
Chris Lattner [Tue, 4 May 2010 18:15:33 +0000 (18:15 +0000)]
update instructions for llvm-gcc4, the brave new world!  PR7037

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

14 years ago"on the rare occasion the SPU BE produces illegal assembly - it tries to emit an...
Chris Lattner [Tue, 4 May 2010 17:58:46 +0000 (17:58 +0000)]
"on the rare occasion the SPU BE produces illegal assembly - it tries to emit an add instruction of the form 'a reg, reg, imm'."

Patch by Kalle Raiskila!

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

14 years agoMC/X86: Chris pointed that 'as' isn't consistent in accepting the long form of
Daniel Dunbar [Tue, 4 May 2010 17:31:02 +0000 (17:31 +0000)]
MC/X86: Chris pointed that 'as' isn't consistent in accepting the long form of
instructions which have no direct register usage.

Darwin 'as' accepts:
  add $0, (%rax)
but rejects
  mov $0, (%rax)
for example.

Given that, only accept suffix matches which match exactly one form. We still
need to emit nice diagnostics for failures...

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