oota-llvm.git
15 years agoSelectionDAGISel no longer needs to check hasAvailableExternallyLinkage,
Dan Gohman [Sat, 1 Aug 2009 00:42:23 +0000 (00:42 +0000)]
SelectionDAGISel no longer needs to check hasAvailableExternallyLinkage,
as it is now a MachineFunctionPass, and MachineFunctionPass now handles
this.

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

15 years agoMake UnreachableMachineBlockElim preserve MachineDominatorTree and
Dan Gohman [Sat, 1 Aug 2009 00:34:30 +0000 (00:34 +0000)]
Make UnreachableMachineBlockElim preserve MachineDominatorTree and
MachineLoopInfo.

llc now runs MachineLoopInfo and MachineDominatorTree only twice, instead
of three times.

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

15 years agoThe X86 maximal stack alignment calculator preserves the CFG. Also,
Dan Gohman [Sat, 1 Aug 2009 00:31:02 +0000 (00:31 +0000)]
The X86 maximal stack alignment calculator preserves the CFG. Also,
be more careful about the return value of runOnMachineFunction.

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

15 years agoX86 floating-point passes don't modify the CFG.
Dan Gohman [Sat, 1 Aug 2009 00:26:16 +0000 (00:26 +0000)]
X86 floating-point passes don't modify the CFG.

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

15 years agoFix Thumb2 function call isel. Thumb1 and Thumb2 should share the same
Evan Cheng [Sat, 1 Aug 2009 00:16:10 +0000 (00:16 +0000)]
Fix Thumb2 function call isel. Thumb1 and Thumb2 should share the same
instructions for calls since BL and BLX are always 32-bit long and BX is always
16-bit long.

Also, we should be using BLX to call external function stubs.

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

15 years agoUse setPreservesAll in X86CodeEmitter.
Dan Gohman [Fri, 31 Jul 2009 23:44:16 +0000 (23:44 +0000)]
Use setPreservesAll in X86CodeEmitter.

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

15 years agoUse setPreservesAll and setPreservesCFG in CodeGen passes.
Dan Gohman [Fri, 31 Jul 2009 23:37:33 +0000 (23:37 +0000)]
Use setPreservesAll and setPreservesCFG in CodeGen passes.

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

15 years agoSelectionDAGISel does not "preserve all", since it makes lots of changes
Dan Gohman [Fri, 31 Jul 2009 23:36:22 +0000 (23:36 +0000)]
SelectionDAGISel does not "preserve all", since it makes lots of changes
to the MachineFunction.

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

15 years agoUse a range insert instead of an explicit loop.
Dan Gohman [Fri, 31 Jul 2009 23:36:06 +0000 (23:36 +0000)]
Use a range insert instead of an explicit loop.

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

15 years agollvm-mc: Add -triple, and fix some typos
Daniel Dunbar [Fri, 31 Jul 2009 23:13:12 +0000 (23:13 +0000)]
llvm-mc: Add -triple, and fix some typos

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

15 years agollvm-mc: Fix .s output to quote section & symbol names when necessary.
Daniel Dunbar [Fri, 31 Jul 2009 23:04:32 +0000 (23:04 +0000)]
llvm-mc: Fix .s output to quote section & symbol names when necessary.

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

15 years agoPrivatize all but one of the remaining constant tables.
Owen Anderson [Fri, 31 Jul 2009 22:45:43 +0000 (22:45 +0000)]
Privatize all but one of the remaining constant tables.

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

15 years agoAllow target intrinsics that return multiple values, i.e., struct types,
Bob Wilson [Fri, 31 Jul 2009 22:41:21 +0000 (22:41 +0000)]
Allow target intrinsics that return multiple values, i.e., struct types,
in SelectionDAGLowering::visitTargetIntrinsic.

This removes a bit of special-case code for vector types.  After staring
at it for a while, I managed to convince myself that it is not necessary.
The only case where TLI.getValueType() differs from MVT::getMVT is for iPTR,
so this code could potentially make a difference for a vector of pointers.
But, it looks like that is not supported.  Calling TLI.getValueType() on
a vector of pointers leads to the following sequence of calls:

TargetLowering::getValueType
MVT::getMVT
MVT::getVectorVT(iPTR, num elements)
MVT::getExtendedVectorVT
MVT::getTypeForMVT for iPTR
assertion fails "Type is not extended!"

So, unless I'm really missing something, this bit of code is irrelevant to
the current version of LLVM, which is consistent with the fact that I don't
see this code in other similar places.

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

15 years agoAdd a warning.
Mikhail Glushenkov [Fri, 31 Jul 2009 22:24:20 +0000 (22:24 +0000)]
Add a warning.

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

15 years agollvm-mc: A few more parsing / match tweaks.
Daniel Dunbar [Fri, 31 Jul 2009 22:22:54 +0000 (22:22 +0000)]
llvm-mc: A few more parsing / match tweaks.
 - Operands which are just a label should be parsed as immediates, not memory
   operands (from the assembler perspective).

 - Match a few more flavors of immediates.

 - Distinguish match functions for memory operands which don't take a segment
   register.

 - We match the .s for "hello world" now!

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

15 years agot2BR_JT is mov pc, it's 2 byte long, not 4.
Evan Cheng [Fri, 31 Jul 2009 22:22:22 +0000 (22:22 +0000)]
t2BR_JT is mov pc, it's 2 byte long, not 4.

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

15 years agoThumb2 movcc need .w suffix.
Evan Cheng [Fri, 31 Jul 2009 22:21:55 +0000 (22:21 +0000)]
Thumb2 movcc need .w suffix.

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

15 years agoadd some comments on how this is *supposed* to work. We don't
Chris Lattner [Fri, 31 Jul 2009 22:18:14 +0000 (22:18 +0000)]
add some comments on how this is *supposed* to work.  We don't
need the PreferredEHDataFormat hook, but I have yet-more refactoring to
do before I can zap it.

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

15 years agorearrange a conditional. Even if this weren't #if 0'd out, this would
Chris Lattner [Fri, 31 Jul 2009 22:03:47 +0000 (22:03 +0000)]
rearrange a conditional.  Even if this weren't #if 0'd out, this would
have no functionality change.

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

15 years agoSimplify operand padding by keying off tabs in the asm stream. If
David Greene [Fri, 31 Jul 2009 21:57:10 +0000 (21:57 +0000)]
Simplify operand padding by keying off tabs in the asm stream.  If
padding is disabled, tabs get replaced by spaces except in the case of
the first operand, where the tab is output to line up the operands after
the mnemonics.

Add some better comments and eliminate redundant code.

Fix some testcases to not assume tabs.

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

15 years agollvm-mc: Support quoted identifiers.
Daniel Dunbar [Fri, 31 Jul 2009 21:55:09 +0000 (21:55 +0000)]
llvm-mc: Support quoted identifiers.
 - Uses MCAsmToken::getIdentifier which returns the (sub)string representing the
   meaningfull contents a string or identifier token.

 - Directives aren't done yet.

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

15 years agoPreferredEHDataFormat is always call with data and global, but this whole
Chris Lattner [Fri, 31 Jul 2009 21:39:55 +0000 (21:39 +0000)]
PreferredEHDataFormat is always call with data and global, but this whole
thing is #if0'd out anyway.  Just simplify the code by reducing the interface.
Not deleting this is essential for Bill's continuing happiness.

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

15 years agoFix unit tests.
Owen Anderson [Fri, 31 Jul 2009 21:38:10 +0000 (21:38 +0000)]
Fix unit tests.

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

15 years agoMove the metadata constructors back to 2.5 syntax.
Owen Anderson [Fri, 31 Jul 2009 21:35:40 +0000 (21:35 +0000)]
Move the metadata constructors back to 2.5 syntax.

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

15 years agoUpdate unittest for LLVM API change.
Benjamin Kramer [Fri, 31 Jul 2009 20:56:31 +0000 (20:56 +0000)]
Update unittest for LLVM API change.

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

15 years agoLibCallAliasAnalysis doesn't use TargetData.
Dan Gohman [Fri, 31 Jul 2009 20:56:29 +0000 (20:56 +0000)]
LibCallAliasAnalysis doesn't use TargetData.

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

15 years agollvm-mc/X86: Sketch match functions for immediates and memory operands.
Daniel Dunbar [Fri, 31 Jul 2009 20:53:16 +0000 (20:53 +0000)]
llvm-mc/X86: Sketch match functions for immediates and memory operands.

Also, change scale value to always be 1 when unspecified to machine MachineInst
encoding.

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

15 years agoMake TargetData optional in MemoryDependenceAnalysis.
Dan Gohman [Fri, 31 Jul 2009 20:53:12 +0000 (20:53 +0000)]
Make TargetData optional in MemoryDependenceAnalysis.

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

15 years agomove emitUsedDirectiveFor to TargetLoweringObjectFile and rename it to
Chris Lattner [Fri, 31 Jul 2009 20:52:39 +0000 (20:52 +0000)]
move emitUsedDirectiveFor to TargetLoweringObjectFile and rename it to
indicate that it is a predicate, not an emitter.  This eliminates TAI
dependencies on Mangler and GlobalValue.

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

15 years agoRemove an unnecessary header.
Dan Gohman [Fri, 31 Jul 2009 20:47:45 +0000 (20:47 +0000)]
Remove an unnecessary header.

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

15 years agoremove the PPCLinuxTargetAsmInfo implementation of PreferredEHDataFormat,
Chris Lattner [Fri, 31 Jul 2009 20:43:26 +0000 (20:43 +0000)]
remove the PPCLinuxTargetAsmInfo implementation of PreferredEHDataFormat,
because it just calls the default impl.

Remove the PPCDarwinTargetAsmInfo version of PreferredEHDataFormat because
it just returns DW_EH_PE_absptr unless on 10.6.  However, 10.6 doesn't support
PPC, so the default impl is just fine.

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

15 years agoremove a pointless override.
Chris Lattner [Fri, 31 Jul 2009 20:36:15 +0000 (20:36 +0000)]
remove a pointless override.

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

15 years agoMove a few more APIs back to 2.5 forms. The only remaining ones left to change back are
Owen Anderson [Fri, 31 Jul 2009 20:28:14 +0000 (20:28 +0000)]
Move a few more APIs back to 2.5 forms.  The only remaining ones left to change back are
metadata related, which I'm waiting on to avoid conflicting with Devang.

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

15 years agoFix GVN's debug output, now that operator<< on Value* doesn't print
Dan Gohman [Fri, 31 Jul 2009 20:24:18 +0000 (20:24 +0000)]
Fix GVN's debug output, now that operator<< on Value* doesn't print
a trailing newline.

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

15 years agoWhitespace and 80-col cleanup.
Eric Christopher [Fri, 31 Jul 2009 20:07:27 +0000 (20:07 +0000)]
Whitespace and 80-col cleanup.

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

15 years ago- Convert the rest of the DOUTs to DEBUG+errs().
Bill Wendling [Fri, 31 Jul 2009 19:52:24 +0000 (19:52 +0000)]
- Convert the rest of the DOUTs to DEBUG+errs().
- One formatting change.

No intended functionality change.

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

15 years agoPR4662: Fix a crash introduced by the recent LLVMContext changes.
Eli Friedman [Fri, 31 Jul 2009 19:36:47 +0000 (19:36 +0000)]
PR4662: Fix a crash introduced by the recent LLVMContext changes.

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

15 years agoFix a typo in a comment.
Dan Gohman [Fri, 31 Jul 2009 19:26:54 +0000 (19:26 +0000)]
Fix a typo in a comment.

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

15 years agoAdjust unit test for the MCSection changes.
Benjamin Kramer [Fri, 31 Jul 2009 19:12:33 +0000 (19:12 +0000)]
Adjust unit test for the MCSection changes.

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

15 years agoDelete spurious semicolons.
Dan Gohman [Fri, 31 Jul 2009 18:59:29 +0000 (18:59 +0000)]
Delete spurious semicolons.

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

15 years agoFix build.
Benjamin Kramer [Fri, 31 Jul 2009 18:58:46 +0000 (18:58 +0000)]
Fix build.

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

15 years agoUpdate CMake files.
Ted Kremenek [Fri, 31 Jul 2009 18:50:22 +0000 (18:50 +0000)]
Update CMake files.

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

15 years agoswitch off of 'Section' onto MCSection. We're not properly using
Chris Lattner [Fri, 31 Jul 2009 18:48:30 +0000 (18:48 +0000)]
switch off of 'Section' onto MCSection.  We're not properly using
MCSection subclasses yet, but this is a step in the right direction.

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

15 years agoRemove Annotation.h, which is no longer used in the LLVM tree.
Dan Gohman [Fri, 31 Jul 2009 18:36:25 +0000 (18:36 +0000)]
Remove Annotation.h, which is no longer used in the LLVM tree.

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

15 years agoUntil we have a "ALIGN" pseudo instruction, have asm printer emitted a .align
Evan Cheng [Fri, 31 Jul 2009 18:35:56 +0000 (18:35 +0000)]
Until we have a "ALIGN" pseudo instruction, have asm printer emitted a .align
to ensure the instruction that follows a TBB (when the number of table entries
is odd) is 2-byte aligned.
Patch by Sandeep Patel.

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

15 years agoMachineFunction no longer needs Annotation.
Dan Gohman [Fri, 31 Jul 2009 18:35:51 +0000 (18:35 +0000)]
MachineFunction no longer needs Annotation.

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

15 years ago- Teach TBB / TBH offset limits are 510 and 131070 respectively since the offset
Evan Cheng [Fri, 31 Jul 2009 18:28:05 +0000 (18:28 +0000)]
- Teach TBB / TBH offset limits are 510 and 131070 respectively since the offset
  is scaled by two.
- Teach GetInstSizeInBytes about TBB and TBH.

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

15 years agofix some more issues where we expected GetSection to do "get or create"
Chris Lattner [Fri, 31 Jul 2009 18:27:48 +0000 (18:27 +0000)]
fix some more issues where we expected GetSection to do "get or create"

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

15 years agoFix printing of Alloca instructions with null operands.
Dan Gohman [Fri, 31 Jul 2009 18:23:24 +0000 (18:23 +0000)]
Fix printing of Alloca instructions with null operands.

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

15 years agoFix some problems with ASTCallbackVH in its use as a DenseMap key.
Dan Gohman [Fri, 31 Jul 2009 18:21:48 +0000 (18:21 +0000)]
Fix some problems with ASTCallbackVH in its use as a DenseMap key.

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

15 years agoTeach ValueHandleBase to treat DenseMap's special Empty and Tombstone
Dan Gohman [Fri, 31 Jul 2009 18:20:18 +0000 (18:20 +0000)]
Teach ValueHandleBase to treat DenseMap's special Empty and Tombstone
values the same way it treats null pointers. This is needed to allow
CallbackVH to be used as a key in a DenseMap.

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

15 years agoProcess DbgDeclareInst.
Devang Patel [Fri, 31 Jul 2009 18:18:52 +0000 (18:18 +0000)]
Process DbgDeclareInst.

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

15 years agoSplit DenseMapInfo into a separate header file, so that it can be
Dan Gohman [Fri, 31 Jul 2009 18:18:19 +0000 (18:18 +0000)]
Split DenseMapInfo into a separate header file, so that it can be
included separately.

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

15 years agoNormalize target registration code.
Daniel Dunbar [Fri, 31 Jul 2009 18:16:53 +0000 (18:16 +0000)]
Normalize target registration code.

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

15 years agoReapply r77654 with a fix: MachineFunctionPass's getAnalysisUsage
Dan Gohman [Fri, 31 Jul 2009 18:16:33 +0000 (18:16 +0000)]
Reapply r77654 with a fix: MachineFunctionPass's getAnalysisUsage
shouldn't do AU.setPreservesCFG(), because even though CodeGen passes
don't modify the LLVM IR CFG, they may modify the MachineFunction CFG,
and passes like MachineLoop are registered with isCFGOnly set to true.

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

15 years agofix a bunch of failing tests now that MCContext::GetSection doesn't create sections.
Chris Lattner [Fri, 31 Jul 2009 17:47:16 +0000 (17:47 +0000)]
fix a bunch of failing tests now that MCContext::GetSection doesn't create sections.

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

15 years agorefactor section construction in TLOF to be through an explicit
Chris Lattner [Fri, 31 Jul 2009 17:42:42 +0000 (17:42 +0000)]
refactor section construction in TLOF to be through an explicit
initialize method, which can be called when an MCContext is available.

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

15 years agoMove getTrue() and getFalse() to 2.5-like APIs.
Owen Anderson [Fri, 31 Jul 2009 17:39:07 +0000 (17:39 +0000)]
Move getTrue() and getFalse() to 2.5-like APIs.

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

15 years agosplit MCSection stuff out to its own .cpp file, add a new
Chris Lattner [Fri, 31 Jul 2009 17:02:00 +0000 (17:02 +0000)]
split MCSection stuff out to its own .cpp file, add a new
MCSectionWithKind subclass of MCSection.

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

15 years agomove the sectionkind and section classes to TargetLoweringObjectFile.h
Chris Lattner [Fri, 31 Jul 2009 16:47:16 +0000 (16:47 +0000)]
move the sectionkind and section classes to TargetLoweringObjectFile.h

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

15 years agocreate sections with MCSection::Create instead of Context->getOrCreateSection.
Chris Lattner [Fri, 31 Jul 2009 16:43:49 +0000 (16:43 +0000)]
create sections with MCSection::Create instead of Context->getOrCreateSection.
This is needed to allow polymorphic sections.

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

15 years agofix PR4650: we only track sizes for certain objects, so only put something
Chris Lattner [Fri, 31 Jul 2009 16:17:13 +0000 (16:17 +0000)]
fix PR4650: we only track sizes for certain objects, so only put something
into the mergable section if it is one of our special cases.  This could
obviously be improved, but this is the minimal fix and restores us to the
previous behavior.

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

15 years agoWork around a dangling pointer dereference when enumerating NamedMDNodes.
Benjamin Kramer [Fri, 31 Jul 2009 14:22:13 +0000 (14:22 +0000)]
Work around a dangling pointer dereference when enumerating NamedMDNodes.

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

15 years agoFix a struct/class mismatch, to silence a MSVC warning.
Benjamin Kramer [Fri, 31 Jul 2009 11:35:26 +0000 (11:35 +0000)]
Fix a struct/class mismatch, to silence a MSVC warning.

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

15 years agodefine target names for std libcalls.
Sanjiv Gupta [Fri, 31 Jul 2009 07:35:57 +0000 (07:35 +0000)]
define target names for std libcalls.

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

15 years agoAdd this test back, the check pattern was too strict.
Daniel Dunbar [Fri, 31 Jul 2009 03:11:49 +0000 (03:11 +0000)]
Add this test back, the check pattern was too strict.

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

15 years agoRevert r77654, it appears to be causing llvm-gcc bootstrap failures, and many
Daniel Dunbar [Fri, 31 Jul 2009 03:02:41 +0000 (03:02 +0000)]
Revert r77654, it appears to be causing llvm-gcc bootstrap failures, and many
failures when building assorted projects with clang.

--- Reverse-merging r77654 into '.':
U    include/llvm/CodeGen/Passes.h
U    include/llvm/CodeGen/MachineFunctionPass.h
U    include/llvm/CodeGen/MachineFunction.h
U    include/llvm/CodeGen/LazyLiveness.h
U    include/llvm/CodeGen/SelectionDAGISel.h
D    include/llvm/CodeGen/MachineFunctionAnalysis.h
U    include/llvm/Function.h
U    lib/Target/CellSPU/SPUISelDAGToDAG.cpp
U    lib/Target/PowerPC/PPCISelDAGToDAG.cpp
U    lib/CodeGen/LLVMTargetMachine.cpp
U    lib/CodeGen/MachineVerifier.cpp
U    lib/CodeGen/MachineFunction.cpp
U    lib/CodeGen/PrologEpilogInserter.cpp
U    lib/CodeGen/MachineLoopInfo.cpp
U    lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
D    lib/CodeGen/MachineFunctionAnalysis.cpp
D    lib/CodeGen/MachineFunctionPass.cpp
U    lib/CodeGen/LiveVariables.cpp

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

15 years agoRemove this test while I figure out why it is failing.
Daniel Dunbar [Fri, 31 Jul 2009 02:46:36 +0000 (02:46 +0000)]
Remove this test while I figure out why it is failing.

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

15 years agollvm-mc: Match a few X86 instructions.
Daniel Dunbar [Fri, 31 Jul 2009 02:32:59 +0000 (02:32 +0000)]
llvm-mc: Match a few X86 instructions.
 - This is "experimental" code, I am feeling my way around and working out the
   best way to do things (and learning tblgen in the process). Comments welcome,
   but keep in mind this stuff will change radically.

 - This is enough to match "subb" and friends, but not much else. The next step is to
   automatically generate the matchers for individual operands.

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

15 years agoManage MachineFunctions with an analysis Pass instead of the Annotable
Dan Gohman [Fri, 31 Jul 2009 01:52:50 +0000 (01:52 +0000)]
Manage MachineFunctions with an analysis Pass instead of the Annotable
mechanism. To support this, make MachineFunctionPass a little more
complete.

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

15 years agoFix cmake build.
Benjamin Kramer [Fri, 31 Jul 2009 00:35:23 +0000 (00:35 +0000)]
Fix cmake build.

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

15 years agoAdd getOrInsertNamedMetadata().
Devang Patel [Thu, 30 Jul 2009 23:59:04 +0000 (23:59 +0000)]
Add getOrInsertNamedMetadata().

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

15 years agoAdd addElement().
Devang Patel [Thu, 30 Jul 2009 23:57:23 +0000 (23:57 +0000)]
Add addElement().

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

15 years agoWhen fp is not eliminated, instructions with T2_i12 modes will be changed to T2_i8...
Evan Cheng [Thu, 30 Jul 2009 23:29:25 +0000 (23:29 +0000)]
When fp is not eliminated, instructions with T2_i12 modes will be changed to T2_i8 ones. Take that into consideration when determining stack size limit for reserving register scavenging slot.

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

15 years agoRemoved the BigBlock register allocator.
Lang Hames [Thu, 30 Jul 2009 23:18:43 +0000 (23:18 +0000)]
Removed the BigBlock register allocator.

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

15 years agoDo not use abbrev while writing NamedMDNode name.
Devang Patel [Thu, 30 Jul 2009 23:06:35 +0000 (23:06 +0000)]
Do not use abbrev while writing NamedMDNode name.

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

15 years agoEnumerate NamedMDNode elements first.
Devang Patel [Thu, 30 Jul 2009 23:03:43 +0000 (23:03 +0000)]
Enumerate NamedMDNode elements first.

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

15 years agoMove more code back to 2.5 APIs.
Owen Anderson [Thu, 30 Jul 2009 23:03:37 +0000 (23:03 +0000)]
Move more code back to 2.5 APIs.

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

15 years agoHandle NamedMDNode.
Devang Patel [Thu, 30 Jul 2009 23:03:19 +0000 (23:03 +0000)]
Handle NamedMDNode.

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

15 years agoRemove redundant match for frame index from imm8 addrmode, it is handled by the imm12...
David Goodwin [Thu, 30 Jul 2009 22:45:52 +0000 (22:45 +0000)]
Remove redundant match for frame index from imm8 addrmode, it is handled by the imm12 addrmode.

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

15 years agoDarwin assembler now recognizes "orn", so remove workaround.
David Goodwin [Thu, 30 Jul 2009 21:51:41 +0000 (21:51 +0000)]
Darwin assembler now recognizes "orn", so remove workaround.

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

15 years agoDarwin assembler now supports "rrx", so remove workaround.
David Goodwin [Thu, 30 Jul 2009 21:38:40 +0000 (21:38 +0000)]
Darwin assembler now supports "rrx", so remove workaround.

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

15 years agoTwine: Directly support int, long, and long long types.
Daniel Dunbar [Thu, 30 Jul 2009 21:15:14 +0000 (21:15 +0000)]
Twine: Directly support int, long, and long long types.
 - This should resolve Cygwin gcc ambiguities.

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

15 years agoUse CallbackVH in AliasSetTracker to avoid getting stuck with
Dan Gohman [Thu, 30 Jul 2009 20:21:41 +0000 (20:21 +0000)]
Use CallbackVH in AliasSetTracker to avoid getting stuck with
dangling Value*s.

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

15 years agoCleanup and include code selection for some frame index cases.
David Goodwin [Thu, 30 Jul 2009 18:56:48 +0000 (18:56 +0000)]
Cleanup and include code selection for some frame index cases.

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

15 years agoStart using DebugInfoFinder.
Devang Patel [Thu, 30 Jul 2009 18:56:46 +0000 (18:56 +0000)]
Start using DebugInfoFinder.

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

15 years agoDo not use getNamedValue() to lookup NamedMDNode. NamedMDNode is not a GlobalValue.
Devang Patel [Thu, 30 Jul 2009 18:46:29 +0000 (18:46 +0000)]
Do not use getNamedValue() to lookup NamedMDNode. NamedMDNode is not a GlobalValue.
Thanks Benjamin Kramer!

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

15 years agoFix MetadataBase::classof().
Devang Patel [Thu, 30 Jul 2009 18:45:09 +0000 (18:45 +0000)]
Fix MetadataBase::classof().
Thanks Benjamin Kramer!

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

15 years agoTwine: Use raw_ostream::write_hex, remove unused itohexstr method.
Daniel Dunbar [Thu, 30 Jul 2009 18:30:19 +0000 (18:30 +0000)]
Twine: Use raw_ostream::write_hex, remove unused itohexstr method.

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

15 years agoRemove unintended changes.
Daniel Dunbar [Thu, 30 Jul 2009 18:29:44 +0000 (18:29 +0000)]
Remove unintended changes.

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

15 years agos/DebugInfoEnumerator/DebugInfoFinder/g
Devang Patel [Thu, 30 Jul 2009 18:25:15 +0000 (18:25 +0000)]
s/DebugInfoEnumerator/DebugInfoFinder/g

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

15 years agoAdd raw_ostream::write_hex
Daniel Dunbar [Thu, 30 Jul 2009 18:21:23 +0000 (18:21 +0000)]
Add raw_ostream::write_hex

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

15 years agoRemove itohexstr, which only had one user.
Daniel Dunbar [Thu, 30 Jul 2009 18:18:54 +0000 (18:18 +0000)]
Remove itohexstr, which only had one user.

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

15 years agoAdd missing D* register clobbers for Thumb-2 call.
David Goodwin [Thu, 30 Jul 2009 18:01:09 +0000 (18:01 +0000)]
Add missing D* register clobbers for Thumb-2 call.

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

15 years agoTwines: Don't allow implicit conversion from integers, this is too tricky.
Daniel Dunbar [Thu, 30 Jul 2009 17:37:43 +0000 (17:37 +0000)]
Twines: Don't allow implicit conversion from integers, this is too tricky.

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

15 years agowalk DbgRegionStartInst and DbgRegionEndInst
Devang Patel [Thu, 30 Jul 2009 17:30:23 +0000 (17:30 +0000)]
walk DbgRegionStartInst and DbgRegionEndInst

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

15 years agoFix comment.
Devang Patel [Thu, 30 Jul 2009 17:25:33 +0000 (17:25 +0000)]
Fix comment.

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

15 years agoMinor whitespace tidiness.
Dan Gohman [Thu, 30 Jul 2009 17:04:07 +0000 (17:04 +0000)]
Minor whitespace tidiness.

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

15 years agoRename GRAD to GR32_AD, to follow the naming convention of other
Dan Gohman [Thu, 30 Jul 2009 17:02:08 +0000 (17:02 +0000)]
Rename GRAD to GR32_AD, to follow the naming convention of other
classes. And define its SubRegClassList.

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

15 years agoadd a random codegen deficiency.
Chris Lattner [Thu, 30 Jul 2009 16:08:58 +0000 (16:08 +0000)]
add a random codegen deficiency.

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